/* ============================================
   DESIGN TOKENS
   ============================================ */
:root {
    /* Colors */
    --color-primary: #2563eb;
    --color-primary-hover: #1d4ed8;
    --color-primary-light: #eff6ff;
    --color-secondary: #6b7280;
    --color-secondary-hover: #4b5563;
    --color-secondary-light: #f3f4f6;
    --color-success: #16a34a;
    --color-success-hover: #15803d;
    --color-success-light: #f0fdf4;
    --color-warning: #ca8a04;
    --color-warning-hover: #a16207;
    --color-warning-light: #fefce8;
    --color-danger: #dc2626;
    --color-danger-hover: #b91c1c;
    --color-danger-light: #fef2f2;
    --color-info: #0891b2;
    --color-info-hover: #0e7490;
    --color-info-light: #ecfeff;

    --color-text: #171717;
    --color-text-secondary: #737373;
    --color-text-tertiary: #a3a3a3;
    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-border: #e5e5e5;
    --color-border-light: #f5f5f5;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
    --space-3xl: 2.5rem;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.04);

    /* Borders */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ============================================
   RESET
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

button { cursor: pointer; }

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

img { max-width: 100%; display: block; }

ul, ol { list-style: none; }

/* ============================================
   UTILITY: Spacing
   ============================================ */
.m-0 { margin: 0; }
.mt-xs { margin-top: var(--space-xs); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-0 { padding: 0; }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }
.p-2xl { padding: var(--space-2xl); }
.p-3xl { padding: var(--space-3xl); }

/* ============================================
   UTILITY: Layout
   ============================================ */
.d-flex { display: flex; }
.d-grid { display: grid; }
.d-block { display: block; }
.d-none { display: none; }

.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.justify-start { justify-content: flex-start; }

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }
.gap-2xl { gap: var(--space-2xl); }

/* ============================================
   UTILITY: Sizing
   ============================================ */
.w-full { width: 100%; }
.w-auto { width: auto; }
.max-w-sm { max-width: 420px; }
.max-w-md { max-width: 640px; }
.max-w-lg { max-width: 880px; }
.max-w-xl { max-width: 1140px; }
.max-w-2xl { max-width: 1440px; }

.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* ============================================
   UTILITY: Text
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-xs { font-size: 0.7rem; }
.text-sm { font-size: 0.8rem; }
.text-base { font-size: 0.9rem; }
.text-lg { font-size: 1.1rem; }
.text-xl { font-size: 1.4rem; }
.text-2xl { font-size: 1.8rem; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-text-secondary); }
.text-tertiary { color: var(--color-text-tertiary); }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.text-warning { color: var(--color-warning); }

.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.text-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   UTILITY: Backgrounds
   ============================================ */
.bg-surface { background: var(--color-surface); }
.bg-bg { background: var(--color-bg); }
.bg-primary-light { background: var(--color-primary-light); }
.bg-success-light { background: var(--color-success-light); }
.bg-danger-light { background: var(--color-danger-light); }
.bg-warning-light { background: var(--color-warning-light); }
.bg-info-light { background: var(--color-info-light); }

/* ============================================
   UTILITY: Borders & Radius
   ============================================ */
.border { border: 1.5px solid var(--color-border); }
.border-top { border-top: 1px solid var(--color-border-light); }
.border-bottom { border-bottom: 1px solid var(--color-border-light); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* ============================================
   UTILITY: Shadows
   ============================================ */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* ============================================
   UTILITY: Misc
   ============================================ */
.relative { position: relative; }
.sticky { position: sticky; }
.overflow-hidden { overflow: hidden; }

.transition { transition: all var(--transition-base); }
.transition-fast { transition: all var(--transition-fast); }

.cursor-pointer { cursor: pointer; }
.user-select-none { user-select: none; }

[x-cloak] { display: none !important; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* ============================================
   COMPONENT: Buttons (btn)
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 9px 18px;
    border: 1.5px solid transparent;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-sm { padding: 5px 12px; font-size: 0.78rem; }
.btn-lg { padding: 12px 22px; font-size: 0.95rem; }
.btn-icon { width: 38px; height: 38px; padding: 0; border-radius: 50%; }
.btn-icon.btn-sm { width: 30px; height: 30px; }
.btn-icon.btn-lg { width: 44px; height: 44px; }

.btn-primary {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}
.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--color-secondary);
    color: white;
    border-color: var(--color-secondary);
}
.btn-secondary:hover:not(:disabled) {
    background: var(--color-secondary-hover);
    border-color: var(--color-secondary-hover);
}

