/* =========================================================
   Adra Eats — olp-adra theme
   ========================================================= */

/* ----- VARIABLES ----- */
:root {
  --brand-red:    #e8281e;
  --brand-dark:   #1a1a2e;
  --brand-yellow: #ffd600;
  --gradient:     linear-gradient(135deg, #e8281e 0%, #ff6432 100%);

  --bg:       #ffffff;
  --bg-alt:   #f8f9fa;
  --bg-card:  #ffffff;
  --surface:  #f1f3f5;
  --border:   #e9ecef;
  --text:     #1a1a2e;
  --text-muted: #6c757d;

  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 4px rgba(0,0,0,.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,.09);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.14);

  --transition: .2s ease;
  --navbar-h:   68px;
}

[data-theme="dark"] {
  --bg:        #0f0f1a;
  --bg-alt:    #161625;
  --bg-card:   #1e1e30;
  --surface:   #252538;
  --border:    #2d2d45;
  --text:      #f0f0f8;
  --text-muted:#8888aa;
}

/* ----- RESET ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* ----- TYPOGRAPHY ----- */
h1, h2, h3, h4 { font-weight: 800; line-height: 1.15; color: var(--text); }
h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.1rem; }
p  { color: var(--text-muted); line-height: 1.75; }

.eyebrow {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--brand-red);
  margin-bottom: 10px;
}

/* ----- LAYOUT ----- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section    { padding: 72px 0; }
.section-sm { padding: 48px 0; }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-header p {
  max-width: 560px;
  margin: 12px auto 0;
}

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }

/* ----- PROMO STRIP ----- */
.promo-strip {
  background: var(--brand-dark);
  color: #fff;
  text-align: center;
  font-size: .78rem;
  font-weight: 600;
  padding: 9px 16px;
  letter-spacing: .04em;
}
.promo-strip span { color: var(--brand-yellow); font-weight: 800; }

/* ----- NAVBAR ----- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition), background var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--navbar-h);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 24px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-icon {
  width: 40px; height: 40px;
  background: var(--gradient);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.logo-text  { font-size: 1.15rem; font-weight: 900; color: var(--brand-red); display: block; }
.logo-city  { font-size: .68rem; color: var(--text-muted); font-weight: 500; display: block; }

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.navbar-nav a {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.navbar-nav a:hover, .navbar-nav a.active {
  color: var(--brand-red);
  background: rgba(232,40,30,.08);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  width: 38px; height: 38px;
  font-size: 1rem;
  transition: background var(--transition);
}
.theme-toggle:hover { background: var(--border); }

/* Logo images */
.navbar-logo {
  height: 52px;
  width: auto;
  display: block;
  border-radius: var(--radius-sm);
}
.footer-logo {
  height: 56px;
  width: auto;
  display: block;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 6px 10px;
}

/* Hide decorative food emoji on hero slides */
.hero-food-emoji { display: none !important; }

.navbar-desktop-only { display: none; }
@media(min-width: 900px) { .navbar-desktop-only { display: inline; } }

.cart-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--gradient);
  color: #fff;
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-size: .88rem;
  font-weight: 700;
  transition: opacity var(--transition), transform var(--transition);
  white-space: nowrap;
}
.cart-btn:hover { opacity: .9; transform: translateY(-1px); }

@keyframes cartPop {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.32) rotate(-9deg); }
  60%  { transform: scale(0.9) rotate(5deg); }
  80%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.cart-btn-pop { animation: cartPop .44s cubic-bezier(.36,.07,.19,.97) both; }

.cart-count {
  background: #fff;
  color: var(--brand-red);
  border-radius: var(--radius-pill);
  padding: 1px 7px;
  font-size: .75rem;
  font-weight: 800;
  min-width: 20px;
  text-align: center;
  display: none;
}
.cart-count:not(:empty) { display: inline-block; }

/* hamburger */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  width: 36px; height: 36px;
  padding: 4px;
}
.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s, opacity .25s;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media(min-width: 900px) {
  .menu-toggle { display: none; }
}
@media(max-width: 899px) {
  .navbar-nav { display: none; }
}

