/* Apple-inspired theme for Henberg Trades */

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Define color variables - LIGHT theme (default) */
:root {
    /* Primary colors */
    --primary: #0071e3;
    --primary-hover: #0077ed;
    --primary-light: rgba(0, 113, 227, 0.1);
    
    /* Light theme colors - Apple white style */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #e8e8ed;
    --bg-elevated: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.9);
    
    /* Text colors */
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    
    /* Accent colors */
    --accent-green: #34c759;
    --accent-orange: #ff9500;
    --accent-red: #ff3b30;
    --accent-purple: #af52de;
    --accent-blue: #007aff;
    
    /* Borders and shadows */
    --border-color: rgba(0, 0, 0, 0.06);
    --border-color-light: rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-glow: 0 0 40px rgba(0, 113, 227, 0.1);
    
    /* Hover backgrounds */
    --hover-bg: rgba(0, 0, 0, 0.04);
    --hover-border: rgba(0, 0, 0, 0.15);
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* DARK theme */
[data-theme="dark"] {
    /* Primary colors */
    --primary: #0a84ff;
    --primary-hover: #409cff;
    --primary-light: rgba(10, 132, 255, 0.15);
    
    /* Dark theme colors */
    --bg-primary: #000000;
    --bg-secondary: #1c1c1e;
    --bg-tertiary: #2c2c2e;
    --bg-elevated: #1c1c1e;
    --bg-card: rgba(28, 28, 30, 0.95);
    
    /* Text colors */
    --text-primary: #f5f5f7;
    --text-secondary: #a1a1a6;
    --text-tertiary: #8e8e93;
    
    /* Accent colors (slightly brighter for dark mode) */
    --accent-green: #30d158;
    --accent-orange: #ff9f0a;
    --accent-red: #ff453a;
    --accent-purple: #bf5af2;
    --accent-blue: #64d2ff;
    
    /* Borders and shadows */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-color-light: rgba(255, 255, 255, 0.15);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(10, 132, 255, 0.2);
    
    /* Hover backgrounds */
    --hover-bg: rgba(255, 255, 255, 0.08);
    --hover-border: rgba(255, 255, 255, 0.2);
}

/* Base styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    color: var(--text-secondary);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* Container adjustments */
.container {
    max-width: 1200px;
}

/* ===== NAVBAR ===== */
.navbar {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background var(--transition-base);
}

[data-theme="dark"] .navbar {
    background: rgba(28, 28, 30, 0.8) !important;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: var(--bg-tertiary);
    border: none;
    border-radius: var(--radius-full);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: all var(--transition-fast);
    margin-right: 0.5rem;
}

.theme-toggle-btn:hover {
    background: var(--bg-secondary);
    color: var(--primary);
}

.theme-toggle-btn i {
    font-size: 1rem;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-primary) !important;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    color: var(--primary);
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 0.875rem !important;
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary) !important;
    background: var(--hover-bg);
}

.nav-link.active {
    color: var(--text-primary) !important;
}

.nav-link::after {
    display: none;
}

/* Cart icon in navbar */
.nav-link .bi-cart3 {
    font-size: 1.1rem;
}

/* Dropdown */
.dropdown-menu {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    backdrop-filter: blur(20px);
    margin-top: 0.5rem !important;
}

.dropdown-item {
    color: var(--text-secondary) !important;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: var(--text-primary) !important;
    background: var(--hover-bg) !important;
}

/* ===== BUTTONS ===== */
.btn {
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-full);
    border: none;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
}

.btn:focus {
    box-shadow: none;
}

/* Primary button - pill style */
.btn-primary {
    background: var(--primary) !important;
    color: white !important;
    border: none !important;
    box-shadow: none;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-hover) !important;
    transform: scale(1.02);
    box-shadow: var(--shadow-glow);
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Secondary button */
.btn-secondary {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: none !important;
}

.btn-secondary:hover {
    background: var(--bg-tertiary) !important;
}

