:root {
  --bg: #fff8ed;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-strong: #fff;
  --text: #211612;
  --muted: #796c62;
  --line: rgba(60, 34, 18, 0.12);
  --red: #df1f1f;
  --red-dark: #b91616;
  --orange: #f59e0b;
  --green: #168345;
  --shadow: 0 18px 50px rgba(89, 50, 24, 0.13);
  --radius: 24px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 205, 108, 0.32), transparent 30rem),
    radial-gradient(circle at 85% 20%, rgba(255, 130, 82, 0.13), transparent 34rem),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 237, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1540px;
  margin: 0 auto;
  height: 82px;
  padding: 0 26px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.logo img { width: 286px; max-width: 36vw; display: block; }
.main-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}
.main-nav a {
  font-weight: 750;
  font-size: 15px;
  color: #35231c;
  position: relative;
  padding: 28px 0;
}
.main-nav a.active::after,
.main-nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 17px;
  height: 3px;
  border-radius: 99px;
  background: var(--red);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 20px;
}
.lang-switch { display: flex; align-items: center; gap: 6px; font-weight: 800; color: #9b8273; }
.lang-btn {
  border: 0;
  background: transparent;
  font-weight: 900;
  cursor: pointer;
  color: #8b7a70;
}
.lang-btn.active { color: var(--red); }
.icon-btn, .mobile-cart-toggle {
  border: 1px solid var(--line);
  background: #fff;
  min-width: 42px;
  height: 42px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(76, 37, 16, 0.08);
}
.mobile-cart-toggle { display: none; padding: 0 13px; gap: 8px; align-items: center; }
.points-pill {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0 8px;
  align-items: center;
  background: rgba(255,255,255,.82);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px 12px;
  box-shadow: 0 8px 24px rgba(76,37,16,.08);
}
.points-pill strong { font-size: 17px; }
.points-pill small { grid-column: 2; color: var(--muted); font-size: 11px; line-height: 1.1; }
.coin {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe79a, #f59e0b);
  color: white;
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
  box-shadow: 0 8px 20px rgba(245,158,11,.3);
}
.coin.big { width: 48px; height: 48px; font-size: 22px; }
.top-promo {
  max-width: 1540px;
  margin: 16px auto 0;
  border-radius: 16px;
  padding: 14px 28px;
  background:
    linear-gradient(90deg, rgba(198,15,15,.98), rgba(226,36,24,.94)),
    radial-gradient(circle at 90% 50%, rgba(255,255,255,.22), transparent 18rem);
  color: white;
  display: flex;
  align-items: center;
  gap: 22px;
  box-shadow: 0 18px 40px rgba(182, 22, 22, 0.25);
}
.top-promo strong { flex: 1; text-align: center; font-size: clamp(18px, 2vw, 24px); }
.top-promo-label, .coupon {
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255,255,255,.14);
  font-weight: 900;
  white-space: nowrap;
}
.coupon { background: #ffd166; color: #5d270d; }
.expires { font-size: 14px; opacity: .92; white-space: nowrap; }
.promo-close { background: transparent; color: white; border: 0; font-size: 30px; cursor: pointer; }
.page-shell {
  max-width: 1540px;
  margin: 18px auto 0;
  padding: 0 26px 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 24px;
}
.content-column { min-width: 0; }
.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 470px;
  gap: 24px;
  align-items: center;
  margin: 18px 0 20px;
}
.hero-copy { padding: 8px 18px; }
.eyebrow {
  color: var(--red);
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 12px;
}
h1 { margin: 8px 0 8px; font-size: clamp(34px, 4vw, 56px); line-height: .98; letter-spacing: -0.045em; }
.hero-copy p:not(.eyebrow) { color: var(--muted); font-size: 18px; max-width: 680px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hero-badges span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 13px;
  border-radius: 999px;
  background: rgba(255,255,255,.76);
  border: 1px solid var(--line);
  font-weight: 750;
}
.mode-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  text-align: center;
}
.mode-card > small { display: block; color: var(--muted); font-weight: 800; margin-bottom: 10px; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mode-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.74);
  border-radius: 16px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 3px 10px;
  align-items: center;
}
.mode-btn strong { font-size: 14px; }
.mode-btn small { color: var(--muted); grid-column: 2; }
.mode-btn.active {
  background: linear-gradient(135deg, var(--red), #bc1717);
  color: white;
  box-shadow: 0 14px 28px rgba(223,31,31,.26);
}
.mode-btn.active small { color: rgba(255,255,255,.86); }
.brand-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 16px 0 20px;
}
.brand-card {
  min-height: 152px;
  border: 0;
  border-radius: 28px;
  background-size: cover;
  background-position: center;
  color: white;
  text-align: left;
  padding: 26px 24px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 18px 46px rgba(60,34,18,.16);
  transition: transform .22s ease, box-shadow .22s ease;
}
.brand-card:hover, .brand-card.active { transform: translateY(-4px); box-shadow: 0 28px 65px rgba(60,34,18,.23); }
.brand-card.active::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid #fff;
  border-radius: 28px;
  box-shadow: inset 0 0 0 4px var(--brand-color);
}
.brand-card strong { display: block; font-size: clamp(22px, 2vw, 34px); line-height: .9; text-transform: uppercase; max-width: 170px; letter-spacing: .02em; }
.brand-card small { display: block; margin-top: 18px; max-width: 190px; font-weight: 800; line-height: 1.25; }
.brand-icon { position: absolute; top: 16px; right: 20px; font-size: 34px; filter: drop-shadow(0 5px 10px rgba(0,0,0,.3)); }
.brand-arrow { position: absolute; right: 18px; bottom: 18px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.9); color: #24130d; display: grid; place-items: center; font-size: 30px; }
.menu-layout { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 20px; align-items: start; }
.filters-card, .cart-panel, .product-card, .info-band, .admin-table-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.filters-card { padding: 18px; position: sticky; top: 112px; }
.filters-title { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 14px; margin-bottom: 12px; }
.filters-title small { display: block; color: var(--muted); margin-top: 2px; }
.filters-title span { background: var(--red); color: white; border-radius: 999px; min-width: 34px; height: 28px; display: grid; place-items: center; font-weight: 900; }
.category-list { display: grid; gap: 4px; }
.category-btn, .reset-filters {
  border: 0;
  background: transparent;
  color: #2f2019;
  width: 100%;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 8px;
  text-align: left;
  padding: 12px 8px;
  border-radius: 13px;
  cursor: pointer;
  font-weight: 750;
}
.category-btn:hover, .category-btn.active { background: #fff1df; color: var(--red-dark); }
.category-btn em { font-style: normal; color: #4a372f; }
.reset-filters { display: block; margin-top: 10px; background: #fff4e7; text-align: center; font-weight: 900; color: var(--red-dark); }
.products-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.product-card { overflow: hidden; background: #fff; transition: transform .2s ease, box-shadow .2s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: 0 25px 60px rgba(91,45,18,.17); }
.product-card.hidden { display: none; }
.product-image { height: 172px; background-size: cover; background-position: center; position: relative; }
.brand-chip, .discount-chip {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--brand-color, #222);
  color: #fff;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.discount-chip { left: auto; right: 14px; background: #ffca37; color: #421e0d; }
.product-body { padding: 16px; }
.product-body h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -0.02em; }
.product-body p { min-height: 46px; margin: 0 0 14px; color: var(--muted); line-height: 1.34; font-size: 14px; }
.price-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.price-row div:first-child { border-right: 1px solid var(--line); }
.price-row small { display: block; color: var(--muted); font-size: 11px; font-weight: 800; }
.price-row strong { display: block; font-size: 19px; margin-top: 3px; }
.add-to-cart, .checkout-btn, .secondary-btn {
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: white;
  min-height: 48px;
  width: 100%;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(223,31,31,.23);
}
.add-to-cart:hover, .checkout-btn:hover { filter: brightness(.96); transform: translateY(-1px); }
.promo-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin: 22px 0; }
.promo-tile {
  min-height: 105px;
  border-radius: 22px;
  background-size: cover;
  background-position: center;
  color: white;
  padding: 20px;
  box-shadow: var(--shadow);
}
.promo-tile strong { display: block; font-size: 19px; margin-bottom: 8px; }
.promo-tile p { margin: 0; opacity: .94; font-weight: 650; }
.info-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,243,217,.92)),
    radial-gradient(circle at right, rgba(245,158,11,.16), transparent 18rem);
}
.info-band > div { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; align-items: center; }
.info-band h2 { margin: 0; font-size: 24px; }
.info-band p { grid-column: 2; margin: 0; color: var(--muted); }
.secondary-btn { width: auto; min-width: 190px; background: #22130d; box-shadow: none; }
.cart-panel {
  position: sticky;
  top: 112px;
  align-self: start;
  padding: 20px;
  max-height: calc(100vh - 126px);
  overflow: auto;
  background: rgba(255,255,255,.94);
}
.cart-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.cart-header h2 { margin: 0; font-size: 32px; letter-spacing: -0.04em; }
.cart-header small { color: var(--muted); font-weight: 800; }
.clear-cart { border: 0; background: #fff5ec; border-radius: 12px; width: 40px; height: 40px; cursor: pointer; }
.cart-shared-note {
  margin: 14px 0;
  padding: 12px;
  border-radius: 14px;
  background: #fff2df;
  border: 1px solid rgba(245,158,11,.2);
  color: #7c3e13;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
}
.cart-items { display: grid; gap: 12px; margin: 14px 0; }
.cart-item {
  display: grid;
  grid-template-columns: 72px minmax(0,1fr);
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.cart-item img { width: 72px; height: 72px; object-fit: cover; border-radius: 14px; }
.cart-item h4 { margin: 2px 0 4px; font-size: 14px; }
.cart-brand { display: inline-block; font-size: 9px; color: white; border-radius: 999px; padding: 4px 7px; font-weight: 900; text-transform: uppercase; }
.cart-item-meta { color: var(--muted); font-size: 12px; }
.qty-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 7px; }
.qty-control { display: inline-flex; background: #fff2e6; border-radius: 999px; align-items: center; overflow: hidden; }
.qty-control button { border: 0; background: transparent; width: 28px; height: 26px; font-weight: 900; cursor: pointer; }
.qty-control span { min-width: 22px; text-align: center; font-weight: 900; }
.cart-line-price { font-weight: 900; }
.free-delivery-box { border-radius: 16px; background: #eafbea; border: 1px solid rgba(22,131,69,.22); padding: 13px; color: #0b7437; margin: 14px 0; }
.free-delivery-copy { margin: 4px 0 10px; font-size: 13px; font-weight: 800; }
.progress { height: 8px; border-radius: 999px; background: rgba(22,131,69,.13); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--green); transition: width .25s ease; }
.cart-summary { border-top: 1px solid var(--line); padding-top: 14px; margin: 14px 0; display: grid; gap: 10px; }
.cart-summary div { display: flex; justify-content: space-between; gap: 12px; align-items: center; color: var(--muted); }
.cart-summary strong { color: var(--text); font-size: 18px; }
.checkout-btn { font-size: 16px; }
.payment-strip { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.payment-strip span { background: #fff4e9; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 12px; font-weight: 900; }
.site-footer {
  max-width: 1540px;
  margin: 0 auto 32px;
  padding: 24px 26px 40px;
  display: grid;
  grid-template-columns: 1.5fr .7fr 1fr;
  gap: 40px;
  border-top: 1px solid var(--line);
}
.footer-logo { width: 260px; }
.site-footer p, .site-footer a { color: var(--muted); display: block; line-height: 1.7; }
.site-footer h3 { margin-top: 0; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(18px);
  background: #1c120e;
  color: white;
  padding: 14px 18px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: .22s ease;
  z-index: 100;
  box-shadow: 0 18px 50px rgba(0,0,0,.25);
  font-weight: 850;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.admin-shell { max-width: 1180px; margin: 34px auto; padding: 0 26px; }
.admin-hero { background: #22130d; color: white; border-radius: 28px; padding: 34px; box-shadow: var(--shadow); }
.admin-hero h1 { margin: 0 0 12px; }
.admin-hero p { color: rgba(255,255,255,.78); margin: 0; }
.admin-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin: 22px 0; }
.admin-cards article { background: white; border: 1px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: var(--shadow); }
.admin-cards span { font-size: 36px; }
.admin-cards h2 { margin-bottom: 8px; }
.admin-cards p { color: var(--muted); line-height: 1.5; }
.admin-table-card { padding: 24px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: white; border-radius: 18px; overflow: hidden; }
th, td { text-align: left; border-bottom: 1px solid var(--line); padding: 14px; }
th { background: #fff2df; }
td small { color: var(--muted); }
@media (max-width: 1220px) {
  .main-nav { display: none; }
  .page-shell { grid-template-columns: 1fr; }
  .cart-panel { position: fixed; right: 18px; top: 94px; bottom: 18px; width: min(420px, calc(100vw - 36px)); max-height: none; transform: translateX(calc(100% + 32px)); transition: transform .25s ease; z-index: 60; }
  body.cart-open .cart-panel { transform: translateX(0); }
  .mobile-cart-toggle { display: inline-flex; }
  .hero-card { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 840px) {
  .header-inner { height: auto; padding: 14px 16px; gap: 12px; }
  .logo img { width: 230px; max-width: 58vw; }
  .points-pill { display: none; }
  .top-promo { margin: 10px 12px 0; padding: 12px; flex-wrap: wrap; gap: 10px; }
  .top-promo strong { order: 2; width: 100%; text-align: left; }
  .expires { display: none; }
  .page-shell { padding: 0 12px 24px; }
  .hero-copy { padding: 0; }
  .hero-card { margin-top: 14px; }
  .mode-switch, .brand-strip, .menu-layout, .promo-grid, .site-footer, .admin-cards { grid-template-columns: 1fr; }
  .filters-card { position: static; }
  .products-grid { grid-template-columns: 1fr; }
  .brand-card { min-height: 138px; }
  .info-band { display: block; }
  .info-band > div { display: block; }
  .info-band p { margin: 10px 0 16px; }
  .secondary-btn { width: 100%; }
}

/* v0.4 brand logo integration */
.brand-logo-badge {
  position: absolute;
  right: 16px;
  top: 14px;
  width: 78px;
  height: 78px;
  border-radius: 22px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(255,255,255,.68);
  box-shadow: 0 14px 30px rgba(0,0,0,.23);
  display: grid;
  place-items: center;
  padding: 8px;
  z-index: 2;
}
.brand-logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.brand-card .brand-icon { top: 98px; right: 22px; opacity: .92; }
.brand-card strong,
.brand-card small,
.brand-arrow { position: relative; z-index: 3; }
.brand-card strong { max-width: 210px; padding-right: 76px; }
.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 104px);
}
.brand-chip img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
  padding: 2px;
  flex: 0 0 auto;
}
.cart-brand.with-logo {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px 3px 4px;
}
.cart-brand.with-logo img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
  padding: 2px;
}
.admin-brand-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}
.admin-brand-cell img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(91,45,18,.12);
  padding: 5px;
}
@media (max-width: 840px) {
  .brand-logo-badge { width: 68px; height: 68px; border-radius: 18px; }
  .brand-card .brand-icon { top: 86px; }
  .brand-card strong { padding-right: 70px; }
}
