/* =========================================================
   MOBILE RESPONSIVE PATCH — CSS ONLY
   Scope: public pages, home, product cards, forms, checkout,
   cart floating modal, WhatsApp floating pill, modals, footer,
   and admin layout. Logic/JS/PHP untouched.
   ========================================================= */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}
body {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
img, video, canvas, svg {
    max-width: 100%;
}
input, select, textarea, button {
    font-size: 16px;
}
.page-section {
    width: 100%;
    overflow-x: clip;
}
.container {
    width: 100%;
}

@media (max-width: 1200px) {
    .container { padding-left: 18px; padding-right: 18px; }
    .nav { gap: 16px; }
    .nav-search input { width: 210px; }
    #homePage .hero-inner { gap: 34px; }
    #homePage .hero-slider { min-height: 440px; }
    #homePage .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    #homePage .categories-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .shipping-grid { grid-template-columns: 1fr; }
}

@media (max-width: 992px) {
    .header {
        position: sticky !important;
        top: 0 !important;
        z-index: 3000;
    }
    .header-inner {
        min-height: 64px;
        gap: 12px;
        position: relative;
    }
    .logo { font-size: 1.2rem; min-width: 0; }
    .site-logo-img { height: 36px; max-width: 158px; }
    .admin-logo-img { height: 36px; max-width: 150px; }
    .header-actions { gap: 8px; }
    .btn-icon { width: 38px; height: 38px; }
    .mobile-menu-btn {
        display: inline-flex;
        width: 46px;
        height: 46px;
        flex: 0 0 46px;
        border: 1px solid rgba(26,95,63,.16);
        border-radius: 12px;
        background: #f6faf7;
        color: var(--primary);
        box-shadow: 0 8px 18px rgba(15,61,41,.08);
        transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
    }
    .mobile-menu-btn i { font-size: 1.1rem; }
    .mobile-menu-btn[aria-expanded="true"] {
        border-color: var(--primary);
        background: var(--primary);
        color: #fff;
        transform: rotate(2deg);
    }
    .mobile-menu-btn:focus-visible {
        outline: 3px solid rgba(201,162,39,.72);
        outline-offset: 3px;
    }
    .nav-search { display: none !important; }
    #navSearchBtnMobile { display: flex !important; }
    .nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 7px;
        position: absolute;
        top: calc(100% + 10px);
        left: 12px;
        right: 12px;
        padding: 12px;
        border: 1px solid rgba(26,95,63,.16);
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 24px 54px rgba(15,61,41,.18);
        z-index: 1200;
        max-height: calc(100dvh - 88px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px) scale(.985);
        transform-origin: top right;
        transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
    }
    .nav.mobile-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }
    .nav a,
    .nav .nav-dropdown-trigger {
        width: 100%;
        min-height: 46px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        border-radius: 10px;
        padding: 11px 14px;
        font-weight: 700;
    }
    .nav a::after { display: none; }
    .nav a.active,
    .nav a:hover,
    .nav .nav-dropdown-trigger:hover,
    .nav .nav-dropdown.active > .nav-dropdown-trigger {
        background: #edf6f0;
        color: var(--primary);
    }
    .nav a:focus-visible,
    .nav .nav-dropdown-trigger:focus-visible {
        outline: 3px solid rgba(201,162,39,.62);
        outline-offset: -2px;
    }
    .nav-dropdown {
        width: 100%;
        display: block;
    }
    .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border-radius: 14px;
        margin-top: 6px;
        width: 100%;
        display: none;
        border: 1px solid rgba(15,23,42,.06);
        background: #f8faf9;
    }
    .nav-dropdown.active .dropdown-menu {
        display: block;
        animation: mobileNavSubmenuIn 140ms ease both;
    }
    @keyframes mobileNavSubmenuIn {
        from { opacity: 0; transform: translateY(-4px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .dropdown-menu a {
        justify-content: center;
        font-size: .95rem;
        padding: 11px 14px;
    }
    .nav-mobile-actions {
        display: flex !important;
        flex-direction: column;
        width: 100%;
        gap: 8px;
        padding-top: 12px;
        margin-top: 8px;
        border-top: 1px solid #e1ebe4;
    }
    .nav-mobile-actions .btn-primary,
    .nav-mobile-actions .btn-outline {
        width: 100%;
        justify-content: center;
        min-height: 46px;
        border-radius: 9px;
    }

    .section { padding: 54px 0; }
    .section-header { margin-bottom: 30px; }
    .section-header h2 { font-size: clamp(1.8rem, 5vw, 2.35rem); }
    .section-header p { font-size: .95rem; }

    .hero { padding: 54px 0; }
    .hero-inner,
    #homePage .hero-inner {
        grid-template-columns: 1fr !important;
        gap: 32px;
        text-align: center;
    }
    #homePage .hero {
        min-height: auto !important;
        padding: 58px 0 54px !important;
    }
    #homePage .hero-content { max-width: 720px; margin: 0 auto; }
    #homePage .hero-content h1 {
        font-size: clamp(2.15rem, 8vw, 3.55rem) !important;
        line-height: 1.05;
        margin-bottom: 16px;
    }
    #homePage .hero-content p {
        font-size: clamp(1rem, 2.4vw, 1.12rem);
        max-width: 620px;
    }
    #homePage .hero-kicker { margin-left: auto; margin-right: auto; }
    #homePage .hero-buttons { justify-content: center; }
    #homePage .hero-stats {
        width: 100%;
        max-width: 560px;
        margin: 32px auto 0;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
    }
    #homePage .stat-item {
        border-right: 0;
        padding-right: 0;
        justify-content: center;
        text-align: left;
    }
    #homePage .hero-image {
        display: block !important;
        width: 100%;
        max-width: 680px;
        margin: 0 auto;
    }
    #homePage .hero-slider {
        min-height: clamp(270px, 52vw, 400px) !important;
        border-radius: 28px 28px 58px 28px;
    }
    #homePage .floating-card { display: none !important; }

    .about-connect-inner,
    .contact-layout,
    .checkout-grid,
    .admin-grid {
        grid-template-columns: 1fr !important;
    }
    .about-connect-media { order: -1; }
    .metrics-grid,
    .commit-grid,
    .features-grid,
    .production-grid,
    .services-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .spec-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
}

