:root {
  --primary: #ef6c27;
  --primary-hover: #d95614;
  --primary-light: rgba(239, 108, 39, 0.1);
  --navy: #0f172a;
  --navy-soft: #1e293b;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e8e4de;
  --bg: #faf8f5;
  --card: #ffffff;
  --sale: #be123c;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --display: "Playfair Display", Georgia, serif;
  --header-h: 78px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.container { width: min(1180px, 92%); margin: 0 auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.brand-logo-img {
  height: 34px;
  width: auto;
  max-width: min(160px, 42vw);
  object-fit: contain;
  background: transparent !important;
  border: none;
  border-radius: 0;
  padding: 0;
  flex-shrink: 0;
  display: block;
  image-rendering: auto;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.footer-brand img {
  height: 48px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  background: transparent !important;
  border-radius: 0;
  padding: 0;
  display: block;
}
.nav-main { display: flex; gap: 22px; align-items: center; }
.nav-main a {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
}
.nav-main a:hover, .nav-main a.active { color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--navy);
}
.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  padding: 0 4px;
}
.back-group {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--navy);
  padding: 8px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--border);
}
.menu-toggle { display: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #c2410c);
  color: #fff;
  box-shadow: 0 10px 24px rgba(239, 108, 39, 0.28);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-outline {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--navy);
}
.btn-outline:hover { border-color: var(--navy); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Hero — full-bleed image */
.hero-full {
  position: relative;
  min-height: min(78vh, 720px);
  display: flex;
  align-items: flex-end;
  padding: 0;
  border-bottom: none;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.25) 0%,
    rgba(15, 23, 42, 0.55) 45%,
    rgba(15, 23, 42, 0.82) 100%
  );
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 48px 0 56px;
  max-width: 720px;
  margin-left: max(4%, calc((100% - 1180px) / 2));
  margin-right: auto;
  width: min(1180px, 92%);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(239, 108, 39, 0.22);
  color: #ffd7bf;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero-full h1 {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  line-height: 1.08;
  color: #fff;
  margin-bottom: 14px;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.hero-full p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 34rem;
  margin-bottom: 24px;
  font-size: 1.05rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-hero-outline {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  color: #fff;
}
.btn-hero-outline:hover {
  background: #fff;
  color: var(--navy);
  border-color: #fff;
}

/* Categories */
.section { padding: 56px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 28px;
}
.section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  color: var(--navy);
}
.section-head p { color: var(--muted); font-size: 0.95rem; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.cat-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3/4;
  background: #ddd;
}
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: 0.4s; }
.cat-card:hover img { transform: scale(1.05); }
.cat-card span {
  position: absolute;
  inset: auto 0 0 0;
  padding: 18px 14px;
  background: linear-gradient(transparent, rgba(15,23,42,0.75));
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
}

