/* ========================================
   GRIFFINS MEDICALS - PRODUCT PAGE STYLES
   Follows Home Page Theme System
   ======================================== */

/* ----------------------------------------
   1. CSS VARIABLES (Matching Cart & Home Theme)
   ---------------------------------------- */
   :root {
    --primary: #2d6a4f;
    --primary-dark: #1b4d3e;
    --primary-light: #d1fae5;
    --primary-gradient: linear-gradient(135deg, #2d6a4f, #1b4d3e);
    --primary-gradient-hover: linear-gradient(135deg, #40916c, #2d6a4f);
    
    --secondary: #1a3c34;
    --secondary-dark: #0a2e25;
    --secondary-light: #e6fffa;
    
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --info: #3b82f6;
    --info-light: #dbeafe;
    
    --white: #ffffff;
    --black: #000000;
    
    --border-radius-sm: 6px;
    --border-radius-md: 10px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    --border-radius-2xl: 24px;
    --border-radius-3xl: 28px;
    --border-radius-pill: 50px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1);
    
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ----------------------------------------
   2. GLOBAL RESETS
   ---------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background: linear-gradient(135deg, #f5f7fb 0%, #eef2f6 100%);
    color: var(--gray-900);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden !important;
    height: 100vh;
    padding-right: 15px;
}

html {
    scroll-behavior: smooth;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Loading States */
.loading-spinner {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--primary);
}

.loading-text,
.panel-status {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500);
    font-style: italic;
    background: var(--gray-100);
    border-radius: var(--border-radius-lg);
    border: 2px dashed var(--gray-300);
}

.empty-state,
.empty-msg,
.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500);
    background: var(--gray-100);
    border-radius: var(--border-radius-lg);
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
    color: var(--gray-400);
}

.error-text {
    color: var(--danger);
    background: var(--danger-light);
    padding: 0.75rem;
    border-radius: var(--border-radius-md);
    text-align: center;
    font-weight: 600;
}

/* ----------------------------------------
   3. TOAST NOTIFICATION SYSTEM
   ---------------------------------------- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    min-width: 320px;
    max-width: 420px;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease forwards;
    position: relative;
    overflow: hidden;
    border-left: 4px solid;
}

.toast-success {
    border-left-color: var(--success);
}
.toast-success .toast-icon {
    background: var(--success-light);
    color: var(--success);
}

.toast-error {
    border-left-color: var(--danger);
}
.toast-error .toast-icon {
    background: var(--danger-light);
    color: var(--danger);
}

.toast-warning {
    border-left-color: var(--warning);
}
.toast-warning .toast-icon {
    background: var(--warning-light);
    color: var(--warning);
}

.toast-info {
    border-left-color: var(--info);
}
.toast-info .toast-icon {
    background: var(--info-light);
    color: var(--info);
}

.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.2rem;
    color: var(--gray-800);
}

.toast-message {
    font-size: 0.8rem;
    color: var(--gray-600);
    line-height: 1.4;
}

.toast-close {
    background: transparent;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--gray-400);
    padding: 0.25rem;
    transition: all var(--transition-fast);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--gray-100);
    color: var(--danger);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    animation: toastProgress 3s linear forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes toastProgress {
    from { width: 100%; }
    to { width: 0%; }
}

/* ----------------------------------------
   4. HEADER STYLES
   ---------------------------------------- */
.main-header {
    background: linear-gradient(135deg, #0b3b2f 0%, #0a2e25 100%);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff, var(--primary-light));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.02);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.top-nav {
    display: flex;
    gap: 1rem;
}

.top-nav a {
    color: var(--gray-200);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-pill);
}

.top-nav a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.action-pill {
    background: var(--primary-gradient);
    color: white !important;
    padding: 0.5rem 1.2rem !important;
    border-radius: var(--border-radius-pill) !important;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    cursor: pointer;
    font-size: 0.85rem;
}

.action-pill:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

#cartCount,
#quoteCount {
    background: #ffc107;
    color: #1a2a3a;
    padding: 0.15rem 0.5rem;
    border-radius: var(--border-radius-pill);
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 0.25rem;
}

/* ----------------------------------------
   5. RESULTS HEADER & FILTERS
   ---------------------------------------- */
.results-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary-dark) 100%);
    color: white;
    padding: 3rem 2rem 4rem;
}