@media (max-width: 768px) {
    .container { padding-left: 16px; padding-right: 16px; }
    .header { position: sticky !important; top: 0 !important; z-index: 3000; }
    .header-inner { padding: 10px 0; }
    .logo { font-size: 1.08rem; }
    .logo i { font-size: 1rem; }
    .site-logo-img { height: 34px; max-width: 148px; }
    .checkout-brand .site-logo-img { height: 32px; max-width: 142px; }
    .footer .site-logo-img { height: 42px; max-width: 190px; }
    .header-actions .btn-primary { display: none !important; }
    .cart-count {
        top: -4px;
        right: -4px;
        min-width: 18px;
        width: auto;
        padding: 0 5px;
    }

    .section { padding: 44px 0; }
    .section-header { margin-bottom: 26px; }
    #homePage .section { padding: 48px 0 !important; }
    #homePage .section-header .section-eyebrow { font-size: .74rem; gap: 8px; }
    #homePage .section-header .section-eyebrow::before,
    #homePage .section-header .section-eyebrow::after { width: 14px; }
    #homePage .section-header h2 { font-size: clamp(1.65rem, 7vw, 2.25rem); }
    #homePage .section-header p { max-width: 92%; }

    #homePage .hero {
        padding: 44px 0 38px !important;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    #homePage .hero::before,
    #homePage .hero::after {
        opacity: .45;
        pointer-events: none;
    }
    #homePage .hero-kicker {
        font-size: .72rem;
        padding: 7px 12px;
        margin-bottom: 14px;
    }
    #homePage .hero-content h1 {
        font-size: clamp(2rem, 10vw, 3rem) !important;
        letter-spacing: -.045em;
    }
    #homePage .hero-content h1 span { display: inline; }
    #homePage .hero-content p {
        font-size: .98rem;
        line-height: 1.7;
        margin-bottom: 22px;
    }
    #homePage .hero-buttons {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
    }
    #homePage .hero-buttons .btn-primary,
    #homePage .hero-buttons .btn-outline {
        width: 100%;
        min-height: 48px;
        justify-content: center;
        border-radius: 12px;
    }
    #homePage .hero-stats {
        grid-template-columns: 1fr !important;
        max-width: 330px !important;
        gap: 12px !important;
        margin-top: 26px;
    }
    #homePage .stat-item {
        min-height: 58px;
        border: 1px solid rgba(255,255,255,.14);
        border-radius: 14px;
        padding: 10px 14px;
        background: rgba(255,255,255,.055);
    }
    #homePage .stat-icon { width: 36px; height: 36px; font-size: 1.25rem; }
    #homePage .stat-item h3 { font-size: 1.55rem; }
    #homePage .stat-item p { font-size: .76rem; }
    #homePage .hero-slider {
        min-height: clamp(230px, 58vw, 315px) !important;
        border-width: 2px;
        border-radius: 22px 22px 44px 22px !important;
    }

    .search-section { padding: 22px 0; }
    .search-box,
    #homePage .products-section .search-box {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px;
        padding: 10px;
        border-radius: 14px;
    }
    .search-filters {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }
    .filter-select,
    .search-box .btn-primary,
    .search-filters .btn-primary {
        width: 100%;
        min-height: 46px;
        justify-content: center;
    }

    .categories-grid,
    #homePage .categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 14px !important;
    }
    .category-card,
    #homePage .category-card {
        min-height: auto;
        padding: 20px 12px !important;
        border-radius: 16px;
    }
    .category-icon,
    #homePage .category-icon {
        width: 58px;
        height: 58px;
        font-size: 1.4rem;
        margin-bottom: 12px;
    }
    .category-card h3 { font-size: .98rem; }
    .category-card p { font-size: .8rem; }

    .products-grid,
    #homePage .products-grid {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }
    .product-card,
    #homePage .product-card {
        border-radius: 16px;
    }
    .product-image,
    #homePage .product-image {
        height: clamp(190px, 54vw, 245px) !important;
    }
    .product-actions {
        opacity: 1 !important;
        top: 12px;
        right: 12px;
    }
    .product-info,
    #homePage .product-info { padding: 16px; }
    .product-info h3,
    #homePage .product-info h3 {
        min-height: auto;
        font-size: 1.02rem;
    }
    .product-meta {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .product-footer {
        gap: 12px;
        align-items: stretch;
    }
    .product-footer .inquiry-btn,
    #homePage .inquiry-btn {
        min-height: 42px;
        justify-content: center;
    }

    .features-grid,
    .metrics-grid,
    .commit-grid,
    .production-grid,
    .services-cards,
    #homePage .services-cards {
        grid-template-columns: 1fr !important;
    }
    .feature-card,
    .service-card,
    .process-card,
    .faq-item {
        border-radius: 16px;
    }
    .feature-card { padding: 26px 20px; }
    #homePage .services-cards {
        max-width: 92%;
        margin-left: auto;
        margin-right: auto;
        gap: 18px !important;
    }
    #homePage .service-card { min-height: 238px; }
    #homePage .service-card .content { padding: 22px 18px 20px; }
    #homePage .service-card .content::before {
        width: 46px;
        height: 46px;
        top: 16px;
        left: 16px;
        font-size: 1.18rem;
    }
    #homePage .service-card h4 { font-size: 1.12rem; }
    #homePage .service-card p { font-size: .88rem; line-height: 1.48; }

    .wholesale-form,
    .tracking-form,
    .tracking-result,
    .checkout-card {
        padding: 20px !important;
        border-radius: 16px;
    }
    .form-grid,
    .form-row,
    .checkout-form .form-row {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
    .form-group { margin-bottom: 14px; }
    .form-group textarea { min-height: 105px; }

    .contact-layout { gap: 18px; }
    .tracking-input-group { flex-direction: column; }
    .tracking-input-group .btn-primary { width: 100%; justify-content: center; }
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .tracking-timeline { padding-left: 34px; }

    .checkout-wrap { padding: 24px 0 56px; }
    .checkout-top {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 18px;
    }
    .checkout-brand { justify-content: center; }
    .checkout-steps {
        width: 100%;
        justify-content: center;
        gap: 8px;
        flex-wrap: wrap;
    }
    .checkout-step {
        font-size: .82rem;
        gap: 6px;
    }
    .checkout-step .dot {
        width: 24px;
        height: 24px;
        font-size: .75rem;
    }
    .checkout-grid { gap: 18px; }
    .checkout-summary-item { align-items: flex-start; }
    .checkout-summary-item .qty { margin-left: 0; }
    .ship-toggle { grid-template-columns: 1fr; }
    .ship-methods { grid-template-columns: 1fr !important; }
    .ship-method { padding: 15px; min-height: auto; }
    .checkout-checkboxes { flex-direction: column; align-items: flex-start; }
    .checkout-badge-row { gap: 8px; }

    .modal {
        padding: 12px;
        align-items: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .modal-content {
        width: 100% !important;
        max-height: calc(100vh - 24px);
        border-radius: 20px;
        margin: auto 0;
    }
    .modal-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
        box-shadow: var(--shadow);
    }
    #productModal .product-detail {
        grid-template-columns: 1fr !important;
        gap: 22px;
        padding: 18px !important;
    }
    #productModal .modal-content {
        border-radius: 14px;
    }
    .product-detail-image {
        aspect-ratio: 1 / 1.06;
        border-radius: 12px;
        max-height: none;
    }
    .product-detail-info .product-category {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    #productModal .product-detail-info h2 {
        font-size: 1.9rem;
        line-height: 1.1;
        padding-right: 48px;
        margin-bottom: 12px;
        overflow-wrap: anywhere;
    }
    #productModal .product-description {
        font-size: 1rem;
        margin-bottom: 18px;
        overflow-wrap: anywhere;
    }
    .product-detail-meta {
        gap: 10px;
        margin-bottom: 18px;
    }
    .detail-meta-item {
        width: 100%;
        justify-content: flex-start;
        padding: 11px 14px;
    }
    .product-variants h4,
    .product-specs h4 {
        font-size: 1.08rem;
        margin-bottom: 12px;
    }
    .variant-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .variant-option {
        min-height: 48px;
        padding: 13px 14px;
        border-radius: 8px;
    }
    .product-detail-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .product-detail-actions .btn-primary,
    .product-detail-actions .btn-outline {
        width: 100%;
        justify-content: center;
        min-height: 52px;
    }
    .product-modal-note {
        margin-bottom: 18px;
        font-size: 0.9rem;
    }
    #productModal .product-specs {
        min-width: 0;
        overflow: hidden;
    }
    #productModal .product-spec-grid {
        display: flex;
        gap: 0;
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-behavior: smooth;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
        scrollbar-color: rgba(26,95,63,.45) transparent;
        border: 1px solid #dce6df;
        border-radius: 10px;
    }
    #productModal .product-spec-item {
        display: grid;
        flex: 0 0 min(78vw, 220px);
        grid-template-columns: 28px minmax(0, 1fr);
        min-height: 98px;
        padding: 15px 14px;
        border: 0;
        border-right: 1px solid #dce6df;
        scroll-snap-align: start;
    }
    #productModal .product-spec-item:last-child { border-right: 0; }
    #productModal .product-spec-copy { gap: 4px; }
    #productModal .product-spec-value {
        max-width: 100%;
        text-align: left;
        overflow-wrap: anywhere;
    }
    .product-gallery-thumbs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        margin-top: 14px;
    }
    .product-gallery-thumb {
        width: 70px;
        height: 70px;
        flex: 0 0 70px;
        border-radius: 14px;
    }

    .login-container { padding: 24px 18px !important; }
    .login-tabs { gap: 8px; }
    .login-tab { padding: 11px 8px; font-size: .9rem; }
    .social-login { flex-direction: column; gap: 10px; }

    .footer { padding: 42px 0 90px !important; }
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 28px !important;
    }
    .footer-brand,
    .footer-links,
    .footer-newsletter { min-width: 0; }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .footer-newsletter-form { width: 100%; }

    .toast-container {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }
    .toast { min-width: 0; width: 100%; }

    .admin-layout { display: block; }
    .admin-sidebar {
        width: min(82vw, 280px) !important;
        transform: translateX(-105%);
        z-index: 4000;
        box-shadow: 18px 0 40px rgba(0,0,0,.22);
    }
    .admin-sidebar.collapsed { transform: translateX(-105%) !important; }
    .admin-sidebar:not(.collapsed) { transform: translateX(0) !important; }
    .admin-sidebar.collapsed .admin-logo span,
    .admin-sidebar.collapsed .admin-nav-item span,
    .admin-sidebar.collapsed .admin-nav-section { display: initial; }
    .admin-main,
    .admin-sidebar + .admin-main,
    .admin-sidebar.collapsed + .admin-main {
        margin-left: 0 !important;
        width: 100%;
    }
    .admin-header {
        padding: 12px 14px;
        gap: 10px;
        flex-wrap: wrap;
    }
    .admin-mobile-menu-btn { display: flex !important; }
    .admin-search { order: 3; width: 100%; }
    .admin-search input { width: 100% !important; }
    .admin-actions { gap: 10px; margin-left: auto; }
    .admin-profile span { display: none; }
    .admin-content { padding: 16px !important; }
    .stats-grid { grid-template-columns: 1fr !important; gap: 14px; }
    .stat-card { padding: 18px; }
    .admin-card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .admin-card-body {
        padding: 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .data-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    .data-table th,
    .data-table td { padding: 12px; }
    .table-actions { flex-wrap: nowrap; }
    .admin-form { max-width: 100%; }
    .image-upload { padding: 24px 14px; }
    .image-preview { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .chart-wrap { height: 260px; }
}

@media (max-width: 560px) {
    .container { padding-left: 14px; padding-right: 14px; }
    .btn-primary,
    .btn-secondary,
    .btn-outline { padding: 10px 16px; }
    .logo { font-size: 1rem; }
    .site-logo-img { height: 30px; max-width: 132px; }
    .admin-logo-img { height: 32px; max-width: 132px; }
    .btn-icon { width: 36px; height: 36px; }
    .header-actions { gap: 6px; }

    #homePage .hero { padding-top: 34px !important; }
    #homePage .hero-content h1 { font-size: clamp(1.85rem, 11vw, 2.55rem) !important; }
    #homePage .hero-content p { font-size: .94rem; }
    #homePage .hero-slider { min-height: 220px !important; }
    #homePage .section { padding: 40px 0 !important; }

    .categories-grid,
    #homePage .categories-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }
    .category-card,
    #homePage .category-card { padding: 18px 10px !important; }
    .category-icon,
    #homePage .category-icon { width: 52px; height: 52px; font-size: 1.25rem; }

    .product-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .product-footer .inquiry-btn { width: 100%; }
    .product-meta span { min-width: 0; }

    .cart-sidebar {
        width: calc(100vw - 20px) !important;
        max-height: calc(100dvh - 20px) !important;
        border-radius: 22px !important;
    }
    .cart-header {
        padding: 16px 14px 12px !important;
        gap: 10px;
    }
    .cart-header-icon {
        width: 48px !important;
        height: 48px !important;
        border-radius: 15px !important;
        font-size: 1.25rem !important;
    }
    .cart-header-copy h3 { font-size: 1.15rem !important; }
    .cart-header-copy p { display: none; }
    .close-cart { width: 40px !important; height: 40px !important; }
    .cart-items {
        padding: 12px !important;
        max-height: calc(100dvh - 260px) !important;
    }
    .cart-item {
        grid-template-columns: 76px 1fr !important;
        gap: 12px !important;
        padding: 12px !important;
        border-radius: 16px !important;
    }
    .cart-item-image {
        width: 76px !important;
        height: 76px !important;
        border-radius: 14px !important;
    }
    .cart-item-top { gap: 8px; }
    .cart-item-copy h4 { font-size: .92rem !important; line-height: 1.3; }
    .cart-item-copy p { font-size: .78rem !important; }
    .cart-item-actions { margin-top: 12px !important; gap: 8px !important; }
    .qty-control { padding: 4px 6px; }
    .qty-btn { width: 30px !important; height: 30px !important; }
    .remove-item { width: 34px !important; height: 34px !important; }
    .cart-footer { padding: 12px !important; }
    .cart-note textarea { min-height: 64px; }
    .cart-footer-actions { grid-template-columns: 1fr !important; }

    .checkout-card h3 { font-size: 1.12rem; }
    .checkout-summary-item {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        grid-template-areas: "image copy" "actions actions";
        align-items: center;
        row-gap: 10px;
    }
    #checkoutPage .checkout-summary-item > img { grid-area: image; }
    #checkoutPage .checkout-summary-copy { grid-area: copy; min-width: 0; }
    #checkoutPage .checkout-summary-item .cart-item-actions {
        grid-area: actions;
        justify-content: flex-end;
        margin-left: 0 !important;
    }
    .ship-method .title { font-size: 1rem; }

    .footer-contact li { align-items: flex-start; }
    .wa-popup-fab {
        right: 14px !important;
        bottom: 14px !important;
        min-width: auto !important;
        height: 54px !important;
        padding: 7px 11px 7px 7px !important;
        z-index: 2600;
    }
    .wa-popup-fab-icon { width: 40px; height: 40px; }
    .wa-popup-fab-text { font-size: .68rem; }
    .wa-popup-fab-text strong { font-size: .72rem; }
}

