:root {
  --navy: #03112a;
  --navy-soft: #0d2447;
  --gold: #c68d54;
  --gold-soft: #e0b47f;
  --white: #ffffff;
  --bg: #f7f7f8;
  --border: #e3e3e6;
  --danger: #b3261e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--navy);
}

a { color: inherit; }

header.site-header {
  background: var(--navy);
  color: var(--white);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 20;
}

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

header.site-header img.logo {
  height: 40px;
  width: 40px;
  display: block;
  border-radius: 8px;
  background: var(--white);
  padding: 2px;
}

header.site-header .brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--white);
}

.cart-btn {
  background: var(--gold);
  color: var(--navy);
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

nav.categories {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  overflow-x: auto;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

nav.categories button {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--navy);
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 14px;
}

nav.categories button.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.banner {
  margin: 16px 20px 0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  background: var(--navy-soft);
  color: var(--white);
  min-height: 140px;
  display: flex;
  align-items: center;
}

.banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.banner .banner-content {
  position: relative;
  padding: 24px;
}

.banner h2 {
  margin: 0 0 6px;
  color: var(--gold-soft);
}

.banner p { margin: 0; }

main {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

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

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: box-shadow 0.15s ease;
}

.card:hover { box-shadow: 0 6px 18px rgba(3, 17, 42, 0.12); }

.card .thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--border);
}

.card .body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card .category {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gold);
  font-weight: 700;
}

.card h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.3;
}

.price-row {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price {
  font-weight: 700;
  font-size: 16px;
}

.price.strike {
  text-decoration: line-through;
  color: #888;
  font-weight: 400;
  font-size: 13px;
}

.offer-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  align-self: flex-start;
}

.add-btn {
  margin-top: 8px;
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.add-btn:hover { background: var(--navy-soft); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

/* Cart drawer */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 17, 42, 0.45);
  display: none;
  z-index: 30;
}

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

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(420px, 100%);
  background: var(--white);
  z-index: 31;
  transform: translateX(100%);
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
}

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

.drawer-header {
  padding: 16px 20px;
  background: var(--navy);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-header button {
  background: none;
  border: none;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
}

.drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cart-item {
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.cart-item img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--border);
}

.cart-item .info { flex: 1; }

.cart-item .qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-item .qty-controls button {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
}

.remove-link {
  color: var(--danger);
  font-size: 12px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.drawer-footer .total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 12px;
}

.whatsapp-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: #25d366;
  color: white;
  padding: 12px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
}

/* Product modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 17, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 40;
  padding: 20px;
}

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

.modal {
  background: var(--white);
  border-radius: 12px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 640px) {
  .modal { grid-template-columns: 1fr; }
}

.modal img.main-image {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}

.modal .modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal .close-modal {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--navy);
}

footer.site-footer {
  text-align: center;
  padding: 24px;
  color: #777;
  font-size: 13px;
}
