/*
 * ProductAiShop styles: "Caribbean beach bar & cigar lounge".
 *
 * Deep navy (header, footer, hero label art), tobacco browns, amber rum,
 * sand, and a turquoise sea as the fresh accent. Headings use Playfair Display, body text Inter (both
 * self-hosted in assets/fonts, SIL Open Font License).
 *
 * All colours, radii and shadows are design tokens on :root; components only
 * use the tokens, so the look can be adjusted in one place.
 */

/* --- Fonts ---------------------------------------------------------------- */
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/playfair-display-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/playfair-display-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Playfair Display"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/playfair-display-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/inter-latin-700-normal.woff2") format("woff2"); }

/* --- Design tokens -------------------------------------------------------- */
:root {
  /* Surfaces */
  --color-bg: #f6eee1;              /* warm sand */
  --color-surface: #fffaf3;         /* card paper */
  --color-surface-2: #f1e5d2;       /* subtle fills, table heads */
  --color-border: #e6d6bd;
  --color-border-strong: #d4bd99;

  /* Text */
  --color-text: #2a1c13;            /* dark tobacco */
  --color-muted: #7b6a58;

  /* Brand */
  --color-espresso: #0f1d36;        /* header & footer: deep navy, matches the label art */
  --color-tobacco: #3d2618;
  --color-rum: #b8731f;             /* primary actions */
  --color-rum-dark: #94591a;
  --color-gold: #e1ad55;            /* highlights on dark */
  --color-gold-soft: #f8e8c8;
  --color-sea: #12706f;             /* links, focus */
  --color-sea-dark: #0b5352;
  --color-sea-soft: #dcefec;
  --color-sunset: #d9603b;

  /* Status */
  --color-danger: #b23a2b;
  --color-success: #2f6f48;
  --color-warning: #a8650a;

  --badge-blue-bg: #dcefec;   --badge-blue-fg: #0b5352;
  --badge-green-bg: #e2f0e2;  --badge-green-fg: #285c35;
  --badge-amber-bg: #fbecd0;  --badge-amber-fg: #85540c;
  --badge-red-bg: #f8e0db;    --badge-red-fg: #96281f;
  --badge-grey-bg: #ece4d8;   --badge-grey-fg: #5b5040;
  --badge-purple-bg: #efe3f0; --badge-purple-fg: #6a3570;

  /* Shape & depth */
  --radius: 14px;
  --radius-small: 9px;
  --shadow: 0 1px 2px rgba(42, 28, 19, 0.06), 0 4px 14px rgba(42, 28, 19, 0.06);
  --shadow-hover: 0 10px 28px rgba(42, 28, 19, 0.14);

  /* Type */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;

  /* Header */
  --color-header-bg: var(--color-espresso);
  --color-header-text: #f6ead6;

  color-scheme: light;
}