.btn-success {
    background: var(--color-success);
    color: white;
    border-color: var(--color-success);
}
.btn-success:hover:not(:disabled) {
    background: var(--color-success-hover);
    border-color: var(--color-success-hover);
}

.btn-danger {
    background: var(--color-danger);
    color: white;
    border-color: var(--color-danger);
}
.btn-danger:hover:not(:disabled) {
    background: var(--color-danger-hover);
    border-color: var(--color-danger-hover);
}

.btn-outline-primary {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-outline-primary:hover:not(:disabled) {
    background: var(--color-primary-light);
}

.btn-outline-secondary {
    background: transparent;
    color: var(--color-text-secondary);
    border-color: var(--color-border);
}
.btn-outline-secondary:hover:not(:disabled) {
    background: var(--color-bg);
    color: var(--color-text);
    border-color: #d4d4d4;
}

.btn-ghost {
    background: transparent;
    color: var(--color-text-secondary);
    border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
    background: var(--color-bg);
    color: var(--color-text);
}

.btn-block { width: 100%; }

/* ============================================
   COMPONENT: Card
   ============================================ */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card-body { padding: var(--space-xl); }

.card-hover {
    transition: all var(--transition-base);
    cursor: pointer;
}
.card-hover:hover {
    border-color: transparent;
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

/* ============================================
   COMPONENT: Form
   ============================================ */
.form-group { margin-bottom: var(--space-lg); }

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--color-text);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: var(--font-sans);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
    background: var(--color-bg);
}
.form-control:focus {
    border-color: var(--color-primary);
    background: var(--color-surface);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
.form-control::placeholder { color: var(--color-text-tertiary); }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group .form-control { padding-left: 40px; }

.input-group-icon {
    position: absolute;
    left: 13px;
    color: var(--color-text-tertiary);
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 1;
}

.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}
.form-check input { accent-color: var(--color-primary); width: 16px; height: 16px; }

/* ============================================
   COMPONENT: Badge
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-primary { background: var(--color-primary-light); color: var(--color-primary); }
.badge-success { background: var(--color-success-light); color: var(--color-success); }
.badge-warning { background: var(--color-warning-light); color: var(--color-warning); }
.badge-danger { background: var(--color-danger-light); color: var(--color-danger); }
.badge-secondary { background: var(--color-secondary-light); color: var(--color-secondary); }

.badge-sm { padding: 1px 7px; font-size: 0.62rem; }

/* ============================================
   COMPONENT: Alert / Flash messages
   ============================================ */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    border: 1px solid transparent;
}

.alert-error {
    background: var(--color-danger-light);
    color: var(--color-danger);
    border-color: rgba(220, 38, 38, 0.2);
}

.alert-success {
    background: var(--color-success-light);
    color: var(--color-success);
    border-color: rgba(22, 163, 74, 0.2);
}

.alert-warning {
    background: var(--color-warning-light);
    color: var(--color-warning);
    border-color: rgba(202, 138, 4, 0.2);
}

.alert-info {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-color: rgba(37, 99, 235, 0.2);
}

