/**
 * File: public/assets/css/style.css
 * Ajay Metals - Professional B2B Product Catalogue Stylesheet
 */

/* ============================================================
   1. DESIGN TOKENS & RESET
   ============================================================ */

:root {
    /* Color Palette */
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-surface-subtle: #f1f5f9;
    --color-border: #e2e8f0;
    --color-border-dark: #cbd5e1;

    --color-text-main: #0f172a;
    --color-text-muted: #475569;
    --color-text-subtle: #94a3b8;

    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-light: #eff6ff;

    --color-whatsapp: #16a34a;
    --color-whatsapp-hover: #15803d;
    --color-whatsapp-light: #f0fdf4;

    --color-pdf: #dc2626;
    --color-pdf-hover: #b91c1c;

    /* Typography */
    --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-card: 0 2px 6px -1px rgba(15, 23, 42, 0.06), 0 1px 4px -1px rgba(15, 23, 42, 0.04);
    --shadow-card-hover: 0 10px 25px -4px rgba(15, 23, 42, 0.1), 0 4px 10px -2px rgba(15, 23, 42, 0.05);
    --shadow-dropdown: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-drawer: -4px 0 24px rgba(0, 0, 0, 0.15);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Layout */
    --max-width: 1480px;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background-color: var(--color-bg);
    color: var(--color-text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select {
    font-family: inherit;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 640px) {
    .container {
        padding: 0 10px;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   2. HEADER & NAVIGATION
   ============================================================ */

.header {
    background: #ffffff;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-content {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 44px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
}

.brand-link:hover .logo-img {
    transform: scale(1.02);
}

.brand-meta {
    display: none;
}

@media (max-width: 520px) {
    .logo-img {
        height: 38px;
        max-width: 140px;
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Header Query Cart Button - Elegant WhatsApp Emerald Theme */
.header-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #128c7e 0%, #075e54 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    padding: 8px 18px;
    border-radius: var(--radius-full);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 3px 12px rgba(18, 140, 126, 0.3), 0 1px 2px rgba(0, 0, 0, 0.08);
    letter-spacing: 0.2px;
}

.header-cart-btn:hover {
    background: linear-gradient(135deg, #1ebea5 0%, #0e6e63 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(18, 140, 126, 0.42), 0 2px 5px rgba(0, 0, 0, 0.12);
}

.header-cart-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(18, 140, 126, 0.25);
}

.cart-btn-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}

.whatsapp-img {
    width: 22px;
    height: 22px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}

.cart-btn-text {
    white-space: nowrap;
    color: #ffffff;
    font-weight: 700;
}

.cart-badge-count {
    background: #ffffff;
    color: #075e54;
    font-size: 11.5px;
    font-weight: 800;
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .header-cart-btn {
        display: none !important;
    }
}

/* ============================================================
   3. TOOLBAR (SEARCH + CATEGORY FILTER + PDF DOWNLOAD)
   ============================================================ */

.main-content {
    flex: 1;
    padding: 24px 0 48px;
}

.search-filter-section {
    width: 100%;
    margin-bottom: 24px;
}

.toolbar-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    box-shadow: var(--shadow-card);
}

@media (max-width: 640px) {
    .toolbar-card {
        padding: 14px;
    }
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.search-form-group {
    flex: 2;
    min-width: 220px;
}

.category-dropdown-group {
    flex: 1.5;
    min-width: 200px;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .search-form-group {
        flex: 1 1 100%;
    }
    .category-dropdown-group {
        flex: 1 1 100%;
    }
    .toolbar-actions {
        width: 100%;
        display: flex;
    }
    .toolbar-actions .btn {
        flex: 1;
    }
}

/* Search input */
.search-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-input-icon {
    position: absolute;
    left: 14px;
    color: var(--color-text-subtle);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.search-input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 42px;
    background: #ffffff;
    border: 1.5px solid var(--color-border-dark);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--color-text-main);
    transition: all 0.2s ease;
}

.search-input::placeholder {
    color: var(--color-text-subtle);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Custom Category Dropdown */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    user-select: none;
}

.custom-select-trigger {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    background: #ffffff;
    border: 1.5px solid var(--color-border-dark);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-select-trigger:hover {
    border-color: #94a3b8;
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.custom-select-label-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-arrow {
    width: 18px;
    height: 18px;
    color: var(--color-text-muted);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.custom-select-wrapper.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-dropdown);
    z-index: 200;
    list-style: none;
    max-height: 320px;
    overflow-y: auto;
    padding: 6px;
}

.custom-select-wrapper.open .custom-select-dropdown {
    display: block;
}

.custom-select-option {
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s ease;
}

.custom-select-option:hover {
    background: var(--color-surface-subtle);
    color: var(--color-primary);
}

.custom-select-option.selected {
    background: var(--color-primary-light);
    color: var(--color-primary);
    font-weight: 700;
}

.custom-select-parent {
    font-weight: 700;
    color: var(--color-text-main);
}

.option-expand-btn {
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.option-expand-btn:hover {
    background: #e2e8f0;
}

.option-expand-arrow {
    width: 14px;
    height: 14px;
    color: var(--color-text-muted);
    transition: transform 0.15s ease;
}

.option-expand-btn.expanded .option-expand-arrow {
    transform: rotate(180deg);
}

.subcategory-list {
    display: none;
    list-style: none;
    padding: 2px 0 2px 14px;
}

.custom-select-sub {
    font-size: 12px;
    padding: 7px 10px;
    color: var(--color-text-muted);
}

.custom-select-sub:hover {
    color: var(--color-primary);
}

/* Action Buttons in Toolbar */
.btn {
    height: 44px;
    padding: 0 18px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-pdf {
    background: var(--color-pdf);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.btn-pdf:hover {
    background: var(--color-pdf-hover);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.35);
    transform: translateY(-1px);
}

.btn-pdf-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-secondary {
    background: var(--color-surface-subtle);
    color: var(--color-text-muted);
    border: 1px solid var(--color-border-dark);
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: var(--color-text-main);
}

/* Toolbar Meta Bar */
.toolbar-meta-bar {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
}

.meta-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.meta-count {
    color: var(--color-text-main);
}

.meta-chip {
    background: var(--color-surface-subtle);
    border: 1px solid var(--color-border);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--color-text-muted);
}

.meta-reset-link {
    color: var(--color-pdf);
    font-weight: 600;
    font-size: 12px;
}

.meta-reset-link:hover {
    text-decoration: underline;
}

/* ============================================================
   4. PRODUCT GRID & CARDS
   ============================================================ */

.products-section {
    width: 100%;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
    }
}

@media (min-width: 1280px) {
    .products-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 16px;
    }
}

/* Product Card */
.product-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 485px;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (max-width: 640px) {
    .product-card {
        min-height: 435px;
    }
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--color-border-dark);
}

/* Card Image Frame - Full Bleed Edge-to-Edge */
.card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f8fafc;
    border-bottom: none;
    overflow: hidden;
}

/* Slider Track & Slides */
.product-slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.slider-track {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.slider-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.slider-slide.active {
    opacity: 1;
    visibility: visible;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 0;
    display: block;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.04);
}

/* Slider Controls */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.7);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: all 0.2s ease;
}

