/* ==========================================================================
   STOREFRONT STYLES & CONVERSION-FOCUSED COMPONENTS
   Modern Supermarket & Grocery Store UI (JGK Kirana Edition)
   ========================================================================== */

/* Top Announcement Bar */
.announcement-bar {
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    color: #ffffff;
    font-size: 0.815rem;
    font-weight: 500;
    padding: 0.45rem 1rem;
    text-align: center;
    position: relative;
    z-index: 50;
    letter-spacing: 0.02em;
}

@media (max-width: 640px) {
    .announcement-bar .container {
        flex-direction: column;
        gap: 0.35rem;
        text-align: center;
    }
    .announcement-bar .container > div {
        justify-content: center;
    }
}

/* Header & Navigation */
.store-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
    transition: all var(--transition-fast);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 1.5rem;
    padding: 0.5rem 0;
}

.store-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
}

.store-logo-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.3);
    flex-shrink: 0;
}

/* Live Instant Search Bar */
.search-container {
    position: relative;
    flex: 1;
    max-width: 600px;
    min-width: 0;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0.35rem 0.45rem 0.35rem 1.15rem;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.search-input-wrap:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.18);
    background: var(--bg-surface);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-main);
    font-size: 0.9rem;
    font-family: inherit;
    min-width: 0;
}

.search-btn {
    background: var(--primary);
    color: #ffffff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast);
    flex-shrink: 0;
}

.search-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.04);
}

/* Live Search Dropdown */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--bg-surface);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--glass-shadow-lg);
    z-index: 1200;
    overflow: hidden;
    display: none;
    max-height: 420px;
    overflow-y: auto;
}

.search-results-dropdown.active {
    display: block;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
    text-decoration: none;
    color: var(--text-main);
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: rgba(var(--primary-rgb), 0.08);
}

.search-item img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.theme-toggle-btn, .header-icon-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    width: 42px;
    height: 42px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.theme-toggle-btn:hover, .header-icon-btn:hover {
    background: var(--glass-bg-hover);
    transform: translateY(-2px);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.cart-count-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    line-height: 1;
}

/* Responsive Header */
@media (max-width: 768px) {
    .header-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "logo actions"
            "search search";
        height: auto;
        min-height: auto;
        padding: 0.65rem 0 0.5rem;
        row-gap: 0.65rem;
        column-gap: 0.75rem;
        align-items: center;
    }

    .store-logo {
        grid-area: logo;
        min-width: 0;
        max-width: 100%;
        font-size: 1.15rem;
        gap: 0.5rem;
        overflow: hidden;
    }

    .store-logo-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
        flex-shrink: 0;
    }

    .store-logo .text-xs {
        display: none; /* Hide tagline on mobile to keep header clean and prevent overlap */
    }

    .header-actions {
        grid-area: actions;
        gap: 0.4rem;
        flex-shrink: 0;
    }

    .theme-toggle-btn, .header-icon-btn {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }

    .search-container {
        grid-area: search;
        width: 100%;
        max-width: 100%;
        margin-top: 0;
    }

    .search-input-wrap {
        padding: 0.3rem 0.35rem 0.3rem 1rem;
    }

    .search-input {
        font-size: 0.85rem;
    }

    .search-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

/* Category Navigation Sub-bar */
.category-nav-bar {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.65rem 0;
    overflow-x: auto;
    white-space: nowrap;
    position: relative;
    z-index: 80;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-nav-bar::-webkit-scrollbar {
    display: none;
}

.category-pills {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    flex-shrink: 0;
    text-decoration: none;
}

.cat-pill:hover, .cat-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Hero Section & Banners */
.hero-slider-section {
    padding: 1.5rem 0;
}

.hero-banner-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.92) 0%, rgba(21, 128, 61, 0.96) 100%);
    color: #ffffff;
    min-height: 340px;
    display: flex;
    align-items: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.hero-banner-card img.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    mix-blend-mode: overlay;
    opacity: 0.35;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 3rem;
    max-width: 650px;
}

@media (max-width: 768px) {
    .hero-banner-card {
        min-height: 260px;
        border-radius: var(--radius-md);
    }
    .hero-content {
        padding: 1.5rem 1.25rem;
    }
    .hero-content h1 {
        font-size: 1.5rem;
        line-height: 1.25;
    }
    .hero-content p {
        font-size: 0.875rem;
        margin-bottom: 1.25rem;
    }
    .hero-content .flex {
        flex-direction: column;
        width: 100%;
        gap: 0.65rem;
    }
    .hero-content .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Quick Category Circular Rail */
.quick-categories-section {
    padding: 1.25rem 0;
}

.quick-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 1rem;
    text-align: center;
}

.quick-cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.5rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    transition: transform var(--transition-smooth), border-color var(--transition-smooth);
    text-decoration: none;
}

.quick-cat-item:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--glass-shadow);
}

.quick-cat-img-box {
    width: 68px;
    height: 68px;
    border-radius: var(--radius-full);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--primary-rgb), 0.08);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
    flex-shrink: 0;
}

.quick-cat-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quick-cat-item span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
}

