  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  :root {
    --bg: #fafaf9;
    --text: #1a1a1a;
    --muted: #78716c;
    --accent: #1a1a1a;
    --accent-hover: #333;
    --card: #ffffff;
    --border: #e7e5e4;
    --success: #16a34a;
    --danger: #dc2626;
    --radius: 12px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-lg: 0 4px 24px rgba(0,0,0,0.1);
  }
  body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
  }
  a { text-decoration: none; color: inherit; }
  button { cursor: pointer; font-family: inherit; }
  input, select, textarea { font-family: inherit; }

  /* NAV */
  nav {
    position: sticky; top: 0; z-index: 100;
    background: rgba(250,250,249,0.92);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
  }
  .logo {
    font-size: 1.4rem; font-weight: 800; letter-spacing: 4px;
    cursor: pointer;
  }
  .nav-links { display: flex; gap: 2rem; align-items: center; }
  .nav-links a {
    font-size: 0.88rem; font-weight: 500; color: var(--muted);
    transition: color 0.2s; cursor: pointer;
  }
  .nav-links a:hover, .nav-links a.active { color: var(--text); }
  .nav-icons { display: flex; gap: 1rem; align-items: center; }
  .nav-icon-btn {
    background: none; border: none; font-size: 1.2rem;
    position: relative; padding: 6px; color: var(--text);
  }
  .cart-badge {
    position: absolute; top: -2px; right: -4px;
    background: var(--text); color: #fff;
    font-size: 0.65rem; font-weight: 700;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
  }
  .cart-badge:empty, .cart-badge[data-count="0"] { display: none; }

  /* PAGES */
  .page { display: none; animation: fadeIn 0.35s ease; }
  .page.active { display: block; }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

  /* HERO */
  .hero {
    position: relative; height: 70vh; min-height: 420px;
    overflow: hidden; display: flex; align-items: center;
    justify-content: center; text-align: center;
  }
  .hero img {
    position: absolute; inset: 0; width: 100%; height: 100%;
    object-fit: cover; filter: brightness(0.7);
  }
  .hero-content { position: relative; z-index: 2; color: #fff; padding: 2rem; }
  .hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800; letter-spacing: 6px; margin-bottom: 1rem;
  }
  .hero-content p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 2rem; }
  .btn {
    display: inline-block; padding: 14px 36px;
    background: #fff; color: var(--text);
    border: none; border-radius: 50px;
    font-weight: 600; font-size: 0.9rem;
    transition: all 0.25s; letter-spacing: 1px;
  }
  .btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
  .btn-dark { background: var(--accent); color: #fff; }
  .btn-dark:hover { background: var(--accent-hover); }
  .btn-outline { background: transparent; border: 2px solid var(--text); color: var(--text); }
  .btn-outline:hover { background: var(--text); color: #fff; }
  .btn-sm { padding: 10px 20px; font-size: 0.82rem; }
  .btn-block { width: 100%; }
  .btn-danger { background: var(--danger); color: #fff; }

  /* SECTIONS */
  .section { padding: 4rem 2rem; max-width: 1280px; margin: 0 auto; }
  .section-title {
    font-size: 1.8rem; font-weight: 700; margin-bottom: 0.5rem;
    text-align: center;
  }
  .section-sub { text-align: center; color: var(--muted); margin-bottom: 3rem; font-size: 0.95rem; }

  /* PRODUCTS GRID */
  .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
  }
  .product-card {
    background: var(--card); border-radius: var(--radius);
    overflow: hidden; box-shadow: var(--shadow);
    transition: all 0.3s; cursor: pointer;
  }
  .product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
  .product-card img {
    width: 100%; height: 340px; object-fit: cover;
    transition: transform 0.5s;
  }
  .product-card:hover img { transform: scale(1.04); }
  .product-info { padding: 1.2rem; }
  .product-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.3rem; }
  .product-info .price { font-size: 1.1rem; font-weight: 700; }
  .product-info .category { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
  .add-to-cart-btn {
    width: 100%; padding: 10px; margin-top: 0.8rem;
    background: var(--text); color: #fff; border: none;
    border-radius: 8px; font-weight: 600; font-size: 0.85rem;
    transition: background 0.2s;
  }
  .add-to-cart-btn:hover { background: var(--accent-hover); }

  /* CATEGORIES */
  .categories { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2rem; }
  .cat-btn {
    padding: 8px 20px; border: 1.5px solid var(--border);
    background: #fff; border-radius: 50px; font-size: 0.85rem;
    font-weight: 500; transition: all 0.2s;
  }
  .cat-btn:hover, .cat-btn.active { background: var(--text); color: #fff; border-color: var(--text); }

  /* CART PAGE */
  .cart-container { max-width: 900px; margin: 0 auto; padding: 3rem 2rem; }
  .cart-item {
    display: flex; gap: 1.5rem; padding: 1.5rem 0;
    border-bottom: 1px solid var(--border); align-items: center;
  }
  .cart-item img { width: 100px; height: 120px; object-fit: cover; border-radius: 8px; }
  .cart-item-info { flex: 1; }
  .cart-item-info h4 { font-size: 1rem; margin-bottom: 0.3rem; }
  .cart-item-info .cart-price { font-weight: 700; font-size: 1.05rem; }
  .qty-controls { display: flex; align-items: center; gap: 0.8rem; }
  .qty-btn {
    width: 32px; height: 32px; border: 1.5px solid var(--border);
    background: #fff; border-radius: 6px; font-size: 1rem;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
  }
  .qty-btn:hover { background: var(--text); color: #fff; border-color: var(--text); }
  .qty-num { font-weight: 600; min-width: 20px; text-align: center; }
  .remove-btn {
    background: none; border: none; color: var(--danger);
    font-size: 0.85rem; font-weight: 500; margin-top: 0.5rem;
  }
  .cart-summary {
    background: var(--card); border-radius: var(--radius);
    padding: 2rem; margin-top: 2rem; box-shadow: var(--shadow);
  }
  .cart-summary-row {
    display: flex; justify-content: space-between;
    padding: 0.6rem 0; font-size: 0.95rem;
  }
  .cart-summary-row.total {
    border-top: 2px solid var(--text); margin-top: 0.5rem;
    padding-top: 1rem; font-weight: 700; font-size: 1.2rem;
  }
  .empty-state {
    text-align: center; padding: 4rem 2rem; color: var(--muted);
  }
  .empty-state svg { width: 64px; height: 64px; margin-bottom: 1rem; opacity: 0.3; }

  /* AUTH */
  .auth-container {
    max-width: 440px; margin: 3rem auto; padding: 0 2rem;
  }
  .auth-card {
    background: var(--card); border-radius: var(--radius);
    padding: 2.5rem; box-shadow: var(--shadow);
  }
  .auth-card h2 { font-size: 1.5rem; margin-bottom: 0.3rem; }
  .auth-card .sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }
  .form-group { margin-bottom: 1.2rem; }
  .form-group label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.4rem; }
  .form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 12px 14px; border: 1.5px solid var(--border);
    border-radius: 8px; font-size: 0.95rem; transition: border 0.2s;
    background: #fff;
  }
  .form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--text);
  }
  .auth-switch { text-align: center; margin-top: 1.5rem; font-size: 0.88rem; color: var(--muted); }
  .auth-switch a { color: var(--text); font-weight: 600; cursor: pointer; }
  .auth-switch a:hover { text-decoration: underline; }

  /* CHECKOUT */
  .checkout-container { max-width: 900px; margin: 0 auto; padding: 3rem 2rem; display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; }
  @media (max-width: 768px) { .checkout-container { grid-template-columns: 1fr; } }
  .checkout-form { background: var(--card); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); }
  .checkout-form h2 { font-size: 1.3rem; margin-bottom: 1.5rem; }
  .checkout-summary { background: var(--card); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); height: fit-content; position: sticky; top: 80px; }
  .checkout-summary h3 { font-size: 1.1rem; margin-bottom: 1rem; }
  .checkout-item { display: flex; justify-content: space-between; padding: 0.5rem 0; font-size: 0.9rem; }
  .payment-methods { display: flex; gap: 0.8rem; margin-bottom: 1.5rem; }
  .pay-method {
    flex: 1; padding: 12px; border: 2px solid var(--border);
    border-radius: 8px; text-align: center; font-size: 0.85rem;
    font-weight: 600; cursor: pointer; transition: all 0.2s;
  }
  .pay-method:hover, .pay-method.active { border-color: var(--text); background: var(--text); color: #fff; }

  /* ADMIN */
  .admin-container { max-width: 1280px; margin: 0 auto; padding: 2rem; }
  .admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
  .admin-header h1 { font-size: 1.8rem; }
  .stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; }
  .stat-card {
    background: var(--card); border-radius: var(--radius);
    padding: 1.5rem; box-shadow: var(--shadow);
  }
  .stat-card .stat-label { font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
  .stat-card .stat-value { font-size: 2rem; font-weight: 800; margin-top: 0.3rem; }
  .stat-card .stat-change { font-size: 0.82rem; color: var(--success); margin-top: 0.3rem; }
  .admin-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--border); }
  .admin-tab {
    padding: 12px 24px; border: none; background: none;
    font-weight: 600; font-size: 0.9rem; color: var(--muted);
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: all 0.2s;
  }
  .admin-tab:hover, .admin-tab.active { color: var(--text); border-bottom-color: var(--text); }
  .admin-table { width: 100%; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
  .admin-table th, .admin-table td { padding: 14px 18px; text-align: left; font-size: 0.9rem; }
  .admin-table th { background: #f5f5f4; font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
  .admin-table tr { border-bottom: 1px solid var(--border); }
  .admin-table tr:last-child { border-bottom: none; }
  .status-badge {
    display: inline-block; padding: 4px 12px; border-radius: 50px;
    font-size: 0.75rem; font-weight: 600;
  }
  .status-badge.pending { background: #fef3c7; color: #92400e; }
  .status-badge.completed { background: #dcfce7; color: #166534; }
  .status-badge.shipped { background: #dbeafe; color: #1e40af; }

  /* MODAL */
  .modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5);
    z-index: 200; display: none; align-items: center; justify-content: center;
    padding: 2rem;
  }
  .modal-overlay.active { display: flex; }
  .modal {
    background: var(--card); border-radius: var(--radius);
    max-width: 500px; width: 100%; max-height: 90vh;
    overflow-y: auto; padding: 2rem;
    animation: modalIn 0.3s ease;
  }
  @keyframes modalIn { from { transform: scale(0.95); opacity: 0; } to { transform: none; opacity: 1; } }
  .modal h2 { margin-bottom: 1rem; }
  .modal-close {
    float: right; background: none; border: none;
    font-size: 1.5rem; cursor: pointer; color: var(--muted);
  }

  /* TOAST */
  .toast-container { position: fixed; top: 80px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 0.5rem; }
  .toast {
    background: var(--text); color: #fff; padding: 14px 22px;
    border-radius: 8px; font-size: 0.9rem; font-weight: 500;
    box-shadow: var(--shadow-lg); animation: toastIn 0.3s ease;
    display: flex; align-items: center; gap: 0.5rem;
  }
  @keyframes toastIn { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }

  /* FOOTER */
  footer {
    background: var(--text); color: #fff; padding: 3rem 2rem;
    margin-top: 4rem;
  }
  .footer-grid {
    max-width: 1280px; margin: 0 auto;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
  }
  .footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 1rem; }
  .footer-col a { display: block; color: #a8a29e; font-size: 0.9rem; margin-bottom: 0.5rem; cursor: pointer; }
  .footer-col a:hover { color: #fff; }
  .footer-bottom { max-width: 1280px; margin: 2rem auto 0; padding-top: 2rem; border-top: 1px solid #333; text-align: center; color: #78716c; font-size: 0.85rem; }

  /* RESPONSIVE */
  @media (max-width: 768px) {
    nav { padding: 0 1rem; }
    .nav-links { gap: 1rem; }
    .nav-links a { font-size: 0.8rem; }
    .section { padding: 2.5rem 1rem; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
    .cart-item { flex-wrap: wrap; }
  }

  /* Success page */
  .success-page { text-align: center; padding: 6rem 2rem; }
  .success-icon { width: 80px; height: 80px; background: var(--success); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; font-size: 2.5rem; color: #fff; }

  /* Admin product form */
  .admin-product-form { background: var(--card); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 2rem; }
  .admin-product-form h3 { margin-bottom: 1rem; }
  .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  @media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

  /* User dropdown */
  .user-menu { position: relative; }
  .user-dropdown {
    position: absolute; top: 100%; right: 0;
    background: var(--card); border-radius: 8px;
    box-shadow: var(--shadow-lg); padding: 0.5rem;
    min-width: 180px; display: none; z-index: 50;
  }
  .user-dropdown.show { display: block; }
  .user-dropdown a {
    display: block; padding: 10px 14px; font-size: 0.88rem;
    border-radius: 6px; cursor: pointer;
  }
  .user-dropdown a:hover { background: #f5f5f4; }