/* Outline buttons */
.btn-outline-primary {
    background: transparent !important;
    color: var(--primary) !important;
    border: 1.5px solid var(--primary) !important;
}

.btn-outline-primary:hover {
    background: var(--primary) !important;
    color: white !important;
}

.btn-outline-secondary {
    background: transparent !important;
    color: var(--text-secondary) !important;
    border: 1.5px solid var(--border-color-light) !important;
}

.btn-outline-secondary:hover {
    background: var(--hover-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--hover-border) !important;
}

.btn-outline-danger {
    background: transparent !important;
    color: var(--accent-red) !important;
    border: 1.5px solid var(--accent-red) !important;
}

.btn-outline-danger:hover {
    background: var(--accent-red) !important;
    color: white !important;
}

/* Success, Warning, Danger buttons */
.btn-success {
    background: var(--accent-green) !important;
    color: white !important;
    border: none !important;
}

.btn-success:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

.btn-warning {
    background: var(--accent-orange) !important;
    color: var(--bg-primary) !important;
    border: none !important;
}

.btn-warning:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

.btn-danger {
    background: var(--accent-red) !important;
    color: white !important;
    border: none !important;
}

.btn-danger:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

.btn-info {
    background: var(--accent-blue) !important;
    color: var(--bg-primary) !important;
    border: none !important;
}

.btn-info:hover {
    filter: brightness(1.1);
    transform: scale(1.02);
}

/* Button sizes */
.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

/* Add to cart button special style */
.btn-add-cart {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition-base);
    border: none;
    width: 100%;
}

.btn-add-cart:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 113, 227, 0.3);
}

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

/* ===== CARDS ===== */
.card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.card:hover {
    border-color: var(--border-color-light) !important;
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: transparent !important;
    border-top: 1px solid var(--border-color) !important;
    padding: 1.25rem 1.5rem;
}

/* Product card specific */
.product-card {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-xl) !important;
    overflow: hidden;
    transition: all var(--transition-smooth);
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(0, 113, 227, 0.08);
    border-color: rgba(0, 0, 0, 0.1) !important;
}

.product-card .card-img-container {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    aspect-ratio: 4/3;
}

.product-card .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform var(--transition-smooth);
}

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

.product-card .card-body {
    padding: 1.25rem;
}

.product-card .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card .card-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Price display */
.price-tag {
    color: var(--accent-green);
    font-weight: 600;
    font-size: 1.125rem;
}

.price-tag-lg {
    font-size: 1.5rem;
}

.price-original {
    color: var(--text-tertiary);
    text-decoration: line-through;
    font-size: 0.875rem;
}

/* Weapon type badge */
.badge-weapon {
    background: rgba(0, 113, 227, 0.2);
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Status badges */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    letter-spacing: 0.01em;
}

.badge.bg-success,
.bg-success {
    background: var(--accent-green) !important;
}

.badge.bg-warning,
.bg-warning {
    background: var(--accent-orange) !important;
    color: var(--bg-primary) !important;
}

.badge.bg-danger,
.bg-danger {
    background: var(--accent-red) !important;
}

.badge.bg-info,
.bg-info {
    background: var(--accent-blue) !important;
    color: var(--bg-primary) !important;
}

.badge.bg-primary,
.bg-primary {
    background: var(--primary) !important;
}

.badge.bg-secondary,
.bg-secondary {
    background: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
}

/* Availability badge */
.availability-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

.availability-badge.available {
    background: var(--accent-green);
    color: white;
}

.availability-badge.rented {
    background: var(--accent-orange);
    color: var(--bg-primary);
}

/* Discount badge */
.discount-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    background: #dc3545;
    color: white;
    font-weight: 700;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Original price (crossed out) */
.price-tag-original {
    font-weight: 600;
    color: var(--text-tertiary);
    text-decoration: line-through;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

/* ===== FORMS ===== */
.form-control,
.form-select {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md);
    color: var(--text-primary) !important;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1) !important;
    background: var(--bg-elevated) !important;
}