@media (max-width: 640px) {
    .quick-cat-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
    .quick-cat-item {
        padding: 0.5rem 0.25rem;
    }
    .quick-cat-img-box {
        width: 52px;
        height: 52px;
    }
    .quick-cat-item span {
        font-size: 0.7rem;
    }
}

@media (max-width: 380px) {
    .quick-cat-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.35rem;
    }
    .quick-cat-img-box {
        width: 46px;
        height: 46px;
    }
    .quick-cat-item span {
        font-size: 0.65rem;
    }
}

/* Product Cards Grid & Design */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    width: 100%;
    min-width: 0;
}

.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1rem;
    border-radius: var(--radius-md);
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.product-card-top {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(0, 0, 0, 0.02);
    margin-bottom: 0.85rem;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card-top img {
    max-height: 90%;
    max-width: 90%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover .product-card-top img {
    transform: scale(1.08);
}

.product-badge-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 5;
}

.product-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.35;
    margin-bottom: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.7em;
}

.product-hindi-name {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 1.2em;
}

/* Variant Selector */
.product-variant-select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.35rem 0.65rem;
    font-size: 0.825rem;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-main);
    margin-bottom: 0.75rem;
    outline: none;
    cursor: pointer;
    height: 32px;
    text-overflow: ellipsis;
    overflow: hidden;
}

.product-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.current-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary);
}

