/*
 * responsive.css
 * Theme: imty-vai-custom-theme
 * Description: Full responsive breakpoints for all components.
 *              Breakpoints: 1280px | 1024px | 768px | 480px | 360px
 *              Also includes @media print and @media (prefers-color-scheme: dark)
 */

/* =========================================================
   TABLE OF CONTENTS
   1.  Large Laptop  (max-width: 1280px)
   2.  Tablet Landscape (max-width: 1024px)
   3.  Tablet Portrait  (max-width: 768px)
   4.  Mobile           (max-width: 480px)
   5.  Small Mobile     (max-width: 360px)
   6.  Print Styles
   7.  Dark Mode  (prefers-color-scheme: dark)
   ========================================================= */

/* ==========================================================
   1. LARGE LAPTOP  —  max-width: 1280px
   ========================================================== */
@media screen and (max-width: 1280px) {

    /* ----- Layout & Container ----- */
    .container,
    .site-container {
        max-width: 1160px;
        padding-left: 24px;
        padding-right: 24px;
    }

    /* ----- Header ----- */
    .site-header {
        padding: 0 24px;
    }

    .main-navigation .nav-menu > li > a {
        padding: 0 14px;
        font-size: 0.9rem;
    }

    .mega-menu {
        width: 960px;
    }

    /* ----- Hero Slider ----- */
    .hero-slider,
    .hero-section {
        min-height: 520px;
    }

    .hero-slide__title {
        font-size: clamp(2rem, 3vw, 2.75rem);
    }

    .hero-slide__subtitle {
        font-size: 1rem;
    }

    /* ----- Features Bar ----- */
    .features-bar .features-list {
        gap: 16px;
    }

    .features-bar .feature-item {
        padding: 14px 16px;
    }

    /* ----- Category Grid ----- */
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }

    /* ----- Products Grid ----- */
    .products-grid,
    ul.products {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    /* ----- Footer ----- */
    .footer-widgets {
        grid-template-columns: repeat(4, 1fr);
        gap: 24px;
    }

    /* ----- Sticky Tabs ----- */
    .sticky-product-tabs .tab-item a {
        font-size: 0.85rem;
        padding: 10px 14px;
    }

    /* ----- Search Drawer ----- */
    .search-drawer {
        width: 480px;
    }
}

/* ==========================================================
   2. TABLET LANDSCAPE  —  max-width: 1024px
   ========================================================== */