@media (max-width: 380px) {
    .container { padding-left: 12px; padding-right: 12px; }
    .logo span { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .site-logo-img { height: 28px; max-width: 116px; }
    .header-actions { gap: 4px; }
    #homePage .hero-content h1 { font-size: 1.75rem !important; }
    #homePage .hero-buttons .btn-primary,
    #homePage .hero-buttons .btn-outline { font-size: .9rem; }
    .categories-grid,
    #homePage .categories-grid { grid-template-columns: 1fr !important; }
    .cart-item { grid-template-columns: 68px 1fr !important; }
    .cart-item-image { width: 68px !important; height: 68px !important; }
    .wa-popup-fab-text { display: none; }
    .wa-popup-fab { width: 54px !important; padding: 7px !important; border-radius: 50% !important; }
}


/* Footer logo white background wrapper */
.footer-brand .logo.logo-image {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    padding: 8px 13px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.72);
    box-shadow: 0 14px 30px rgba(0,0,0,0.18);
    margin-bottom: 20px;
    overflow: hidden;
}
.footer-brand .logo.logo-image .site-logo-img {
    height: 42px;
    max-width: 205px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.35));
}
@media (max-width: 768px) {
    .footer-brand .logo.logo-image {
        padding: 7px 11px;
        border-radius: 11px;
    }
    .footer-brand .logo.logo-image .site-logo-img {
        height: 36px;
        max-width: 175px;
    }
}
@media (max-width: 380px) {
    .footer-brand .logo.logo-image {
        padding: 6px 9px;
        border-radius: 10px;
    }
    .footer-brand .logo.logo-image .site-logo-img {
        height: 32px;
        max-width: 154px;
    }
}


