:root {
      --gold: #FFD700;
      --lemon: #C4FF61;
      --navy: #001F3F;
      --bg: #000000;
      --text: #ffffff;
      --grey: #1a1a1a;
      --card: #111111;
      --border: #333333;
    }

    [data-theme="light"] {
      --bg: #ffffff;
      --text: #001F3F;
      --grey: #f4f4f4;
      --card: #ffffff;
      --border: #e0e0e0;
    }

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

    body {
      font-family: system-ui, -apple-system, sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      transition: background 0.3s, color 0.3s;
    }

    header {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 12px 16px;
      border-bottom: 2px solid var(--gold);
      position: sticky;
      top: 0;
      background: var(--bg);
      z-index: 50;
    }

    header img { height: 32px; }

    #searchBar {
      flex: 1;
      max-width: 280px;
      min-width: 80px;
      padding: 10px 14px;
      border-radius: 20px;
      border: 1px solid var(--border);
      background: var(--grey);
      color: var(--text);
      font-size: 14px;
    }

    .header-actions {
      display: flex;
      gap: 6px;
      align-items: center;
      margin-left: auto;
    }

    .icon-btn {
      background: none;
      border: none;
      font-size: 20px;
      cursor: pointer;
      color: var(--text);
      padding: 6px;
    }

    #navDrawer {
      position: fixed;
      top: 0;
      right: -100%;
      width: 25%;
      min-width: 260px;
      max-width: 320px;
      height: 100vh;
      background: var(--bg);
      border-left: 2px solid var(--gold);
      padding: 24px 20px;
      transition: right 0.3s ease;
      z-index: 100;
      overflow-y: auto;
      box-shadow: -4px 0 20px rgba(0,0,0,0.4);
    }

    #navDrawer.open { right: 0; }

    #navDrawer a {
      display: block;
      padding: 12px 0;
      color: var(--text);
      text-decoration: none;
      font-weight: 500;
      border-bottom: 1px solid var(--border);
    }

    #navDrawer a:hover { color: var(--gold); }

    main {
      flex: 1;
      padding: 20px 16px;
      max-width: 700px;
      margin: 0 auto;
      width: 100%;
    }

    h1 {
      font-size: 1.5rem;
      margin-bottom: 20px;
    }

    .cart-item {
      display: flex;
      gap: 14px;
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 14px;
      margin-bottom: 14px;
    }

    .cart-item img {
      width: 90px;
      height: 90px;
      object-fit: cover;
      border-radius: 10px;
      background: var(--grey);
      flex-shrink: 0;
    }

    .cart-info {
      flex: 1;
      display: flex;
      flex-direction: column;
    }

    .cart-info h3 {
      font-size: 1rem;
      margin-bottom: 6px;
      word-break: break-word;
    }

    .cart-price {
      color: var(--gold);
      font-weight: 700;
      margin-bottom: 10px;
    }

    .qty-controls {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 8px;
    }

    .qty-controls button {
      width: 32px;
      height: 32px;
      border-radius: 8px;
      border: 1px solid var(--border);
      background: var(--grey);
      color: var(--text);
      font-size: 18px;
      cursor: pointer;
      transition: background 0.2s;
    }

    .qty-controls button:hover {
      background: var(--gold);
      color: #000;
    }

    .qty-controls span {
      min-width: 30px;
      text-align: center;
      font-weight: 600;
    }

    .remove-btn {
      background: none;
      border: none;
      color: #e74c3c;
      font-size: 13px;
      cursor: pointer;
      padding: 0;
      margin-top: auto;
      text-decoration: underline;
    }

    .remove-btn:hover {
      opacity: 0.8;
    }

    .summary {
      background: var(--card);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 18px;
      margin-top: 20px;
    }

    .summary-row {
      display: flex;
      justify-content: space-between;
      margin-bottom: 10px;
      font-size: 15px;
    }

    .summary-row.total {
      font-size: 1.2rem;
      font-weight: 700;
      color: var(--gold);
      border-top: 1px solid var(--border);
      padding-top: 12px;
      margin-top: 12px;
    }

    .checkout-btn {
      display: block;
      width: 100%;
      padding: 15px;
      background: var(--gold);
      color: #000;
      border: none;
      border-radius: 10px;
      font-weight: 700;
      font-size: 16px;
      text-align: center;
      text-decoration: none;
      margin-top: 16px;
      cursor: pointer;
      transition: opacity 0.2s;
    }

    .checkout-btn:hover {
      opacity: 0.9;
    }

    .empty {
      text-align: center;
      padding: 60px 20px;
      opacity: 0.8;
    }

    .empty a {
      display: inline-block;
      margin-top: 16px;
      padding: 12px 24px;
      background: var(--gold);
      color: #000;
      text-decoration: none;
      border-radius: 10px;
      font-weight: 600;
      transition: opacity 0.2s;
    }

    .empty a:hover {
      opacity: 0.9;
    }

    footer {
      text-align: center;
      padding: 18px;
      font-size: 13px;
      border-top: 1px solid var(--border);
      margin-top: auto;
    }

    #backToTop {
      position: fixed;
      bottom: 24px;
      right: 24px;
      width: 46px;
      height: 46px;
      border-radius: 50%;
      background: var(--gold);
      border: none;
      font-size: 20px;
      cursor: pointer;
      display: none;
      z-index: 40;
    }