@media screen and (max-width: 1024px) {

    /* ----- Layout & Container ----- */
    .container,
    .site-container {
        max-width: 100%;
        padding-left: 20px;
        padding-right: 20px;
    }

    /* ----- Header ----- */
    .site-header {
        padding: 0 20px;
        position: relative;
    }

    .site-header__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 10px;
    }

    /* Hide mega navigation, show hamburger */
    .main-navigation {
        display: none;
    }

    .mobile-nav-toggle,
    .hamburger-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: transparent;
        border: 1.5px solid var(--color-border, #e5e7eb);
        border-radius: 6px;
        cursor: pointer;
        padding: 0;
        z-index: 1100;
        color: var(--color-text, #111827);
        transition: background 0.2s ease, border-color 0.2s ease;
    }

    .mobile-nav-toggle:hover,
    .hamburger-btn:hover {
        background: var(--color-primary, #2563eb);
        border-color: var(--color-primary, #2563eb);
        color: #fff;
    }

    .hamburger-btn .bar {
        display: block;
        width: 22px;
        height: 2px;
        background: currentColor;
        border-radius: 2px;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .hamburger-btn .bar + .bar {
        margin-top: 5px;
    }

    .hamburger-btn.is-active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger-btn.is-active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger-btn.is-active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Mobile Navigation Drawer */
    .mobile-navigation {
        display: block;
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100%;
        background: var(--color-surface, #fff);
        z-index: 2000;
        overflow-y: auto;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
        transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 60px 0 40px;
    }

    .mobile-navigation.is-open {
        left: 0;
    }

    .mobile-nav-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s ease;
    }

    .mobile-nav-overlay.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-navigation .nav-menu {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .mobile-navigation .nav-menu > li > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 13px 20px;
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--color-text, #111827);
        border-bottom: 1px solid var(--color-border, #e5e7eb);
        text-decoration: none;
        transition: background 0.2s;
    }

    .mobile-navigation .nav-menu > li > a:hover {
        background: var(--color-surface-alt, #f9fafb);
        color: var(--color-primary, #2563eb);
    }

    .mobile-navigation .sub-menu {
        display: none;
        list-style: none;
        margin: 0;
        padding: 0;
        background: var(--color-surface-alt, #f9fafb);
    }

    .mobile-navigation .sub-menu.is-open {
        display: block;
    }

    .mobile-navigation .sub-menu li a {
        display: block;
        padding: 10px 20px 10px 36px;
        font-size: 0.875rem;
        color: var(--color-text-muted, #6b7280);
        text-decoration: none;
        border-bottom: 1px solid var(--color-border, #e5e7eb);
        transition: color 0.2s;
    }

    .mobile-navigation .sub-menu li a:hover {
        color: var(--color-primary, #2563eb);
    }

    /* Mega menu completely hidden at this breakpoint */
    .mega-menu,
    .mega-menu-wrapper {
        display: none !important;
    }

    /* Header top bar */
    .header-topbar {
        display: none;
    }

    /* ----- Hero Slider ----- */
    .hero-slider,
    .hero-section {
        min-height: 440px;
    }

    .hero-slide__content {
        padding: 0 40px;
        max-width: 80%;
    }

    .hero-slide__title {
        font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    }

    .hero-slide__subtitle {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .hero-slide__cta {
        padding: 12px 28px;
        font-size: 0.9rem;
    }

    .hero-slider .slick-dots,
    .hero-slider .swiper-pagination {
        bottom: 14px;
    }

    /* ----- Features Bar ----- */
    .features-bar .features-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .features-bar .feature-item {
        padding: 14px;
    }

    /* ----- Category Grid ----- */
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    .category-card__title {
        font-size: 0.9rem;
    }

    /* ----- Products Grid ----- */
    .products-grid,
    ul.products {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    /* ----- Section Heading ----- */
    .section-heading .section-title {
        font-size: clamp(1.4rem, 2.5vw, 1.8rem);
    }

    /* ----- Footer ----- */
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }

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

    /* ----- Sticky Tabs ----- */
    .sticky-product-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .sticky-product-tabs::-webkit-scrollbar {
        display: none;
    }

    .sticky-product-tabs .tab-list {
        min-width: max-content;
    }

    /* ----- WhatsApp Button ----- */
    .whatsapp-float .whatsapp-label {
        display: none;
    }

    .whatsapp-float {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        padding: 0;
        justify-content: center;
    }

    /* ----- Modal ----- */
    .modal-wrapper {
        padding: 20px;
    }

    .modal-dialog {
        width: 90vw;
        max-width: 600px;
    }

    /* ----- Search Drawer ----- */
    .search-drawer {
        width: 100%;
        max-width: 100%;
    }

    /* ----- Sidebar ----- */
    .sidebar-primary {
        display: none;
    }

    .content-area {
        width: 100%;
        max-width: 100%;
    }

    /* ----- WooCommerce Cart & Checkout ----- */
    .woocommerce-cart .cart-collaterals {
        float: none;
        width: 100%;
    }

    .woocommerce .woocommerce-checkout .col2-set {
        float: none;
        width: 100%;
    }

    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review {
        float: none;
        width: 100%;
    }
}

/* ==========================================================
   3. TABLET PORTRAIT  —  max-width: 768px
   ========================================================== */
@media screen and (max-width: 768px) {

    /* ----- Base ----- */
    body {
        font-size: 15px;
    }

    /* ----- Layout & Container ----- */
    .container,
    .site-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* ----- Header ----- */
    .site-header {
        padding: 12px 16px;
    }

    .site-logo img {
        max-height: 44px;
        width: auto;
    }

    .header-actions {
        gap: 10px;
    }

    .header-search-form {
        display: none;
    }

    .header-search-toggle {
        display: flex;
    }

    /* ----- Hero Slider ----- */
    .hero-slider,
    .hero-section {
        min-height: 360px;
        max-height: 420px;
    }

    .hero-slide {
        min-height: 360px;
    }

    .hero-slide__content {
        padding: 0 24px;
        max-width: 100%;
        text-align: center;
    }

    .hero-slide__title {
        font-size: clamp(1.4rem, 4vw, 2rem);
        line-height: 1.3;
        margin-bottom: 10px;
    }

    .hero-slide__subtitle {
        font-size: 0.875rem;
        margin-bottom: 16px;
    }

    .hero-slide__cta-group {
        justify-content: center;
        gap: 10px;
    }

    .hero-slide__cta {
        padding: 10px 22px;
        font-size: 0.875rem;
    }

    .hero-slider .slick-arrow,
    .hero-slider .swiper-button-next,
    .hero-slider .swiper-button-prev {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    /* ----- Features Bar ----- */
    .features-bar {
        padding: 16px 0;
    }

    .features-bar .features-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .features-bar .feature-item {
        padding: 12px;
        border-radius: 8px;
    }

    .feature-item__icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .feature-item__title {
        font-size: 0.8rem;
    }

    .feature-item__text {
        font-size: 0.75rem;
    }

    /* ----- Section Headings ----- */
    .section-heading {
        margin-bottom: 20px;
    }

    .section-heading .section-title {
        font-size: 1.3rem;
    }

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

    .category-card {
        border-radius: 8px;
    }

    .category-card__image {
        aspect-ratio: 4/3;
    }

    /* ----- Products Grid ----- */
    .products-grid,
    ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-card {
        border-radius: 8px;
    }

    .product-card__title {
        font-size: 0.875rem;
    }

    .product-card__price {
        font-size: 0.9rem;
    }

    /* ----- Tabs ----- */
    .section-tabs .tab-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .section-tabs .tab-nav::-webkit-scrollbar {
        display: none;
    }

    .section-tabs .tab-btn {
        white-space: nowrap;
        padding: 8px 14px;
        font-size: 0.8rem;
    }

    /* ----- Sticky Tabs ----- */
    .sticky-product-tabs {
        display: none;
    }

    /* ----- Banner / Promo ----- */
    .promo-banner {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .promo-banner__item {
        min-height: 160px;
    }

    /* ----- Testimonials ----- */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* ----- Blog Posts ----- */
    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* ----- Footer ----- */
    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .footer-widget__title {
        font-size: 0.95rem;
    }

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

    .footer-payment-icons {
        justify-content: center;
        flex-wrap: wrap;
    }

    /* ----- WhatsApp Button ----- */
    .whatsapp-float {
        bottom: 72px;
        right: 16px;
        width: 46px;
        height: 46px;
    }

    /* ----- Back to Top ----- */
    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    /* ----- Modal ----- */
    .modal-dialog {
        width: 95vw;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 10px;
    }

    .modal-header {
        padding: 14px 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        padding: 12px 16px;
        flex-direction: column;
        gap: 8px;
    }

    .modal-footer .btn {
        width: 100%;
    }

    /* Quick View Modal */
    .quick-view-modal .qv-product-gallery {
        width: 100%;
        float: none;
        margin-bottom: 16px;
    }

    .quick-view-modal .qv-product-info {
        width: 100%;
        float: none;
    }

    /* ----- Search Drawer ----- */
    .search-drawer {
        width: 100%;
        top: 0;
        right: 0;
        height: 100%;
        border-radius: 0;
    }

    .search-drawer__inner {
        padding: 20px 16px;
    }

    /* ----- WooCommerce Cart ----- */
    .woocommerce-cart table.cart {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .woocommerce-cart .cart-collaterals {
        float: none;
        width: 100%;
        clear: both;
        margin-top: 24px;
    }

    .woocommerce-cart .cart-collaterals .cart_totals {
        float: none;
        width: 100%;
    }

    /* ----- WooCommerce Checkout ----- */
    .woocommerce-checkout .col2-set .col-1,
    .woocommerce-checkout .col2-set .col-2 {
        float: none;
        width: 100%;
    }

    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review {
        float: none;
        width: 100%;
    }

    /* ----- WooCommerce My Account ----- */
    .woocommerce-account .woocommerce-MyAccount-navigation {
        float: none;
        width: 100%;
        margin-bottom: 20px;
    }

    .woocommerce-account .woocommerce-MyAccount-content {
        float: none;
        width: 100%;
    }

    /* ----- Single Product ----- */
    .woocommerce-single .woocommerce-product-gallery {
        float: none;
        width: 100%;
        margin-bottom: 24px;
    }

    .woocommerce-single .entry-summary {
        float: none;
        width: 100%;
        clear: both;
    }

    /* Breadcrumb */
    .woocommerce .woocommerce-breadcrumb {
        font-size: 0.8rem;
    }

    /* ----- Notification Toast ----- */
    .toast-container {
        width: 100%;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 8px;
    }

    .toast {
        width: 100%;
        border-radius: 6px 6px 0 0;
    }
}

/* ==========================================================
   4. MOBILE  —  max-width: 480px
   ========================================================== */
@media screen and (max-width: 480px) {

    /* ----- Base ----- */
    body {
        font-size: 14px;
    }

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.35rem; }
    h3 { font-size: 1.15rem; }
    h4 { font-size: 1rem; }

    /* ----- Layout & Container ----- */
    .container,
    .site-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* ----- Header ----- */
    .site-header {
        padding: 10px 12px;
    }

    .site-logo img {
        max-height: 38px;
    }

    .header-cart-count {
        width: 16px;
        height: 16px;
        font-size: 10px;
    }

    /* ----- Hero Slider ----- */
    .hero-slider,
    .hero-section {
        min-height: 280px;
        max-height: 340px;
    }

    .hero-slide {
        min-height: 280px;
    }

    .hero-slide__content {
        padding: 0 16px;
    }

    .hero-slide__title {
        font-size: clamp(1.15rem, 5vw, 1.5rem);
        line-height: 1.25;
    }

    .hero-slide__subtitle {
        font-size: 0.8rem;
        display: none; /* hide subtitle on mobile to save space */
    }

    .hero-slide__badge {
        font-size: 0.7rem;
        padding: 3px 8px;
    }

    .hero-slide__cta {
        padding: 9px 18px;
        font-size: 0.8rem;
    }

    .hero-slider .slick-arrow,
    .hero-slider .swiper-button-next,
    .hero-slider .swiper-button-prev {
        display: none;
    }

    /* ----- Features Bar ----- */
    .features-bar .features-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .features-bar .feature-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
    }

    .feature-item__icon {
        flex-shrink: 0;
        width: 32px;
        height: 32px;
    }

    /* ----- Section Headings ----- */
    .section-heading .section-title {
        font-size: 1.15rem;
    }

    .section-heading .view-all-link {
        font-size: 0.8rem;
    }

    /* ----- Category Grid ----- */
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .category-card__title {
        font-size: 0.78rem;
        padding: 6px 8px;
    }

    /* ----- Products Grid ----- */
    .products-grid,
    ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .product-card__body {
        padding: 10px;
    }

    .product-card__title {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

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

    .product-card__add-to-cart {
        padding: 8px 12px;
        font-size: 0.78rem;
        width: 100%;
    }

    /* ----- Blog Posts ----- */
    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    /* ----- Footer ----- */
    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-widget {
        border-bottom: 1px solid var(--color-border, #e5e7eb);
        padding-bottom: 20px;
    }

    .footer-widget:last-child {
        border-bottom: none;
    }

    /* Accordion footer widgets on mobile */
    .footer-widget__title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .footer-widget__title::after {
        content: "+";
        font-size: 1.2rem;
        line-height: 1;
        font-weight: 300;
        transition: transform 0.2s ease;
    }

    .footer-widget__title.is-open::after {
        content: "−";
    }

    .footer-widget__content {
        display: none;
        margin-top: 12px;
    }

    .footer-widget__content.is-open {
        display: block;
    }

    .footer-copyright {
        text-align: center;
        font-size: 0.8rem;
    }

    /* ----- WhatsApp Button ----- */
    .whatsapp-float {
        bottom: 64px;
        right: 12px;
        width: 44px;
        height: 44px;
    }

    .whatsapp-float svg,
    .whatsapp-float i {
        font-size: 20px;
    }

    /* ----- Back to Top ----- */
    .back-to-top {
        bottom: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
    }

    /* ----- Sticky Bottom Bar (mobile) ----- */
    .sticky-bottom-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--color-surface, #fff);
        border-top: 1px solid var(--color-border, #e5e7eb);
        z-index: 900;
        height: 56px;
    }

    .sticky-bottom-bar__item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        font-size: 0.65rem;
        color: var(--color-text-muted, #6b7280);
        text-decoration: none;
        padding: 6px 4px;
        transition: color 0.2s;
    }

    .sticky-bottom-bar__item.is-active,
    .sticky-bottom-bar__item:hover {
        color: var(--color-primary, #2563eb);
    }

    .sticky-bottom-bar__item svg,
    .sticky-bottom-bar__item i {
        font-size: 20px;
    }

    /* Push body content up so it's not hidden behind sticky bar */
    body {
        padding-bottom: 56px;
    }

    /* ----- Modal ----- */
    .modal-dialog {
        width: 100%;
        min-height: 60vh;
        max-height: 90vh;
        margin: 0;
        align-self: flex-end;
        border-radius: 16px 16px 0 0;
    }

    .modal-overlay {
        align-items: flex-end;
    }

    /* ----- WooCommerce Cart ----- */
    .woocommerce-cart table.cart td.product-thumbnail {
        display: none;
    }

    .woocommerce-cart table.cart td,
    .woocommerce-cart table.cart th {
        padding: 10px 8px;
    }

    .woocommerce-cart table.cart td.product-name {
        font-size: 0.85rem;
    }

    .woocommerce-cart .cart_totals .shop_table {
        font-size: 0.875rem;
    }

    .woocommerce-cart .cart_totals .wc-proceed-to-checkout .checkout-button {
        font-size: 0.9rem;
        padding: 14px 20px;
    }

    /* ----- WooCommerce Checkout ----- */
    .woocommerce-checkout .woocommerce-billing-fields,
    .woocommerce-checkout .woocommerce-shipping-fields {
        padding: 0;
    }

    .woocommerce-checkout .form-row {
        float: none !important;
        width: 100% !important;
        margin-bottom: 12px;
    }

    .woocommerce-checkout #payment .payment_methods > li label {
        font-size: 0.875rem;
    }

    /* ----- WooCommerce Single Product ----- */
    .woocommerce-single .product_title {
        font-size: 1.3rem;
    }

    .woocommerce-single .woocommerce-product-rating {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .woocommerce-single .quantity .qty {
        width: 50px;
    }

    .woocommerce-single .single_add_to_cart_button {
        width: 100%;
        padding: 14px;
        font-size: 1rem;
    }

    /* ----- WooCommerce Tabs ----- */
    .woocommerce-tabs .tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
        gap: 0;
        border-bottom: 2px solid var(--color-border, #e5e7eb);
    }

    .woocommerce-tabs .tabs::-webkit-scrollbar {
        display: none;
    }

    .woocommerce-tabs .tabs li a {
        white-space: nowrap;
        font-size: 0.85rem;
        padding: 10px 14px;
    }

    /* ----- Related Products ----- */
    .related.products ul.products {
        grid-template-columns: repeat(2, 1fr);
    }

    /* ----- Sticky Tabs ----- */
    .sticky-product-tabs {
        display: none !important;
    }
}

/* ==========================================================
   5. SMALL MOBILE  —  max-width: 360px
   ========================================================== */
@media screen and (max-width: 360px) {

    /* ----- Base ----- */
    body {
        font-size: 13px;
    }

    /* ----- Layout & Container ----- */
    .container,
    .site-container {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* ----- Header ----- */
    .site-header {
        padding: 8px 10px;
    }

    .site-logo img {
        max-height: 34px;
    }

    .header-actions {
        gap: 6px;
    }

    .header-action-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    /* ----- Hero Slider ----- */
    .hero-slider,
    .hero-section {
        min-height: 220px;
        max-height: 280px;
    }

    .hero-slide {
        min-height: 220px;
    }

    .hero-slide__title {
        font-size: 1rem;
        line-height: 1.2;
    }

    .hero-slide__cta {
        padding: 8px 14px;
        font-size: 0.75rem;
    }

    /* ----- Features Bar ----- */
    .features-bar .feature-item__title {
        font-size: 0.75rem;
    }

    .features-bar .feature-item__text {
        display: none;
    }

    /* ----- Section Headings ----- */
    .section-heading .section-title {
        font-size: 1.05rem;
    }

    /* ----- Category Grid ----- */
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .category-card__title {
        font-size: 0.7rem;
        padding: 5px 6px;
    }

    /* ----- Products Grid ----- */
    .products-grid,
    ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .product-card__body {
        padding: 8px;
    }

    .product-card__title {
        font-size: 0.75rem;
    }

    .product-card__price {
        font-size: 0.8rem;
    }

    .product-card__add-to-cart {
        font-size: 0.72rem;
        padding: 7px 8px;
    }

    /* ----- Footer ----- */
    .footer-copyright {
        font-size: 0.75rem;
    }

    /* ----- WhatsApp Button ----- */
    .whatsapp-float {
        width: 40px;
        height: 40px;
        right: 10px;
        bottom: 60px;
    }

    /* ----- WooCommerce ----- */
    .woocommerce-cart table.cart td,
    .woocommerce-cart table.cart th {
        padding: 8px 6px;
        font-size: 0.8rem;
    }

    .woocommerce-single .product_title {
        font-size: 1.1rem;
    }

    .woocommerce-single .price {
        font-size: 1.2rem;
    }

    .woocommerce-single .single_add_to_cart_button {
        padding: 12px;
        font-size: 0.9rem;
    }

    .woocommerce-tabs .tabs li a {
        font-size: 0.78rem;
        padding: 9px 10px;
    }
}

/* ==========================================================
   6. PRINT STYLES
   ========================================================== */
@media print {

    /* ----- Remove Unnecessary Elements ----- */
    .site-header,
    .main-navigation,
    .mobile-navigation,
    .mobile-nav-toggle,
    .hamburger-btn,
    .header-topbar,
    .hero-slider,
    .hero-section,
    .features-bar,
    .site-footer,
    .footer-widgets,
    .footer-bottom,
    .sticky-product-tabs,
    .sticky-bottom-bar,
    .whatsapp-float,
    .back-to-top,
    .modal-overlay,
    .modal-dialog,
    .search-drawer,
    .notification-banner,
    .cookie-notice,
    .woocommerce-cart .actions,
    .woocommerce-checkout #payment .place-order,
    .related.products,
    .upsells.products,
    .cross-sells,
    .woocommerce-tabs,
    .product_meta,
    .social-share,
    nav.woocommerce-breadcrumb,
    .woocommerce-pagination,
    .widget_price_filter,
    .widget_layered_nav,
    .sidebar-primary,
    button,
    .btn,
    video,
    iframe,
    .no-print {
        display: none !important;
    }

    /* ----- Base Print Reset ----- */
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    body {
        font-family: Georgia, "Times New Roman", Times, serif;
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        padding: 0;
        margin: 0;
    }

    /* ----- Links ----- */
    a,
    a:visited {
        text-decoration: underline;
        color: #000;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
    }

    a[href^="#"]::after,
    a[href^="javascript:"]::after {
        content: "";
    }

    /* ----- Images ----- */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    /* ----- Page Breaks ----- */
    h1, h2, h3 {
        page-break-after: avoid;
    }

    p, blockquote {
        orphans: 3;
        widows: 3;
    }

    /* ----- Container ----- */
    .container,
    .site-container {
        max-width: 100%;
        padding: 0;
    }

    /* ----- Single Product Print ----- */
    .woocommerce-single .woocommerce-product-gallery {
        float: none;
        width: 40%;
        margin: 0 auto 20pt;
        display: block;
    }

    .woocommerce-single .entry-summary {
        float: none;
        width: 100%;
    }

    .woocommerce-single .product_title {
        font-size: 18pt;
    }

    .woocommerce-single .price {
        font-size: 14pt;
        font-weight: bold;
    }

    /* ----- Cart Print ----- */
    .woocommerce-cart table.cart {
        width: 100%;
        border-collapse: collapse;
        font-size: 10pt;
    }

    .woocommerce-cart table.cart th,
    .woocommerce-cart table.cart td {
        border: 1px solid #ccc;
        padding: 6pt 8pt;
    }

    /* ----- Page Number ----- */
    @page {
        margin: 1.5cm;
    }
}

/* ==========================================================
   7. DARK MODE  —  prefers-color-scheme: dark
   ========================================================== */
@media (prefers-color-scheme: dark) {

    /*
     * These rules apply only when the OS/browser is in dark mode
     * AND the theme does not override via a .light-mode body class.
     * Keep adjustments subtle — trust CSS custom properties where possible.
     */

    :root {
        --color-bg:            #0f172a;
        --color-surface:       #1e293b;
        --color-surface-alt:   #1a2535;
        --color-surface-hover: #243044;
        --color-border:        #334155;
        --color-text:          #f1f5f9;
        --color-text-muted:    #94a3b8;
        --color-text-faint:    #64748b;
        --color-primary:       #3b82f6;
        --color-primary-dark:  #2563eb;
        --color-secondary:     #0ea5e9;
        --color-accent:        #f59e0b;
        --color-success:       #22c55e;
        --color-danger:        #ef4444;
        --color-warning:       #f59e0b;
        --color-info:          #3b82f6;
        --shadow-sm:           0 1px 3px rgba(0,0,0,0.4);
        --shadow-md:           0 4px 12px rgba(0,0,0,0.5);
        --shadow-lg:           0 8px 28px rgba(0,0,0,0.6);
    }

    body {
        background-color: var(--color-bg);
        color: var(--color-text);
    }

    /* ----- Header ----- */
    .site-header {
        background: var(--color-surface);
        border-bottom-color: var(--color-border);
    }

    .header-topbar {
        background: #0d1f3c;
        border-bottom-color: var(--color-border);
    }

    /* ----- Navigation ----- */
    .main-navigation .nav-menu > li > a {
        color: var(--color-text);
    }

    .main-navigation .nav-menu > li > a:hover,
    .main-navigation .nav-menu > li.current-menu-item > a {
        color: var(--color-primary);
    }

    .mega-menu,
    .dropdown-menu {
        background: var(--color-surface);
        border-color: var(--color-border);
        box-shadow: var(--shadow-lg);
    }

    .mega-menu a,
    .dropdown-menu a {
        color: var(--color-text);
    }

    .mega-menu a:hover,
    .dropdown-menu a:hover {
        color: var(--color-primary);
        background: var(--color-surface-hover);
    }

    /* ----- Product Cards ----- */
    .product-card {
        background: var(--color-surface);
        border-color: var(--color-border);
    }

    .product-card:hover {
        box-shadow: var(--shadow-md);
        border-color: var(--color-primary);
    }

    .product-card__title a {
        color: var(--color-text);
    }

    .product-card__price {
        color: var(--color-text);
    }

    .product-card__price del {
        color: var(--color-text-faint);
    }

    .product-card__price ins {
        color: var(--color-danger);
    }

    /* ----- Category Cards ----- */
    .category-card {
        background: var(--color-surface);
        border-color: var(--color-border);
    }

    /* ----- Features Bar ----- */
    .features-bar {
        background: var(--color-surface);
        border-color: var(--color-border);
    }

    .feature-item {
        border-color: var(--color-border);
    }

    /* ----- Sections ----- */
    .section-heading .section-title {
        color: var(--color-text);
    }

    .section-heading .section-divider {
        background: var(--color-primary);
    }

    /* ----- Tabs ----- */
    .section-tabs .tab-btn {
        color: var(--color-text-muted);
        border-color: var(--color-border);
    }

    .section-tabs .tab-btn.is-active,
    .section-tabs .tab-btn:hover {
        color: var(--color-primary);
        border-color: var(--color-primary);
    }

    /* ----- Forms & Inputs ----- */
    input[type="text"],
    input[type="email"],
    input[type="search"],
    input[type="number"],
    input[type="tel"],
    input[type="url"],
    input[type="password"],
    select,
    textarea {
        background: var(--color-surface-alt);
        border-color: var(--color-border);
        color: var(--color-text);
    }

    input::placeholder,
    textarea::placeholder {
        color: var(--color-text-faint);
    }

    /* ----- Buttons ----- */
    .btn-secondary,
    .button.alt {
        background: var(--color-surface-hover);
        color: var(--color-text);
        border-color: var(--color-border);
    }

    .btn-outline {
        border-color: var(--color-border);
        color: var(--color-text);
    }

    .btn-outline:hover {
        background: var(--color-primary);
        border-color: var(--color-primary);
        color: #fff;
    }

    /* ----- Modals ----- */
    .modal-dialog {
        background: var(--color-surface);
        border-color: var(--color-border);
    }

    .modal-header {
        border-bottom-color: var(--color-border);
    }

    .modal-footer {
        border-top-color: var(--color-border);
    }

    /* ----- Search Drawer ----- */
    .search-drawer {
        background: var(--color-surface);
    }

    .search-drawer__input {
        background: var(--color-surface-alt);
        border-color: var(--color-border);
        color: var(--color-text);
    }

    /* ----- Footer ----- */
    .site-footer {
        background: #090f1f;
        border-top-color: var(--color-border);
    }

    .footer-widgets {
        border-bottom-color: var(--color-border);
    }

    .footer-widget__title {
        color: var(--color-text);
        border-bottom-color: var(--color-border);
    }

    .footer-widget__content a {
        color: var(--color-text-muted);
    }

    .footer-widget__content a:hover {
        color: var(--color-primary);
    }

    .footer-bottom {
        background: #060c18;
        color: var(--color-text-faint);
        border-top-color: var(--color-border);
    }

    /* ----- Mobile Navigation ----- */
    .mobile-navigation {
        background: var(--color-surface);
    }

    .mobile-navigation .nav-menu > li > a {
        color: var(--color-text);
        border-bottom-color: var(--color-border);
    }

    .mobile-navigation .sub-menu {
        background: var(--color-surface-alt);
    }

    .mobile-navigation .sub-menu li a {
        color: var(--color-text-muted);
        border-bottom-color: var(--color-border);
    }

    /* ----- WooCommerce ----- */
    .woocommerce-message,
    .woocommerce-info,
    .woocommerce-error {
        border-color: var(--color-border) !important;
    }

    .woocommerce table.shop_table {
        border-color: var(--color-border);
    }

    .woocommerce table.shop_table th {
        background: var(--color-surface-alt);
        color: var(--color-text);
        border-color: var(--color-border);
    }

    .woocommerce table.shop_table td {
        border-color: var(--color-border);
        color: var(--color-text);
    }

    .woocommerce-tabs .tabs {
        border-bottom-color: var(--color-border);
    }

    .woocommerce-tabs .tabs li a {
        color: var(--color-text-muted);
        background: var(--color-surface-alt);
        border-color: var(--color-border);
    }

    .woocommerce-tabs .tabs li.active a {
        background: var(--color-surface);
        color: var(--color-text);
        border-bottom-color: var(--color-surface);
    }

    /* ----- Notices ----- */
    .woocommerce-message {
        background-color: rgba(34, 197, 94, 0.1) !important;
        color: #86efac !important;
    }

    .woocommerce-error {
        background-color: rgba(239, 68, 68, 0.1) !important;
        color: #fca5a5 !important;
    }

    .woocommerce-info {
        background-color: rgba(59, 130, 246, 0.1) !important;
        color: #93c5fd !important;
    }

    /* ----- Sticky Bottom Bar ----- */
    .sticky-bottom-bar {
        background: var(--color-surface);
        border-top-color: var(--color-border);
    }

    /* ----- Scrollbar (WebKit) ----- */
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    ::-webkit-scrollbar-track {
        background: var(--color-surface-alt);
    }

    ::-webkit-scrollbar-thumb {
        background: var(--color-border);
        border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: var(--color-text-faint);
    }

    /* ----- Images — subtle dark overlay so bright images don't hurt eyes ----- */
    img:not([src*=".svg"]) {
        filter: brightness(0.92) contrast(1.02);
    }

    /* ----- Sale Badge ----- */
    .onsale,
    .product-card__badge--sale {
        background: var(--color-danger);
        color: #fff;
    }

    /* ----- Star Rating ----- */
    .star-rating span::before,
    .woocommerce .star-rating span::before {
        color: var(--color-accent);
    }
}