/* =========================================================
   GLOBAL UI ZOOM-OUT / COMPACT DENSITY PATCH
   Scope: visual sizing only. No PHP/JS logic changed.
========================================================= */
html { font-size: 14px; }
body { font-size: 0.95rem; line-height: 1.55; }
.container,
.header .container { max-width: 1220px; }

.header-inner { padding: 9px 0 !important; }
.header .logo.logo-image .site-logo-img { height: 34px !important; max-width: 165px !important; }
.footer .logo.logo-image .site-logo-img { height: 42px !important; max-width: 205px !important; }
.checkout-brand .site-logo-img { height: 30px !important; max-width: 150px !important; }
.admin-logo-img { height: 34px !important; max-width: 150px !important; }
.nav a,
.nav-dropdown-trigger { font-size: 0.84rem !important; }
.nav-search input { height: 40px !important; width: min(230px, 20vw) !important; font-size: 0.86rem !important; }
.header-actions .btn-icon { width: 38px !important; height: 38px !important; border-radius: 10px !important; }
#loginBtn,
#profileBtn,
.nav-login,
.nav-profile { padding: 10px 16px !important; font-size: 0.86rem !important; }

.btn-primary,
.btn-outline,
.inquiry-btn,
.whatsapp-checkout,
.checkout-primary { font-size: 0.9rem; }
.btn-primary,
.btn-outline { padding: 11px 18px; }
.section { padding: 58px 0 !important; }
.section-header { margin-bottom: 34px !important; }
.section-header h2 { font-size: clamp(1.7rem, 2.7vw, 2.18rem) !important; }
.section-header p { font-size: 0.92rem; }