/* ----- MOBILE NAV ----- */
.mobile-nav {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 850;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: calc(var(--navbar-h) + 20px) 24px 32px;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a {
  display: block;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  transition: background var(--transition);
}
.mobile-nav a:hover { background: var(--surface); }

/* ----- BUTTONS ----- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-pill);
  font-size: .92rem;
  font-weight: 700;
  border: 2px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
}
.btn-primary:hover { opacity: .88; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(232,40,30,.35); }

.btn-ghost {
  background: rgba(255,255,255,.15);
  color: #fff;
  border-color: rgba(255,255,255,.4);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { background: rgba(255,255,255,.25); }

.btn-outline {
  background: transparent;
  color: var(--brand-red);
  border-color: var(--brand-red);
}
.btn-outline:hover { background: var(--brand-red); color: #fff; }

/* ----- HERO SLIDER ----- */
.hero-slider {
  position: relative;
  overflow: hidden;
  height: clamp(420px, 62vw, 660px);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .7s ease;
  pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }

.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
  transition: transform 8s ease;
}
.hero-slide.active .hero-slide-bg { transform: scale(1); }
.hero-slide-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(15,15,26,.82) 0%, rgba(15,15,26,.35) 60%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  padding: 0 clamp(24px, 6vw, 80px);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,214,0,.12);
  border: 1px solid rgba(255,214,0,.35);
  color: var(--brand-yellow);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  width: fit-content;
}