/* ============================================
   COMPONENT: Tag
   ============================================ */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: var(--color-bg);
    color: var(--color-text-secondary);
    border: 1.5px solid transparent;
    user-select: none;
}
.tag:hover { border-color: var(--color-border); color: var(--color-text); }
.tag.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-color: var(--color-primary);
    font-weight: 600;
}

.tag-removable { padding-right: 6px; }
.tag-removable button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    font-size: 0.9rem;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
    display: flex;
    align-items: center;
}
.tag-removable button:hover { opacity: 1; }

/* ============================================
   COMPONENT: Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    width: 92%;
    max-width: 880px;
    max-height: 88vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: var(--space-xl);
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--color-surface);
    z-index: 10;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal-body { padding: var(--space-xl); }

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--color-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 1.1rem;
    color: var(--color-text-secondary);
}
.modal-close:hover { background: var(--color-danger-light); color: var(--color-danger); }

/* ============================================
   COMPONENT: Dropdown
   ============================================ */
.dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    z-index: 50;
    overflow: hidden;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 10px 16px;
    font-size: 0.85rem;
    color: var(--color-text);
    transition: background var(--transition-fast);
    cursor: pointer;
}
.dropdown-item:hover { background: var(--color-bg); }

.dropdown-divider {
    height: 1px;
    background: var(--color-border-light);
    margin: 4px 0;
}

/* ============================================
   COMPONENT: Avatar
   ============================================ */
.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-primary-light);
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.avatar-sm { width: 26px; height: 26px; font-size: 0.7rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1.1rem; }

/* ============================================
   LAYOUT: Header
   ============================================ */
.header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.92);
    height: 64px;
}

.header-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--space-2xl);
    height: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-text);
    white-space: nowrap;
    flex-shrink: 0;
}
.header-logo i { color: var(--color-primary); font-size: 1.4rem; }

.header-search {
    flex: 1;
    max-width: 520px;
    position: relative;
}
.header-search .form-control {
    padding-left: 42px;
    border-radius: var(--radius-full);
    background: var(--color-bg);
}

.header-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-tertiary);
    font-size: 1.05rem;
    pointer-events: none;
    z-index: 1;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-shrink: 0;
}

.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 6px 14px 6px 6px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: background var(--transition-fast);
    position: relative;
}
.user-menu-trigger:hover { background: var(--color-bg); }

.user-menu-info { text-align: left; line-height: 1.3; }
.user-menu-name { font-weight: 600; font-size: 0.85rem; }
.user-menu-org { font-size: 0.7rem; color: var(--color-text-secondary); }

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--color-danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    padding: 0 4px;
}

/* ============================================
   LAYOUT: Footer
   ============================================ */
.footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border-light);
    padding: var(--space-xl) 0;
}

.footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 var(--space-2xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
}
.footer-brand i { color: var(--color-primary); font-size: 1.2rem; }

.footer-links { display: flex; gap: var(--space-lg); }
.footer-links a {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}
.footer-links a:hover { color: var(--color-text); }

.footer-copy { font-size: 0.75rem; color: var(--color-text-tertiary); }

/* ============================================
   LAYOUT: Main Content
   ============================================ */
.main-content {
    min-height: calc(100vh - 64px - 61px);
    max-width: 1440px;
    margin: 0 auto;
    padding: var(--space-2xl);
}

.page-centered {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 64px - 61px);
    padding: var(--space-2xl);
}

.layout-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

/* ============================================
   LAYOUT: Lock Screen
   ============================================ */
.lock-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-dialog {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl) var(--space-3xl);
    text-align: center;
    max-width: 380px;
    width: 90%;
    box-shadow: var(--shadow-xl);
}

/* ============================================
   CATALOG: Layout
   ============================================ */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.sidebar {
    position: sticky;
    top: 88px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
}

/* ============================================
   CATALOG: Product Card
   ============================================ */