#homePage .hero { min-height: 560px !important; padding: 58px 0 54px !important; }
#homePage .hero-inner { gap: 42px !important; }
#homePage .hero-content h1,
.hero-content h1 { font-size: clamp(2.15rem, 4.5vw, 4.1rem) !important; line-height: 1.02 !important; }
#homePage .hero-content p,
.hero-content p { font-size: 1rem !important; max-width: 560px; }
#homePage .hero-badge { transform: scale(0.92); transform-origin: left center; }
#homePage .hero-buttons { gap: 12px !important; }
#homePage .hero-stats { gap: 22px !important; margin-top: 28px !important; }
#homePage .hero-stat strong { font-size: 1.65rem !important; }
#homePage .hero-image,
.hero-image { transform: scale(0.94); transform-origin: center; }
#homePage .floating-card { transform: scale(0.9); }

.categories-grid,
#homePage .categories-grid { gap: 20px !important; }
.category-card { padding: 24px 18px !important; }
.category-icon { width: 58px !important; height: 58px !important; font-size: 1.35rem !important; }
.products-grid,
#homePage .products-grid { grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)) !important; gap: 22px !important; }
.product-image { height: 205px !important; }
.product-info { padding: 18px !important; }
.product-info h3 { font-size: 1rem !important; }
.product-meta { gap: 8px !important; font-size: 0.78rem !important; }