.form-control::placeholder {
    color: var(--text-tertiary);
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.form-text {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}

/* Date picker wrapper - fully clickable via CSS */
.date-picker-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.date-picker-wrapper:hover {
    border-color: var(--border-color-light);
    background: var(--bg-elevated);
}

.date-picker-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.date-picker-wrapper i {
    color: var(--text-secondary);
    margin-right: 0.75rem;
    font-size: 1rem;
    pointer-events: none;
    z-index: 1;
}

.date-picker-wrapper .date-picker-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    border: none !important;
    background: transparent !important;
}

.date-picker-wrapper .date-display {
    color: var(--text-primary);
    flex: 1;
    pointer-events: none;
    z-index: 1;
}

/* Input group */
.input-group-text {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary);
}

/* Checkbox and Radio */
.form-check-input {
    background-color: var(--bg-tertiary);
    border-color: var(--border-color-light);
    width: 1.25rem;
    height: 1.25rem;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
    border-color: var(--primary);
}

/* Range slider */
.form-range::-webkit-slider-thumb {
    background: var(--primary);
}

.form-range::-webkit-slider-track {
    background: var(--bg-tertiary);
}

/* ===== TABLES ===== */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
    --bs-table-border-color: var(--border-color);
    width: auto;
    min-width: 100%;
}

.table-dark {
    --bs-table-bg: var(--bg-secondary);
    --bs-table-striped-bg: var(--bg-tertiary);
    --bs-table-hover-bg: rgba(0, 0, 0, 0.02);
}

.table thead th {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table tbody td {
    padding: 1rem 1.25rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table-hover tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Ensure table-responsive scrolls horizontally */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.card .table-responsive {
    border-radius: inherit;
}

/* Allow horizontal scroll in cards with tables */
.card:has(.table-responsive) {
    overflow-x: auto;
}

.card:has(.table-responsive) .table-responsive {
    min-width: max-content;
}

/* ===== ALERTS ===== */
.alert {
    border: none;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
}

.alert-success {
    background: rgba(48, 209, 88, 0.15);
    color: var(--accent-green);
}

.alert-danger {
    background: rgba(255, 69, 58, 0.15);
    color: var(--accent-red);
}

.alert-warning {
    background: rgba(255, 159, 10, 0.15);
    color: var(--accent-orange);
}

.alert-info {
    background: rgba(100, 210, 255, 0.15);
    color: var(--accent-blue);
}

/* ===== FOOTER ===== */
footer {
    background: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding: 3rem 0 2rem;
}

footer h5 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

footer p {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* ===== UTILITY CLASSES ===== */

/* Accent text */
.accent-text {
    color: var(--primary) !important;
}

/* Muted text */
.text-muted {
    color: var(--text-secondary) !important;
}

/* Background utilities */
.bg-dark {
    background: var(--bg-primary) !important;
}

.bg-dark-subtle {
    background: var(--bg-secondary) !important;
}

/* Glass effect */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Animation classes */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out forwards;
}

.animate-fade-in-down {
    animation: fadeInDown 0.5s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.4s ease-out forwards;
}

/* Stagger animations */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }

/* Hover effects */
.hover-lift {
    transition: transform var(--transition-smooth);
}

.hover-lift:hover {
    transform: translateY(-4px);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow);
}

