/* ==========================================================================
   Uncle Dough — storefront styles
   Brand: black script wordmark · yellow/white stripes · red gift box · cream
   ========================================================================== */
:root {
  --cream: #fffaf0;
  --paper: #ffffff;
  --ink: #141414;
  --ink-2: #4a4a4a;
  --muted: #7a7a7a;
  --line: #ebe6d8;
  --yellow: #f7c948;
  --yellow-2: #ffd970;
  --yellow-soft: #fff1c2;
  --red: #b42318;
  --red-2: #d13a2e;
  --green: #1f7a4d;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(20, 20, 20, .08);
  --shadow-sm: 0 3px 10px rgba(20, 20, 20, .06);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ar: 'Tajawal', 'Manrope', system-ui, sans-serif;
  --script: 'Pinyon Script', 'Brush Script MT', cursive;
  --stripes: repeating-linear-gradient(90deg, var(--yellow) 0 14px, #fff 14px 28px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body.rtl { font-family: var(--font-ar); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 800; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .75rem; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* ---------- announcement + header */
.announce { background: var(--ink); color: #fff; text-align: center; padding: 8px 16px; font-size: .9rem; font-weight: 600; }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 250, 240, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header::before { content: ''; display: block; height: 6px; background: var(--stripes); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand-script { font-family: var(--script); font-size: 2.1rem; font-weight: 400; color: var(--ink); }
.brand-script.light { color: #fff; font-size: 2.4rem; }
.brand-tag { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
body.rtl .brand-tag { letter-spacing: 0; }
.header-nav { display: flex; align-items: center; gap: 10px; }
.nav-link { font-weight: 700; padding: 8px 12px; border-radius: 999px; }
.nav-link:hover { background: var(--yellow-soft); }
.lang-btn {
  font-weight: 800; font-size: .8rem; letter-spacing: .06em; border: 2px solid var(--ink);
  border-radius: 999px; padding: 6px 12px; transition: .15s;
}
.lang-btn:hover { background: var(--ink); color: var(--yellow); }
.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 9px 14px;
  transition: transform .15s;
}
.cart-btn:hover { transform: translateY(-1px); }
.cart-count { background: var(--yellow); color: var(--ink); font-weight: 800; font-size: .75rem; border-radius: 999px; min-width: 20px; height: 20px; display: grid; place-items: center; padding: 0 5px; }
.cart-btn.bump { animation: bump .35s; }
@keyframes bump { 30% { transform: scale(1.12); } }

/* ---------- hero */
.hero { padding: 48px 0 24px; position: relative; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; }
.stripe-badge {
  display: inline-block; font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px; background: var(--yellow); color: var(--ink); margin-bottom: 18px;
}
body.rtl .stripe-badge { letter-spacing: 0; }
.hero-title { font-family: var(--script); font-weight: 400; font-size: clamp(3rem, 7vw, 5.4rem); line-height: 1.05; }
body.rtl .hero-title { font-family: var(--font-ar); font-weight: 800; font-size: clamp(2.2rem, 6vw, 4rem); }
.hero-sub { font-size: 1.15rem; color: var(--ink-2); max-width: 46ch; margin: 14px 0 26px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 22px; color: var(--ink-2); font-weight: 600; font-size: .95rem; }
.hero-art { position: relative; }
.hero-photo {
  aspect-ratio: 16/9; border-radius: 28px; background: var(--hero-img) center/cover no-repeat, var(--yellow-soft);
  box-shadow: var(--shadow); position: relative;
}
.hero-photo::after {
  content: ''; position: absolute; inset: auto -14px -14px auto; width: 60%; height: 22px; border-radius: 12px;
  background: var(--stripes); z-index: -1;
}
.notice { border-radius: 14px; padding: 12px 16px; font-weight: 600; margin: 8px 0 16px; }
.notice.warn { background: var(--yellow-soft); border: 1px solid #f2d98a; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 2px solid transparent; border-radius: 999px; padding: 12px 22px; font-weight: 800;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--red); color: #fff; box-shadow: 0 8px 20px rgba(180, 35, 24, .25); }
.btn.primary:hover { background: var(--red-2); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.yellow { background: var(--yellow); color: var(--ink); }
.btn.ghost { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn.lg { padding: 15px 30px; font-size: 1.05rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { background: transparent; border: 0; font-size: 1.2rem; padding: 6px 10px; border-radius: 10px; }
.icon-btn:hover { background: var(--yellow-soft); }

/* ---------- sections + grid */
.section-title { font-size: 1.6rem; margin: 26px 0 14px; display: flex; align-items: center; gap: 12px; }
.section-title::after { content: ''; flex: 1; height: 6px; border-radius: 4px; background: var(--stripes); opacity: .8; max-width: 120px; }
.featured-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.menu { padding-bottom: 60px; }
.menu-toolbar {
  position: sticky; top: 76px; z-index: 40; background: var(--cream);
  display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line);
}
.cat-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  white-space: nowrap; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 16px;
  font-weight: 700; color: var(--ink-2); transition: .15s;
}
.cat-tab:hover { border-color: var(--ink); color: var(--ink); }
.cat-tab.active { background: var(--ink); border-color: var(--ink); color: var(--yellow); }
.search { border: 1.5px solid var(--line); border-radius: 999px; padding: 9px 16px; min-width: 200px; background: #fff; outline: none; }
.search:focus { border-color: var(--ink); }

/* ---------- product card */
.card {
  background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-img { position: relative; aspect-ratio: 1; background: #f6f3ec; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.badge.sale {
  position: absolute; top: 10px; inset-inline-start: 10px; background: var(--red); color: #fff;
  font-weight: 800; font-size: .75rem; padding: 4px 9px; border-radius: 999px;
}
.badge.sale.inline { position: static; align-self: flex-start; margin: 12px 14px 0; }
.card-body { padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-title { font-size: 1.02rem; }
.card-desc { margin: 0; color: var(--muted); font-size: .85rem; }
.card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.price { display: flex; flex-direction: column; line-height: 1.1; }
.price .now { font-weight: 800; font-size: 1.05rem; }
.price .orig { color: var(--muted); font-size: .8rem; }
.add-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--yellow); color: var(--ink);
  font-size: 1.4rem; font-weight: 800; line-height: 1; box-shadow: 0 4px 12px rgba(247, 201, 72, .45); transition: .15s;
}
.add-btn:hover { background: var(--ink); color: var(--yellow); }
.card.addon { flex-direction: row; align-items: center; }
.card.addon .card-body { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
.card.addon .card-foot { margin: 0; padding: 0; gap: 14px; }

/* ---------- cart drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(20, 20, 20, .45); opacity: 0; pointer-events: none; transition: .2s; z-index: 90; }
.drawer-backdrop.show { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; width: min(420px, 100%); background: #fff; z-index: 100;
  transform: translateX(100%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column;
  box-shadow: -10px 0 40px rgba(0, 0, 0, .12);
}
body.rtl .cart-drawer { transform: translateX(-100%); }
.cart-drawer.open, body.rtl .cart-drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 6px solid; border-image: var(--stripes) 1; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 18px; }
.drawer-foot { padding: 14px 18px 18px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.empty-cart { text-align: center; padding: 50px 10px; color: var(--muted); }
.empty-cart .big { font-size: 3rem; }
.cart-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); align-items: center; }
.cart-item img, .cart-item .ph { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; background: var(--yellow-soft); }
.cart-item .ttl { font-weight: 700; font-size: .95rem; }
.cart-item .sub { font-size: .78rem; color: var(--muted); }
.cart-item .rm { background: none; border: 0; color: var(--muted); font-size: .75rem; padding: 0; text-decoration: underline; }
.qty-ctl { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty-ctl button { width: 30px; height: 30px; border: 0; background: #fff; font-weight: 800; }
.qty-ctl button:hover { background: var(--yellow-soft); }
.qty-ctl span { min-width: 26px; text-align: center; font-weight: 700; font-size: .9rem; }
.totals { display: grid; gap: 4px; font-size: .95rem; }
.totals .row { display: flex; justify-content: space-between; }
.totals .row.total { font-weight: 800; font-size: 1.1rem; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 4px; }
.totals .warn { color: var(--red); font-size: .8rem; font-weight: 600; }

/* ---------- modal */
.modal { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; background: rgba(20, 20, 20, .5); opacity: 0; pointer-events: none; transition: .2s; padding: 16px; }
.modal.show { opacity: 1; pointer-events: auto; }
.modal-card { background: #fff; border-radius: 22px; width: min(460px, 100%); padding: 20px; box-shadow: var(--shadow); max-height: 90vh; overflow: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.addon-list { display: grid; gap: 6px; margin: 12px 0 16px; }
.addon-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; }
.addon-row:has(input:checked) { border-color: var(--ink); background: var(--yellow-soft); }
.addon-row input { accent-color: var(--red); width: 18px; height: 18px; }
.addon-row .nm { flex: 1; font-weight: 600; }
.addon-row .pr { font-weight: 700; font-size: .9rem; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ---------- toast */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 999px; font-weight: 700; opacity: 0; transition: .25s; z-index: 200; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- checkout */
.checkout { padding: 30px 0 70px; }
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.panel h3 { font-size: 1.15rem; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.panel h3 .n { width: 28px; height: 28px; border-radius: 50%; background: var(--yellow); display: inline-grid; place-items: center; font-size: .85rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid.three { grid-template-columns: repeat(3, 1fr); }
label.f { display: grid; gap: 5px; font-weight: 600; font-size: .88rem; }
label.f input, label.f select, label.f textarea {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 13px; background: #fff; outline: none; width: 100%;
  transition: border .15s;
}
label.f input:focus, label.f select:focus, label.f textarea:focus { border-color: var(--ink); }
label.f .err { color: var(--red); font-size: .75rem; font-weight: 600; }
.field-error input, .field-error select { border-color: var(--red) !important; }
.choice { display: grid; gap: 8px; }
.choice-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; }
.choice-row:has(input:checked) { border-color: var(--ink); background: var(--yellow-soft); }
.choice-row input { accent-color: var(--red); width: 18px; height: 18px; }
.choice-row .lbl { font-weight: 700; }
.choice-row .hint { display: block; font-size: .8rem; color: var(--muted); font-weight: 500; }
.choice-row.disabled { opacity: .5; pointer-events: none; }
.sched { margin-top: 10px; }
.summary-sticky { position: sticky; top: 90px; }
.sum-item { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .93rem; }
.sum-item .nm { font-weight: 600; }
.sum-item .ad { display: block; font-size: .78rem; color: var(--muted); }
.coupon-row { display: flex; gap: 8px; margin: 12px 0; }
.coupon-row input { flex: 1; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; text-transform: uppercase; }
.coupon-row button { border-radius: 12px; padding: 10px 16px; }
.coupon-msg { font-size: .82rem; font-weight: 600; margin-bottom: 8px; }
.coupon-msg.ok { color: var(--green); }
.coupon-msg.bad { color: var(--red); }
.secure { display: flex; align-items: center; gap: 6px; justify-content: center; color: var(--muted); font-size: .78rem; margin-top: 10px; }
.form-error { background: #fde8e6; border: 1px solid #f3b8b3; color: var(--red); border-radius: 12px; padding: 10px 14px; font-weight: 600; margin-bottom: 14px; }

/* ---------- order status page */
.order-page { padding: 40px 0 80px; }
.order-card { background: #fff; border-radius: 26px; border: 1px solid var(--line); padding: 28px; box-shadow: var(--shadow); max-width: 720px; margin: 0 auto; }
.order-card .check { width: 70px; height: 70px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; font-size: 2rem; margin: 0 auto 14px; }
.order-card .check.bad { background: #fde8e6; }
.ref-box { display: inline-block; background: var(--ink); color: var(--yellow); font-weight: 800; letter-spacing: .1em; padding: 8px 18px; border-radius: 999px; margin: 8px 0; }
.status-line { display: flex; gap: 6px; margin: 20px 0; }
.status-line .s { flex: 1; height: 8px; border-radius: 6px; background: var(--line); }
.status-line .s.on { background: var(--yellow); }
.status-line .s.done { background: var(--green); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 14px; font-size: .95rem; margin-top: 16px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }

/* ---------- footer */
.site-footer { background: var(--ink); color: #eee; margin-top: 40px; position: relative; }
.site-footer::before { content: ''; display: block; height: 8px; background: var(--stripes); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; padding: 34px 0 20px; }
.site-footer h4 { color: var(--yellow); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
body.rtl .site-footer h4 { letter-spacing: 0; }
.site-footer p { margin: 0; color: #cfcfcf; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0 20px; border-top: 1px solid #2b2b2b; font-size: .85rem; color: #aaa; }

/* ---------- responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .checkout-grid { grid-template-columns: 1fr; }
  .summary-sticky { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .header-inner { padding: 8px 0; }
  .brand-script { font-size: 1.7rem; }
  .brand-tag { display: none; }
  .nav-link { display: none; }
  .menu-toolbar { top: 62px; flex-wrap: wrap; }
  .search { width: 100%; }
  .grid, .featured-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-body { padding: 10px; }
  .card-title { font-size: .92rem; }
  .form-grid, .form-grid.three { grid-template-columns: 1fr 1fr; }
  .form-grid .full { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .hero { padding-top: 20px; }
  .card.addon { grid-column: 1 / -1; }
}
@media print { .site-header, .site-footer, .cart-drawer, .drawer-backdrop, .btn { display: none !important; } }

/* ---------- floating "Your order" bar (sticks to the bottom while scrolling) */
.float-cart {
  position: fixed; bottom: 18px; left: 50%; transform: translate(-50%, 90px); z-index: 80;
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 20px;
  background: var(--red); color: #fff; border: 0; border-radius: 999px; box-shadow: 0 14px 34px rgba(180, 35, 24, .38);
  width: min(560px, calc(100% - 32px)); cursor: pointer; opacity: 0; transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .2s;
  font-family: inherit; text-align: start;
}
.float-cart.show { transform: translate(-50%, 0); opacity: 1; }
.float-cart:hover .fc-btn { background: #fff; color: var(--red); }
.fc-info { display: flex; flex-direction: column; flex: 1; line-height: 1.2; min-width: 0; }
.fc-label { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; opacity: .8; font-weight: 700; }
body.rtl .fc-label { letter-spacing: 0; }
.fc-sum { font-weight: 800; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fc-btn { background: var(--ink); color: #fff; border-radius: 999px; padding: 12px 18px; font-weight: 800; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; transition: .15s; }
.fc-arrow { font-size: 1.2rem; line-height: 1; }
body.rtl .fc-arrow { transform: scaleX(-1); display: inline-block; }
.cart-drawer.open ~ .float-cart, .modal.show ~ .float-cart { opacity: 0; pointer-events: none; }
@media (max-width: 600px) { .float-cart { bottom: 12px; padding-inline-start: 16px; } .fc-btn { padding: 10px 14px; font-size: .9rem; } .menu { padding-bottom: 110px; } }
@media print { .float-cart { display: none; } }

.card-img { display: block; }
.card-title a { color: inherit; }
.card-title a:hover { text-decoration: underline; }
.product-page { padding: 30px 0 60px; }
.product-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; align-items: start; }
.product-hero img { width: 100%; border-radius: 24px; box-shadow: var(--shadow); }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.breadcrumb a:hover { text-decoration: underline; }
.related { margin-top: 40px; }
@media (max-width: 700px) { .product-hero { grid-template-columns: 1fr; } }

/* ---------- box flavour picker */
.flav-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 12px; }
.flav-row .nm { flex: 1; font-weight: 600; }
.flav-row.has { border-color: var(--ink); background: var(--yellow-soft); }
.nudge { background: var(--yellow-soft); border: 1px dashed #e8c96a; border-radius: 12px; padding: 8px 12px; font-size: .82rem; font-weight: 600; margin: 8px 0; }
.nudge.ok { background: #dcf3e6; border-color: #9fd8b6; color: var(--green); }
.wa-btn { display: inline-flex; align-items: center; gap: 8px; background: #25D366; color: #fff; border-radius: 999px; padding: 10px 18px; font-weight: 800; }
.wa-btn:hover { background: #1ebe5b; }
.saved-note { font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
