:root {
    /* Colors - Deep Blue Theme (Amazon/Walmart Vibe) */
    --primary-blue: #0A3254; /* Walmartish/Deep Blue */
    --primary-blue-light: #125187;
    --primary-blue-dark: #041E34;
    --primary-blue-button: #001f3f; /* Deep Blue requested */
    --accent-yellow: #FFC220; /* Walmart Yellow / Amazon Orange-Yellow */
    --accent-yellow-hover: #EBB019;
    
    --bg-white: #FFFFFF;
    --bg-gray-light: #F2F4F8; /* Soft background */
    --bg-gray-lighter: #F8F9FA;
    
    --text-dark: #1C2433;
    --text-gray: #545D6A;
    --text-light: #808D9E;
    
    --border-color: #E2E8F0;
    
    /* Typography */
    --font-main: 'Inter', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-gray-light);
    color: var(--text-dark);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
}

/* Enforce touch targets for all primary buttons */
button, .btn, .qa-btn, .dd-btn, .view-link {
    min-height: 48px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 15px;
}

/* =========================================
   HEADER
   ========================================= */
.main-header {
    background-color: var(--primary-blue);
    color: var(--bg-white);
}

.header-top {
    padding: 12px 0;
}

.container-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}

.logo-primary {
    color: var(--bg-white);
}

.logo-secondary {
    color: var(--accent-yellow);
}

.search-container {
    flex-grow: 1;
    display: flex;
}

.search-form {
    display: flex;
    width: 100%;
    height: 44px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.search-category {
    background-color: #f3f3f3;
    border: none;
    padding: 0 10px;
    color: var(--text-dark);
    font-size: 14px;
    border-right: 1px solid #ddd;
    cursor: pointer;
    min-width: 130px;
}

.search-input {
    flex-grow: 1;
    border: none;
    padding: 0 15px;
    font-size: 15px;
    color: var(--text-dark);
}

.search-input:focus {
    outline: none;
}

.search-button {
    background-color: var(--accent-yellow);
    border: none;
    width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dark);
    transition: background-color var(--transition-fast);
}

.search-button:hover {
    background-color: var(--accent-yellow-hover);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.header-link {
    color: var(--bg-white);
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.header-link:hover {
    color: var(--accent-yellow);
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-bottom {
    background-color: var(--primary-blue-dark);
    padding: 8px 0;
}

.nav-links {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none; /* Firefox */
}

.nav-links::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.nav-link {
    color: var(--bg-white);
    font-size: 14px;
    font-weight: 500;
    padding: 5px 0;
}

.nav-link:hover {
    color: var(--accent-yellow);
    box-shadow: 0 2px 0 0 var(--accent-yellow);
}

.all-menu {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

/* =========================================
   SECTIONS
   ========================================= */
.section-padding {
    padding: 40px 0;
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================================
   CARDS
   ========================================= */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.category-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    border: 1px solid var(--border-color);
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-blue-light);
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.shop-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
    border: 1px solid var(--border-color);
}

.shop-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.shop-cover {
    height: 100px;
    background-color: var(--bg-gray-light);
    background-size: cover;
    background-position: center;
}

.shop-info {
    padding: 15px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-top: -30px;
}

.shop-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--bg-white);
    border: 3px solid var(--bg-white);
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    object-fit: cover;
}

.shop-details {
    padding-top: 30px;
}

.shop-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}

/* TIKTOK / INSTA STYLE PRODUCT GRID (COMPACT) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 140px); /* FIXED WIDTH TO PREVENT STRETCHING */
    gap: 15px;
    justify-content: center; /* CENTER THE ENTIRE GRID BLOCk */
}

