/* Base look shared by the shop and the admin page: colours, header, buttons, forms, dialogs, toast.
   Shop-only decoration (hero, hills, cards, animations) is in store.css. */
:root {
  --cocoa: #2f1b10;
  --cocoa-2: #4a2a1a;
  --cocoa-soft: #6b4430;
  --cream: #fbf5ee;
  --card: #ffffff;
  --accent: #b5532b;
  --accent-dark: #8e3f1e;
  --gold: #d9a05b;
  --leaf: #5b7a52;
  --leaf-dark: #2f4733;
  --mist: #e6eee9;
  --line: #e7d9cb;
  --muted: #7a6657;
  --err: #b3261e;
  --ease: cubic-bezier(.22, .8, .26, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--cream); color: var(--cocoa); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: Georgia, "Palatino Linotype", "Times New Roman", serif; line-height: 1.2; }
.muted { color: var(--muted); font-size: .9rem; }
.error { color: var(--err); min-height: 1.2em; margin: .25rem 0; font-size: .9rem; }
[hidden] { display: none !important; }
::selection { background: rgba(217, 160, 91, .45); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1.25rem; background: linear-gradient(180deg, #4a2a1a, #3f2416); color: #fff; box-shadow: 0 2px 0 rgba(217, 160, 91, .4); transition: padding .3s var(--ease), box-shadow .3s; }
.brand { color: #fff; text-decoration: none; font: 700 1.45rem Georgia, serif; letter-spacing: .01em; }
.site-header nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.site-header nav a, .site-header .link { color: #f3e3d3; text-decoration: none; transition: color .2s; }
.site-header nav a:hover, .site-header .link:hover { color: #fff; }
button { font: inherit; cursor: pointer; }
.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; transition: color .2s; }
.cart-btn { background: linear-gradient(135deg, #c2603a, #a4471f); color: #fff; border: 0; border-radius: 999px; padding: .45rem 1rem; font-weight: 600; box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .7); transition: transform .2s var(--ease), filter .2s; }
.cart-btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.badge { display: inline-block; min-width: 1.4em; padding: 0 .35em; margin-left: .2em; border-radius: 999px; background: #fff; color: var(--accent-dark); font-size: .8rem; text-align: center; }

/* ---------- Buttons ---------- */
.btn { position: relative; display: inline-block; background: linear-gradient(135deg, #c2603a, #a4471f); color: #fff; border: 0; border-radius: 999px; padding: .65rem 1.4rem; font-weight: 600; letter-spacing: .01em; text-decoration: none; box-shadow: 0 8px 18px -10px rgba(142, 63, 30, .9); transition: transform .2s var(--ease), box-shadow .25s var(--ease), filter .2s; }
.btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 24px -12px rgba(142, 63, 30, .95); filter: brightness(1.07); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.btn:focus-visible, .chip:focus-visible, .cart-btn:focus-visible, .link:focus-visible, .stepper button:focus-visible { outline: 3px solid rgba(217, 160, 91, .8); outline-offset: 2px; }

/* ---------- Layout bits ---------- */
.container { max-width: 1100px; margin: 0 auto; padding: 2rem 1.25rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.chip { border: 1px solid var(--line); background: var(--card); color: var(--cocoa); border-radius: 999px; padding: .35rem 1rem; transition: background .25s var(--ease), color .25s, border-color .25s, transform .2s var(--ease), box-shadow .25s; }
.chip:hover { transform: translateY(-1px); border-color: var(--gold); }
.chip[aria-pressed="true"] { background: var(--cocoa); color: #fff; border-color: var(--cocoa); box-shadow: 0 8px 16px -10px rgba(47, 27, 16, .9); }

.low { font-size: .8rem; color: var(--err); }

/* ---------- Dialogs ---------- */
dialog { width: min(480px, 92vw); border: 0; border-radius: 20px; padding: 1.6rem; background: var(--card); color: var(--cocoa); box-shadow: inset 0 4px 0 var(--gold), 0 30px 60px -20px rgba(0, 0, 0, .55); }
dialog[open] { animation: dlg-in .38s var(--ease); }
dialog::backdrop { background: rgba(30, 15, 8, .55); backdrop-filter: blur(3px); }
dialog[open]::backdrop { animation: fade-in .3s ease; }
@keyframes dlg-in { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
dialog h3 { margin-top: 0; font-size: 1.35rem; }
label { display: block; margin-bottom: .75rem; font-size: .9rem; }
input, textarea { display: block; width: 100%; margin-top: .25rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: #fff; transition: border-color .2s, box-shadow .2s, background .2s; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 160, 91, .3); }
.req { color: var(--err); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
@media (max-width: 420px) { .two-col { grid-template-columns: 1fr; } }
input[readonly] { background: #f3ece4; color: var(--cocoa-soft); }
.pin-msg { min-height: 1.2em; margin: -.35rem 0 .6rem; }
.pin-msg.bad { color: var(--err); }
dialog form { max-height: 80vh; overflow-y: auto; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }

/* ---------- Cart lines, orders, payment ---------- */
.line { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.line .name { flex: 1; }
.link.danger { color: var(--err); }
.push-right { margin-left: auto; }
.line .remove { font-size: .85rem; margin-top: .15rem; }
.line .remove:hover { color: var(--err); }
.qty { display: flex; align-items: center; gap: .4rem; }
.qty button { width: 1.9rem; height: 1.9rem; border: 1px solid var(--line); border-radius: 50%; background: var(--cream); transition: background .2s, transform .15s var(--ease), border-color .2s; }
.qty button:hover { background: #fff; border-color: var(--gold); transform: scale(1.08); }
.qty button:active { transform: scale(.94); }
.total { text-align: right; font-size: 1.1rem; }

.order { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem; margin-bottom: 1rem; transition: box-shadow .3s var(--ease), transform .3s var(--ease); }
.order:hover { box-shadow: 0 14px 30px -18px rgba(47, 27, 16, .5); transform: translateY(-2px); }
.order header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; }
.status { font-weight: 600; color: var(--accent-dark); }
.order ul { margin: .5rem 0; padding-left: 1.2rem; }

.pay-box { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin: 1rem 0; padding: 1rem; border: 1px dashed var(--gold); border-radius: 16px; background: linear-gradient(180deg, #fffaf3, var(--cream)); text-align: center; }
.pay-box img { width: 220px; max-width: 70%; height: auto; border-radius: 8px; background: #fff; }
.qr svg { display: block; width: 230px; max-width: 75vw; height: auto; border-radius: 10px; box-shadow: 0 8px 20px -12px rgba(47, 27, 16, .6); }
.upi-id { font: 600 1rem ui-monospace, Consolas, monospace; word-break: break-all; }
.mobile-only { display: none; }
@media (pointer: coarse) { .mobile-only { display: inline-block; } }
.order .actions { margin-top: .6rem; }
.status.s-pending { color: var(--err); }
.status.s-processing { color: #9a6a00; }
.status.s-paid, .status.s-shipped, .status.s-delivered { color: #1b6b3a; }

/* ---------- Toast ---------- */
#toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 160%); padding: .75rem 1.3rem .75rem 1.1rem; border-radius: 999px; background: var(--cocoa); color: #fff; border-left: 6px solid var(--gold); box-shadow: 0 16px 30px -12px rgba(0, 0, 0, .6); opacity: 0; transition: transform .45s var(--ease), opacity .3s; z-index: 100; max-width: 90vw; }
#toast.show { transform: translate(-50%, 0); opacity: 1; }