.hero-content h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.5rem); }
.hero-content p  { color: rgba(255,255,255,.75); max-width: 460px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.hero-price-tag {
  display: flex;
  flex-direction: column;
  color: #fff;
  margin-left: 8px;
}
.hero-price-tag .from { font-size: .7rem; opacity: .65; font-weight: 600; text-transform: uppercase; }
.hero-price-tag .price { font-size: 1.5rem; font-weight: 900; color: var(--brand-yellow); line-height: 1; }

.slide-counter {
  position: absolute;
  bottom: 24px;
  left: clamp(24px, 6vw, 80px);
  z-index: 5;
  color: rgba(255,255,255,.5);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
}
.slide-counter span { color: #fff; font-size: 1.1rem; }

.slider-dots {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  gap: 8px;
}
.slider-dot {
  width: 8px; height: 8px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.35);
  border: none;
  cursor: pointer;
  transition: all .3s;
}
.slider-dot.active { background: #fff; width: 24px; }

.slider-arrows {
  position: absolute;
  bottom: 20px;
  right: 24px;
  z-index: 5;
  display: flex;
  gap: 8px;
}
.slider-arrow {
  width: 40px; height: 40px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  font-size: 1rem;
  backdrop-filter: blur(6px);
  transition: background var(--transition);
}
.slider-arrow:hover { background: rgba(255,255,255,.3); }

@keyframes float {
  0%, 100% { transform: translateY(-50%) translateY(0); }
  50%       { transform: translateY(-50%) translateY(-18px); }
}

/* ----- CATEGORY GRID ----- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 16px;
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
}
.cat-card:hover, .cat-card.active {
  border-color: var(--brand-red);
  background: rgba(232,40,30,.05);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.cat-icon { font-size: 2rem; line-height: 1; }
.cat-name { font-size: .8rem; font-weight: 700; color: var(--text); }

/* ----- PRODUCTS GRID ----- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.product-card[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.product-card[data-reveal].revealed { opacity: 1; transform: translateY(0); }

.product-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface);
}
.product-img-wrap img { transition: transform .4s ease; }
.product-card:hover .product-img-wrap img { transform: scale(1.06); }

.product-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.badge {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.badge-hot   { background: var(--brand-red); color: #fff; }
.badge-new   { background: #22c55e; color: #fff; }
.badge-offer { background: var(--brand-yellow); color: var(--brand-dark); }

.product-body { padding: 16px; }
.product-meta { margin-bottom: 6px; }
.product-category {
  font-size: .72rem;
  font-weight: 700;
  color: var(--brand-red);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.product-name {
  font-size: .98rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(2 * 1.35em);
}
.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.product-price { display: flex; align-items: baseline; gap: 6px; }
.price-now      { font-size: .75rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.price-current  { font-size: 1.1rem; font-weight: 900; color: var(--brand-red); }
.price-original { font-size: .82rem; text-decoration: line-through; color: var(--text-muted); }

.add-to-cart-btn {
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex; align-items: center;
  transition: opacity var(--transition), transform var(--transition);
}
.add-to-cart-btn:hover { opacity: .88; transform: scale(1.04); }

/* ----- OFFER BANNER ----- */
.offer-banner {
  background: var(--gradient);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.offer-banner h2 { color: #fff; margin-bottom: 8px; }
.offer-banner p  { color: rgba(255,255,255,.8); }

/* ----- BLOG CARDS ----- */
.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.blog-card[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.blog-card[data-reveal].revealed { opacity: 1; transform: translateY(0); }

.blog-card-img { aspect-ratio: 3/2; overflow: hidden; background: var(--surface); }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.blog-card:hover .blog-card-img img { transform: scale(1.06); }

.blog-card-body { padding: 20px; }
.blog-card-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.blog-tag  { background: rgba(232,40,30,.1); color: var(--brand-red); padding: 3px 10px; border-radius: var(--radius-pill); font-size: .72rem; font-weight: 700; }
.blog-date { font-size: .75rem; color: var(--text-muted); }
.blog-card-title { font-size: 1rem; font-weight: 700; margin-bottom: 12px; line-height: 1.4; }
.blog-card-link  { font-size: .85rem; font-weight: 700; color: var(--brand-red); }
.blog-card-link:hover { text-decoration: underline; }

/* ----- PAGE HERO (inner pages) ----- */
.page-hero {
  background: linear-gradient(135deg, var(--brand-dark) 0%, #2d1f63 100%);
  padding: 48px 0 40px;
  text-align: center;
}
.page-hero h1 { color: #fff; margin-bottom: 12px; }
.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: .82rem;
  color: rgba(255,255,255,.55);
  flex-wrap: wrap;
}
.breadcrumb a { color: rgba(255,255,255,.75); transition: color var(--transition); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { opacity: .4; }

/* ----- TAG CHIPS ----- */
.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  background: var(--bg-card);
  transition: all var(--transition);
  white-space: nowrap;
}
.tag-chip:hover, .tag-chip.active {
  border-color: var(--brand-red);
  color: var(--brand-red);
  background: rgba(232,40,30,.06);
}

/* ----- ORDER SUMMARY BOX ----- */
.order-summary-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

/* ----- FORM ELEMENTS ----- */
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: .82rem; font-weight: 700; margin-bottom: 7px; color: var(--text); }
.form-input, .form-textarea {
  width: 100%;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text);
  font-size: .92rem;
  font-family: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(232,40,30,.12);
}
.form-textarea { resize: vertical; min-height: 100px; }
@media(max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.pw-wrap { position: relative; }
.pw-wrap .form-input,
.pw-wrap input[type=password],
.pw-wrap input[type=text] { padding-right: 42px; }
.pw-toggle {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: 4px; cursor: pointer;
  color: var(--text-muted); display: flex; align-items: center;
  transition: color .15s; line-height: 1;
}
.pw-toggle:hover { color: var(--text); }

/* ----- FOOTER ----- */
.footer { background: var(--brand-dark); color: rgba(255,255,255,.75); }
.footer-top { padding: 60px 0 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 40px;
}
@media(max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width: 540px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-brand-col {}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.footer-heading {
  font-size: .72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.35);
  margin-bottom: 16px;
}
.footer-links li {
  margin-bottom: 10px;
  font-size: .88rem;
  color: rgba(255,255,255,.55);
}
.footer-links a { color: rgba(255,255,255,.65); transition: color var(--transition); }
.footer-links a:hover { color: #fff; }

.social-icon {
  width: 38px; height: 38px;
  background: rgba(255,255,255,.08);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  transition: background var(--transition);
}
.social-icon:hover { background: rgba(255,255,255,.18); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.07);
  padding: 20px 0;
  text-align: center;
}
.footer-bottom p { color: rgba(255,255,255,.3); font-size: .8rem; margin: 0; }

/* ----- CART DRAWER (HALF-PLATE SHAPE) ----- */
#cart-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.48);
  z-index: 1199;
  opacity: 0; pointer-events: none;
  transition: opacity .28s ease;
}
#cart-overlay.open { opacity: 1; pointer-events: all; }

/*
 * The drawer is a vertical semicircle — flat edge flush with the right
 * viewport wall, curved left edge like a dinner plate stood upright.
 * width = radius (360 px), height ≈ diameter (720 px) → perfect half-circle.
 * border-radius: 360px 0 0 360px creates a single circular arc on the left.
 * overflow:hidden clips all inner content to that shape.
 */
#cart-drawer {
  position: fixed;
  right: 0;
  top: 50%;
  width: 420px;
  height: min(780px, 96vh);
  /* fallback bg — #cart-plate-bg SVG provides the full plate surface */
  background: #f4f0ea;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  border-radius: 360px 0 0 360px;
  overflow: hidden;
  transform: translateY(-50%) translateX(110%);
  transition: transform .38s cubic-bezier(.4,0,.2,1);
  /* only the plate's drop shadow remains; rim rings live in the SVG layer */
  box-shadow:
    -32px 8px 84px rgba(55,32,10,.42),
    inset -14px 0 42px rgba(0,0,0,.05);
}
#cart-drawer.open { transform: translateY(-50%) translateX(0); }

/*
 * Plate peek tab — visible when the drawer is closed, hidden when open.
 * Acts as a secondary trigger to open the cart without needing the nav icon.
 */
#cart-peek {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1205;
  background: var(--brand-red);
  color: #fff;
  width: 44px;
  height: 80px;
  border-radius: 44px 0 0 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  box-shadow: -4px 2px 18px rgba(0,0,0,.30);
  transition: width .22s ease, box-shadow .22s ease;
  user-select: none;
}
#cart-peek:hover { width: 56px; box-shadow: -6px 3px 22px rgba(0,0,0,.38); }
#cart-peek.hidden { display: none; }
#cart-peek .peek-count {
  font-size: .65rem; font-weight: 800;
  background: #fff; color: var(--brand-red);
  border-radius: 50%; width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}

/* Dark mode: desaturate the SVG plate; swap background */
[data-theme="dark"] #cart-drawer {
  background: #1a1a2e;
  box-shadow: -32px 8px 84px rgba(0,0,0,.68), inset -14px 0 42px rgba(0,0,0,.20);
}
[data-theme="dark"] #cart-plate-bg { filter: brightness(.28) saturate(.4); }