.slider-prev { left: 8px; }
.slider-next { right: 8px; }

.card-image:hover .slider-btn,
.product-slider.has-multiple:focus-within .slider-btn {
    opacity: 1;
}

.slider-btn:hover {
    background: var(--color-primary);
}

.slider-dots {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 10;
    background: rgba(15, 23, 42, 0.5);
    padding: 3px 6px;
    border-radius: 12px;
}

.slider-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    border: none;
    cursor: pointer;
    padding: 0;
}

.slider-dot.active {
    background: #ffffff;
    width: 12px;
    border-radius: 3px;
}

.slider-counter-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.7);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    z-index: 10;
    letter-spacing: 0.5px;
}

.zoom-trigger-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--shadow-sm);
    transition: all 0.15s ease;
}

.zoom-trigger-badge:hover {
    background: #ffffff;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

/* Stock Badges */
.stock-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.stock-badge-stock-green {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.stock-badge-stock-yellow {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.stock-badge-stock-red {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.stock-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.stock-dot.stock-green { background: #10b981; }
.stock-dot.stock-yellow { background: #f59e0b; }
.stock-dot.stock-red { background: #ef4444; }

/* Card Content Area - Compact & Readable */
.card-content {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 7px;
}

.product-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-main);
    line-height: 1.25;
    min-height: auto;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-sku {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    color: var(--color-text-muted);
    background: var(--color-surface-subtle);
    border: 1px solid var(--color-border);
    padding: 1px 6px;
    border-radius: 4px;
    width: fit-content;
    line-height: 1.2;
    margin-top: 1px;
}

.product-sku .sku-prefix {
    color: var(--color-text-subtle);
}

/* Product Description Box on Card */
.product-desc-box {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 5px 8px;
    font-size: 11px;
    line-height: 1.35;
    color: var(--color-text-muted);
    max-height: 38px;
    overflow: hidden;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    user-select: none;
}

.product-desc-box:hover {
    background: #f1f5f9;
    border-color: var(--color-primary);
    color: var(--color-text-main);
}

.product-desc-box .desc-icon {
    font-size: 11px;
    flex-shrink: 0;
    margin-top: 1px;
    opacity: 0.8;
}

.product-desc-text {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    font-size: 11px;
}

/* Specifications Table - Tightened Spacing */
.product-specs {
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 6px 8px;
    font-size: 11px;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    line-height: 1.25;
}

.spec-label {
    color: var(--color-text-muted);
    font-weight: 500;
    font-size: 10.5px;
}

.spec-value {
    color: var(--color-text-main);
    font-weight: 600;
    font-size: 11px;
    text-align: right;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.color-swatch {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.2);
    display: inline-block;
}

/* Card Actions */
.product-actions {
    margin-top: auto;
    padding-top: 6px;
    display: flex;
    gap: 6px;
    align-items: center;
}

/* Quantity Stepper */
.qty-input {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid var(--color-border-dark);
    border-radius: var(--radius-sm);
    height: 36px;
    overflow: hidden;
    flex-shrink: 0;
}

.qty-btn {
    width: 28px;
    height: 100%;
    border: none;
    background: transparent;
    color: var(--color-text-main);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.qty-btn:hover {
    background: var(--color-surface-subtle);
}

.qty-field {
    width: 30px;
    height: 100%;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-main);
}

.qty-field::-webkit-inner-spin-button,
.qty-field::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Add Query Button */
.btn-add-query {
    flex: 1;
    min-height: 38px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(37, 99, 235, 0.25);
    padding: 8px 14px;
    white-space: nowrap;
}

.btn-add-query span {
    display: inline-block;
    padding: 0 2px;
}

/* Pointer events none ensures clicks never fail on child SVG/span */
.btn-add-query * {
    pointer-events: none;
}

.btn-add-query:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.btn-add-query.btn-added {
    background: var(--color-whatsapp) !important;
    color: #ffffff !important;
}

.query-btn-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

/* Mobile Specific (Screens <= 640px) 2-Column Optimization */
@media (max-width: 640px) {
    .products-grid {
        gap: 10px;
    }

    .card-content {
        padding: 8px 9px 10px;
        gap: 5px;
    }

    .product-header {
        gap: 2px;
    }

    .product-name {
        font-size: 13px;
        min-height: auto;
        line-height: 1.25;
        margin: 0;
    }

    .product-sku {
        font-size: 9.5px;
        padding: 1px 5px;
        margin-top: 1px;
    }

    .product-specs {
        padding: 4px 6px;
        gap: 2px;
    }

    .spec-item {
        font-size: 10px;
    }

    .spec-label {
        font-size: 9.5px;
    }

    .spec-value {
        font-size: 10px;
    }

    .product-actions {
        flex-direction: column;
        gap: 6px;
        padding-top: 6px;
    }

    .qty-input {
        width: 100%;
        height: 34px;
        border-radius: 8px;
        border: 1px solid #cbd5e1;
        justify-content: space-between;
    }

    .qty-btn {
        width: 36px;
        font-size: 15px;
        font-weight: 700;
    }

    .qty-field {
        width: 36px;
        font-size: 13px;
        font-weight: 700;
    }

    .btn-add-query {
        width: 100%;
        min-height: 42px;
        font-size: 13px;
        font-weight: 700;
        gap: 8px;
        padding: 10px 14px;
        border-radius: 8px;
        box-shadow: 0 3px 8px rgba(37, 99, 235, 0.32);
        display: flex;
        align-items: center;
        justify-content: center;
        letter-spacing: 0.2px;
    }

    .btn-add-query span {
        display: inline-block;
        padding: 0 2px;
    }

    .query-btn-icon {
        width: 16px;
        height: 16px;
    }

    .stock-badge {
        top: 6px;
        right: 6px;
        font-size: 9px;
        padding: 2px 5px;
    }

    .stock-dot {
        width: 5px;
        height: 5px;
    }

    .zoom-trigger-badge {
        bottom: 6px;
        right: 6px;
        font-size: 9px;
        padding: 2px 5px;
    }

    .slider-counter-badge {
        top: 6px;
        left: 6px;
        font-size: 9px;
        padding: 1px 5px;
    }

    .slider-btn {
        width: 22px;
        height: 22px;
        font-size: 9px;
    }
}

/* Empty State */
.no-products {
    background: var(--color-surface);
    border: 1px dashed var(--color-border-dark);
    border-radius: var(--radius-lg);
    padding: 48px 20px;
    text-align: center;
    color: var(--color-text-muted);
}

.no-products p {
    font-size: 15px;
    margin-bottom: 16px;
}

/* ============================================================
   5. MOBILE FLOATING CART BUTTON
   ============================================================ */

.mobile-floating-cart {
    display: none;
}

@media (max-width: 768px) {
    .mobile-floating-cart {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 24px;
        right: 20px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: #25d366;
        color: #ffffff;
        border: none;
        box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
        cursor: pointer;
        z-index: 150;
        transition: transform 0.2s ease;
    }

    .mobile-floating-cart:active {
        transform: scale(0.92);
    }

    .mobile-floating-cart .whatsapp-img {
        width: 28px;
        height: 28px;
    }

    .mobile-floating-cart .cart-badge-count {
        position: absolute;
        top: -4px;
        right: -4px;
        background: #ef4444;
        color: #ffffff;
        border: 2px solid #ffffff;
        font-size: 11px;
        font-weight: 800;
        min-width: 22px;
        height: 22px;
        border-radius: 11px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ============================================================
   6. QUERY CART DRAWER & OVERLAY
   ============================================================ */

.query-cart {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 380px;
    max-width: 90vw;
    background: #ffffff;
    box-shadow: var(--shadow-drawer);
    z-index: 300;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.query-cart.open {
    transform: translateX(0);
}

.cart-header {
    height: 64px;
    padding: 0 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-header h2 {
    font-size: 17px;
    font-weight: 800;
    color: var(--color-text-main);
}

.cart-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--color-surface-subtle);
    color: var(--color-text-muted);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.cart-close:hover {
    background: #e2e8f0;
    color: var(--color-text-main);
}

.cart-items-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.cart-items {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item {
    background: #f8fafc;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text-main);
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--color-pdf);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 2px 4px;
}

.cart-item-remove:hover {
    text-decoration: underline;
}

.cart-item-details {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--color-text-muted);
}

.cart-empty {
    text-align: center;
    color: var(--color-text-subtle);
    padding: 40px 0;
    font-size: 14px;
}

.cart-actions {
    padding: 16px 20px;
    border-top: 1px solid var(--color-border);
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-actions .btn {
    width: 100%;
}

.btn-primary {
    background: var(--color-whatsapp);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--color-whatsapp-hover);
    color: #ffffff;
}

.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
    z-index: 250;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.cart-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================================
   7. PRODUCT ANGLE ZOOM LIGHTBOX
   ============================================================ */

.lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
}

.lightbox-content {
    position: relative;
    width: 92vw;
    max-width: 900px;
    height: 85vh;
    max-height: 700px;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 2;
}

.lightbox-header {
    height: 56px;
    padding: 0 16px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
}

.lightbox-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lightbox-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text-main);
}

.lightbox-counter {
    background: var(--color-surface-subtle);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-muted);
}

.lightbox-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lightbox-btn {
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    background: var(--color-surface-subtle);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}

.lightbox-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.lightbox-btn.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.lightbox-close-btn {
    padding: 6px 12px;
    font-size: 15px;
    font-weight: 700;
}

.lightbox-close-btn:hover {
    background: #fee2e2;
    color: #dc2626;
    border-color: #fca5a5;
}

.lightbox-viewport {
    position: relative;
    flex: 1;
    background: #f8fafc;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-stage {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    position: relative;
    overflow: hidden;
}

.lightbox-stage.zoomed {
    cursor: grab;
}

.lightbox-stage.zoomed:active {
    cursor: grabbing;
}

.lightbox-stage img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    -webkit-user-drag: none;
    cursor: zoom-in;
}

.lightbox-stage.zoomed img,
.lightbox-stage img.zoomed {
    max-width: none;
    max-height: none;
    transform: scale(2.5);
    cursor: grab;
    transition: transform 0.1s ease-out;
}

.lightbox-stage.zoomed img:active,
.lightbox-stage img.zoomed:active {
    cursor: grabbing;
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--color-border);
    color: var(--color-text-main);
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: var(--shadow-card);
    transition: all 0.2s ease;
}

.lightbox-nav-btn:hover {
    background: #ffffff;
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateY(-50%) scale(1.08);
}

.lightbox-nav-btn.prev { left: 16px; }
.lightbox-nav-btn.next { right: 16px; }

.lightbox-footer {
    padding: 10px 16px;
    background: #ffffff;
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lightbox-hint {
    font-size: 11px;
    color: var(--color-text-subtle);
    text-align: center;
}

.lightbox-thumbs {
    display: flex;
    justify-content: center;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.lightbox-thumb {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--color-border);
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
    flex-shrink: 0;
}

.lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lightbox-thumb:hover {
    border-color: #94a3b8;
    transform: scale(1.05);
}

.lightbox-thumb.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* ============================================================
   8. FOOTER
   ============================================================ */

.footer {
    background: #ffffff;
    border-top: 1px solid var(--color-border);
    padding: 24px 0;
    margin-top: auto;
    font-size: 13px;
    color: var(--color-text-muted);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.footer-links a {
    color: var(--color-primary);
}

.footer-links a:hover {
    text-decoration: underline;
}

/* ============================================================
   9. DESCRIPTION MODAL
   ============================================================ */
.desc-modal {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.desc-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.desc-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    z-index: 1;
    overflow: hidden;
    animation: descModalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.desc-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    gap: 12px;
}

.desc-modal-title-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.desc-modal-badge {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.desc-modal-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-main);
    margin: 0;
    line-height: 1.3;
}

.desc-modal-sku {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--color-text-muted);
}

.desc-modal-close {
    background: var(--color-surface-subtle);
    border: 1px solid var(--color-border);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.desc-modal-close:hover {
    background: var(--color-border);
    color: var(--color-text-main);
}

.desc-modal-body {
    padding: 20px;
    overflow-y: auto;
    font-size: 13.5px;
    line-height: 1.6;
    color: #334155;
    white-space: pre-line;
}

@keyframes descModalScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}