#aboutPage .about-v2-hero { min-height: 520px !important; padding: 66px 0 46px !important; }
#aboutPage .about-v2-title { font-size: clamp(2.3rem, 5vw, 4.25rem) !important; }
#aboutPage .about-v2-subtitle { font-size: 1rem !important; }
#aboutPage .about-v2-card { padding: 30px !important; }
#aboutPage .about-v2-stats { gap: 18px !important; }
#aboutPage .about-v2-stat-card { padding: 24px 18px !important; }
#aboutPage .about-v2-business-section { margin: 54px 0 58px !important; }
#aboutPage .about-v2-business-head h2 { font-size: clamp(2.4rem, 4.3vw, 4.2rem) !important; }
#aboutPage .about-v2-business-grid { gap: 24px !important; }
#aboutPage .about-v2-business-image { height: 220px !important; }
#aboutPage .about-v2-business-grid .about-v2-offer-content { padding: 18px 28px 28px !important; }
#aboutPage .about-v2-business-grid .about-v2-offer-content h3 { font-size: 1.55rem !important; }
#aboutPage .about-v2-business-grid .about-v2-offer-content p { font-size: 0.94rem !important; }
#aboutPage .about-v2-business-benefits { padding: 22px !important; }
#aboutPage .about-v2-business-benefit span { width: 58px !important; height: 58px !important; font-size: 1.45rem !important; }