/* --- Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--color-text);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(225, 173, 85, 0.16), transparent 60%),
    var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--color-sea); text-decoration: none; }
a:hover { color: var(--color-sea-dark); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); color: var(--color-tobacco); letter-spacing: 0.005em; font-variant-numeric: lining-nums; }
h1 { font-size: 2rem; font-weight: 700; line-height: 1.2; margin: 0 0 1rem; }
h2 { font-size: 1.3rem; font-weight: 600; margin: 0 0 0.85rem; }
h3 { font-size: 1.05rem; font-weight: 600; margin: 1.1rem 0 0.4rem; }
img { max-width: 100%; }
::selection { background: var(--color-gold-soft); }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 2rem 1rem 4rem; flex: 1; }
.container[aria-busy="true"] { opacity: 0.75; transition: opacity 0.2s; }
.container:focus { outline: none; }

/* --- Header --------------------------------------------------------------- */
.app-header {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(180deg, #16294a 0%, var(--color-espresso) 100%);
  color: var(--color-header-text);
  border-bottom: 1px solid rgba(225, 173, 85, 0.35);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}
.header-inner { max-width: 1200px; margin: 0 auto; padding: 0.7rem 1rem; display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.4rem;
  color: var(--color-header-text); letter-spacing: 0.01em;
}
.brand:hover { color: var(--color-gold); text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand small {
  font-family: var(--font); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--color-gold);
  border: 1px solid rgba(225, 173, 85, 0.5); border-radius: 999px; padding: 0.1rem 0.5rem; margin-left: 0.2rem;
}
.main-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; flex: 1; }
.main-nav a {
  position: relative; padding: 0.4rem 0.7rem; color: var(--color-header-text);
  opacity: 0.8; font-weight: 500; border-radius: 6px;
}
.main-nav a:hover { opacity: 1; text-decoration: none; color: var(--color-header-text); }
.main-nav a.active { opacity: 1; color: var(--color-gold); }
.main-nav a.active::after {
  content: ""; position: absolute; left: 0.7rem; right: 0.7rem; bottom: 0.1rem;
  height: 2px; border-radius: 2px; background: var(--color-gold);
}
.header-actions { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.header-manage { justify-content: space-between; row-gap: 0.35rem; }
.header-manage .main-nav { order: 3; flex: 1 0 100%; margin-left: -0.7rem; }
.user-link { color: var(--color-header-text); opacity: 0.8; max-width: 11rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-link:hover { color: var(--color-gold); opacity: 1; text-decoration: none; }
.cart-link {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.75rem;
  border: 1px solid rgba(246, 234, 214, 0.25); border-radius: 999px;
  color: var(--color-header-text); font-weight: 600;
}
.cart-link:hover, .cart-link.active { border-color: var(--color-gold); color: var(--color-gold); text-decoration: none; }
.cart-count {
  min-width: 1.45rem; padding: 0 0.4rem; border-radius: 999px; text-align: center;
  background: var(--color-gold); color: var(--color-espresso); font-size: 0.78rem; font-weight: 700; line-height: 1.45rem;
}
.app-header .btn-ghost { color: var(--color-header-text); }
.app-header .btn-ghost:hover { background: rgba(246, 234, 214, 0.08); color: var(--color-gold); }
.app-header .btn-primary { background: var(--color-gold); border-color: var(--color-gold); color: var(--color-espresso); }
.app-header .btn-primary:hover { background: #ecbd6b; border-color: #ecbd6b; }

/* Language switcher */
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(246, 234, 214, 0.08); border: 1px solid rgba(246, 234, 214, 0.15); }
.lang-option {
  display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.22rem 0.55rem; border: 0; border-radius: 999px;
  background: transparent; color: var(--color-header-text); font: inherit; font-size: 0.78rem; font-weight: 600;
  cursor: pointer; opacity: 0.7;
}
.lang-option:hover { opacity: 1; }
.lang-option.active { opacity: 1; background: var(--color-header-text); color: var(--color-espresso); }
.lang-option:focus-visible { outline: 2px solid var(--color-gold); outline-offset: 1px; }
.flag { width: 1.2rem; height: auto; aspect-ratio: 3 / 2; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); display: block; }

/* --- Hero (shop home) ----------------------------------------------------- */
/* A navy "label" panel: text on the left, the arched label illustration right. */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: 2rem;
  margin: -0.5rem 0 2.25rem; padding: 2.75rem 3rem; border-radius: 22px;
  color: #f4ead6; border: 2px solid #d4a24c; outline: 1px solid rgba(212, 162, 76, 0.35); outline-offset: -10px;
  background:
    repeating-linear-gradient(135deg, rgba(244, 234, 214, 0.035) 0 1px, transparent 1px 12px),
    #16294a;
  box-shadow: 0 18px 40px rgba(15, 29, 54, 0.3);
}
.hero-eyebrow {
  display: inline-block; margin-bottom: 0.9rem; font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.24em; text-transform: uppercase; color: #d4a24c;
}
.hero h1 { color: #f4ead6; font-size: clamp(2.1rem, 4.2vw, 3.3rem); margin-bottom: 0.85rem; }
.hero h1 em { display: block; font-style: italic; font-weight: 400; color: #d4a24c; }
.hero p { font-size: 1.05rem; margin: 0 0 1.6rem; color: rgba(244, 234, 214, 0.88); max-width: 34rem; }
.hero .actions { gap: 0.75rem; }
.hero .btn-primary { background: #d4a24c; border-color: #d4a24c; color: #16294a; box-shadow: none; }
.hero .btn-primary:hover { background: #e2b766; color: #16294a; }
.hero .btn-ghost { color: #f4ead6; border-color: rgba(244, 234, 214, 0.45); }
.hero .btn-ghost:hover { background: rgba(244, 234, 214, 0.1); color: #fff; }
.hero-categories { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 1.5rem; font-size: 0.85rem; }
.hero-categories span { color: rgba(244, 234, 214, 0.7); margin-right: 0.25rem; }
.hero-categories a {
  padding: 0.3rem 0.85rem; border-radius: 999px; border: 1px solid rgba(212, 162, 76, 0.6);
  color: #f4ead6; font-weight: 600;
}
.hero-categories a:hover { background: #d4a24c; border-color: #d4a24c; color: #16294a; text-decoration: none; }
.hero-art { display: flex; justify-content: center; }
.hero-art .emblem { width: 100%; max-width: 300px; height: auto; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.35)); }
#products { scroll-margin-top: 5.5rem; }

/* --- Layout helpers ------------------------------------------------------- */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.4rem; margin-bottom: 1.25rem;
}
/* A second section heading inside a card gets breathing room above it. */
.card h2:not(:first-child) { margin-top: 1.75rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.align-start { align-items: start; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-header h1 { margin: 0; }
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.card > .actions { margin-top: 1rem; justify-content: flex-end; }

.shop-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 2rem; align-items: start; }
.sidebar { position: sticky; top: 5.5rem; padding: 1.4rem 1.25rem; }
.sidebar-title {
  font-family: var(--font); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.16em;
  color: var(--color-rum-dark); margin: 1.4rem 0 0.6rem;
}
.sidebar-title:first-child { margin-top: 0; }
.sidebar a { display: block; padding: 0.28rem 0 0.28rem 0.75rem; color: var(--color-text); border-left: 2px solid transparent; }
.sidebar a:hover { color: var(--color-rum-dark); text-decoration: none; border-left-color: var(--color-border-strong); }
.sidebar a.active { color: var(--color-rum-dark); font-weight: 600; border-left-color: var(--color-rum); }
.category-list { list-style: none; margin: 0; padding: 0; }
.category-list .category-list { padding-left: 0.85rem; font-size: 0.94em; }
.price-form { display: flex; gap: 0.35rem; align-items: center; margin-bottom: 0.85rem; }
.price-form input { flex: 1; width: 0; min-width: 0; padding: 0.45rem 0.5rem; -moz-appearance: textfield; appearance: textfield; }
.price-form input::-webkit-inner-spin-button, .price-form input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.toolbar { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.25rem; }
.toolbar h1, .toolbar .section-title { margin: 0; flex: 1; }
/* Section heading styled like h1 (used when the hero holds the page's h1). */
.section-title { font-size: 2rem; font-weight: 700; line-height: 1.2; }
.toolbar input[type="search"] { width: 250px; }
.filters { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; padding: 1rem 1.25rem; }
.filters input[type="search"] { flex: 1; min-width: 200px; }

/* --- Products ------------------------------------------------------------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.product-card { display: flex; flex-direction: column; padding: 0.85rem 0.85rem 1rem; margin: 0; transition: transform 0.2s, box-shadow 0.2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.product-card h3 { margin: 0.85rem 0.15rem 0.2rem; font-size: 1.1rem; color: var(--color-tobacco); }
.product-card .muted { margin: 0 0.15rem; }
.product-card-link:hover { text-decoration: none; }
.product-card-link:hover h3 { color: var(--color-rum-dark); }
.product-card-footer { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 0.6rem; padding: 0.9rem 0.15rem 0; }
.product-image, .product-detail-image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--color-surface-2); display: block; }

/* Placeholder for products without a photo: a cigar band on dark tobacco. */
.placeholder {
  display: flex; align-items: center; justify-content: center;
  background:
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.025) 0 2px, transparent 2px 9px),
    radial-gradient(circle at 30% 25%, #7a4a28 0%, #3d2618 55%, #1f130c 100%);
}
.placeholder .band {
  font-variant-numeric: lining-nums;
  display: flex; align-items: center; justify-content: center;
  width: 72%; padding: 0.55rem 0.5rem; border-radius: 6px;
  background: linear-gradient(180deg, #f2cf86 0%, #d9a441 48%, #b9832c 100%);
  box-shadow: inset 0 0 0 2px rgba(122, 64, 18, 0.55), inset 0 0 0 5px rgba(255, 238, 200, 0.5), 0 6px 16px rgba(0, 0, 0, 0.35);
  color: #5a1d12; font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  letter-spacing: 0.08em; text-transform: uppercase; text-align: center; line-height: 1.2;
  overflow-wrap: anywhere;
}
.product-detail-image.placeholder .band {
  font-variant-numeric: lining-nums; font-size: 1.4rem; padding: 0.9rem 0.6rem; }

.product-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 2.5rem; padding: 1.5rem; }
.product-detail h1 { font-size: 2.2rem; margin-bottom: 0.5rem; }
.description { white-space: pre-line; margin: 1.25rem 0; color: #4a382a; }
.thumb { display: block; max-width: 160px; border-radius: 8px; margin-bottom: 0.5rem; }

/* Prices: ANG leading, EUR below it (see formatPrices()). */
.price { color: var(--color-tobacco); }
.prices { display: inline-flex; flex-direction: column; line-height: 1.25; }
.price-ang { font-weight: 700; font-size: 1.05em; color: var(--color-tobacco); }
.price-eur { font-size: 0.82em; font-weight: 500; color: var(--color-muted); }
.num .prices { align-items: flex-end; }
.price-large { font-size: 1.75rem; margin: 0.25rem 0 0.4rem; font-family: var(--font-display); font-variant-numeric: lining-nums; }
.price-large .price-ang { font-weight: 700; }
.price-large .price-eur { font-family: var(--font); font-size: 0.55em; }

/* --- Dashboard stats ------------------------------------------------------ */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat { display: flex; flex-direction: column; gap: 0.15rem; margin: 0; color: var(--color-text); border-top: 3px solid transparent; transition: transform 0.2s, box-shadow 0.2s; }
.stat:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-hover); color: var(--color-text); }
.stat-value { font-family: var(--font-display); font-size: 1.75rem; font-weight: 700; color: var(--color-tobacco); line-height: 1.2; font-variant-numeric: lining-nums tabular-nums; }
.stat-value .prices { font-family: var(--font); }
.stat-label { color: var(--color-muted); font-size: 0.88rem; }
.tone-info { border-top-color: var(--color-sea); }
.tone-warning { border-top-color: var(--color-rum); }
.tone-danger { border-top-color: var(--color-danger); }

/* --- Tables --------------------------------------------------------------- */
.table-wrap { overflow-x: auto; padding: 0; }
.table-wrap .table { margin: 0; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.table thead th {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-muted); font-weight: 700;
  background: var(--color-surface-2);
}
.table thead th:first-child { border-top-left-radius: var(--radius-small); }
.table thead th:last-child { border-top-right-radius: var(--radius-small); }
.table tfoot th { border-bottom: none; padding-top: 0.9rem; }
.table-clickable tbody tr[data-href] { cursor: pointer; transition: background 0.15s; }
.table-clickable tbody tr:hover, .table tr.selected { background: var(--color-gold-soft); }
.num { text-align: right !important; }
.nowrap { white-space: nowrap; }
.sort { background: none; border: none; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.sort.active { color: var(--color-tobacco); }
.qty-input { width: 5rem; text-align: right; }

/* --- Badges --------------------------------------------------------------- */
.badge { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: 0.76rem; font-weight: 600; white-space: nowrap; }
.badge-pending    { background: var(--badge-amber-bg);  color: var(--badge-amber-fg); }
.badge-confirmed  { background: var(--badge-blue-bg);   color: var(--badge-blue-fg); }
.badge-processing { background: var(--badge-purple-bg); color: var(--badge-purple-fg); }
.badge-shipped    { background: var(--badge-blue-bg);   color: var(--badge-blue-fg); }
.badge-delivered  { background: var(--badge-green-bg);  color: var(--badge-green-fg); }
.badge-cancelled  { background: var(--badge-grey-bg);   color: var(--badge-grey-fg); }
.badge-paid       { background: var(--badge-green-bg);  color: var(--badge-green-fg); }
.badge-unpaid     { background: var(--badge-grey-bg);   color: var(--badge-grey-fg); }
.badge-overdue    { background: var(--badge-red-bg);    color: var(--badge-red-fg); }

/* --- Forms ---------------------------------------------------------------- */
.form-narrow { max-width: 460px; margin: 2rem auto; }
.field { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1rem; }
.field label { font-weight: 600; font-size: 0.88rem; color: var(--color-tobacco); }
.field-checkbox label { font-weight: 500; display: flex; gap: 0.5rem; align-items: center; }
.req { color: var(--color-sunset); }
.help { color: var(--color-muted); font-size: 0.8rem; }
.field-error, .form-error { color: var(--color-danger); font-size: 0.85rem; }
.field-error:empty, .form-error:empty { display: none; }
input, select, textarea {
  font: inherit; color: inherit; padding: 0.6rem 0.75rem; min-width: 0;
  border: 1px solid var(--color-border-strong); border-radius: var(--radius-small); background: #fffdf9;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:hover, select:hover, textarea:hover { border-color: #c5a87c; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-sea); box-shadow: 0 0 0 3px rgba(18, 112, 111, 0.15); }
input.invalid, select.invalid, textarea.invalid { border-color: var(--color-danger); }
input[type="checkbox"] { width: 1.05rem; height: 1.05rem; padding: 0; accent-color: var(--color-rum); }
textarea { resize: vertical; }
.checkbox { display: flex; align-items: center; gap: 0.45rem; cursor: pointer; }
.inline-form { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; margin-top: 1rem; }
.inline-form input[type="text"] { flex: 1; min-width: 200px; }
.inline-form input[type="number"] { width: 6rem; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; padding: 0.6rem 1.15rem;
  font: inherit; font-weight: 600; border-radius: 999px; border: 1px solid var(--color-border-strong);
  background: var(--color-surface); color: var(--color-tobacco); cursor: pointer; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.btn:hover { text-decoration: none; background: var(--color-surface-2); color: var(--color-tobacco); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid rgba(18, 112, 111, 0.35); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(180deg, #c8822a 0%, var(--color-rum) 100%);
  border-color: var(--color-rum-dark); color: #fffaf0; box-shadow: 0 2px 6px rgba(148, 89, 26, 0.3);
}
.btn-primary:hover { background: linear-gradient(180deg, #b8731f 0%, var(--color-rum-dark) 100%); color: #fff; }
.btn-danger { background: var(--color-surface); border-color: var(--color-danger); color: var(--color-danger); }
.btn-danger:hover { background: var(--badge-red-bg); color: var(--color-danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-small { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* --- Login / invitation pages -------------------------------------------- */
.auth-card { padding: 0; overflow: hidden; }
.auth-card .band-art { display: block; width: 100%; height: 130px; }
.auth-card .auth-body { padding: 1.6rem 1.75rem 1.75rem; }

/* --- Footer --------------------------------------------------------------- */
.app-footer { background: var(--color-espresso); color: rgba(246, 234, 214, 0.75); border-top: 1px solid rgba(225, 173, 85, 0.35); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 2.25rem 1rem; display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; }
.footer-brand strong { display: block; font-family: var(--font-display); font-size: 1.2rem; color: var(--color-header-text); }
.footer-brand span { font-family: var(--font-display); font-style: italic; color: var(--color-gold); }
.footer-note { font-size: 0.85rem; text-align: right; }
.footer-note .age { display: inline-block; margin-right: 0.5rem; padding: 0.05rem 0.45rem; border: 1px solid var(--color-gold); border-radius: 999px; color: var(--color-gold); font-weight: 700; font-size: 0.75rem; }

/* --- Misc ----------------------------------------------------------------- */
.muted { color: var(--color-muted); }
.small { font-size: 0.85rem; }
.pre { white-space: pre-line; margin: 0.25rem 0; }
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }
.loading, .empty { padding: 3.5rem 1rem; text-align: center; color: var(--color-muted); }
.empty h1 { margin-bottom: 0.5rem; }
.alert { padding: 0.95rem 1.1rem; border-radius: var(--radius-small); margin-bottom: 1rem; }
.alert-error { background: var(--badge-red-bg); color: var(--badge-red-fg); }
.details { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.75rem; margin: 0; }
.details dt { color: var(--color-muted); }
.details dd { margin: 0; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--color-muted); }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--color-border); }
.timeline li { padding: 0 0 1rem 1.1rem; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 0.45rem; width: 10px; height: 10px; border-radius: 50%; background: var(--color-rum); box-shadow: 0 0 0 3px var(--color-surface); }
.timeline time { color: var(--color-muted); font-size: 0.85rem; margin-right: 0.5rem; }

.toasts { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: 0.5rem; z-index: 100; }
.toast { padding: 0.8rem 1.1rem; border-radius: 12px; color: #fffaf0; background: var(--color-tobacco); box-shadow: var(--shadow-hover); max-width: 380px; transition: opacity 0.4s; }
.toast-success { background: var(--color-sea-dark); }
.toast-error { background: var(--color-danger); }
.toast-hide { opacity: 0; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 860px) {
  .shop-layout, .product-detail, .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; }
  .toolbar input[type="search"] { width: 100%; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 0.85rem; }
  .hero { grid-template-columns: minmax(0, 1fr); padding: 2rem 1.5rem; border-radius: 16px; gap: 1.5rem; }
  .hero-art { order: -1; }
  .hero-art .emblem { max-width: 190px; }
  .footer-note { text-align: left; }
  h1 { font-size: 1.7rem; }
}
