/* Home responsive rules. Extracted from home.css without visual changes. */

/* ======================================================
   <= 1100px
   ====================================================== */
@media (max-width: 1100px) {
    .site-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .site-artist-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ======================================================
   <= 1000px
   ====================================================== */
@media (max-width: 1000px) {

    .store-footer--platform .store-footer__inner {
        grid-template-columns: 180px minmax(0, 1fr);
        gap: 38px;
    }

    .store-footer--platform .store-footer__links {
        grid-column: 1 / -1;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding-top: 4px;
    }
}

/* ======================================================
   <= 900px
   ====================================================== */
@media (max-width: 900px) {
    .home-hero-slider:not(.home-hero-slider--image) .home-hero-slider__viewport,
    .home-hero-slider:not(.home-hero-slider--image) .home-hero-slide,
    .home-hero-slider:not(.home-hero-slider--image) .home-hero-slide__inner {
        min-height: 440px;
    }

    .site-header-container {
        flex-wrap: wrap;
    }

    .site-header-center {
        order: 3;
        width: 100%;
        flex-basis: 100%;
    }

    .site-type-grid,
    .site-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-best-sellers {
        grid-auto-columns: calc((100% - 18px) / 2);
    }

    .site-quick-buy-modal__dialog {
        grid-template-columns: 1fr;
        width: min(520px, calc(100% - 24px));
        height: auto;
        max-height: calc(100vh - 32px);
        margin: 16px auto 0;
        overflow-y: auto;
    }

    .site-quick-buy-modal__media {
        width: 100%;
        height: 300px;
        min-height: 300px;
    }

    .site-quick-buy-modal__media img {
        padding: 16px;
    }

    .site-quick-buy-modal__content {
        overflow: visible;
    }

    .home-hero-slider:not(.home-hero-slider--image) .home-hero-slide__inner {
        padding: 26px;
    }

    .brand__platform-logo {
        width: 160px;
    }

    .site-hero__visual,
    .site-hero__copy {
        grid-column: 1 / -1;
    }

    .site-artist-card__media {
        height: 320px;
    }

    .home-hero-slider--image .site-hero__dots {
        bottom: 18px;
    }
}

/* ======================================================
   <= 760px
   ====================================================== */
@media (max-width: 760px) {
    .is-front-home .site-header-container {
        width: min(100%, calc(100%));
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 0;
        padding: 10px 20px;
    }

    .is-front-home .site-header-center {
        display: none;
    }

    .is-front-home .brand--platform {
        flex: 0 0 auto;
        margin: 0;
    }

    .is-front-home .brand__platform-logo {
        width: 150px;
    }

    .is-front-home .header-actions {
        flex: 0 0 auto;
        margin-left: auto;
    }

    .is-front-home .cart-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: var(--home-mobile-touch-target);
        height: var(--home-mobile-touch-target);
    }
    .is-front-home .cart-link span {
        top: 4px;
        right: 4px;
    }

    .is-front-home {
        --home-mobile-gutter: 16px;
        --home-mobile-section-space: 30px;
        --home-mobile-touch-target: 44px;
    }

    .site-home .site-section:not(.site-section--artists-full):not(.site-section--best-sellers-full),
    .site-home .site-section--artists-full .site-section__inner,
    .site-home .site-section--best-sellers-full .site-section__inner {
        width: min(100%, calc(100% - (var(--home-mobile-gutter) * 2)));
    }

    .site-home .site-section {
        padding-top: var(--home-mobile-section-space);
        padding-bottom: var(--home-mobile-section-space);
    }

    .site-home .site-section--artists-full,
    .site-home .site-section--best-sellers-full {
        width: 100%;
        max-width: none;
        margin-inline: 0;
    }

    .site-home .site-section__head,
    .site-home .site-section__head > * {
        min-width: 0;
    }

    .site-home .site-section__head {
        margin-bottom: 20px;
    }

    .site-home .site-section__head h1,
    .site-home .site-section__head h2 {
        max-width: 100%;
        line-height: 1.05;
        overflow-wrap: break-word;
        font-size: 26px;
    }

    .site-home .site-button {
        min-height: var(--home-mobile-touch-target);
    }

    .site-home img,
    .site-home picture,
    .site-home video,
    .site-home svg {
        max-width: 100%;
    }
    #tiendas-oficiales {
        padding-top: calc(var(--home-mobile-section-space) + 8px);
        padding-bottom: calc(var(--home-mobile-section-space) + 8px);
    }

    #tiendas-oficiales .site-section__inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    #tiendas-oficiales .site-section__head {
        display: contents;
    }

    #tiendas-oficiales .site-section__head > div {
        order: 1;
        margin-bottom: 20px;
    }

    #tiendas-oficiales .site-artist-grid {
        order: 2;
    }

    .site-artist-grid {
        gap: 10px;
    }

    #tiendas-oficiales .site-section__head > .site-button {
        order: 3;
        width: 100%;
        margin-top: 18px;
    }

    #tiendas-oficiales .site-artist-card,
    #tiendas-oficiales .site-artist-card__media,
    #tiendas-oficiales .site-artist-card__media img,
    #tiendas-oficiales .site-artist-card--visual::after {
        border-radius: 10px;
    }

    #tiendas-oficiales .site-artist-card--visual::after {
        inset: 0;
        z-index: 1;
        width: auto;
        height: auto;
        background: linear-gradient(90deg, rgba(4, 10, 42, 0.86) 0%, rgba(4, 10, 42, 0.58) 42%, rgba(4, 10, 42, 0.08) 78%, rgba(4, 10, 42, 0) 100%);
        pointer-events: none;
    }

    #tiendas-oficiales .site-artist-card__media img {
        object-position: 50% center;
        transform: scale(1.08);
        transform-origin: 2% center;
    }

    #tiendas-oficiales .site-artist-card__overlay {
        top: 0;
        bottom: 0;
        z-index: 2;
        align-items: center;
        justify-content: flex-start;
        padding: 20px;
    }

    #tiendas-oficiales .site-artist-card__logo {
        display: block;
        width: auto;
        height: auto;
        max-width: min(50%, 160px);
        max-height: 56px;
        object-fit: contain;
        object-position: left center;
    }

    .site-section#productos .site-section__head {
        display: flex;
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 12px;
    }

    .site-section#productos .site-section__head > div:first-child {
        min-width: 0;
        flex: 1 1 auto;
    }

    .site-section#productos .site-product-sort {
        flex: 0 1 132px;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 132px;
        max-width: 42vw;
    }

    .site-section#productos .site-product-sort label {
        position: absolute;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        overflow: hidden;
        border: 0;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
    }

    .site-section#productos .site-product-sort__select {
        width: 100%;
        min-width: 0;
    }

    .site-section#productos .site-product-sort__select::after {
        right: 12px;
    }

    .site-section#productos .site-product-sort select {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        padding: 0 36px 0 12px;
    }

    .site-section#productos .site-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .site-section#productos .site-product-card {
        min-width: 0;
        overflow: hidden;
        border-radius: 10px;
    }

    .site-section#productos .site-product-card__media {
        width: 100%;
        aspect-ratio: 1 / 1;
        overflow: hidden;
        border-radius: 10px 10px 0 0;
    }

    .site-section#productos .site-product-card__media img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .site-section#productos .site-product-card__body {
        min-width: 0;
        gap: 5px;
        padding: 12px;
        border-radius: 0 0 10px 10px;
    }

    .site-section#productos .site-product-card__artist {
        max-width: 100%;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .site-section#productos .site-product-card__body h3 {
        display: -webkit-box;
        min-height: 2.5em;
        margin: 0 0 8px;
        overflow: hidden;
        font-size: 0.9rem;
        line-height: 1.25;
        overflow-wrap: anywhere;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .site-section#productos .site-product-card__footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .site-section#productos .site-product-card__price-block {
        min-width: 0;
    }

    .site-section#productos .site-product-card__footer strong {
        font-size: 1rem;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .site-section#productos .site-product-card__footer span {
        font-size: 0.78rem;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .site-section#productos .site-product-card__buy {
        width: 100%;
        min-width: 0;
        padding-right: 8px;
        padding-left: 8px;
        text-align: center;
    }

    .site-section#productos .site-product-card__promo-badge {
        top: 8px;
        right: 8px;
        max-width: calc(100% - 16px);
        padding: 6px 8px;
        font-size: 9px;
        white-space: nowrap;
    }

    .site-section#mas-vendidos .site-section__head {
        display: flex;
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 10px;
    }

    .site-section#mas-vendidos .site-section__head > div:first-child {
        min-width: 0;
        flex: 1 1 auto;
    }

    .site-section#mas-vendidos .site-carousel__actions {
        flex: 0 0 auto;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .site-section#mas-vendidos .site-carousel__button {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
    }

    .site-section#mas-vendidos .site-best-sellers {
        --home-best-sellers-mobile-gap: 12px;
        grid-auto-columns: calc((100% - var(--home-best-sellers-mobile-gap)) / 2);
        gap: var(--home-best-sellers-mobile-gap);
        width: 100%;
        min-width: 0;
        overflow-x: auto;
        overscroll-behavior-x: contain;
    }

    .site-section#mas-vendidos .site-best-seller-card {
        min-width: 0;
    }

    .site-section#mas-vendidos .site-best-seller-card__media {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .site-section#mas-vendidos .site-best-seller-card__media img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .site-section#mas-vendidos .site-best-seller-card__body {
        min-width: 0;
        padding: 12px;
    }

    .site-section#mas-vendidos .site-best-seller-card__body h3 {
        display: -webkit-box;
        min-height: 2.5em;
        overflow: hidden;
        font-size: 0.9rem;
        line-height: 1.25;
        overflow-wrap: anywhere;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .site-section#mas-vendidos .site-best-seller-card__footer {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .site-section#mas-vendidos .site-best-seller-card__price-block {
        min-width: 0;
    }

    .site-section#mas-vendidos .site-best-seller-card__footer .site-button {
        width: 100%;
        min-width: 0;
        padding-right: 8px;
        padding-left: 8px;
        text-align: center;
    }

    .site-quick-buy-modal__actions {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        gap: 8px;
        flex-wrap: nowrap;
        width: 100%;
        min-width: 0;
    }

    .site-quick-buy-modal__actions .site-button {
        min-width: 0;
        min-height: 44px;
        padding: 10px 6px;
        font-size: 10px;
        letter-spacing: 0.02em;
        line-height: 1.1;
        white-space: nowrap;
    }

    .site-quick-buy-modal__actions .site-button--ghost {
        flex: 0.9 1 0;
    }

    .site-quick-buy-modal__actions .site-button--primary {
        flex: 1.1 1 0;
    }

    .site-quick-buy-modal__actions .site-button i {
        margin-right: 4px;
    }

    .store-footer--platform .store-footer__inner,
    .store-footer--platform .store-footer__bottom {
        width: min(100%, calc(100% - 24px));
    }

    .store-footer--platform .store-footer__inner {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 30px;
        padding: 42px 0 30px;
        text-align: center;
    }

    .store-footer--platform .store-footer__brand-block,
    .store-footer--platform .store-footer__newsletter {
        width: 100%;
        text-align: center;
    }

    .store-footer--platform .store-footer__logo-link {
        justify-content: center;
    }

    .store-footer--platform .store-footer__logo {
        width: 168px;
        margin-inline: auto;
        object-position: center;
    }

    .store-footer--platform .store-footer__newsletter-form {
        max-width: none;
        margin-inline: auto;
    }

    .store-footer--platform .store-footer__newsletter-alert,
    .store-footer--platform .store-footer__newsletter-message {
        max-width: none;
        justify-content: center;
        margin-right: auto;
        margin-left: auto;
        text-align: center;
    }

    .store-footer--platform .store-footer__links {
        grid-column: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-items: center;
        gap: 14px 24px;
        width: 100%;
        text-align: center;
    }

    .store-footer--platform .store-footer__links a {
        width: 100%;
        overflow-wrap: anywhere;
        text-align: center;
    }

    .store-footer--platform .store-footer__bottom {
        align-items: center;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        padding-bottom: 26px;
        text-align: center;
    }

    .store-footer--platform .store-footer__bottom > span {
        width: 100%;
        text-align: center;
    }

    .store-footer--platform .store-footer__powered {
        text-align: center;
    }
}

