*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

  :root {
    --ink: #1a1a1a;
    --ink-muted: #6b6b6b;
    --ink-faint: #b0b0b0;
    --bg: #f7f6f3;
    --surface: #ffffff;
    --accent: #2563eb;
    --accent-bg: #eff4ff;
    --accent-hover: #1d4ed8;
    --border: #e5e4df;
    --border-strong: #c9c8c2;
    --success: #16a34a;
    --success-bg: #f0fdf4;
    --danger: #dc2626;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.10), 0 2px 4px rgba(0,0,0,0.06);
  }

  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
  }

  /* NAV */
  nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
  }
  .nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    gap: 16px;
  }
  .logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--ink);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }
  .logo-mark {
    width: 28px;
    height: 28px;
    background: var(--accent);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .logo-mark svg { display: block; }

  .search-bar {
    flex: 1;
    max-width: 480px;
    margin-left: auto;
    position: relative;
  }
  .search-bar input {
    width: 100%;
    padding: 8px 16px 8px 38px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg);
    color: var(--ink);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
  }
  .search-bar input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
    background: var(--surface);
  }
  .search-bar svg {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-faint);
    pointer-events: none;
  }

  .nav-actions { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
  .nav-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-muted);
    transition: background 0.15s, color 0.15s;
  }
  .nav-btn:hover { background: var(--bg); color: var(--ink); }
  .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
  }
  .badge.hidden { display: none; }

  /* HERO */
  .hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
    color: #fff;
    padding: 60px 24px;
    text-align: center;
  }
  .hero h1 {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 12px;
  }
  .hero h1 span { opacity: 0.7; }
  .hero p {
    font-size: 16px;
    opacity: 0.8;
    margin-bottom: 28px;
  }
  .hero-cta {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .btn-primary {
    background: #fff;
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
    padding: 10px 22px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.15s;
    text-decoration: none;
    display: inline-block;
  }
  .btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
  .btn-outline-white {
    background: transparent;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 22px;
    border-radius: 8px;
    border: 1.5px solid rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.15s;
  }
  .btn-outline-white:hover { background: rgba(255,255,255,0.1); }

  /* CATEGORIES */
  .section { max-width: 1200px; margin: 0 auto; padding: 40px 24px; }
  .section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
  }
  .section-title { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
  .see-all {
    font-size: 13px;
    color: var(--accent);
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
  }
  .see-all:hover { text-decoration: underline; }

  .categories {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .categories::-webkit-scrollbar { display: none; }
  .cat-chip {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1.5px solid var(--border-strong);
    background: var(--surface);
    color: var(--ink-muted);
    transition: all 0.15s;
    white-space: nowrap;
  }
  .cat-chip:hover { border-color: var(--accent); color: var(--accent); }
  .cat-chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
  }

  /* PRODUCTS GRID */
  .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
  }

  .product-card {
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    flex-direction: column;
  }
  .product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

  .product-img {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    background: var(--bg);
  }
  .product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s;
  }
  .product-card:hover .product-img img { transform: scale(1.04); }
  .product-badge-sale {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .product-badge-new {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--success);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .wishlist-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: var(--surface);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: transform 0.15s;
    color: var(--ink-faint);
  }
  .wishlist-btn:hover { transform: scale(1.1); }
  .wishlist-btn.loved { color: #ef4444; }

  .product-info { padding: 14px; flex: 1; display: flex; flex-direction: column; }
  .product-category {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-bottom: 4px;
  }
  .product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
    line-height: 1.4;
  }
  .product-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
  }
  .stars { color: #f59e0b; font-size: 12px; letter-spacing: -1px; }
  .rating-count { font-size: 12px; color: var(--ink-muted); }
  .product-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    margin-bottom: 12px;
  }
  .price { font-size: 17px; font-weight: 700; color: var(--ink); }
  .price-old {
    font-size: 13px;
    color: var(--ink-faint);
    text-decoration: line-through;
  }
  .add-to-cart {
    width: 100%;
    padding: 9px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
  }
  .add-to-cart:hover { background: var(--accent-hover); }
  .add-to-cart:active { transform: scale(0.97); }
  .add-to-cart.added { background: var(--success); }

  /* CART SIDEBAR */
  .cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
  }
  .cart-overlay.open { opacity: 1; pointer-events: all; }

  .cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: min(400px, 100vw);
    height: 100vh;
    background: var(--surface);
    z-index: 201;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
  }
  .cart-sidebar.open { transform: translateX(0); }

  .cart-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .cart-header h2 { font-size: 17px; font-weight: 700; }
  .close-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-muted);
  }
  .close-btn:hover { background: var(--border); }

  .cart-items { flex: 1; overflow-y: auto; padding: 16px 20px; }
  .cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--ink-muted);
  }
  .cart-empty svg { margin: 0 auto 12px; display: block; opacity: 0.3; }
  .cart-empty p { font-size: 14px; }

  .cart-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
  }
  .cart-item-img {
    width: 68px;
    height: 68px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg);
  }
  .cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
  .cart-item-details { flex: 1; min-width: 0; }
  .cart-item-name { font-size: 13px; font-weight: 600; margin-bottom: 4px; line-height: 1.3; }
  .cart-item-price { font-size: 13px; color: var(--accent); font-weight: 700; }
  .qty-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
  }
  .qty-btn {
    width: 26px;
    height: 26px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    transition: background 0.1s;
  }
  .qty-btn:hover { background: var(--bg); }
  .qty-num { font-size: 13px; font-weight: 600; min-width: 16px; text-align: center; }
  .remove-item {
    font-size: 11px;
    color: var(--danger);
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    margin-top: 4px;
    display: block;
  }
  .remove-item:hover { text-decoration: underline; }

  .cart-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--bg);
  }
  .cart-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--ink-muted);
    margin-bottom: 6px;
  }
  .cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }
  .checkout-btn {
    width: 100%;
    padding: 13px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
  }
  .checkout-btn:hover { background: var(--accent-hover); }

  /* TOAST */
  .toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
  }
  .toast {
    background: var(--ink);
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: slideUp 0.25s ease, fadeOut 0.3s ease 2s forwards;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
  }
  .toast.success { background: #15803d; }
  @keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
  }
  @keyframes fadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
  }

  /* PROMO BANNER */
  .promo-banner {
    background: #1e3a8a;
    color: #fff;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    letter-spacing: 0.3px;
  }
  .promo-banner span { opacity: 0.7; }

  /* FEATURES BAR */
  .features-bar {
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  .features-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    justify-content: space-around;
    gap: 16px;
    flex-wrap: wrap;
  }
  .feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-muted);
    font-weight: 500;
  }
  .feature-item svg { color: var(--accent); flex-shrink: 0; }

  /* FOOTER */
  footer {
    background: var(--ink);
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 28px 24px;
    font-size: 13px;
    margin-top: 40px;
  }
  footer strong { color: #fff; }

  /* EMPTY STATE */
  .no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--ink-muted);
  }
  .no-results p { font-size: 15px; }

  @media (max-width: 600px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .hero h1 { font-size: 26px; }
  }