/* ===== EMPTY STATES ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

/* ===== HERO SECTION ===== */
.hero-section {
    padding: 4rem 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section .lead {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* ===== FILTERS ===== */
.filters-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.filters-section .form-label {
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-tertiary);
}

/* ===== PRODUCT GRID ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* 3 columns max on large screens */
@media (min-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===== PRODUCT DETAIL PAGE ===== */
.product-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.product-image-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.product-image-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.product-info {
    padding: 1rem 0;
}

.product-info h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1.5rem 0;
}

.product-meta-item {
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.product-meta-item label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.25rem;
}

.product-meta-item span {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ===== CART ===== */
.cart-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
}

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

.cart-item-image {
    width: 100px;
    height: 80px;
    object-fit: contain;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 0.5rem;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.cart-item-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.cart-summary {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-summary-row:last-child {
    border-bottom: none;
}

.cart-summary-total {
    font-size: 1.25rem;
    font-weight: 600;
}

/* ===== QUANTITY SELECTOR ===== */
.quantity-selector {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    padding: 0.25rem;
}

.quantity-selector button {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.quantity-selector button:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
}

.quantity-selector input {
    width: 40px;
    text-align: center;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-weight: 500;
}

/* ===== STATS CARDS ===== */
.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-card-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .product-hero {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-section h1 {
        font-size: 2.25rem;
    }
}

@media (max-width: 767.98px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
    
    .hero-section {
        padding: 2.5rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.875rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}

@media (max-width: 575.98px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-lg {
        width: 100%;
    }
}

/* ===== PAGE TRANSITIONS ===== */
.page-content {
    animation: fadeInUp 0.4s ease-out;
}

/* ===== LOADER ===== */
.loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== TOOLTIP ===== */
.tooltip-inner {
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.tooltip-arrow::before {
    border-top-color: var(--bg-elevated);
}

/* ===== CART SIDE SHEET ===== */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}

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

.cart-sidesheet {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 100%;
    height: 100%;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--transition-smooth);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.12);
}

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

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

.cart-sidesheet-header h5 {
    font-weight: 600;
    font-size: 1.125rem;
}

.cart-sidesheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.5rem;
}

.cart-sidesheet-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-elevated);
}

.cart-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 0;
}

/* Sidesheet cart item overrides */
.cart-sidesheet .cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

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

.cart-sidesheet .cart-item-image {
    width: 80px;
    height: 60px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-sidesheet .cart-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

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

.cart-sidesheet .cart-item-name {
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

.cart-item-meta {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
}

.cart-item-price {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9375rem;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--text-tertiary);
    padding: 0.25rem;
    cursor: pointer;
    transition: color var(--transition-fast);
    flex-shrink: 0;
}

.cart-item-remove:hover {
    color: var(--accent-red);
}

/* Cart badge on navbar */
.cart-toggle-btn {
    position: relative;
    padding: 0.5rem !important;
}

.cart-badge {
    position: absolute;
    top: 0;
    right: -2px;
    background: var(--accent-red);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== CONFIRMATION MODAL ===== */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.confirm-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.confirm-modal {
    background: var(--bg-elevated);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.confirm-modal-overlay.active .confirm-modal {
    transform: scale(1);
}

.confirm-modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.confirm-modal-icon i {
    font-size: 1.75rem;
    color: var(--accent-red);
}

.confirm-modal-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.confirm-modal-message {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
}

.confirm-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.confirm-modal-actions .btn {
    min-width: 100px;
}

@media (max-width: 575.98px) {
    .cart-sidesheet {
        width: 100%;
    }
    
    .cart-item-image {
        width: 60px;
        height: 45px;
    }
}

/* ===== REWARDS & TIER STYLES ===== */
.tier-banner {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
}

.tier-banner-title {
    font-weight: 600;
    color: var(--text-primary);
}

.tier-banner-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.points-badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-purple) 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.875rem;
}

.tier-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

/* ===== MODAL STYLES ===== */
.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 1060 !important;
    width: 100% !important;
    height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

.modal-backdrop {
    z-index: 1055 !important;
}

.modal-dialog {
    position: relative !important;
    margin: 1.75rem auto !important;
    max-width: 500px !important;
}

.modal-dialog-centered {
    display: flex !important;
    align-items: center !important;
    min-height: calc(100% - 3.5rem) !important;
}

.modal-content {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg) !important;
}

.modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color) !important;
}

.modal-title {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
    color: var(--text-primary);
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color) !important;
}

[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}
