:root {
    --orange: #F47B20;
    --yellow: #F7C31A;
    --green: #5CB85C;
    --teal: #3AADA8;
    --purple: #8B5CF6;
    --pink: #EC4899;
    --red: #EF4444;
    --blue: #3B82F6;
    --dark: #1A1A2E;
    --charcoal: #2D2D3A;
    --gray: #6B7280;
    --light-gray: #F3F4F6;
    --border: #E5E7EB;
    --white: #FFFFFF;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --radius: 14px;
    --radius-sm: 8px;
  }

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

  body {
    font-family: 'DM Sans', sans-serif;
    background: #FFFFFF;
    color: var(--charcoal);
    min-height: 100vh;
  }

  /* HEADER */
  .header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
  }

  .logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
  }

  .logo-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .logo-circle img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    display: block;
  }

  .logo-text {
    display: flex;
    flex-direction: column;
  }

  .logo-text .brand {
    font-family: 'Bebas Neue', cursive;
    font-size: 22px;
    color: var(--dark);
    letter-spacing: 1px;
    line-height: 1;
  }

  .logo-text .sub {
    font-size: 10px;
    color: var(--orange);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .btn-primary {
    background: var(--orange);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .btn-primary:hover { background: #d96b10; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(244,123,32,0.4); }

  .btn-secondary {
    background: var(--white);
    color: var(--charcoal);
    border: 2px solid var(--border);
    padding: 8px 16px;
    border-radius: 50px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
  }

  .btn-secondary:hover { border-color: var(--orange); color: var(--orange); }

  /* MOBILE NAV */
  .mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 2px solid var(--border);
    padding: 8px 0 12px;
    z-index: 200;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  }

  .mobile-nav-inner {
    display: flex;
    justify-content: space-around;
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 4px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    border: none;
    background: none;
    font-family: 'DM Sans', sans-serif;
  }

  .mobile-nav-item .icon { font-size: 20px; }
  .mobile-nav-item .label { font-size: 10px; font-weight: 600; color: var(--gray); }
  .mobile-nav-item.active .label { color: var(--orange); }
  .mobile-nav-item.active .icon { filter: none; }

  /* MAIN LAYOUT */
  .app-layout {
    display: flex;
    min-height: calc(100vh - 64px);
  }

  /* SIDEBAR */
  .sidebar {
    width: 220px;
    background: var(--white);
    border-right: 2px solid var(--border);
    padding: 20px 12px;
    flex-shrink: 0;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
    overflow-y: auto;
  }

  .sidebar-nav { display: flex; flex-direction: column; gap: 4px; }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: var(--gray);
    transition: all 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: 'DM Sans', sans-serif;
  }

  .nav-item:hover { background: var(--light-gray); color: var(--charcoal); }
  .nav-item.active { background: #FFF4EA; color: var(--orange); }
  .nav-item .nav-icon { font-size: 18px; width: 22px; text-align: center; }

  .nav-section-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--gray);
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 12px 14px 4px;
  }

  /* MAIN CONTENT */
  .main-content {
    flex: 1;
    padding: 28px;
    overflow-x: hidden;
  }

  /* PAGES */
  .page { display: none; animation: fadeIn 0.3s ease; }
  .page.active { display: block; }

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

  /* DASHBOARD */
  .dashboard-hero {
    background: #FFFFFF;
    padding: 48px 20px 36px;
    margin-bottom: 8px;
    text-align: center;
  }

  .hero-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 52px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 28px;
    color: var(--dark);
  }

  .hero-title span { color: var(--orange); }

  .hero-sub { color: var(--gray); font-size: 15px; margin-bottom: 28px; }

  .search-bar-wrap {
    display: flex;
    gap: 10px;
    max-width: 680px;
    margin: 0 auto;
    background: white;
    border: 2px solid var(--border);
    border-radius: 50px;
    padding: 6px 6px 6px 20px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  }

  .search-input {
    flex: 1;
    padding: 10px 8px;
    border-radius: 50px;
    border: none;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    color: var(--charcoal);
    outline: none;
    background: transparent;
  }

  .search-input::placeholder { color: var(--gray); }

  .search-wrap { position: relative; flex: 1; display: flex; align-items: center; gap: 10px; }
  .search-icon {
    font-size: 18px;
    color: var(--teal);
    flex-shrink: 0;
  }

  .search-btn {
    background: var(--teal);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
  }

  .search-btn:hover { background: #2d9590; }

  /* QUICK ACTIONS */
  .section-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px;
    border-left: 4px solid var(--orange);
  }

  .quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 32px;
  }

  .quick-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 24px 16px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  }

  .quick-card:hover { border-color: transparent; transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }

  .quick-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
  }

  .quick-label { font-weight: 700; font-size: 14px; color: var(--charcoal); }

  /* PRODUCT CARDS GRID */
  .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
  }

  .product-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
  }

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

  .card-img {
    height: 160px;
    background: linear-gradient(135deg, #F3F4F6, #E5E7EB);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
  }

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

  .fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all 0.2s;
  }

  .fav-btn:hover { transform: scale(1.1); }

  .card-body { padding: 16px; }
  .card-name { font-weight: 700; font-size: 15px; margin-bottom: 4px; color: var(--dark); }
  .card-vendor { font-size: 12px; color: var(--gray); margin-bottom: 10px; }

  .badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }

  .badge {
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .badge-preferred { background: #ECFDF5; color: #059669; }
  .badge-approved { background: #EFF6FF; color: #2563EB; }
  .badge-testing { background: #FFF7ED; color: #D97706; }
  .badge-avoid { background: #FEF2F2; color: #DC2626; }
  .badge-discontinued { background: #F3F4F6; color: #6B7280; }
  .badge-category { background: #F3F4FF; color: #6366F1; }
  .badge-warning { background: #FEF3C7; color: #D97706; }

  .card-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    font-size: 12px;
    color: var(--gray);
    margin-bottom: 12px;
  }

  .card-meta-item { display: flex; align-items: center; gap: 4px; }

  .stars { color: var(--yellow); font-size: 12px; }

  .card-footer {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
  }

  .btn-sm {
    flex: 1;
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    border: 2px solid var(--border);
    background: white;
    color: var(--charcoal);
    transition: all 0.2s;
  }

  .btn-sm:hover { border-color: var(--orange); color: var(--orange); }
  .btn-sm.primary { background: var(--orange); color: white; border-color: var(--orange); }
  .btn-sm.primary:hover { background: #d96b10; }

  /* FILTERS */
  .filters-bar {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
  }

  .filter-select {
    padding: 8px 14px;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--charcoal);
    background: white;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
  }

  .filter-select:focus { border-color: var(--orange); }

  .filter-search {
    flex: 1;
    min-width: 200px;
    padding: 8px 16px 8px 38px;
    border: 2px solid var(--border);
    border-radius: 50px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
    position: relative;
  }

  .filter-search:focus { border-color: var(--orange); }

  .search-input-wrap { position: relative; flex: 1; min-width: 200px; }
  .search-input-wrap .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray); font-size: 16px; }

  /* MODAL */
  .modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 500;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
  }

  .modal-overlay.open { display: flex; }

  .modal {
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 64px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease;
  }

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

  .modal-header {
    padding: 24px 28px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
  }

  .modal-title { font-family: 'Bebas Neue', cursive; font-size: 26px; letter-spacing: 1px; color: var(--dark); }

  .modal-close {
    background: var(--light-gray);
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
  }

  .modal-close:hover { background: #fee2e2; }

  .modal-body { padding: 24px 28px; }

  /* FORM STYLES */
  .form-section {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
  }

  .form-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--light-gray);
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    user-select: none;
    transition: background 0.2s;
  }

  .form-section-header:hover { background: #ECEDF0; }

  .form-section-body {
    padding: 20px 18px;
    display: none;
  }

  .form-section-body.open { display: block; }

  .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
  }

  .form-group { margin-bottom: 16px; }
  .form-group:last-child { margin-bottom: 0; }

  .form-label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: var(--charcoal);
    margin-bottom: 6px;
  }

  .form-label .req { color: var(--orange); margin-left: 3px; }

  .form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: var(--charcoal);
    background: white;
    outline: none;
    transition: border-color 0.2s;
  }

  .form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--orange); }
  .form-textarea { resize: vertical; min-height: 80px; }

  .form-checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }

  .checkbox-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 2px solid var(--border);
    border-radius: 50px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    user-select: none;
  }

  .checkbox-pill input { display: none; }
  .checkbox-pill:hover { border-color: var(--orange); }
  .checkbox-pill.checked { background: var(--orange); color: white; border-color: var(--orange); }

  .star-rating { display: flex; gap: 4px; }
  .star-btn { font-size: 24px; cursor: pointer; color: #D1D5DB; transition: all 0.15s; background: none; border: none; }
  .star-btn.active, .star-btn:hover { color: var(--yellow); }

  /* DETAIL PAGE */
  .detail-header {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 28px;
  }

  .detail-img {
    width: 200px;
    height: 200px;
    border-radius: var(--radius);
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
  }

  .detail-info { display: flex; flex-direction: column; }
  .detail-name { font-family: 'Bebas Neue', cursive; font-size: 36px; letter-spacing: 1px; color: var(--dark); line-height: 1.1; margin-bottom: 8px; }

  .detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 16px; }

  .detail-section {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 16px;
  }

  .detail-section h3 {
    font-weight: 700;
    font-size: 14px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
  }

  .detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
  }

  .detail-item label { font-size: 11px; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; display: block; margin-bottom: 4px; }
  .detail-item .val { font-size: 15px; font-weight: 600; color: var(--charcoal); }

  /* QUICK QUOTE */
  .quote-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-width: 520px;
    margin: 0 auto;
  }

  .quote-result {
    background: linear-gradient(135deg, var(--dark), var(--charcoal));
    border-radius: var(--radius);
    padding: 28px;
    text-align: center;
    color: white;
    margin-top: 24px;
  }

  .quote-price { font-family: 'Bebas Neue', cursive; font-size: 64px; color: var(--orange); letter-spacing: 2px; line-height: 1; }
  .quote-total { font-family: 'Bebas Neue', cursive; font-size: 32px; color: var(--yellow); letter-spacing: 1px; }

  /* COMPARE */
  .compare-table {
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
  }

  .compare-table table { width: 100%; border-collapse: collapse; }
  .compare-table th { background: var(--light-gray); padding: 14px 16px; font-weight: 700; font-size: 13px; text-align: left; border-bottom: 2px solid var(--border); }
  .compare-table td { padding: 12px 16px; font-size: 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
  .compare-table tr:last-child td { border-bottom: none; }
  .compare-table .row-label { font-weight: 700; color: var(--gray); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; }

  /* HELP PAGE */
  .help-accordion {
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
  }

  .help-question {
    padding: 16px 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
  }

  .help-question:hover { background: var(--light-gray); }
  .help-answer { padding: 0 20px 16px; font-size: 14px; line-height: 1.7; color: var(--gray); display: none; }
  .help-answer.open { display: block; }

  /* STATUS BADGES */
  .status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }

  /* BACKUP STATUS */
  .backup-banner {
    background: #ECFDF5;
    border: 2px solid #D1FAE5;
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #065F46;
    font-weight: 600;
    margin-bottom: 20px;
  }

  /* PAGE HEADER */
  .page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .page-title { font-family: 'Bebas Neue', cursive; font-size: 32px; letter-spacing: 1px; color: var(--dark); }

  /* TOAST */
  .toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--dark);
    color: white;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 14px;
    z-index: 1000;
    transform: translateY(100px);
    transition: transform 0.3s;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .toast.show { transform: translateY(0); }

  /* EMPTY STATE */
  .empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray);
  }

  .empty-state .icon { font-size: 56px; margin-bottom: 16px; }
  .empty-state h3 { font-size: 20px; font-weight: 700; color: var(--charcoal); margin-bottom: 8px; }
  .empty-state p { font-size: 14px; margin-bottom: 20px; }

  /* TOP 3 SECTION */
  .top3-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
  }

  .top3-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.2s;
  }

  .top3-card:hover { border-color: var(--orange); }

  .top3-rank {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Bebas Neue', cursive;
    font-size: 20px;
    flex-shrink: 0;
  }

  .rank-1 { background: var(--yellow); color: white; }
  .rank-2 { background: #C0C0C0; color: white; }
  .rank-3 { background: #CD7F32; color: white; }

  /* Category selector tabs */
  .cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }

  .cat-tab {
    padding: 8px 16px;
    border-radius: 50px;
    border: 2px solid var(--border);
    background: white;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
  }

  .cat-tab:hover { border-color: var(--orange); color: var(--orange); }
  .cat-tab.active { background: var(--orange); color: white; border-color: var(--orange); }

  /* Responsive */
  @media (max-width: 768px) {
    .sidebar { display: none; }
    .mobile-nav { display: block; }
    .main-content { padding: 16px; padding-bottom: 80px; }
    .cards-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .detail-header { grid-template-columns: 1fr; }
    .detail-img { width: 100%; height: 200px; }
    .hero-title { font-size: 32px; }
    .quick-actions { grid-template-columns: repeat(3, 1fr); }
  }

  @media (max-width: 480px) {
    .quick-actions { grid-template-columns: repeat(2, 1fr); }
  }

  /* Archive badge */
  .archived-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .compare-selector {
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
  }

  .info-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--light-gray);
    border-radius: 50px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--charcoal);
    margin: 3px;
  }
  /* =========================================
     IMAGE UPLOAD
  ========================================= */
  #upload-dropzone {
    border: 2px dashed #CBD5E1;
    border-radius: var(--radius);
    padding: 36px 20px;
    text-align: center;
    transition: all 0.2s;
    background: #F8FAFC;
    cursor: pointer;
    user-select: none;
  }

  #upload-dropzone:hover {
    border-color: var(--orange);
    background: #FFF4EA;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(244,123,32,0.12);
  }

  #upload-dropzone.dragging {
    border-color: var(--orange);
    background: #FFF4EA;
    transform: scale(1.01);
  }

  .upload-icon { font-size: 40px; margin-bottom: 10px; }
  .upload-label { font-weight: 700; font-size: 15px; color: var(--charcoal); margin-bottom: 6px; }
  .upload-hint { font-size: 12px; color: var(--gray); margin-top: 4px; }

  .upload-progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 50px;
    overflow: hidden;
  }

  .upload-progress-fill {
    height: 100%;
    background: var(--orange);
    border-radius: 50px;
    width: 0%;
    transition: width 0.3s;
  }

  /* Image grid in form */
  .img-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
  }

  .img-preview-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--border);
    aspect-ratio: 1;
    background: var(--light-gray);
  }

  .img-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .img-preview-item .img-type-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.55);
    color: white;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 6px;
    text-align: center;
  }

  .img-preview-item .img-delete-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(239,68,68,0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s;
  }

  .img-preview-item:hover .img-delete-btn { opacity: 1; }

  /* Product card image (real photo) */
  .card-img.has-photo { background: #000; }
  .card-img.has-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.95;
  }

  /* Detail page image gallery */
  .detail-img-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 12px;
  }

  .detail-img-thumb {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid var(--border);
    aspect-ratio: 1;
    cursor: pointer;
    transition: border-color 0.2s;
    position: relative;
  }

  .detail-img-thumb:hover { border-color: var(--orange); }
  .detail-img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

  .detail-img-main {
    width: 100%;
    height: 220px;
    object-fit: contain;
    border-radius: var(--radius);
    border: 2px solid var(--border);
    background: var(--light-gray);
    display: block;
    cursor: zoom-in;
  }

  /* Lightbox */
  #lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
  }

  #lightbox.open { display: flex; }
  #lightbox img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
  }

  #lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    font-size: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
  }