/*
 * #cart-plate-bg — inline SVG sitting at z:0, absolutely filling the drawer.
 * overflow:hidden on the parent clips it to the exact semicircle shape.
 * preserveAspectRatio="none" lets it stretch with height:min(720px,96vh)
 * so circles stay anchored to the right-edge center at all viewport heights.
 */
#cart-plate-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
/* lift drawer content above the SVG plate layer */
.cart-drawer-header,
#cart-drawer-body { position: relative; z-index: 1; }

/*
 * Push header content down to where the circle is ~240 px wide
 * (y ≈ 110 px from the top of the element → x_left ≈ 101 px).
 * Left padding of 112 px keeps text inside the visible arc.
 */
.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 110px 20px 18px 20px;
  border-bottom: 1px solid rgba(0,0,0,.08);
  flex-shrink: 0;
}
.cart-drawer-header h3 { margin: 0; font-size: .96rem; font-weight: 700; white-space: nowrap; }

#cart-drawer-close {
  background: none; border: none; cursor: pointer;
  font-size: 1rem; color: var(--text-muted);
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
}
#cart-drawer-close:hover { background: var(--bg-alt); color: var(--text); }

#cart-drawer-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.cart-drawer-loading {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: .9rem;
  padding-left: 160px;
}

/* ----- PLATE DRAWER ITEMS ----- */
.pd-items {
  flex: 1;
  overflow-y: auto;
  /* 48 px top offset shifts first item lower so it clears the thick rim band at the top of the arc */
  padding: 48px 0 4px 0;
}

/*
 * Left-padding accounts for the arc narrowing near the top of the well.
 * With 48 px pd-items top padding, first item y ≈ 176 px; inner-well left edge
 * at that height ≈ 155 px, so 160 px keeps all rows safely inside the well.
 */
.pd-item {
  display: flex;
  gap: 10px;
  padding: 12px 14px 12px 160px;
  border-bottom: 1px solid rgba(0,0,0,.07);
  transition: background var(--transition);
}
.pd-item:hover { background: rgba(255,255,255,.48); }
.pd-item:last-child { border-bottom: none; }

.pd-img-link { flex-shrink: 0; display: block; }
.pd-img {
  width: 50px; height: 50px;
  border-radius: var(--radius-md);
  object-fit: cover;
  display: block;
  transition: transform .2s ease;
}
.pd-img-link:hover .pd-img { transform: scale(1.05); }
.pd-img-ph {
  width: 50px; height: 50px;
  border-radius: var(--radius-md);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
}

.pd-body { flex: 1; min-width: 0; }

