/* Festive ordering theme — loaded after style.css. Presentation only. */
:root { --maroon:#2b0a0a; --red:#b3201f; --gold:#d9a441; --gold-soft:#f3d48a; --ember:#e8590c; --line:#efd9b4; --cream:#2a1a14; --bg:#fffaf1; --bg-raised:#fff3dc; --muted:#7a6a5c; }
body { background: var(--bg); }
.site-header { position: sticky; top: 0; z-index: 70; background: linear-gradient(135deg,#1f0606,var(--maroon) 55%,#4a0f0f); border-bottom: 2px solid var(--gold); color:#fff; }
.site-header .bar { height: 64px; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.logo { color: var(--gold-soft); font-family:'Fraunces',serif; font-weight:700; font-size:21px; display:flex; align-items:center; gap:10px; }
.logo small { display:block; font:600 9px 'Manrope'; letter-spacing:.2em; color:#e9c98c; opacity:.85; }
.nav-links { display:flex; gap:22px; }
.nav-links a { color:#f3dcb8; font-weight:700; font-size:14px; padding:6px 2px; border-bottom:2px solid transparent; }
.nav-links a.active, .nav-links a:hover { color:var(--gold-soft); border-color:var(--gold); }
.nav-actions { display:flex; align-items:center; gap:12px; }
.icon-btn { position:relative; color:var(--gold-soft); display:inline-flex; }
.cart-badge { position:absolute; top:-8px; right:-10px; background:var(--ember); color:#fff; font:800 10px 'Manrope'; min-width:18px; height:18px; border-radius:9px; display:grid; place-items:center; padding:0 4px; }
.admin-link { color:#e9c98c; font-size:12px; font-weight:700; border:1px solid rgba(217,164,65,.5); padding:6px 10px; border-radius:8px; }
.hamburger { display:none; background:none; border:0; color:var(--gold-soft); }

.order-page { padding-top:20px; padding-bottom:110px; }
.shop-tools { display:flex; gap:10px; flex-wrap:wrap; background:#fff; border:1px solid var(--line); border-radius:14px; padding:12px; box-shadow:0 6px 18px rgba(120,60,0,.07); margin-bottom:16px; }
.shop-tools .search-wrap { flex:1 1 240px; }
.shop-tools select.input { flex:0 0 auto; }
.btn-primary { background:linear-gradient(135deg,var(--red),var(--ember)); color:#fff; border:0; border-radius:10px; font-weight:800; }

.order-table-wrap { background:#fff; border:1px solid var(--line); border-radius:14px; overflow:hidden; box-shadow:0 8px 24px rgba(120,60,0,.08); }
.ptr-table { width:100%; border-collapse:collapse; }
.ptr-table thead th { background:var(--maroon); color:var(--gold-soft); font:800 12px 'Manrope'; letter-spacing:.08em; text-transform:uppercase; text-align:left; padding:12px 14px; }
.ptr-cat-row th { background:linear-gradient(90deg,var(--bg-raised),#fff); color:var(--red); font:700 15px 'Fraunces',serif; letter-spacing:.12em; padding:10px 14px; border-top:2px solid var(--gold); border-bottom:1px solid var(--line); text-align:left; }
.ptr-td { padding:10px 14px; border-bottom:1px solid #f6e8cc; vertical-align:middle; }
.ptr-td-code, .ptr-cat-pill { display:none !important; }
.ptr-row:hover { background:#fffbf2; }
.ptr-thumb { position:relative; display:block; width:68px; height:68px; border-radius:10px; overflow:hidden; background:radial-gradient(circle,#fff3dc,#f7dca4); border:1px solid var(--line); }
.ptr-thumb img { width:100%; height:100%; object-fit:cover; }
.ptr-emoji { display:grid; place-items:center; width:100%; height:100%; font-size:30px; }
.ptr-ribbon { position:absolute; top:0; left:0; background:var(--red); color:#fff; font:800 10px 'Manrope'; padding:2px 6px; border-bottom-right-radius:8px; }
.ptr-name { font-weight:800; color:var(--cream); line-height:1.3; }
.ptr-price-orig { color:var(--muted); text-decoration:line-through; font-size:14px; }
.ptr-price-sell { color:var(--red); font-weight:800; font-size:16px; }
.ptr-total { font-weight:800; }
.ptr-form { display:flex; align-items:center; gap:8px; }
.qty-stepper { display:inline-flex; align-items:center; border:1px solid var(--gold); border-radius:10px; overflow:hidden; background:#fff; }
.qty-stepper button { width:36px; height:36px; border:0; background:var(--bg-raised); color:var(--red); font-size:18px; font-weight:800; }
.qty-stepper span { min-width:34px; text-align:center; font-weight:800; }
.ptr-oos-label { color:var(--muted); font-weight:700; font-size:13px; }

/* Bottom cart bar (all screen sizes) */
.mobile-cart-bar { position:fixed; left:50%; transform:translateX(-50%); bottom:calc(12px + env(safe-area-inset-bottom,0px)); width:min(560px,calc(100% - 24px)); z-index:60; display:flex; align-items:center; justify-content:space-between; background:linear-gradient(135deg,var(--maroon),var(--red)); color:#fff; border:1px solid var(--gold); padding:13px 20px; border-radius:999px; font-weight:800; box-shadow:0 10px 28px rgba(43,10,10,.45); }
.mobile-cart-bar em { font-style:normal; color:var(--gold-soft); margin-left:8px; }
.mobile-cart-bar.is-empty { display:none; }
.site-footer { background:var(--maroon); color:#e9c98c; padding:22px 0; }
.site-footer .foot-row { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; }

@media (max-width: 720px) {
  .site-header .bar { height:56px; }
  .logo { font-size:18px; } .logo small, .admin-link { display:none; }
  .hamburger { display:inline-flex; }
  .nav-links { display:flex; position:fixed; top:56px; left:0; right:0; flex-direction:column; gap:14px; padding:16px 20px; background:var(--maroon); border-bottom:2px solid var(--gold); transform:translateY(-130%); transition:transform .2s; z-index:65; }
  .nav-links.open { transform:translateY(0); }
  .order-page { padding-left:6px; padding-right:6px; padding-top:10px; }
  .order-table-wrap { border-radius:10px; }
  /* compact one-line-per-product rows: name | MRP over price | qty | total */
  .ptr-table, .ptr-table tbody { display:block; width:100%; }
  .ptr-cat-row { display:block; }
  .ptr-cat-row th { display:block; font-size:13px; padding:8px; text-align:center; }
  .ptr-table .ptr-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto auto; grid-template-areas:"name actual qty total" "name price qty total"; align-items:center; column-gap:6px; row-gap:0; padding:7px 8px; border-bottom:1px solid #f6e8cc; }
  .ptr-td { display:block; padding:0; border:0; font-size:12px; line-height:1.25; }
  .ptr-td-name { grid-area:name; } .ptr-td-actual { grid-area:actual; text-align:right; } .ptr-td-price { grid-area:price; text-align:right; }
  .ptr-td-qty { grid-area:qty; } .ptr-td-total { grid-area:total; text-align:right; }
  .ptr-name { font-size:12.5px; }
  .ptr-price-orig { font-size:10.5px; }
  .ptr-price-sell { font-size:12.5px; }
  .ptr-total { font-size:12px; white-space:nowrap; }
  .ptr-form { gap:3px; flex-wrap:nowrap; }
  .qty-stepper { border-radius:8px; }
  .qty-stepper button { width:21px; height:30px; font-size:14px; }
  .qty-stepper span { min-width:17px; font-size:12px; }
  .ptr-add-btn { padding:8px 6px; font-size:10.5px; border-radius:8px; box-shadow:none; }
  .site-footer .foot-row { flex-direction:column; text-align:center; }
}

/* Keep footer at the bottom of the screen on short pages */
body { min-height:100vh; min-height:100dvh; display:flex; flex-direction:column; }
.order-page { flex:1 0 auto; width:100%; }
.site-footer { margin-top:auto; flex-shrink:0; }

/* Shop name / contact strip under the title */
.shop-info { border-top:1px solid rgba(217,164,65,.25); background:rgba(0,0,0,.18); color:#f3dcb8; font-size:12.5px; font-weight:600; }
.shop-info .container { display:flex; flex-wrap:wrap; justify-content:center; gap:4px 22px; padding-top:6px; padding-bottom:6px; }
.shop-info a { color:var(--gold-soft); font-weight:800; }
@media (max-width: 720px) {
  .logo small { display:block; font-size:8.5px; letter-spacing:.08em; }
  .shop-info { font-size:11px; }
  .shop-info .container { gap:2px 14px; padding-top:5px; padding-bottom:5px; }
}

/* Mobile: footer fills to the very bottom, text stays clear of the cart bar */
@media (max-width: 720px) {
  body { padding-bottom:0 !important; }
  .site-footer { padding:20px 0 92px; }
}

/* =====================================================================
   Edit order / review / confirmation (checkout flow)
   ===================================================================== */
.checkout-actions .btn, .success-actions .btn, .om-actions .btn { justify-content:center; text-align:center; text-decoration:none; }
.btn-outline { background:#fff; color:var(--red); border:1.5px solid var(--red); border-radius:10px; font-weight:800; }
.btn-outline:hover { background:#fff3f0; }
.btn.is-disabled { opacity:.5; pointer-events:none; }

/* Notices */
.alert { padding:13px 16px; border-radius:12px; font-size:14px; line-height:1.45; margin-bottom:16px; border:1px solid; }
.alert[hidden] { display:none; }
.alert-error { background:#fff1ee; border-color:#f4b8ac; color:#9b1c10; }
.alert-warn  { background:#fff8e6; border-color:#f0d58a; color:#7a5200; }
.alert-info  { background:#eef6ff; border-color:#b9d7f5; color:#17497a; }
.alert-link { color:inherit; font-weight:800; text-decoration:underline; white-space:nowrap; }

/* Review step actions */
.table-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.checkout-actions { display:flex; gap:12px; margin-top:6px; }
.checkout-actions .btn { flex:1 1 0; padding:14px 18px; font-size:15px; border-radius:10px; min-height:48px; }
.checkout-hint { text-align:center; color:var(--muted); font-size:13px; margin:14px 0 0; }
.back-link { display:block; text-align:center; margin-top:14px; color:var(--muted); font-weight:700; font-size:14px; }
.back-link:hover { color:var(--red); }

/* Place Order loading state */
.btn.is-loading { position:relative; cursor:progress; opacity:.85; }
.btn.is-loading .btn-label::before {
  content:""; display:inline-block; width:14px; height:14px; margin-right:9px; vertical-align:-2px;
  border:2px solid rgba(255,255,255,.45); border-top-color:#fff; border-radius:50%; animation:okSpin .7s linear infinite;
}
@keyframes okSpin { to { transform:rotate(360deg); } }
.btn.is-busy { opacity:.75; pointer-events:none; }

/* PDF status line */
.pdf-status { min-height:20px; margin-top:12px; font-size:13px; font-weight:600; color:var(--muted); }
.pdf-status.is-ok { color:#15803d; }
.pdf-status.is-warn { color:#9b1c10; }

/* Success page actions */
.success-actions { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; margin-top:22px; }
.success-actions .btn { padding:13px 24px; border-radius:10px; }

/* Confirmation modal */
body.modal-open { overflow:hidden; }
.order-modal-backdrop {
  position:fixed; inset:0; z-index:300; display:flex; align-items:center; justify-content:center;
  padding:16px; background:rgba(43,10,10,.55); animation:fadeIn .18s ease both;
}
.order-modal {
  position:relative; width:100%; max-width:440px; max-height:calc(100dvh - 32px); overflow-y:auto;
  background:#fff; border:1px solid var(--gold); border-top:5px solid var(--gold); border-radius:18px;
  padding:30px 26px 22px; text-align:center; box-shadow:0 24px 60px rgba(43,10,10,.4); animation:rise .25s ease both;
}
.order-modal h2 { font-size:25px; color:var(--maroon); }
.order-modal p { color:var(--muted); margin:8px 0 0; font-size:14.5px; }
.order-modal .om-sub { font-size:13.5px; }
.om-close {
  position:absolute; top:8px; right:10px; width:40px; height:40px; border:0; background:none;
  font-size:28px; line-height:1; color:var(--muted); border-radius:50%;
}
.om-close:hover { background:var(--bg-raised); color:var(--maroon); }
.om-icon {
  width:64px; height:64px; margin:0 auto 14px; border-radius:50%; display:grid; place-items:center;
  background:#16a34a; color:#fff; box-shadow:0 0 0 8px rgba(22,163,74,.14);
}
.om-actions { display:flex; flex-direction:column; gap:10px; margin-top:20px; }
.om-actions .btn { width:100%; padding:14px 18px; border-radius:10px; font-size:15px; min-height:48px; }
.om-viewlink { display:inline-block; margin-top:10px; font-size:13px; font-weight:700; color:var(--red); text-decoration:underline; }

@media (max-width: 560px) {
  .checkout-actions { flex-direction:column-reverse; }   /* Place Order on top, Edit below — thumb friendly */
  .order-modal { padding:26px 18px 18px; border-radius:16px; }
  .order-modal h2 { font-size:22px; }
  .success-actions { flex-direction:column; }
  .success-actions .btn { width:100%; }
  .order-table th, .order-table td { padding-left:4px; padding-right:4px; font-size:13px; }
}
