/* ─── DESIGN TOKENS ──────────────────────────────────────── */
:root {
  --bg:        #020617;
  --surface:   #0f172a;
  --card:      rgba(255, 255, 255, 0.05);
  --card-hover:rgba(255, 255, 255, 0.09);
  --border:    rgba(255, 255, 255, 0.08);
  --blue:      #3b82f6;
  --blue-dark: #2563eb;
  --green:     #22c55e;
  --whatsapp:  #25D366;
  --text:      #f1f5f9;
  --muted:     #94a3b8;
  --red:       #ef4444;
  --radius:    12px;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

/* ─── NAV ────────────────────────────────────────────────── */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
}

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.cart-toggle {
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 18px;
  border-radius: 99px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.cart-toggle:hover { background: rgba(255,255,255,0.18); }

.cart-badge {
  display: inline-block;
  background: var(--blue);
  color: white;
  border-radius: 99px;
  padding: 0 7px;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
  vertical-align: middle;
  transition: transform 0.2s;
}

.cart-badge.bump { transform: scale(1.4); }

/* ─── HERO ───────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 92vh;
  background: linear-gradient(160deg, #020617 0%, #0f172a 60%, #1e293b 100%);
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(59,130,246,0.12) 0%, transparent 60%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 120px 40px 60px;
  max-width: 680px;
}

.hero-tag {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--blue);
  margin-bottom: 16px;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 16px;
}

.hero-sub {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--blue);
  color: white;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  font-size: 0.95rem;
}

.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); }

.btn-whatsapp {
  display: inline-block;
  background: var(--whatsapp);
  color: white;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  transition: opacity 0.2s, transform 0.15s;
  font-size: 0.95rem;
}

.btn-whatsapp:hover { opacity: 0.88; transform: translateY(-1px); }

/* ─── CATEGORY TABS ──────────────────────────────────────── */
.category-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px 10px;
}

.tab {
  padding: 10px 24px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.tab:hover { background: var(--card); color: var(--text); }
.tab.active { background: var(--blue); color: white; border-color: var(--blue); }

/* ─── PRODUCTS ───────────────────────────────────────────── */
.products {
  padding: 30px 40px 60px;
  max-width: 1100px;
  margin: 0 auto;
}

.products h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 28px;
  color: var(--text);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.product {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: background 0.2s, transform 0.2s;
}

.product:hover { background: var(--card-hover); transform: translateY(-3px); }

.product img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
}

.product h3 { font-size: 1rem; font-weight: 600; }

.price {
  color: var(--blue);
  font-weight: 700;
  font-size: 1.05rem;
}

.product button {
  margin-top: auto;
  width: 100%;
}

.out-of-stock { opacity: 0.45; pointer-events: none; }

.sold-out {
  color: var(--red);
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: auto;
}

.state-msg { color: var(--muted); padding: 20px 0; }

/* ─── TRUST ──────────────────────────────────────────────── */
.trust {
  background: var(--surface);
  padding: 60px 40px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trust-item strong { font-size: 1rem; color: var(--text); }
.trust-item span   { font-size: 0.85rem; color: var(--muted); }

/* ─── FOOTER ─────────────────────────────────────────────── */
footer {
  padding: 40px;
  text-align: center;
  background: var(--bg);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

footer a { color: var(--blue); }
.footer-brand { font-weight: 700; font-size: 1rem; color: var(--text); }
.footer-copy  { margin-top: 10px; font-size: 0.8rem; }

/* ─── CART DRAWER ────────────────────────────────────────── */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 100;
}

.cart-overlay.open { display: block; }

.cart-drawer {
  position: fixed;
  top: 0; right: 0;
  width: min(400px, 100vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 101;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.cart-drawer.open { transform: translateX(0); }

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.cart-header h2 { font-size: 1.1rem; }

.cart-close {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.cart-list {
  list-style: none;
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cart-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: var(--card);
  border-radius: 8px;
  font-size: 0.9rem;
}

.cart-list li span:first-child { flex: 1; }

.remove-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
}

.remove-btn:hover { color: var(--red); }

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-total { font-size: 1rem; color: var(--muted); }
.cart-total strong { color: var(--text); font-size: 1.2rem; }

.cart-footer .btn-primary { width: 100%; text-align: center; }

/* ─── ADMIN STYLES ───────────────────────────────────────── */
.admin-body {
  background: #0d1117;
}

.admin-login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 20px;
}

.admin-login h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.admin-login input {
  width: 100%;
  max-width: 340px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
}

.admin-login input:focus { border-color: var(--blue); }

.admin-login button {
  width: 100%;
  max-width: 340px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.admin-header h1 { font-size: 1.1rem; font-weight: 700; }

.logout-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 7px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
}

.logout-btn:hover { color: var(--text); border-color: var(--muted); }

.admin-section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px;
}

.admin-section h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.8rem;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table input,
.admin-table select {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.88rem;
  width: 100%;
  outline: none;
}

.admin-table input:focus,
.admin-table select:focus { border-color: var(--blue); }

.delete-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
}

.delete-btn:hover { color: var(--red); border-color: var(--red); }

.add-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  align-items: end;
}

.add-form input,
.add-form select {
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  width: 100%;
}

.add-form input:focus,
.add-form select:focus { border-color: var(--blue); }

.add-form button { grid-column: span 1; }

.error-msg   { color: var(--red);   font-size: 0.85rem; }
.success-msg { color: var(--green); font-size: 0.85rem; }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav { padding: 16px 20px; }
  .hero-content { padding: 100px 20px 40px; }
  .products { padding: 20px; }
  .trust    { padding: 40px 20px; }
  footer    { padding: 30px 20px; }
  .admin-section  { padding: 24px 16px; }
  .admin-header   { padding: 16px 20px; }
}
