/* =====================================
   KPOPIMO RESPONSIVE FOUNDATION
   Shared breakpoint refinements for the existing design system.
===================================== */

.mobile-nav-toggle {
    display: none;
}

@media (max-width: 1024px) {
    :root {
        --section-spacing: 100px;
    }

    .container {
        width: min(var(--container-width), calc(100% - 64px));
    }

    .details-hero-grid,
    .shop-category-hero-grid,
    .editors-pick-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .details-content {
        max-width: none;
    }

    .shop-category-visual {
        margin-top: 0;
    }

    .related-grid,
    .related-articles .editorial-grid,
    .included-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-large {
        height: 560px;
    }

    .gallery-half,
    .gallery-wide,
    .gallery-small {
        height: 420px;
    }
}

@media (max-width: 768px) {
    html,
    body {
        max-width: 100%;
        overflow-x: clip;
    }

    :root {
        --section-spacing: 80px;
    }

    .container {
        width: min(var(--container-width), calc(100% - 40px));
    }

    .ai-transparency-bar {
        height: 32px;
    }

    .ai-transparency-text {
        font-size: 10px;
        line-height: 1.35;
        text-align: center;
    }

    .ai-transparency-text span {
        margin: 0 5px;
    }

    .site-header {
        top: 32px;
        height: 66px;
    }

    .site-header .container {
        position: relative;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 16px;
    }

    .logo img {
        width: auto;
        max-width: 190px;
        height: 32px;
    }

    .main-nav {
        display: none;
    }

    .mobile-nav-toggle {
        width: 48px;
        height: 48px;
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        border: 0;
        border-radius: 50%;
        background: transparent;
        color: var(--color-text);
        cursor: pointer;
    }

    .mobile-nav-toggle span {
        width: 22px;
        height: 2px;
        display: block;
        background: currentColor;
        transition: transform .25s ease, opacity .25s ease;
    }

    .mobile-nav-toggle:focus-visible {
        outline: 2px solid var(--color-primary);
        outline-offset: 3px;
    }

    .site-header.mobile-nav-open .mobile-nav-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .site-header.mobile-nav-open .mobile-nav-toggle span:nth-child(2) {
        opacity: 0;
    }

    .site-header.mobile-nav-open .mobile-nav-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .site-header.mobile-nav-open .main-nav {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        left: 0;
        display: block;
        padding: 12px;
        overflow: visible;
        border: 1px solid rgba(0, 0, 0, .08);
        border-radius: 18px;
        background: #fff;
        box-shadow: 0 18px 38px rgba(0, 0, 0, .12);
    }

    .main-nav ul {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 0;
    }

    .main-nav a {
        display: flex;
        align-items: center;
        min-height: 48px;
        padding: 0 14px;
        border-radius: 10px;
        font-size: 15px;
    }

    .main-nav a:hover,
    .main-nav a:focus-visible {
        background: #faf8f5;
    }

    main {
        padding-top: 98px;
    }

    .hero {
        min-height: 540px;
        height: auto;
    }

    /* Main landing-page heroes use a shallower mobile frame than desktop. */
    .fashion-hero,
    .beauty-hero,
    .blog-hero,
    .shop-hero {
        min-height: clamp(430px, 70vw, 540px);
    }

    .home-hero .hero-image,
    .fashion-hero .hero-image,
    .beauty-hero .hero-image,
    .blog-hero .hero-image,
    .shop-hero .hero-image,
    .about-hero .hero-image {
        width: calc(100% + 40px);
        margin-left: -20px;
    }

    .hero-content {
        min-height: 0;
        max-width: 100%;
        padding: 112px 0 76px;
    }

    .hero .container {
        min-width: 0;
    }

    .hero h1,
    .fashion-hero h1,
    .beauty-hero h1,
    .blog-hero h1,
    .shop-hero h1 {
        font-size: clamp(2.8rem, 10vw, 4.5rem);
    }

    .hero p,
    .fashion-hero p,
    .beauty-hero p,
    .blog-hero p,
    .shop-hero p {
        font-size: 1.05rem;
    }

    .article-hero {
        padding-bottom: 48px;
    }

    .article-hero:not(.hero-static) .article-hero-viewport {
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .article-hero:not(.hero-static) .article-hero-viewport .article-hero-zoom img {
        height: 100%;
        margin-top: 0;
        object-position: center;
        transform: none !important;
    }

    .article-hero:not(.hero-static) .article-hero-zoom {
        animation: none;
    }

    .article-header,
    .details-hero {
        padding-bottom: 80px;
    }

    .article-header h1,
    .details-content h1 {
        font-size: clamp(2.5rem, 8vw, 4.25rem);
    }

    .article-subtitle {
        font-size: clamp(1.15rem, 3.5vw, 1.45rem);
    }

    .article-content p,
    .details-text p,
    .love-box p,
    .included-card p,
    .editorial-disclaimer p {
        font-size: 17px;
    }

    .article-intro {
        font-size: 20px !important;
    }

    .article-content h2 {
        margin-top: 64px;
        font-size: clamp(2rem, 6vw, 2.5rem);
    }

    .details-meta {
        margin-top: 38px;
    }

    .details-section,
    .details-love,
    .details-included,
    .related-products,
    .details-gallery {
        padding-bottom: 80px;
    }

    .love-box {
        padding: 48px;
    }

    .included-card {
        padding: 32px;
    }

    .gallery-large,
    .gallery-half,
    .gallery-third,
    .gallery-wide,
    .gallery-small {
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .shop-category-hero {
        padding: 64px 0 100px;
    }

    .shop-category-hero p {
        margin-bottom: 36px;
        font-size: 1.1rem;
        line-height: 1.75;
    }

    .category-navigation {
        gap: 12px;
    }

    .category-navigation a,
    .hero-button {
        min-height: 48px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 40px 24px;
    }

    .section-header {
        margin-bottom: 52px;
    }

    .section-header h2,
    .outfits .section-header h2 {
        font-size: clamp(2.25rem, 6vw, 3rem);
    }

    .section-header p,
    .outfits .section-header p {
        font-size: 17px;
        line-height: 1.7;
    }

    .newsletter {
        padding: 80px 0;
    }

    .newsletter-box {
        padding: 48px;
    }

    .newsletter h2 {
        font-size: clamp(2rem, 7vw, 2.75rem);
    }

    .footer-top {
        gap: 48px;
    }

    @media (hover: none) {
        .hero-button:hover,
        .newsletter-form button:hover,
        .gallery-grid figure:hover img,
        .footer-social-icons a:hover {
            transform: none;
        }
    }
}

@media (max-width: 600px) {
    :root {
        --section-spacing: 64px;
    }

    .container {
        width: min(var(--container-width), calc(100% - 32px));
    }

    .ai-transparency-text {
        font-size: 9px;
        letter-spacing: 0;
    }

    .ai-transparency-bar {
        height: 40px;
    }

    .site-header {
        top: 40px;
    }

    .site-header .container {
        column-gap: 14px;
    }

    .logo img {
        max-width: min(52vw, 168px);
        height: 29px;
    }

    .hero {
        min-height: 430px;
    }

    .fashion-hero,
    .beauty-hero,
    .blog-hero,
    .shop-hero {
        min-height: clamp(370px, 100vw, 430px);
    }

    .hero-content {
        padding: 64px 0 48px;
    }

    main {
        padding-top: 106px;
    }

    .hero h1,
    .fashion-hero h1,
    .beauty-hero h1,
    .blog-hero h1,
    .shop-hero h1 {
        font-size: clamp(2.45rem, 12vw, 3.6rem);
        line-height: 1.05;
    }

    .home-hero .hero-image {
        background-position: 45% 54%;
    }

    .fashion-hero .hero-image {
        background-position: 82% center;
    }

    .beauty-hero .hero-image {
        background-position: center;
    }

    .blog-hero .hero-image {
        background-position: center;
    }

    .shop-hero .hero-image {
        background-position: 58% center;
    }

    .about-hero .hero-image {
        background-position: 46% center;
    }

    .home-hero .hero-content {
        max-width: min(100%, 340px);
    }

    .home-hero h1 {
        font-size: clamp(2.25rem, 9.8vw, 2.7rem);
    }

    .hero p {
        margin-bottom: 34px;
        font-size: 1rem;
        line-height: 1.65;
    }

    .article-hero-viewport {
        border-radius: 18px;
    }

    .article-hero:not(.hero-static) .article-hero-viewport .article-hero-zoom img {
        height: 100%;
        margin-top: 0;
    }

    .article-header,
    .details-hero {
        padding-bottom: 64px;
    }

    .article-header h1,
    .details-content h1 {
        margin-bottom: 18px;
        font-size: clamp(2.2rem, 10vw, 3.1rem);
    }

    .article-category,
    .details-category {
        font-size: 12px;
        letter-spacing: 1.5px;
    }

    .article-content p,
    .details-text p,
    .love-box p,
    .included-card p,
    .editorial-disclaimer p {
        font-size: 16px;
        line-height: 1.8;
    }

    .article-content h2 {
        margin: 52px 0 22px;
        font-size: clamp(1.8rem, 8vw, 2.25rem);
    }

    .article-image {
        margin: 36px 0;
        border-radius: 18px;
    }

    .details-meta,
    .included-grid,
    .related-grid,
    .related-articles .editorial-grid,
    .product-grid,
    .shop-grid,
    .category-grid,
    .editorial-grid {
        grid-template-columns: 1fr;
    }

    .editorial-large {
        grid-column: auto;
    }

    .details-meta-card,
    .included-card {
        padding: 26px;
    }

    .section-heading {
        margin-bottom: 44px;
    }

    .love-box {
        padding: 36px 26px;
        border-radius: 20px;
    }

    .editorial-disclaimer {
        margin: 52px auto 64px;
        padding-top: 0;
    }

    .gallery-grid {
        gap: 18px;
    }

    .gallery-large,
    .gallery-half,
    .gallery-third,
    .gallery-wide,
    .gallery-small {
        grid-column: span 12;
        aspect-ratio: 4 / 3;
    }

    .shop-category-hero {
        padding: 48px 0 72px;
    }

    .shop-category-hero h1 {
        font-size: clamp(2.35rem, 11vw, 3.2rem);
    }

    .shop-category-hero p {
        font-size: 1rem;
    }

    .category-navigation a {
        flex: 1 1 calc(50% - 6px);
        padding: 12px 16px;
        font-size: 14px;
    }

    .category-overlay {
        padding: 22px;
    }

    .category-overlay h3 {
        font-size: 26px;
    }

    .outfit-info,
    .beauty-info,
    .article-info,
    .shop-content {
        padding-top: 16px;
    }

    .outfit-info h3,
    .beauty-info h3,
    .article-info h3,
    .shop-content h3 {
        font-size: 22px;
    }

    .contact-content {
        padding: 72px 0;
    }

    .contact-content h2 {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }

    .contact-content p {
        font-size: 17px;
        line-height: 1.8;
    }

    .contact-card {
        margin-top: 40px;
        padding: 28px 22px;
        border-radius: 20px;
    }

    .contact-email {
        font-size: clamp(1.35rem, 7vw, 1.8rem);
        overflow-wrap: anywhere;
    }

    .retailer-card {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
        padding: 28px 24px;
    }

    .retailer-name {
        font-size: 21px;
    }

    .retailer-card p {
        font-size: 16px;
    }

    .retailer-link {
        margin-left: 0;
    }

    .hero-button {
        width: 100%;
        padding: 16px 24px;
    }

    .newsletter {
        padding: 64px 0;
    }

    .newsletter-box {
        padding: 36px 22px;
        border-radius: 22px;
    }

    .newsletter p {
        margin-bottom: 30px;
        font-size: 16px;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 12px;
    }

    .newsletter-form input,
    .newsletter-form button {
        width: 100%;
        max-width: none;
        min-height: 52px;
        padding: 15px 18px;
    }

    .footer {
        padding: 48px 0 26px;
    }

    .footer-top,
    .footer-bottom,
    .footer-legal {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-top {
        gap: 36px;
        padding-bottom: 34px;
    }

    .footer-bottom {
        margin-top: 28px;
        gap: 20px;
    }

    .footer-legal {
        gap: 14px;
    }
}

@media (max-width: 380px) {
    .logo img {
        max-width: 148px;
    }
}