.breadcrumb-nav {
    max-width: 1300px;
    margin: 0 auto 1.5rem;
    font-size: 0.85rem;
    color: var(--gray-300);
}

.breadcrumb-nav a {
    color: var(--gray-300);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb-nav a:hover {
    color: white;
}

.breadcrumb-nav span {
    color: var(--primary-light);
}

.header-content-wrapper {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.title-text {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#pageTitle {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
}

#pageSubtitle {
    color: var(--gray-200);
    font-size: 1rem;
}

#mainUploadBtn {
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    border: none;
    font-weight: 700;
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
}

#mainUploadBtn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-action-bar {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    flex: 1;
    min-width: 280px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-width: 140px;
}

.filter-group label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.filter-group select {
    height: 44px;
    padding: 0 0.75rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--gray-300);
    background: var(--gray-50);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

.price-slider-wrapper {
    padding: 0 0.5rem;
}

#priceRange {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: var(--gray-200);
    accent-color: var(--primary);
    cursor: pointer;
}

.price-range-values {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    color: var(--gray-500);
}

.results-meta {
    max-width: 1300px;
    margin: 1.5rem auto 0;
    padding: 0 1rem;
}

#productCountText {
    font-size: 0.85rem;
    color: var(--gray-300);
}

/* ----------------------------------------
   6. PRODUCT GRID
   ---------------------------------------- */
.product-container {
    max-width: 1300px;
    margin: 3rem auto;
    padding: 0 1.5rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    border-left: 5px solid var(--primary);
    padding-left: 1rem;
    margin-bottom: 2rem;
    color: var(--secondary);
}

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

.product-card {
    background: white;
    border-radius: var(--border-radius-xl);
    padding: 1.25rem;
    text-align: center;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    position: relative;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.discount-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--danger);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.7rem;
    font-weight: 800;
    z-index: 10;
}

.img-wrapper {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.img-wrapper img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform var(--transition-fast);
}

.product-card:hover .img-wrapper img {
    transform: scale(1.05);
}

.product-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0.5rem 0;
    line-height: 1.4;
    min-height: 2.8em;
}

.brand-name {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.price-box {
    margin: 0.75rem 0;
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

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

.original-price {
    font-size: 0.85rem;
    color: var(--gray-400);
    text-decoration: line-through;
}

/* Product Buttons */
.add-to-cart-btn,
.prescription-btn {
    width: 100%;
    padding: 0.7rem;
    border-radius: var(--border-radius-md);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-to-cart-btn {
    background: var(--primary-gradient);
    color: white;
}

.add-to-cart-btn:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-2px);
}

.prescription-btn {
    background: var(--secondary);
    color: white;
}

.prescription-btn:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}

/* ----------------------------------------
   7. AUTH MODAL
   ---------------------------------------- */
.modal,
.modal-overlay-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 1.5rem;
}

.modal.active,
.modal-overlay-custom.active {
    display: flex !important;
}

.modal.hidden {
    display: none !important;
}

.modal-box {
    background: white;
    border-radius: var(--border-radius-2xl);
    width: 100%;
    max-width: 450px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: modalPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2, .modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.close-modal {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: white;
    transition: all var(--transition-fast);
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    background: var(--danger);
    transform: rotate(90deg);
}

#loginForm, #signupForm {
    padding: 1.5rem;
}

#loginForm h3, #signupForm h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--gray-800);
    font-size: 1.3rem;
}

#loginForm input, #signupForm input {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--gray-300);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

#loginForm input:focus, #signupForm input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

#loginForm button, #signupForm button {
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--border-radius-pill);
    font-weight: 700;
    background: var(--primary-gradient);
    color: white;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-top: 0.5rem;
}

#loginForm button:hover, #signupForm button:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-2px);
}

.auth-switch {
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 1rem;
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

/* ----------------------------------------
   8. PRESCRIPTION MODAL (Dialog)
   ---------------------------------------- */
dialog#prescriptionModal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    padding: 0;
    border: none;
    border-radius: var(--border-radius-2xl);
    background: white;
    box-shadow: var(--shadow-xl);
    z-index: 10001;
    font-family: var(--font-primary);
}

dialog#prescriptionModal::backdrop {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

dialog#prescriptionModal[open] {
    display: flex;
    animation: modalPop 0.35s ease;
}

.prescription-modal-content {
    padding: 1.5rem;
}