#productModal .modal-content { max-width: 1080px !important; }
#productModal .product-detail { padding: 32px !important; gap: 34px !important; }
#productModal .product-detail-info h2 { font-size: clamp(2rem, 3vw, 2.8rem) !important; }
#productModal .product-description { font-size: 0.98rem !important; }
#productModal .product-detail-image { max-height: 600px; }
#productModal .product-gallery-thumb { width: 72px !important; height: 72px !important; }
#productModal .detail-meta-item { padding: 10px 14px !important; font-size: 0.88rem !important; }
#productModal .product-detail-actions .btn-primary,
#productModal .product-detail-actions .btn-outline { min-height: 50px !important; }

.checkout-wrap { padding: 32px 0 60px !important; }
.checkout-card { padding: 18px !important; }
.admin-sidebar { width: 252px !important; }
.admin-main { margin-left: 252px !important; }
.admin-sidebar.collapsed + .admin-main { margin-left: 76px !important; }
.admin-sidebar.collapsed { width: 76px !important; }
.admin-content { padding: 24px !important; }
.admin-card-header,
.admin-card-body { padding: 16px !important; }

.footer { padding: 44px 0 24px !important; }
.footer-grid { gap: 30px !important; margin-bottom: 28px !important; }
.footer-links h4 { margin-bottom: 14px !important; }
.footer-links li,
.footer-contact li { margin-bottom: 9px !important; }

@media (max-width: 1024px) {
    html { font-size: 13.8px; }
    .container,
    .header .container { max-width: 100%; padding-left: 18px; padding-right: 18px; }
    #homePage .hero { min-height: auto !important; padding: 46px 0 !important; }
    #homePage .hero-image,
    .hero-image { transform: none; }
    .section { padding: 46px 0 !important; }
    .products-grid,
    #homePage .products-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)) !important; }
    .admin-main,
    .admin-sidebar.collapsed + .admin-main { margin-left: 0 !important; }
}
@media (max-width: 768px) {
    html { font-size: 13.5px; }
    body { font-size: 0.94rem; }
    .container,
    .header .container { padding-left: 14px; padding-right: 14px; }
    .header-inner { padding: 8px 0 !important; }
    .header .logo.logo-image .site-logo-img { height: 30px !important; max-width: 140px !important; }
    .section { padding: 38px 0 !important; }
    .section-header h2 { font-size: clamp(1.55rem, 7vw, 2rem) !important; }
    #homePage .hero-content h1,
    .hero-content h1 { font-size: clamp(2rem, 10vw, 2.85rem) !important; }
    #homePage .hero-stats { gap: 16px !important; }
    .category-card { padding: 20px 14px !important; }
    .product-image { height: 190px !important; }
    .product-info { padding: 15px !important; }
    #aboutPage .about-v2-business-head h2 { font-size: clamp(2rem, 9vw, 2.65rem) !important; }
    #aboutPage .about-v2-business-image { height: 198px !important; }
    .modal-content { max-width: calc(100vw - 18px) !important; }
    #productModal .product-detail { padding: 16px !important; gap: 18px !important; }
    #productModal .product-detail-info h2 { font-size: 1.75rem !important; }
    .admin-content { padding: 14px !important; }
    .footer { padding-bottom: 86px !important; }
}
@media (max-width: 380px) {
    html { font-size: 13.2px; }
    .container,
    .header .container { padding-left: 12px; padding-right: 12px; }
    .header .logo.logo-image .site-logo-img { height: 28px !important; max-width: 128px !important; }
    .products-grid,
    #homePage .products-grid { grid-template-columns: 1fr !important; }
}


/* HOME MOBILE ALIGNMENT FIX
   Scope: only hero CTA buttons and hero stat cards on home mobile. */
@media (max-width: 768px) {
    #homePage .hero-buttons {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 420px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    #homePage .hero-buttons .btn-secondary,
    #homePage .hero-buttons .btn-primary,
    #homePage .hero-buttons .btn-outline {
        width: 100% !important;
        min-height: 52px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        gap: 12px !important;
        padding-left: 18px !important;
        padding-right: 18px !important;
        border-radius: 12px !important;
    }
    #homePage .hero-stats {
        width: 100% !important;
        max-width: 420px !important;
        margin: 24px auto 0 !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    #homePage .stat-item {
        width: 100% !important;
        min-height: 82px !important;
        display: grid !important;
        grid-template-columns: 48px 82px minmax(0, 1fr) !important;
        grid-template-areas: "icon number text" !important;
        align-items: center !important;
        justify-items: start !important;
        column-gap: 14px !important;
        padding: 14px 18px !important;
        border: 1px solid rgba(255,255,255,.16) !important;
        border-radius: 16px !important;
        background: rgba(255,255,255,.055) !important;
        text-align: left !important;
    }
    #homePage .stat-icon {
        grid-area: icon !important;
        width: 44px !important;
        height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.28rem !important;
        margin: 0 !important;
    }
    #homePage .stat-item h3 {
        grid-area: number !important;
        margin: 0 !important;
        width: 100% !important;
        font-size: 1.62rem !important;
        line-height: 1 !important;
        text-align: left !important;
        white-space: nowrap !important;
    }
    #homePage .stat-item p {
        grid-area: text !important;
        margin: 0 !important;
        font-size: .92rem !important;
        line-height: 1.35 !important;
        text-align: left !important;
        color: rgba(255,255,255,.92) !important;
    }
}
@media (max-width: 380px) {
    #homePage .hero-buttons,
    #homePage .hero-stats {
        max-width: 100% !important;
    }
    #homePage .stat-item {
        grid-template-columns: 42px 68px minmax(0, 1fr) !important;
        column-gap: 10px !important;
        padding: 12px 14px !important;
    }
    #homePage .stat-icon {
        width: 38px !important;
        height: 38px !important;
        font-size: 1.12rem !important;
    }
    #homePage .stat-item h3 { font-size: 1.38rem !important; }
    #homePage .stat-item p { font-size: .82rem !important; }
}