.mrp-price {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* Card Action Bar (WhatsApp + Add Stepper) */
.product-actions {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.product-actions-single .add-to-cart-box {
    width: 100%;
    flex: 1;
}

.btn-card-whatsapp {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background: #25d366;
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none;
    transition: transform var(--transition-fast), background var(--transition-fast);
}

.btn-card-whatsapp:hover {
    background: #20ba5a;
    transform: scale(1.05);
}

/* Add To Cart & Stepper Box */
.add-to-cart-box {
    flex: 1;
    position: relative;
    height: 38px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--primary);
    background: #ffffff;
    min-width: 0;
}

[data-theme="dark"] .add-to-cart-box {
    background: var(--bg-surface);
}

.btn-add-main {
    width: 100%;
    height: 100%;
    background: transparent;
    color: var(--primary);
    border: none;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.btn-add-main:hover {
    background: var(--primary);
    color: #ffffff;
}

.qty-stepper {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: space-between;
    background: var(--primary);
    color: #ffffff;
}

.add-to-cart-box.active .btn-add-main {
    display: none;
}

.add-to-cart-box.active .qty-stepper {
    display: flex;
}

.stepper-btn {
    width: 32px;
    height: 100%;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stepper-btn:hover {
    background: rgba(0, 0, 0, 0.15);
}

.stepper-input {
    width: 28px;
    text-align: center;
    background: transparent;
    border: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.9rem;
    outline: none;
}

/* Responsive Product Card for 2-Column Mobile Grid */
@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
        width: 100%;
    }

    .product-card {
        padding: 0.6rem;
        min-width: 0;
    }

    .product-card-top {
        margin-bottom: 0.5rem;
    }

    .product-title {
        font-size: 0.825rem;
        min-height: 2.4em;
        line-height: 1.25;
        word-break: break-word;
        overflow-wrap: break-word;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .product-hindi-name {
        font-size: 0.72rem;
    }

    .product-price-row {
        gap: 0.25rem;
        margin-bottom: 0.5rem;
    }

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

    .mrp-price {
        font-size: 0.72rem;
    }

    .product-variant-select {
        height: 30px;
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .product-actions {
        gap: 0.35rem;
        min-width: 0;
    }

    .btn-card-whatsapp {
        width: 32px;
        height: 32px;
        font-size: 0.95rem;
        flex-shrink: 0;
    }

    .add-to-cart-box {
        height: 32px;
        min-width: 0;
    }

    .btn-add-main {
        font-size: 0.78rem;
        padding: 0 4px;
        gap: 0.2rem;
        white-space: nowrap;
    }

    .stepper-btn {
        width: 24px;
        font-size: 0.8rem;
        flex-shrink: 0;
    }

    .stepper-input {
        width: 20px;
        font-size: 0.78rem;
        min-width: 0;
    }
}

@media (max-width: 350px) {
    .product-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .product-card {
        padding: 0.85rem;
    }
    .product-actions {
        gap: 0.5rem;
    }
    .btn-card-whatsapp {
        width: 36px;
        height: 36px;
    }
    .add-to-cart-box {
        height: 36px;
    }
}

/* ==========================================================================
   PAGE SPECIFIC RESPONSIVE LAYOUTS (PREVENTING OVERLAPS)
   ========================================================================== */

/* Catalog Layout */
.catalog-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
    width: 100%;
    min-width: 0;
}

.catalog-layout > * {
    min-width: 0;
    max-width: 100%;
}

.catalog-layout aside {
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

.catalog-layout main {
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

.catalog-cat-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
    padding: 0;
    margin: 0;
    list-style: none;
}
.catalog-cat-list li {
    list-style: none;
}
.catalog-cat-list li a {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    color: var(--text-secondary);
    transition: background var(--transition-fast), color var(--transition-fast);
}
.catalog-cat-list li a:hover,
.catalog-cat-list li a.active,
.catalog-cat-list li a.bg-glass {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    font-weight: 700;
}

@media (max-width: 900px) {
    .catalog-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }
    .catalog-layout aside .sticky {
        position: static;
        top: auto;
    }
    .catalog-layout aside .glass-panel {
        padding: 0.75rem 1rem;
        margin-bottom: 0.25rem;
        overflow: hidden;
    }
    .catalog-layout aside h3 {
        margin-bottom: 0.5rem;
        padding-bottom: 0.35rem;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }
    .catalog-layout aside ul,
    .catalog-cat-list {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 0.5rem;
        padding-bottom: 0.4rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        max-width: 100%;
        width: 100%;
    }
    .catalog-layout aside ul::-webkit-scrollbar,
    .catalog-cat-list::-webkit-scrollbar {
        display: none;
    }
    .catalog-layout aside ul li,
    .catalog-cat-list li {
        flex-shrink: 0;
    }
    .catalog-layout aside ul li a,
    .catalog-cat-list li a {
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        padding: 0.4rem 0.85rem !important;
        font-size: 0.8rem;
        font-weight: 600;
        border-radius: 9999px !important;
        border: 1px solid var(--border-color);
        background: var(--bg-surface);
        text-decoration: none;
    }
    .catalog-layout aside ul li a.bg-glass,
    .catalog-layout aside ul li a.active,
    .catalog-layout aside ul li a.text-primary,
    .catalog-cat-list li a.bg-glass,
    .catalog-cat-list li a.active,
    .catalog-cat-list li a.text-primary {
        border-color: var(--primary) !important;
        background: rgba(var(--primary-rgb), 0.12) !important;
        color: var(--primary) !important;
    }
    .catalog-layout aside ul li a i.fa-angle-right,
    .catalog-cat-list li a i.fa-angle-right {
        display: none !important;
    }
}

/* Product Detail Grid */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* Product Showcase Box */
.product-showcase-box {
    min-height: 420px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

.product-showcase-box img {
    max-height: 360px;
    object-fit: contain;
    transition: transform 0.4s ease;
}

@media (max-width: 840px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .product-showcase-box {
        min-height: 240px;
        max-height: 300px;
        padding: 1rem;
    }
    .product-showcase-box img {
        max-height: 220px;
    }
}

/* Cart Page Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.cart-page-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 600px) {
    .cart-page-item {
        flex-wrap: wrap;
        gap: 0.75rem;
    }
    .cart-page-item .cart-item-info {
        flex: 1 1 calc(100% - 80px);
    }
    .cart-page-item .cart-item-actions-row {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-top: 0.5rem;
        border-top: 1px dashed var(--border-color);
    }
}

/* Checkout Page Layout */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .checkout-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 640px) {
    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

.form-row-3 {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 768px) {
    .form-row-3 {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* Trust Grid */
.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 540px) {
    .trust-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Footer Grid */
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2rem;
}

@media (max-width: 991px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ==========================================================================
   GLASSMOPRHIC SLIDE-OVER CART DRAWER
   ========================================================================== */
.cart-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 440px;
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    background: var(--bg-surface);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border-left: 1px solid var(--glass-border);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
    z-index: 2001;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    transform: translateX(0);
}

.cart-drawer-header {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

/* Free Shipping Meter */
.free-shipping-meter {
    padding: 0.85rem 1.25rem;
    background: rgba(var(--primary-rgb), 0.08);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.15);
}

.meter-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-top: 0.4rem;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #10b981);
    border-radius: var(--radius-full);
    transition: width 0.4s ease;
}

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.cart-item img {
    width: 65px;
    height: 65px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-drawer-footer {
    padding: 1.25rem;
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0));
    border-top: 1px solid var(--border-color);
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

/* ==========================================================================
   MOBILE BOTTOM NAVIGATION BAR
   ========================================================================== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.04);
    z-index: 1500;
    display: none;
    align-items: center;
    justify-content: space-around;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    color: var(--text-muted);
    font-size: 0.725rem;
    font-weight: 500;
    position: relative;
    text-decoration: none;
    flex: 1;
    max-width: 90px;
    height: 100%;
}

.mobile-nav-item i {
    font-size: 1.2rem;
}

.mobile-nav-item.active, .mobile-nav-item:hover {
    color: var(--primary);
}

@media (max-width: 991px) {
    .mobile-bottom-nav {
        display: flex;
        height: calc(60px + env(safe-area-inset-bottom, 0));
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    body {
        padding-bottom: calc(74px + env(safe-area-inset-bottom, 0));
    }
}

/* Mobile Banner & Actions Refinements */
@media (max-width: 640px) {
    .promo-banner {
        padding: 1.25rem 1rem !important;
    }
    .promo-banner h3 {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
    }
    .promo-banner .btn {
        width: 100% !important;
        font-size: 0.875rem !important;
        padding: 0.65rem 1rem !important;
        justify-content: center !important;
    }

    .product-detail-actions {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }
    .product-detail-actions > div {
        width: 100% !important;
        justify-content: space-between !important;
    }
    .product-detail-actions button {
        width: 100% !important;
    }
}