.close-modal-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.close-modal-btn:hover {
    background: var(--danger);
    color: white;
}

dialog#prescriptionModal h3 {
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

dialog#prescriptionModal p {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

dialog#prescriptionModal .form-group {
    margin-bottom: 1rem;
}

dialog#prescriptionModal label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.3rem;
}

dialog#prescriptionModal input {
    width: 100%;
    padding: 0.7rem;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--gray-300);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

dialog#prescriptionModal input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

#uploadStatus {
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.modal-actions button {
    flex: 1;
    padding: 0.6rem;
    border-radius: var(--border-radius-pill);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

.modal-actions button:first-child {
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}

.modal-actions button:first-child:hover {
    background: var(--gray-200);
}

.modal-actions button:last-child {
    background: var(--primary-gradient);
    color: white;
}

.modal-actions button:last-child:hover {
    background: var(--primary-gradient-hover);
    transform: translateY(-2px);
}

/* ----------------------------------------
   9. QUOTATION MODAL
   ---------------------------------------- */
#customerQuoteModal .modal-box {
    max-width: 750px;
}

.quote-body {
    padding: 1.5rem;
}

.admin-note-area {
    background: var(--gray-100);
    border-left: 5px solid var(--primary);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius-sm);
}

.admin-note-area label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--gray-500);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.quote-items-table {
    margin-bottom: 1.5rem;
}

.quote-table-header {
    display: grid;
    grid-template-columns: 2.5fr 0.8fr 1.2fr 1.2fr;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 2px solid var(--gray-800);
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--gray-700);
    text-transform: uppercase;
}

.quote-table-row {
    display: grid;
    grid-template-columns: 2.5fr 0.8fr 1.2fr 1.2fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.item-name {
    font-weight: 600;
    color: var(--gray-800);
}

.item-qty {
    text-align: center;
}

.item-price, .item-total {
    font-weight: 600;
    color: var(--primary);
}

.quote-total-section {
    text-align: right;
    padding: 1rem 0;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    align-items: baseline;
}

.total-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-500);
}

.total-value {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary);
}

#quoteActions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

/* ----------------------------------------
   10. FLOATING QUOTES PANEL
   ---------------------------------------- */
#floatingPrescList.floating-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100vh;
    background: white;
    z-index: 10050;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateX(0);
}

#floatingPrescList.floating-panel.hidden {
    transform: translateX(100%);
}

.panel-header {
    padding: 1rem 1.5rem;
    background: var(--primary);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-header .close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.panel-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: var(--gray-50);
}

.quote-sidebar-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all var(--transition-fast);
}

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.card-header span:first-child {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: var(--border-radius-pill);
    font-size: 0.65rem;
    font-weight: 700;
}

.status-ready {
    background: var(--success-light);
    color: var(--success);
}

.status-review {
    background: var(--warning-light);
    color: var(--warning);
}

.card-ref {
    font-family: monospace;
    color: var(--gray-500);
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.card-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

/* ----------------------------------------
   11. CART NOTIFICATION
   ---------------------------------------- */
.cart-notification {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: white;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--primary);
    display: none;
    z-index: 10001;
    animation: slideUp 0.3s ease;
    min-width: 280px;
}

.cart-notification.active {
    display: block;
}