.pd-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}
.pd-name {
  flex: 1; min-width: 0;
  display: block;
  font-size: .86rem; font-weight: 700;
  color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.35;
  transition: color var(--transition);
}
.pd-name:hover { color: var(--brand-red); }

.pd-opt {
  font-size: .72rem; color: var(--brand-red); font-weight: 600;
  margin-bottom: 2px;
}

.pd-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 8px; gap: 8px;
}

.pd-qty {
  display: flex; align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.pd-qty-btn {
  background: none; border: none; cursor: pointer;
  width: 26px; height: 26px;
  font-size: .95rem; font-weight: 800;
  color: var(--brand-red);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
  flex-shrink: 0;
}
.pd-qty-btn:hover { background: rgba(232,40,30,.1); }
.pd-qty-val {
  min-width: 26px; text-align: center;
  font-size: .83rem; font-weight: 700;
  color: var(--text);
  border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border);
  padding: 0 4px;
  line-height: 26px;
}
.pd-price {
  font-size: .88rem; font-weight: 800;
  color: var(--brand-red);
  white-space: nowrap;
}

.pd-remove {
  flex-shrink: 0;
  background: none; border: none; cursor: pointer;
  color: var(--text-muted);
  width: 24px; height: 24px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition), color var(--transition);
  margin-top: -2px;
}
.pd-remove:hover { background: rgba(232,40,30,.1); color: var(--brand-red); }

/*
 * Footer: bottom padding 110 px keeps the last button at y ≈ 640 px
 * (inside the inner well). Left padding 120 px stays inside the lower arc.
 */
.pd-footer {
  flex-shrink: 0;
  border-top: 1px solid rgba(0,0,0,.08);
  background: transparent;
  padding: 10px 14px 110px 120px;
}
.pd-subtotal {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 10px 0;
  font-weight: 700; font-size: .92rem;
}
.pd-subtotal-val { color: var(--brand-red); font-size: 1rem; font-weight: 900; }
.pd-actions {
  display: flex;
  flex-direction: row;
  gap: 6px;
}
/* Half-size inline buttons — one row, equal width */
.pd-actions .btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  font-size: .72rem;
  font-weight: 700;
  border-width: 1.5px;
  white-space: nowrap;
}

.pd-empty {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 28px 40px 52px;
  text-align: center;
}

/* ----- PRODUCT CARD LINKS ----- */
a.product-img-wrap {
  display: block; text-decoration: none;
}
a.product-img-wrap:hover img { transform: scale(1.04); }

a.product-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
  color: var(--text); font-size: .97rem; font-weight: 600;
  line-height: 1.4; margin-bottom: 12px;
  min-height: calc(2 * 1.4em);
  transition: color var(--transition);
}
a.product-name:hover { color: var(--brand-red); }

/* ----- PAGINATION ----- */
.pagination-wrap {
  padding: 32px 0 8px;
  display: flex; justify-content: center;
}
.pagination {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.pagination .page-item {
  min-width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-md);
  font-size: .88rem; font-weight: 600;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  cursor: pointer;
}
.pagination a.page-item:hover {
  background: var(--bg-alt);
  border-color: var(--brand-red);
  color: var(--brand-red);
}
.pagination .page-item.active {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
}
.pagination .page-item.disabled {
  opacity: .4; cursor: default;
}
.pagination .page-item.dots { border: none; background: none; }

/* ----- REMOVE CONFIRM MODAL (shared by /cart page and drawer) ----- */
.remove-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
.remove-modal-overlay.active { opacity: 1; pointer-events: auto; }
.remove-modal {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 36px 32px 28px;
  max-width: 360px; width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  transform: translateY(18px) scale(.97);
  transition: transform .22s ease, opacity .22s ease;
  text-align: center;
}
.remove-modal-overlay.active .remove-modal { transform: translateY(0) scale(1); }
.remove-modal-icon { font-size: 2.6rem; margin-bottom: 14px; line-height: 1; }
.remove-modal h3  { margin: 0 0 8px; font-size: 1.15rem; font-weight: 800; }
.remove-modal p   { color: var(--text-muted); font-size: .9rem; margin: 0 0 26px; }
.remove-modal-actions { display: flex; gap: 12px; justify-content: center; }
.remove-modal-actions .btn { min-width: 110px; justify-content: center; }

/* ----- ANIMATIONS ----- */
@keyframes float {
  0%, 100% { transform: translateY(-50%); }
  50%       { transform: translateY(calc(-50% - 16px)); }
}