/* Products */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  align-items: center;
}
.chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}
.chip.active, .chip:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.search-input {
  margin-left: auto;
  min-width: 220px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: 0.25s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.product-media {
  position: relative;
  aspect-ratio: 3/4;
  background: #efeae3;
  overflow: hidden;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  background: var(--navy);
  color: #fff;
}
.badge.sale { background: var(--sale); }
.badge.hot { background: var(--primary); }
.product-body { padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-cat {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.product-body h3 { font-size: 1rem; color: var(--navy); }
.price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; padding-top: 8px; }
.price { font-weight: 800; color: var(--navy); }
.compare { font-size: 0.85rem; color: var(--muted); text-decoration: line-through; }
.card-actions { display: flex; gap: 8px; margin-top: 10px; }
.card-actions .btn { flex: 1; padding: 10px 12px; font-size: 0.82rem; }

/* Product detail */
.pdp {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  padding: 36px 0 60px;
}
.pdp-gallery {
  border-radius: 20px;
  overflow: hidden;
  background: #efeae3;
  aspect-ratio: 1;
}
.pdp-gallery img { width: 100%; height: 100%; object-fit: cover; }
.pdp-info h1 {
  font-family: var(--display);
  font-size: 2rem;
  color: var(--navy);
  margin: 8px 0 12px;
}
.pdp-meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; }
.option-label { font-size: 0.8rem; font-weight: 800; margin: 16px 0 8px; }
.option-row { display: flex; flex-wrap: wrap; gap: 8px; }
.opt {
  min-width: 44px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
}
.opt.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.qty-row { display: flex; align-items: center; gap: 10px; margin: 18px 0; }
.qty-row input {
  width: 72px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  text-align: center;
}
.pdp-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Cart / Checkout */
.cart-layout, .checkout-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 24px;
  padding: 28px 0 60px;
}
.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
}
.cart-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item img {
  width: 88px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
  background: #efeae3;
}
.cart-item h4 { font-size: 0.95rem; margin-bottom: 4px; }
.cart-item .meta { font-size: 0.8rem; color: var(--muted); }
.remove-btn {
  border: none;
  background: none;
  color: var(--sale);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.8rem;
  margin-top: 8px;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  margin: 10px 0;
  color: var(--muted);
}
.summary-row.total {
  color: var(--navy);
  font-weight: 800;
  font-size: 1.15rem;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 14px;
}
.form-grid { display: grid; gap: 12px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
label { font-size: 0.8rem; font-weight: 700; display: block; margin-bottom: 6px; }
input, select, textarea {
  width: 100%;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
}
.pay-options { display: grid; gap: 10px; margin: 16px 0; }
.pay-option {
  display: flex;
  flex-direction: row;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: #fff;
  margin-bottom: 0;
  font-size: inherit;
  font-weight: inherit;
}
.pay-option:hover { border-color: #cbd5e1; }
.pay-option.active { border-color: var(--primary); background: var(--primary-light); }
.pay-option input[type="radio"] {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 2px 0 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.pay-option > div {
  flex: 1;
  min-width: 0;
  text-align: left;
}
.pay-option strong {
  display: block;
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 700;
}
.pay-option .pay-desc {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 2px;
}
.pay-option.disabled,
.pay-option:has(input:disabled) {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f8fafc;
}
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s;
  z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Side cart drawer */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 100vw);
  height: 100%;
  background: #fff;
  z-index: 310;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.18);
  transform: translateX(100%);
  transition: transform 0.28s ease;
}
.cart-drawer.open {
  transform: translateX(0);
}
.cart-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.cart-drawer-head h3 {
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--navy);
  margin: 0;
}
.cart-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}
.cart-drawer-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--muted);
}
.drawer-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.drawer-item img {
  width: 72px;
  height: 88px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--sand);
}
.drawer-item h4 {
  font-size: 0.9rem;
  margin: 0 0 4px;
  color: var(--navy);
  line-height: 1.3;
}
.drawer-item .meta {
  font-size: 0.78rem;
  color: var(--muted);
}
.drawer-item .line-total {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}
.drawer-qty {
  display: inline-flex;
  align-items: center;
  gap: 0;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.drawer-qty button {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--sand);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  color: var(--navy);
}
.drawer-qty button:hover { background: #e8e0d6; }
.drawer-qty span {
  min-width: 28px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
}
.drawer-remove {
  display: inline-block;
  margin-top: 6px;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.75rem;
  color: #b91c1c;
  cursor: pointer;
  text-decoration: underline;
}
.cart-drawer-foot {
  padding: 16px 20px 20px;
  border-top: 1px solid var(--border);
  background: #faf8f5;
}
.cart-drawer-foot .summary-row {
  display: flex;
  justify-content: space-between;
  margin: 6px 0;
  font-size: 0.9rem;
}
.cart-drawer-foot .summary-row.total {
  font-weight: 800;
  font-size: 1.05rem;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  color: var(--navy);
}
.cart-drawer-foot .btn { margin-top: 12px; }
.cart-drawer-foot .btn + .btn { margin-top: 8px; }
body.cart-open { overflow: hidden; }

/* Checkout steps */
.checkout-steps {
  display: flex;
  gap: 8px;
  margin: 20px 0 8px;
  flex-wrap: wrap;
}
.checkout-step-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.checkout-step-pill .num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--sand);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
}
.checkout-step-pill.active {
  border-color: var(--navy);
  color: var(--navy);
}
.checkout-step-pill.active .num {
  background: var(--navy);
  color: #fff;
}
.checkout-step-pill.done {
  border-color: #a7f3d0;
  color: #065f46;
  background: #ecfdf5;
}
.checkout-step-pill.done .num {
  background: #059669;
  color: #fff;
}
.checkout-panel[hidden] { display: none !important; }
.checkout-nav {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.checkout-nav .btn { flex: 1; min-width: 120px; }
.review-block {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.review-block h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 8px;
}
.review-block p { margin: 4px 0; font-size: 0.95rem; color: var(--navy); }
.success-order {
  text-align: left;
  margin-top: 20px;
}
.success-order h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  margin: 0 0 12px;
  color: var(--navy);
}
.success-hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #059669;
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}
.success-total {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy);
  margin: 12px 0;
}

/* Footer */
.site-footer {
  margin-top: auto;
  background: var(--navy);
  color: #cbd5e1;
  padding: 40px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}
.site-footer h4 { color: #fff; margin-bottom: 12px; }
.site-footer a { color: #94a3b8; display: block; margin: 6px 0; font-size: 0.9rem; }
.site-footer a:hover { color: var(--primary); }
.footer-copy {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 16px;
  font-size: 0.8rem;
  text-align: center;
}
.page-title {
  padding: 28px 0 0;
}
.page-title h1 {
  font-family: var(--display);
  font-size: 2rem;
  color: var(--navy);
}
.alert {
  padding: 14px 16px;
  border-radius: 12px;
  margin: 16px 0;
  font-size: 0.9rem;
}
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-warn { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

@media (max-width: 992px) {
  .pdp, .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .hero-full { min-height: min(70vh, 580px); }
  .hero-content { padding: 36px 0 40px; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-main { display: none; }
  .nav-main.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #fff;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    align-items: flex-start;
  }
  .header-inner { justify-content: flex-start; gap: 12px; }
  .menu-toggle { display: grid; flex-shrink: 0; }
  .header-inner > .brand { flex: 1; }
  .header-actions { flex-shrink: 0; margin-left: auto; }
  .search-input { margin-left: 0; width: 100%; }
  .form-grid.two { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .header-inner { display: grid; grid-template-columns: 94px minmax(0, 1fr) 94px; gap: 8px; }
  .header-inner > .menu-toggle { grid-column: 1; grid-row: 1; justify-self: start; }
  .header-inner > .brand { grid-column: 2; grid-row: 1; justify-content: center; width: 100%; }
  .header-actions { grid-column: 3; grid-row: 1; justify-self: end; gap: 8px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .back-group span { display: none; }
  .brand-logo-img { height: 28px; max-width: min(140px, 100%); flex-shrink: 1; object-position: center; }
  .cart-item { grid-template-columns: 72px 1fr; }
  .cart-item .line-total { grid-column: 2; }
}