.product-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    cursor: pointer;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.product-image-wrap {
    aspect-ratio: 1 / 1;
    background: var(--color-bg);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-image-wrap i {
    font-size: 2.5rem;
    color: #d4d4d4;
}

.stock-badge {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    padding: 3px 9px;
    border-radius: var(--radius-xl);
    font-size: 0.68rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
}
.stock-in { background: rgba(22, 163, 74, 0.12); color: #15803d; }
.stock-low { background: rgba(202, 138, 4, 0.15); color: #a16207; }
.stock-out { background: rgba(220, 38, 38, 0.1); color: #b91c1c; }

.quick-actions {
    position: absolute;
    bottom: var(--space-md);
    right: var(--space-md);
    display: flex;
    gap: var(--space-sm);
    opacity: 0;
    transform: translateY(8px);
    transition: all var(--transition-base);
}
.product-card:hover .quick-actions {
    opacity: 1;
    transform: translateY(0);
}

.quick-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: white;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    color: var(--color-text);
    font-size: 0.85rem;
}
.quick-btn:hover { background: var(--color-primary); color: white; }
.quick-btn.cart-btn-quick:hover { background: var(--color-success); }

.price-current {
    font-size: 1rem;
    font-weight: 700;
}

.tier-mini-dot {
    font-size: 0.62rem;
    padding: 2px 6px;
    border-radius: 10px;
    background: var(--color-bg);
    color: var(--color-text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.btn-add-cart {
    width: 100%;
    padding: 7px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    transition: all var(--transition-fast);
}
.btn-add-cart:hover {
    background: var(--color-primary-hover);
    box-shadow: var(--shadow-md);
}

/* ============================================
   CATALOG: Modal Tiers
   ============================================ */
.tier-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
    cursor: pointer;
    border: 2px solid transparent;
    background: var(--color-bg);
    transition: all var(--transition-fast);
}
.tier-row:hover { background: #f0f0f0; }
.tier-row.selected {
    background: var(--color-primary-light);
    border-color: var(--color-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .main-layout,
    .layout-sidebar { grid-template-columns: 1fr; }
    .sidebar { position: static; }
}

@media (max-width: 768px) {
    .header-inner {
        flex-wrap: wrap;
        height: auto;
        padding-top: var(--space-md);
        padding-bottom: var(--space-md);
        gap: var(--space-md);
    }
    .header-search { max-width: 100%; order: 3; flex-basis: 100%; }
    .user-menu-info { display: none; }
    .main-content { padding: var(--space-lg); }
    .modal-body { padding: var(--space-lg); }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--space-sm); }
}

@media (max-width: 480px) {
    .products-grid { grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
    .header-logo { font-size: 1rem; }
    .btn span { display: none; }
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
    font-size: 0.85rem;
    min-width: 280px;
    max-width: 400px;
}

.toast-success {
    border-left: 3px solid var(--color-success);
}

.toast-error {
    border-left: 3px solid var(--color-danger);
}

.toast-item button {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-tertiary);
    margin-left: auto;
}

/* Fix: product image wrap centrado */
.product-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
}

.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.product-image-wrap i {
    font-size: 2.5rem;
    color: #d4d4d4;
    z-index: 0;
}

/* ============================================
   CAROUSEL ARROWS
   ============================================ */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    font-size: 1rem;
    transition: all var(--transition-fast);
    z-index: 5;
}
.carousel-arrow:hover { background: white; box-shadow: var(--shadow-md); }
.carousel-prev { left: 8px; }
.carousel-next { right: 8px; }

/* ============================================
   CART LAYOUT
   ============================================ */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-2xl);
    align-items: start;
}

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

/* ============================================
   CART TABLE
   ============================================ */
.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    text-align: left;
    padding: var(--space-md) var(--space-lg);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-tertiary);
    border-bottom: 1px solid var(--color-border-light);
}

.cart-table td {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-border-light);
    vertical-align: middle;
}

.cart-table-img {
    width: 64px;
    padding-right: 0 !important;
}

.cart-table tr:last-child td {
    border-bottom: none;
}