/* Final scoped responsive overrides for requested footer/account controls */
@media (max-width: 768px) {
    .footer-redesign {
        padding: 52px 0 28px !important;
    }
    .footer-redesign .footer-grid {
        gap: 34px !important;
        margin-bottom: 34px !important;
    }
    .footer-redesign .footer-brand {
        max-width: 100%;
    }
    .footer-redesign .footer-brand .logo.logo-image {
        min-height: 44px;
        margin-bottom: 16px;
    }
    .footer-redesign .footer-brand .site-logo-img {
        height: 36px !important;
        max-width: 175px !important;
    }
    .footer-redesign .footer-brand p {
        max-width: 42ch;
        font-size: .92rem;
    }
    .footer-redesign .footer-links h4 {
        margin-bottom: 12px !important;
    }
    .footer-redesign .footer-links a {
        min-height: 44px;
    }
    .footer-redesign .footer-contact li {
        margin-bottom: 11px !important;
    }
    .footer-redesign .footer-bottom {
        align-items: flex-start;
        gap: 8px !important;
    }
    .footer-redesign .footer-bottom p {
        font-size: .78rem;
    }
    #checkoutPage .checkout-account-fieldset {
        padding: 14px;
    }
    #checkoutPage .checkout-account-options {
        display: grid;
        grid-template-columns: 1fr;
    }
    #checkoutPage .checkout-account-option {
        width: 100%;
    }
}
@media (max-width: 380px) {
    .footer-redesign .footer-brand .site-logo-img {
        height: 32px !important;
        max-width: 154px !important;
    }
    .footer-redesign .footer-bottom p {
        font-size: .74rem;
    }
}

/* Production page final mobile overrides */
@media (max-width: 768px) {
    #productionPage .production-content {
        padding-top: 30px;
        padding-bottom: 52px;
    }
    #productionPage .production-section-heading > p { max-width: 48ch; }
}
@media (max-width: 560px) {
    #productionPage .production-hero-inner { padding-left: 16px; padding-right: 16px; }
}

/* Login mobile SPA enhancement only */
@media (max-width: 720px) {
    .login-modal {
        align-items: center !important;
        padding: 10px !important;
    }
    .login-modal .login-spa-card {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100vh - 20px) !important;
        overflow-y: auto !important;
        border-radius: 22px !important;
    }
    .login-modal .login-spa-layout {
        grid-template-columns: 1fr !important;
        min-height: auto !important;
    }
    .login-modal .login-visual {
        display: block !important;
        height: 165px !important;
        min-height: 165px !important;
    }
    .login-modal .login-visual img {
        height: 100% !important;
    }
    .login-modal .login-visual-overlay {
        left: 18px !important;
        right: 58px !important;
        bottom: 16px !important;
    }
    .login-modal .login-visual-overlay span {
        margin-bottom: 6px !important;
        font-size: .68rem !important;
    }
    .login-modal .login-visual-overlay h3 {
        font-size: 1.05rem !important;
        line-height: 1.22 !important;
    }
    .login-modal .login-container {
        padding: 22px 18px !important;
    }
    .login-modal .login-header {
        margin-bottom: 16px !important;
    }
    .login-modal .login-header h2 {
        font-size: 1.45rem !important;
    }
    .login-modal .login-header p {
        font-size: .9rem !important;
    }
    .login-modal .login-tabs {
        margin-bottom: 16px !important;
    }
}
@media (max-width: 380px) {
    .login-modal .login-visual {
        height: 138px !important;
        min-height: 138px !important;
    }
    .login-modal .login-visual-overlay h3 {
        font-size: .96rem !important;
    }
    .login-modal .login-container {
        padding: 20px 16px !important;
    }
}