/* ======================================================
   <= 640px
   ====================================================== */
@media (max-width: 640px) {
    .home-hero-slider:not(.home-hero-slider--image) .home-hero-slider__viewport,
    .home-hero-slider:not(.home-hero-slider--image) .home-hero-slide,
    .home-hero-slider:not(.home-hero-slider--image) .home-hero-slide__inner {
        min-height: 0;
    }

    .site-home__footer {
        width: min(100%, calc(100% - (var(--home-mobile-gutter) * 2)));
    }

    .home-hero-slider:not(.home-hero-slider--image) .home-hero-slide__inner {
        width: min(100%, calc(100% - (var(--home-mobile-gutter) * 2)));
        gap: 22px;
        padding: 20px;
        border-radius: 28px;
    }

    .site-product-grid,
    .site-artist-grid,
    .site-type-grid,
    .site-hero__stat-grid {
        grid-template-columns: 1fr;
    }

    .site-home .site-section__head,
    .site-product-card__footer,
    .site-home__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .site-best-sellers {
        grid-auto-columns: 84%;
    }

    .site-product-card__footer,
    .site-quick-buy-modal__actions {
        align-items: stretch;
    }

    .site-quick-buy-modal__content {
        padding: 22px;
    }

    .site-topbar-search__result {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .site-topbar-search__result--store {
        min-height: 88px;
        padding: 10px 14px;
    }

    .site-topbar-search__price,
    .site-topbar-search__price-stack {
        grid-column: 2;
    }

    .site-topbar-search__store-content {
        gap: 12px;
    }

    .site-topbar-search__store-logo-wrap {
        width: 88px;
        height: 58px;
        flex-basis: 88px;
    }

    .site-topbar-search__store-logo {
        max-width: 88px;
        max-height: 56px;
    }

    .site-topbar-search__store-fallback {
        min-width: 52px;
        min-height: 52px;
        font-size: 12px;
    }

    .site-topbar-search__store-label {
        font-size: 10px;
    }

    .site-topbar-search__store-arrow {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
    }

    .brand__platform-logo {
        width: 138px;
        height: 34px;
    }

    .home-hero-slide__image {
        min-height: 0;
        height: auto;
        object-fit: contain;
    }

    .site-artist-card__media {
        height: 120px;
    }

    .site-artist-card__overlay {
    }

    .site-artist-card__logo {
        max-width: min(60%, 140px);
        max-height: 40px;
    }
}

/* ======================================================
   <= 480px
   ====================================================== */
@media (max-width: 480px) {
    .store-footer--platform .store-footer__newsletter-form {
        grid-template-columns: minmax(0, 1fr) 50px;
    }

    .store-footer--platform .store-footer__newsletter-button {
        width: 50px;
    }

    .store-footer--platform .store-footer__links {
        grid-template-columns: 1fr;
    }
}
