/* ==========================================================================
   IKEDU STORES — RESPONSIVE MEDIA QUERIES
   ========================================================================== */

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .nav-menu {
        display: none; /* Hidden on tablet/mobile, replaced by slide drawer */
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .gallery-container {
        flex-direction: column-reverse;
    }

    .gallery-thumbnails {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
    }

    .thumb-item {
        width: 80px;
        height: 100px;
        flex-shrink: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px 12px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .hero-section {
        min-height: 70vh;
    }

    .hero-title {
        font-size: 2.125rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .carousel-panel {
        min-height: 420px;
    }

    .carousel-panel-content {
        padding: 32px 24px;
    }

    .carousel-nav-btn {
        width: 38px;
        height: 38px;
    }

    .carousel-nav-btn.prev { left: 12px; }
    .carousel-nav-btn.next { right: 12px; }

    .cart-drawer {
        max-width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .product-actions-overlay {
        display: none; /* Add to cart is accessed via tap / PDP */
    }
}

@media (max-width: 480px) {
    .brand-logo {
        font-size: 1.25rem;
    }

    .brand-logo-image {
        width: 168px;
        height: 58px;
    }

    .section {
        padding: 56px 0;
    }

    .section-title {
        font-size: 1.625rem;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        height: 76svh;
        min-height: 600px;
        max-height: 760px;
    }

    .hero-slide-media {
        background-position: 58% center;
    }

    .hero-slide-overlay {
        background: linear-gradient(90deg, rgba(10, 10, 10, 0.82), rgba(10, 10, 10, 0.34)),
                    linear-gradient(0deg, rgba(10, 10, 10, 0.55), transparent 58%);
    }

    .hero-slide-container {
        padding-bottom: 108px;
    }

    .hero-slider .hero-title {
        max-width: 540px;
        font-size: clamp(2.8rem, 9vw, 4.5rem);
    }

    .hero-slider .hero-text {
        max-width: 460px;
        font-size: 0.96rem;
    }

    .hero-slider .hero-buttons {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .hero-slider-controls {
        left: 24px;
        bottom: 22px;
        gap: 9px;
    }

    .hero-arrow {
        width: 36px;
        height: 36px;
    }

    .hero-progress {
        width: 58px;
        margin-left: 2px;
    }

    .hero-slide-number {
        right: 24px;
        bottom: 30px;
    }

    .campaign-section {
        padding: 58px 0 66px;
    }

    .campaign-panel {
        min-height: 0;
        aspect-ratio: 2.2 / 1;
    }

    .campaign-brand-label {
        right: 10px;
        bottom: 10px;
        padding: 8px 10px;
        font-size: 0.56rem;
        opacity: 1;
        transform: none;
    }

    .campaign-section .carousel-nav-btn {
        width: 34px;
        height: 34px;
        background: rgba(255, 255, 255, 0.82);
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: 78svh;
        min-height: 560px;
    }

    .hero-slide-container {
        padding-inline: 22px;
        padding-bottom: 105px;
    }

    .hero-slider .hero-eyebrow {
        font-size: 0.67rem;
        letter-spacing: 0.2em;
    }

    .hero-slider .hero-title {
        font-size: clamp(2.45rem, 12vw, 3.45rem);
    }

    .hero-slider .hero-text {
        font-size: 0.9rem;
        line-height: 1.65;
    }

    .hero-slider-controls {
        left: 22px;
        bottom: 18px;
    }

    .hero-slide-number {
        right: 20px;
        bottom: 25px;
        font-size: 0.94rem;
    }

    .hero-progress {
        display: none;
    }

    .campaign-section .carousel-nav-btn.prev { left: 30px; }
    .campaign-section .carousel-nav-btn.next { right: 30px; }

    .campaign-panel {
        aspect-ratio: 1.9 / 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .preloader-emblem,
    .preloader-emblem::before,
    .preloader-emblem::after,
    .preloader-logo,
    .preloader-caption span {
        animation: none !important;
    }
}

/* Storefront layout refinements for narrow screens */
.mobile-nav-drawer {
    right: auto;
    left: 0;
    transform: translateX(-100%);
}

.mobile-nav-drawer.open {
    transform: translateX(0);
}

@media (max-width: 768px) {
    .container,
    .container-narrow {
        padding-inline: 18px;
    }

    .header-inner {
        gap: 10px;
        min-height: 68px;
        height: auto;
    }

    .site-header .container {
        padding-inline: 12px;
    }

    .brand-logo {
        flex: 0 1 auto;
        min-width: 0;
    }

    .brand-logo-image {
        width: clamp(112px, 34vw, 150px);
        height: auto;
        max-height: 52px;
        object-fit: contain;
    }

    .mobile-menu-toggle {
        flex: 0 0 auto;
    }

    .header-actions {
        gap: 8px;
        flex: 0 0 auto;
    }

    .action-btn {
        min-width: 38px;
        min-height: 42px;
    }

    .section-title-wrap {
        margin-bottom: 34px;
    }

    .cart-page-layout,
    .checkout-layout,
    .about-story-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 24px !important;
    }

    .checkout-fields-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 0 !important;
    }

    .cart-page-layout > div {
        min-width: 0;
        padding: 20px !important;
    }

    .cart-page-layout > div:first-child > div {
        gap: 14px !important;
    }

    .cart-page-layout > div:first-child img {
        width: 76px !important;
        height: 96px !important;
        flex: 0 0 76px;
    }

    .checkout-layout > div > div {
        padding: 22px !important;
    }

    .about-hero {
        padding: 42px 24px !important;
        margin-bottom: 40px !important;
    }

    .about-hero h1 {
        font-size: clamp(1.8rem, 8vw, 2.4rem) !important;
    }

    .about-story-grid {
        margin-bottom: 48px !important;
    }

    .about-story-grid > div:nth-child(2) {
        padding: 24px !important;
    }

    .guarantee-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 26px !important;
    }

    .product-detail-layout {
        gap: 28px;
        margin: 24px 0 48px;
    }

    .product-price-row {
        flex-wrap: wrap;
        gap: 6px 10px;
    }

    .category-grid,
    .product-grid {
        min-width: 0;
    }

    .site-footer .footer-col {
        min-width: 0;
    }

    /* Homepage editorial sections and shared storefront layouts */
    .hero-slider {
        height: min(680px, 76svh);
        min-height: 460px;
    }

    .hero-slider .hero-title {
        max-width: 12ch;
        font-size: clamp(2.35rem, 8vw, 3.6rem);
        overflow-wrap: anywhere;
    }

    .hero-slide-container {
        padding-top: 28px;
        padding-bottom: 92px;
    }

    .hero-slider .hero-buttons .btn {
        width: auto;
        max-width: 100%;
    }

    .campaign-section .carousel-container {
        padding-inline: 18px;
    }

    .campaign-panel {
        aspect-ratio: 1.7 / 1;
    }

    .category-card-overlay {
        padding: 16px;
    }

    .guarantee-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 24px 18px !important;
    }

    .product-detail-layout > *,
    .gallery-container,
    .product-detail-info {
        min-width: 0;
    }

    .gallery-main {
        min-width: 0;
    }

    .gallery-main img {
        width: 100%;
        height: auto;
        max-height: 72svh;
        object-fit: contain;
    }

    .product-grid > *,
    .category-grid > * {
        min-width: 0;
    }

    .product-title,
    .category-card-title {
        overflow-wrap: anywhere;
    }

    .breadcrumb > * {
        min-width: 0;
        overflow-wrap: anywhere;
    }

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

@media (max-width: 480px) {
    .container,
    .container-narrow {
        padding-inline: 14px;
    }

    .header-inner {
        gap: 6px;
    }

    .brand-logo-image {
        width: clamp(100px, 31vw, 130px);
        max-height: 44px;
    }

    .header-actions {
        gap: 2px;
    }

    .mobile-menu-toggle svg {
        width: 21px;
        height: 21px;
    }

    .breadcrumb {
        flex-wrap: wrap;
        row-gap: 4px;
        font-size: 0.75rem;
    }

    .cart-page-layout > div:first-child > div > div {
        min-width: 0;
    }

    .cart-page-layout > div:first-child > div > div > div:last-child {
        flex-wrap: wrap;
        gap: 12px !important;
    }

    .cart-page-layout h1,
    .checkout-layout ~ h1 {
        font-size: 1.65rem !important;
    }

    .checkout-layout > div > div {
        padding: 18px !important;
    }

    .category-grid {
        gap: 10px;
    }

    .quick-buy-options {
        grid-template-columns: minmax(0, 1fr);
    }

    .quick-buy-actions {
        gap: 5px;
    }

    .quick-quantity button,
    .quick-quantity input {
        width: 24px;
    }

    .quick-add-button {
        padding-inline: 5px;
        font-size: 0.6rem;
        letter-spacing: 0.03em;
    }

    .product-grid {
        gap: 14px 10px;
    }

    .product-info {
        padding: 14px 12px;
    }

    .product-title {
        font-size: 0.85rem;
    }

    .price-selling {
        font-size: 0.95rem;
    }

    .price-original {
        font-size: 0.75rem;
    }

    .category-card-title {
        font-size: 0.9rem;
    }

    .bank-transfer-card {
        padding: 18px;
    }

    .bank-detail-row {
        align-items: flex-start;
        gap: 12px;
    }

    .bank-detail-row > * {
        overflow-wrap: anywhere;
    }

    .hero-slider {
        height: max(460px, 72svh);
        min-height: 0;
        max-height: 620px;
    }

    .hero-slide-container {
        padding-inline: 20px;
        padding-top: 20px;
        padding-bottom: 88px;
    }

    .hero-slider .hero-title {
        max-width: 11ch;
        font-size: clamp(2.1rem, 10.5vw, 3rem);
        line-height: 1.12;
        letter-spacing: 0.015em;
    }

    .hero-slider .hero-text {
        max-width: 34ch;
        font-size: 0.88rem;
    }

    .hero-slider .hero-buttons {
        gap: 12px;
    }

    .hero-slider .hero-buttons .btn {
        padding: 12px 18px;
        font-size: 0.7rem;
    }

    .hero-slider-controls {
        left: 18px;
        bottom: 16px;
    }

    .hero-slide-number {
        right: 16px;
        bottom: 20px;
    }

    .campaign-section .carousel-container {
        padding-inline: 14px;
    }

    .campaign-panel {
        aspect-ratio: 1.25 / 1;
    }

    .campaign-section .carousel-nav-btn.prev { left: 8px; }
    .campaign-section .carousel-nav-btn.next { right: 8px; }

    .category-grid {
        gap: 10px;
    }

    .category-card {
        padding-top: 145%;
    }

    .category-card-overlay {
        padding: 12px;
    }

    .category-card-title {
        font-size: 0.8rem;
        line-height: 1.25;
    }

    .category-card-action {
        font-size: 0.62rem;
    }

    .guarantee-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 24px !important;
    }

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

    .product-detail-layout {
        margin-top: 24px;
    }

    .gallery-container {
        gap: 10px;
    }

    .thumb-item {
        width: 64px;
        height: 78px;
    }

    .pdp-title {
        font-size: 1.55rem;
        overflow-wrap: anywhere;
    }

    .pdp-pricing {
        flex-wrap: wrap;
        gap: 8px 12px;
    }

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

    .product-info {
        padding: 12px 10px;
    }

    .quick-buy-trigger-copy {
        display: block;
    }

    .quick-buy-trigger-title,
    .quick-buy-trigger-note {
        display: block;
    }

    .quick-buy-actions {
        flex-wrap: wrap;
    }

    .quick-add-button {
        min-height: 36px;
        flex-basis: 100%;
    }
}

@media (max-width: 360px) {
    .site-header .container {
        padding-inline: 8px;
    }

    .header-inner {
        gap: 4px;
    }

    .brand-logo-image {
        width: 94px;
        max-height: 40px;
    }

    .header-actions {
        gap: 0;
    }

    .action-btn {
        min-width: 34px;
        padding-inline: 5px;
    }

    .container,
    .container-narrow {
        padding-inline: 12px;
    }

    .product-grid {
        gap: 12px 8px;
    }

    .product-info {
        padding-inline: 8px;
    }
}

/* Purchase controls and checkout flow */
@media (max-width: 768px) {
    .pills-group {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
        gap: 8px;
    }

    .pill-option {
        min-width: 0;
        min-height: 42px;
        padding: 9px 10px;
        font-size: 0.78rem;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .variant-label {
        gap: 12px;
        font-size: 0.74rem;
        letter-spacing: 0.05em;
    }

    .quick-buy-panel {
        padding: 10px;
    }

    .quick-buy-label {
        font-size: 0.64rem;
    }

    .quick-buy-select {
        width: 100%;
        height: 40px;
        padding-inline: 8px;
        font-size: 0.78rem;
    }

    .quick-buy-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .quick-quantity {
        width: max-content;
        min-height: 40px;
    }

    .quick-quantity button {
        width: 38px;
    }

    .quick-quantity input {
        width: 38px;
        font-size: 0.85rem;
    }

    .quick-add-button {
        width: 100%;
        min-height: 42px;
        padding: 10px 12px;
        font-size: 0.7rem;
        letter-spacing: 0.06em;
    }

    .quick-buy-hint {
        font-size: 0.68rem;
    }

    .product-info {
        min-width: 0;
    }

    .product-brand {
        font-size: 0.66rem;
        letter-spacing: 0.07em;
    }

    .product-title {
        font-size: 0.82rem;
        line-height: 1.35;
    }

    .price-selling {
        font-size: 0.9rem;
    }

    .product-detail-info,
    .product-detail-info p,
    .product-detail-info .pdp-sku {
        font-size: 0.88rem;
    }

    .product-detail-info #addToBagForm > div[style*="display: flex"] {
        flex-wrap: wrap;
        gap: 14px !important;
        margin: 20px 0 !important;
    }

    #pdpStockStatus {
        overflow-wrap: anywhere;
        font-size: 0.8rem !important;
    }

    #pdpSubmitBtn {
        min-height: 48px;
        height: auto !important;
        padding: 12px 16px;
        font-size: 0.82rem !important;
    }

    .payment-submit-card {
        padding: 24px !important;
    }

    .payment-submit-card h3 {
        font-size: 0.9rem !important;
        line-height: 1.4;
    }

    .payment-submit-card .form-label {
        font-size: 0.8rem;
    }

    .payment-submit-card .form-control {
        min-width: 0;
        font-size: 0.88rem;
    }

    .bank-detail-value {
        min-width: 0;
        font-size: 0.9rem;
    }

    .bank-detail-value > span {
        font-size: clamp(1rem, 5vw, 1.25rem) !important;
        overflow-wrap: anywhere;
    }

    .bank-transfer-card .bank-detail-row:last-child {
        flex-wrap: wrap;
    }

    .bank-transfer-card .bank-detail-row:last-child > span:last-child {
        font-size: 1.2rem !important;
    }

    .checkout-layout,
    .cart-page-layout {
        font-size: 0.9rem;
    }

    .checkout-layout h2,
    .cart-page-layout h2 {
        font-size: 1.15rem;
    }

    .checkout-layout .form-label,
    .cart-page-layout .form-label {
        font-size: 0.8rem;
    }

    .checkout-layout .form-control {
        min-width: 0;
        font-size: 0.9rem;
    }

    .container-narrow > div[style*="box-shadow: var(--shadow-sm)"] {
        padding: 24px !important;
    }

    .container-narrow > div[style*="box-shadow: var(--shadow-sm)"] > div[style*="max-width: 600px"] > div {
        width: auto !important;
        min-width: 0;
        flex: 1 1 0;
        font-size: 0.65rem !important;
    }

    .container-narrow > div[style*="box-shadow: var(--shadow-sm)"] > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 20px !important;
        font-size: 0.86rem !important;
    }

    .container-narrow > div[style*="box-shadow: var(--shadow-sm)"] h1 {
        font-size: clamp(1.25rem, 5vw, 1.65rem) !important;
        line-height: 1.3;
    }

    .container-narrow > div[style*="box-shadow: var(--shadow-sm)"] h4 {
        overflow-wrap: anywhere;
    }

    .container-narrow > div[style*="padding: 36px"] {
        padding: 22px !important;
    }

    .container-narrow h1 {
        font-size: clamp(1.4rem, 5vw, 1.8rem) !important;
        line-height: 1.3;
    }

    .container-narrow .bank-transfer-card h3 {
        font-size: 0.86rem !important;
        line-height: 1.4;
    }
}