.cart-notification h4 {
    color: var(--gray-800);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.notification-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.go-cart-btn,
.shop-more-btn {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    border-radius: var(--border-radius-md);
    flex: 1;
    text-align: center;
    text-decoration: none;
}

.go-cart-btn {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.go-cart-btn:hover {
    background: var(--primary-dark);
}

.shop-more-btn {
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
    cursor: pointer;
}

/* ----------------------------------------
   12. FOOTER
   ---------------------------------------- */
.main-footer {
    background: linear-gradient(135deg, var(--secondary-dark) 0%, #061f18 100%);
    color: white;
    margin-top: 4rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 5% 2rem;
}

.footer-col h4 {
    color: var(--primary-light);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: block;
}

.tagline {
    color: var(--gray-300);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.footer-description {
    color: var(--gray-400);
    font-size: 0.8rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.copyright {
    font-size: 0.7rem;
    color: var(--gray-500);
    margin-top: 1rem;
}

.footer-col p {
    color: var(--gray-400);
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-col i {
    width: 20px;
    color: var(--primary);
}

.pharmacist-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: var(--border-radius-lg);
    margin-bottom: 1rem;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.5rem;
    font-size: 0.7rem;
    background: var(--success);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: var(--border-radius-pill);
}

.status-indicator i {
    font-size: 0.5rem;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(45, 106, 79, 0.2);
    border-radius: var(--border-radius-md);
}

.trust-badge i {
    font-size: 1rem;
    color: var(--primary);
}

.trust-badge span {
    font-size: 0.7rem;
    color: var(--gray-300);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1rem 5% 1.5rem;
    text-align: center;
}

.footer-credits p {
    color: var(--gray-500);
    font-size: 0.65rem;
    margin: 0.2rem 0;
}

/* ----------------------------------------
   13. FLOATING ACTION BUTTONS
   ---------------------------------------- */
.fab-container {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 999;
}

.fab-facebook,
.fab-whatsapp {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    text-decoration: none;
}

.fab-facebook { background: #0084ff; }
.fab-whatsapp { background: #25d366; }

.fab-facebook:hover,
.fab-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

/* ----------------------------------------
   14. ANIMATIONS
   ---------------------------------------- */
@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ----------------------------------------
   15. SCROLLBAR STYLING
   ---------------------------------------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-200);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ----------------------------------------
   16. RESPONSIVE DESIGN
   ---------------------------------------- */
   @media (max-width: 1024px) {
    .header-content-wrapper {
        flex-direction: column;
    }
    
    .filter-action-bar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        text-align: center;
        padding: 0.75rem;
        position: relative !important;
        top: auto;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .header-actions {
        justify-content: center;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .top-nav {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .top-nav a {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
    
    .action-pill {
        font-size: 0.7rem !important;
        padding: 0.4rem 0.5rem !important;
    }
    
    .header-controls {
        justify-content: space-between;
        width: 100%;
    }
    
    .results-header {
        padding: 1.5rem 1rem 2rem;
    }
    
    .breadcrumb-nav {
        font-size: 0.7rem;
        margin-bottom: 1rem;
    }
    
    #pageTitle {
        font-size: 1.4rem;
    }
    
    .filter-action-bar {
        padding: 1rem;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .filter-group label {
        font-size: 0.65rem;
    }
    
    .filter-group select {
        height: 36px;
        font-size: 0.8rem;
    }
    
    #mainUploadBtn {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }
    
    /* PRODUCT GRID – TWO COLUMNS ON MOBILE, VERTICAL WRAP */
    .product-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.8rem !important;
        padding: 0 0.25rem 1rem !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
    }
    
    .product-grid .product-card {
        width: 100% !important;
        padding: 0.6rem !important;
        min-height: auto !important;
        height: auto !important;
        margin: 0 !important;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    
    .img-wrapper {
        height: 120px !important;
    }
    
    .product-card h3 {
        font-size: 0.8rem !important;
        min-height: 2.6em !important;
        -webkit-line-clamp: 2 !important;
        margin: 0.25rem 0 !important;
    }
    
    .current-price {
        font-size: 0.9rem !important;
    }
    .original-price {
        font-size: 0.7rem !important;
    }
    .add-to-cart-btn,
    .prescription-btn {
        padding: 0.45rem !important;
        font-size: 0.7rem !important;
    }
    
    /* Modal adjustments */
    .modal-box {
        margin: 1rem;
    }
    
    .quote-table-header,
    .quote-table-row {
        grid-template-columns: 2fr 0.6fr 1fr 1fr;
        font-size: 0.7rem;
        gap: 0.5rem;
    }
    
    #floatingPrescList.floating-panel {
        width: 100%;
        max-width: 350px;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-col h4 {
        justify-content: center;
    }
    
    .footer-col p {
        justify-content: center;
    }
    
    .trust-badge {
        justify-content: center;
    }
    
    .fab-container {
        bottom: 1rem;
        left: 1rem;
    }
    
    .fab-facebook,
    .fab-whatsapp {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Three columns on larger phones (400px to 768px) */
@media (min-width: 400px) and (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* For very small screens (below 400px) keep 2 columns – no horizontal scroll */
@media (max-width: 480px) {
    /* Keep grid, do not override to flex */
    .product-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        overflow-x: visible !important;
    }
    
    .action-pill {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .cart-notification {
        left: 1rem;
        right: 1rem;
        min-width: auto;
    }
    
    .toast {
        min-width: auto;
        width: calc(100% - 2rem);
    }
}