.product-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08); /* Lighter shadow */
    border: 1px solid #ebebeb; /* Crisp faint border */
    transition: transform 100ms ease-in-out;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.product-image {
    aspect-ratio: 1/1; /* STRICT 1:1 SQUARE */
    background-color: var(--bg-gray-lighter);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge-trending {
    position: absolute;
    top: 5px;
    left: 5px;
    background-color: var(--accent-yellow);
    color: var(--primary-blue-dark);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 2;
}

.product-info {
    padding: 8px; /* TIGHT PADDING */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 13px; /* Smaller font */
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}

.product-price {
    font-size: 15px; /* Stand out slightly */
    font-weight: 800;
    color: var(--text-dark);
    margin-top: auto;
}

.product-shop {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================
   TOP BANNER SECTION (REPLACING HERO)
   ========================================= */
.top-banner {
    width: 100%;
    background-color: var(--primary-blue-dark);
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.top-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 300px; /* Keep it slick */
    display: block;
}

/* =========================================
   ADS
   ========================================= */
.ad-banner {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 20px 0;
    display: block;
}

.ad-banner img {
    width: 100%;
    display: block;
}

.ad-script-container {
    margin: 20px 0;
    text-align: center;
    background-color: var(--bg-gray-lighter);
    padding: 10px;
    border-radius: var(--radius-md);
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================
   FOOTER
   ========================================= */
.main-footer {
    background-color: var(--primary-blue-dark);
    color: var(--bg-white);
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--accent-yellow);
}

.footer-col p, .footer-col ul li a {
    color: #ccc;
    font-size: 14px;
    margin-bottom: 10px;
}

.footer-col ul li a:hover {
    color: var(--bg-white);
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 14px;
    color: #aaa;
}

/* =========================================
   MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 768px) {
    .container-header {
        flex-wrap: wrap;
    }
    
    .logo {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
    }
    
    .search-container {
        order: 3;
        width: 100%;
        margin-top: 10px;
    }
    
    .header-actions {
        order: 2;
        width: 100%;
        justify-content: space-between;
    }
}

/* =========================================
   AUTH & FORMS (PREMIUM UI RESTORATION)
   ========================================= */

.auth-page-bg {
    background-color: #f4f7f6; /* Distinct Light Gray */
    min-height: 90vh; /* More height for better centering */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

.auth-card {
    background-color: #FFFFFF !important; /* Force White */
    padding: 50px; /* More breathing room */
    border-radius: 15px;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.25), 0 15px 30px -10px rgba(0, 0, 0, 0.15); /* Deep 'Elevated' Shadow */
    width: 100%;
    max-width: 500px; /* Fixed at 500px as per instructions */
    border: none; /* No border for a cleaner elevated look */
    transition: transform var(--transition-normal);
}

.auth-card-title {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary-blue-dark);
    text-align: center;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.auth-card-subtitle {
    font-size: 16px;
    color: var(--text-gray);
    text-align: center;
    margin-bottom: 40px;
    font-weight: 500;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 700; /* Bold */
    color: var(--text-dark);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    background-color: var(--bg-gray-lighter);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 18px; /* Padding update */
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font-main);
    color: var(--text-dark);
    transition: all var(--transition-fast);
}

.form-input:focus {
    outline: none;
    background-color: var(--bg-white);
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(10, 50, 84, 0.1);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.btn-auth {
    width: 100%;
    background-color: var(--primary-blue-button);
    color: #FFFFFF; /* White text */
    border: none;
    border-radius: var(--radius-md);
    padding: 18px;
    font-size: 16px;
    font-weight: 800; /* Bold */
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    display: inline-block;
    text-align: center;
}

.btn-auth:hover {
    background-color: var(--primary-blue-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-auth:active {
    transform: translateY(0);
}

.btn-auth:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-footer-text {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
    color: var(--text-gray);
}

.auth-footer-link {
    color: var(--primary-blue);
    font-weight: 800;
    text-decoration: underline;
}

/* Utilities */
.mx-auto { margin-left: auto; margin-right: auto; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.max-w-md { max-width: 500px; } /* Updated to 500px */
.max-w-2xl { max-width: 500px; } /* Also updated to 500px as per instructions */
.mt-4 { margin-top: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-6 { margin-top: 1.5rem; }
.hidden { display: none; }
.relative { position: relative; }
.absolute { position: absolute; }
.right-4 { right: 16px; }
.top-4 { top: 16px; }
.text-green-500 { color: #10b981; }

.space-y-6 > * + * { margin-top: 1.5rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-4 { gap: 1rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-10 { margin-bottom: 2.5rem; }

.text-blue-600 { color: var(--primary-blue-light); }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.uppercase { text-transform: uppercase; }
.tracking-tighter { letter-spacing: -0.05em; }

/* Grid for Form */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.col-span-2 {
    grid-column: span 2;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .col-span-2 {
        grid-column: span 1;
    }
    .auth-card {
        padding: 30px 20px;
    }
}

/* =========================================
   EXTRA RESPONSIVE UTILITIES
   (covers Tailwind-like classes used in views)
   ========================================= */

/* Flex direction */
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0, .shrink-0 { flex-shrink: 0; }
.flex-1 { flex: 1; }

/* Gap */
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

/* Margin */
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mr-1 { margin-right: 0.25rem; }

/* Padding */
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-12 { padding: 3rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.pb-3 { padding-bottom: 0.75rem; }
.pb-4 { padding-bottom: 1rem; }
.pt-4 { padding-top: 1rem; }
.pt-8 { padding-top: 2rem; }

/* Text */
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-red-500 { color: #ef4444; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-900 { color: #111827; }
.text-blue-400 { color: #60a5fa; }
.text-blue-900 { color: #1e3a5f; }
.font-medium { font-weight: 500; }
.font-extrabold { font-weight: 800; }
.italic { font-style: italic; }
.leading-relaxed { line-height: 1.625; }
.tracking-widest { letter-spacing: 0.1em; }
.tracking-tight { letter-spacing: -0.025em; }
.underline { text-decoration: underline; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.overflow-hidden { overflow: hidden; }
.text-overflow-ellipsis { text-overflow: ellipsis; }

/* Background / Border */
.bg-white { background-color: #fff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-green-100 { background-color: #dcfce7; }
.bg-blue-600 { background-color: #2563eb; }
.border { border: 1px solid #e5e7eb; }
.border-t { border-top: 1px solid #e5e7eb; }
.border-b { border-bottom: 1px solid #e5e7eb; }
.border-gray-100 { border-color: #f3f4f6; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.ring-8 { box-shadow: 0 0 0 8px; }
.ring-green-50 { box-shadow: 0 0 0 8px #f0fdf4; }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05); }

/* Width / Height */
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.h-24 { height: 6rem; }
.w-24 { width: 6rem; }
.max-w-lg { max-width: 32rem; }
.min-h-screen { min-height: 100vh; }
.inline-flex { display: inline-flex; }

/* Display */
.block { display: block; }
.inline { display: inline; }
.space-y-4 > * + * { margin-top: 1rem; }

/* Hover utilities via classes */
.hover\:bg-blue-700:hover { background-color: #1d4ed8; }
.hover\:bg-gray-200:hover { background-color: #e5e7eb; }
.transition { transition: all 0.15s ease-in-out; }

/* Grid / Layout Extensions */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

@media (min-width: 640px) {
    .sm\:flex-row { flex-direction: row; }
    .sm\:w-auto { width: auto; }
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ============================================================
   SITE-WIDE MOBILE RESPONSIVENESS — All Pages
   Applies to: Storefront, Auth, Checkout, Order, Shop pages
   ============================================================ */

/* ── Product Grid: 2-col on mobile (global fix) ── */
@media (max-width: 767px) {
    /* The old storefront product-grid uses auto-fill/140px — override to 2-col */
    .product-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        justify-content: stretch !important;
    }

    /* Section padding tighter on mobile */
    .section-padding { padding: 24px 0; }

    /* Container horizontal padding */
    .container { padding: 0 12px; }

    /* Section titles */
    .section-title { font-size: 16px; }

    /* Banner: cap height on mobile */
    .top-banner img { max-height: 160px; object-fit: cover; }

    /* Footer: single column */
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    /* Category grid: smaller minmax */
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 10px;
    }

    /* Shop grid: single column */
    .shop-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    /* Auth card: less padding on phone */
    .auth-card { padding: 24px 16px; }
    .auth-card-title { font-size: 24px; }
    .auth-card-subtitle { font-size: 14px; margin-bottom: 24px; }

    /* Auth page background: less top/bottom gap */
    .auth-page-bg { padding: 28px 12px; }

    /* Form grid: single col on mobile */
    .form-grid { grid-template-columns: 1fr; }
    .col-span-2 { grid-column: span 1; }

    /* Nav links bar: reduce font */
    .nav-link { font-size: 13px; }

    /* Header actions: compact */
    .header-actions { gap: 12px; }

    /* Checkout / order pages: ensure no horizontal overflow */
    .receipt-container,
    .checkout-container {
        margin: 0;
        border-radius: 0;
    }
}

/* ── Small phones (≤480px) ── */
@media (max-width: 480px) {
    .product-grid { gap: 8px !important; }
    .product-info { padding: 6px; }
    .product-name { font-size: 12px; }
    .product-price { font-size: 13px; }

    /* Footer text */
    .footer-col h3 { font-size: 14px; }
    .footer-col p, .footer-col ul li a { font-size: 13px; }
    .footer-bottom { font-size: 12px; }

    /* Buttons: full-width on tiny screens */
    .btn-auth { font-size: 14px; padding: 14px; }
}

/* ── Tablet (768px – 1023px) ── */
@media (min-width: 768px) and (max-width: 1023px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr) !important; /* md: 4 columns */
        gap: 14px !important;
        justify-content: stretch !important;
    }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    .shop-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Tables: always scrollable on mobile ── */
@media (max-width: 1023px) {
    table { min-width: 540px; }
    .table-scroll,
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
    }
}

/* ── Checkout Form ── */
.checkout-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 640px) {
    .checkout-form-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Pagination: center & wrap ── */
nav[role="navigation"] {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

/* =========================================
   PREMIUM PRODUCT CARD V2 (UNIFIED)
   ========================================= */
.product-grid-v2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Mobile: 2 col */
    gap: 12px;
    margin-bottom: 30px;
}

/* md: 4 columns */
@media (min-width: 768px) {
    .product-grid-v2 {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* lg: 6 columns — matches home page layout */
@media (min-width: 1024px) {
    .product-grid-v2 {
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
    }
}

.pcard-v2 {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
    height: 100%;
    position: relative;
    box-sizing: border-box;
}

.pcard-v2:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    border-color: #febd69;
}

.pcard-img-wrap {
    width: 100%;
    aspect-ratio: 1/1;
    position: relative;
    background: #f8fafc;
    overflow: hidden;
}

.pcard-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.pcard-v2:hover .pcard-img {
    transform: scale(1.05);
}

.pcard-badge-sponsored {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #FFD700;
    color: #000000;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    z-index: 5;
    border: 1px solid rgba(0,0,0,0.05);
}

.pcard-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.pcard-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 2;
    height: 38px; /* Standard 2-line height */
}

.pcard-price {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.pcard-shop-name {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
    margin-top: auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* NUCLEAR OVERRIDE: Force 6 columns on desktop */
@media (min-width: 1024px) {
    .product-grid, .home-product-section, .home-product-grid { 
        display: grid !important;
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important; 
    }
}

/* FORCE 6 COLUMNS - DO NOT OVERRIDE */
@media (min-width: 1024px) {
    .product-grid-force, .home-product-grid, .category-product-wrapper { 
        display: grid !important;
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important; 
        gap: 12px !important;
    }
    .product-grid-force > div, .product-card { 
        width: 100% !important; 
        max-width: none !important; 
        flex: none !important;
    }
}
@media (max-width: 767px) {
    .product-grid-force { grid-template-columns: repeat(2, 1fr) !important; }
}