@media (max-width: 480px) {
    .pills-group {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .pill-option {
        min-height: 40px;
        padding: 8px 7px;
        font-size: 0.74rem;
    }

    .variant-label {
        font-size: 0.68rem;
    }

    .variant-selector-wrap {
        margin-bottom: 18px;
    }

    .quick-buy-trigger-title {
        font-size: 0.64rem;
    }

    .quick-buy-trigger-note {
        font-size: 0.63rem;
    }

    .quick-buy-select {
        font-size: 0.75rem;
    }

    .quick-add-button {
        font-size: 0.66rem;
    }

    .payment-submit-card {
        padding: 18px !important;
    }

    .payment-submit-card .form-group > div {
        font-size: 0.7rem !important;
        line-height: 1.5;
    }

    .payment-submit-card button[type="submit"] {
        min-height: 48px;
        height: auto !important;
        padding: 12px 14px;
        font-size: 0.76rem !important;
        line-height: 1.4;
    }

    .bank-detail-row {
        flex-wrap: wrap;
    }

    .bank-transfer-card .bank-detail-row:nth-child(4) .bank-detail-value {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
    }

    .cart-page-layout > div:first-child > div {
        align-items: flex-start;
    }

    .cart-page-layout > div:first-child > div > div {
        overflow-wrap: anywhere;
    }

    .checkout-layout > div > div {
        padding: 16px !important;
    }

    .checkout-layout .btn,
    .cart-page-layout .btn {
        min-height: 46px;
        font-size: 0.76rem;
    }

    .container-narrow > div[style*="box-shadow: var(--shadow-sm)"] {
        padding: 18px !important;
    }

    .container-narrow > div[style*="box-shadow: var(--shadow-sm)"] > div[style*="max-width: 600px"] {
        gap: 4px !important;
    }

    .container-narrow > div[style*="box-shadow: var(--shadow-sm)"] > div[style*="max-width: 600px"] > div span {
        font-size: 0.56rem !important;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .container-narrow > div[style*="padding: 36px"] {
        padding: 16px !important;
    }

    .container-narrow > div[style*="display: inline-flex"] {
        max-width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px !important;
        padding: 8px 12px !important;
    }

    .container-narrow > div[style*="display: inline-flex"] span:last-child {
        overflow-wrap: anywhere;
        font-size: 0.78rem !important;
    }
}

/* Keep mobile text compact while preserving comfortable reading sizes. */
@media (max-width: 768px) {
    body {
        font-size: 0.9rem;
    }

    .section-title {
        font-size: clamp(1.4rem, 4.5vw, 1.75rem);
        line-height: 1.25;
    }

    .section-subtitle {
        font-size: 0.72rem;
        letter-spacing: 0.14em;
    }

    .product-brand {
        font-size: 0.68rem;
    }

    .product-title {
        font-size: 0.84rem;
        line-height: 1.35;
    }

    .price-selling {
        font-size: 0.92rem;
    }

    .quick-buy-label,
    .quick-buy-hint {
        font-size: 0.7rem;
    }

    .quick-buy-trigger-title,
    .quick-buy-trigger-note {
        font-size: 0.7rem;
    }

    .quick-add-button {
        font-size: 0.72rem;
    }

    .checkout-layout .form-label,
    .payment-submit-card .form-label {
        font-size: 0.82rem;
    }

    .payment-submit-card .form-group > div,
    .container-narrow > div[style*="box-shadow: var(--shadow-sm)"] > div[style*="max-width: 600px"] > div span {
        font-size: 0.7rem !important;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 0.88rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .section-desc {
        font-size: 0.86rem;
    }

    .product-title {
        font-size: 0.82rem;
    }

    .price-selling {
        font-size: 0.88rem;
    }

    .quick-buy-label,
    .quick-buy-hint,
    .quick-buy-trigger-title,
    .quick-buy-trigger-note {
        font-size: 0.68rem;
    }

    .quick-add-button {
        font-size: 0.7rem;
    }

    .payment-submit-card .form-group > div {
        font-size: 0.7rem !important;
    }

    .container-narrow > div[style*="box-shadow: var(--shadow-sm)"] > div[style*="max-width: 600px"] > div span {
        font-size: 0.66rem !important;
    }
}
