/* TSK MART - Theme C: promotional wholesale look (red / orange / yellow) */

:root {
  --brand: #e92b22;
  --brand-dark: #b91f1a;
  --brand-deep: #7d1814;
  --brand-soft: #fff0ec;
  --accent: #f47a18;
  --accent-dark: #b9560b;
  --accent-soft: #fff3e6;
  --gold: #ffc928;
  --gold-soft: #fff8dd;
  --ink: #241b18;
  --muted: #8b817b;
  --line: #f2dcc7;
  --bg: #fff9ef;
  --card: #ffffff;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --success: #167a5b;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 14px 34px rgba(185, 31, 26, 0.13);
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans Thai", "Sarabun", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

/* Local SVG icon set: rounded outlined 24px grid, inherits color via currentColor */
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.container {
  width: min(calc(100% - 32px), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--brand);
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 253, 248, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(124, 32, 18, 0.06);
}

.header-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--brand-dark);
  white-space: nowrap;
}

.brand img {
  border-radius: 13px;
  box-shadow: 0 5px 12px rgba(198, 40, 40, 0.24);
}

.brand strong {
  color: var(--accent);
}

.main-nav {
  display: none;
  gap: 22px;
  margin-left: auto;
}

.main-nav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 700;
}

.main-nav a:hover {
  color: var(--brand);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.account-link {
  display: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 2px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.account-link:hover {
  color: var(--brand);
}

.cart-button {
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 7px 18px rgba(185, 31, 26, 0.26);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.cart-button .icon {
  width: 20px;
  height: 20px;
}

.cart-button:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.cart-count {
  min-width: 25px;
  height: 25px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--brand-deep);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
}

@media (min-width: 760px) {
  .main-nav {
    display: flex;
  }

  .header-actions {
    margin-left: 0;
  }

  .account-link {
    display: inline-flex;
  }

  .cart-label {
    display: inline;
  }
}

/* Search and shortcuts */

.search-section {
  background: #fffdf8;
  border-bottom: 1px solid var(--line);
  padding: 14px 0 11px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 4px 5px 4px 18px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  box-shadow: 0 5px 16px rgba(124, 32, 18, 0.05);
}

.search-bar:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(233, 43, 34, 0.12);
}

.search-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 10px 0;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
}

.search-bar input::placeholder {
  color: #a88a80;
}

.search-submit {
  flex: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  box-shadow: 0 5px 14px rgba(185, 31, 26, 0.24);
}

.search-submit .icon {
  width: 21px;
  height: 21px;
}

.shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 11px;
}

.shortcut {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--muted);
  padding: 10px 6px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shortcut:hover {
  border-color: var(--accent);
  color: var(--brand);
}

.shortcut.active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  box-shadow: 0 5px 14px rgba(185, 31, 26, 0.18);
}

.meta-notice {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand) 0%, #f04b1d 45%, var(--accent) 72%, var(--gold) 140%);
  border-bottom: 2px solid var(--line);
  padding: 34px 0 46px;
  color: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto auto;
  width: 85%;
  height: 160%;
  background: repeating-conic-gradient(
    from 0deg at 70% 40%,
    rgba(255, 255, 255, 0.14) 0deg 7deg,
    transparent 7deg 15deg
  );
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 10px;
  background: repeating-linear-gradient(
    135deg,
    var(--gold) 0 16px,
    var(--accent) 16px 32px,
    var(--brand-dark) 32px 48px
  );
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
  align-items: center;
}

.hero-copy {
  max-width: 650px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 8px;
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: #fff8dd;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.15rem, 7vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 900;
  text-shadow: 0 3px 0 rgba(125, 24, 20, 0.18);
}

.hero h1 span {
  color: var(--gold);
}

.hero-lede {
  margin: 16px 0 22px;
  color: #fff5ec;
  font-size: 1.05rem;
  max-width: 48ch;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 20px;
  background: #fff;
  color: var(--brand-dark);
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(125, 24, 20, 0.22);
}

.hero-cta:hover {
  background: var(--gold-soft);
}

.hero-cta .icon {
  width: 18px;
  height: 18px;
}

.hero-note {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 600;
}

.hero-visual {
  position: relative;
  min-height: 230px;
  display: grid;
  place-items: center;
}

.hero-ticket {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 2px;
  min-width: 190px;
  padding: 18px 22px;
  border-radius: 20px;
  background: #fff;
  color: var(--ink);
  border: 3px solid var(--gold);
  box-shadow: 0 16px 30px rgba(125, 24, 20, 0.24);
  text-align: center;
  transform: rotate(-3deg);
}

.hero-ticket span {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.hero-ticket strong {
  color: var(--brand);
  font-size: clamp(2.1rem, 5vw, 3rem);
  font-weight: 900;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.hero-ticket small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.hero-ticket-sub {
  position: absolute;
  right: 2%;
  bottom: 5%;
  z-index: 3;
  min-width: 150px;
  padding: 12px 16px;
  background: var(--gold);
  border-color: #fff;
  transform: rotate(5deg);
}

.hero-ticket-sub strong {
  color: var(--brand-deep);
  font-size: 1.75rem;
}

.hero-stamp {
  position: absolute;
  left: 1%;
  top: 4%;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border: 3px dashed rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  transform: rotate(-12deg);
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

/* Sections */

.section {
  padding: 46px 0;
}

.section-soft {
  background: linear-gradient(180deg, #fff 0%, var(--accent-soft) 100%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.55rem, 4vw, 2.1rem);
  font-weight: 900;
}

.section-underline {
  display: block;
  width: 68px;
  height: 5px;
  margin-top: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.see-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-weight: 900;
  padding: 8px 0;
}

.see-all .icon {
  width: 16px;
  height: 16px;
}

.see-all:hover {
  color: var(--brand-dark);
}

.section-note {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 14px;
  scrollbar-width: thin;
}

.chip {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 800;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.chip:hover {
  border-color: var(--accent);
  color: var(--brand);
  transform: translateY(-1px);
}

.chip.active {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 14px rgba(198, 40, 40, 0.2);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.sort-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.sort-control select {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

/* Product grid */

.product-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 900px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.product-card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 5px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(150, 42, 24, 0.07);
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 82% 12%, rgba(255, 201, 40, 0.28), transparent 34%),
    linear-gradient(135deg, #fffaf0, #ffeadf);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.media-placeholder {
  display: grid;
  place-items: center;
  gap: 3px;
  color: var(--brand);
  text-align: center;
  padding: 12px;
}

.media-placeholder .icon {
  width: 38px;
  height: 38px;
  stroke-width: 1.6;
  opacity: 0.72;
}

.media-placeholder span {
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
}

.media-placeholder small {
  font-size: 10px;
  color: #a88a80;
}

.product-code {
  position: absolute;
  left: 10px;
  top: 10px;
  max-width: calc(100% - 20px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(127, 29, 29, 0.92);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}

.product-body {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.product-category {
  margin: 0;
  font-size: 11px;
  color: var(--accent-dark);
  font-weight: 900;
  letter-spacing: 0.02em;
}

.product-name {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.35;
  min-height: 2.7em;
}

.price-wrap {
  display: grid;
  gap: 1px;
  margin-top: 1px;
  padding: 8px 11px;
  border: 1px solid var(--gold);
  border-radius: 14px;
  background: linear-gradient(90deg, var(--gold-soft) 0%, var(--accent-soft) 100%);
}

.price-label {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: var(--accent-dark);
}

.product-price {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.15;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}

.price-unit {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.product-stock {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.stock-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 5px;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 800;
  background: #e7f6ef;
  color: var(--success);
}

.stock-badge.low {
  background: var(--gold-soft);
  color: #8a5a06;
}

.stock-badge.out {
  background: var(--danger-soft);
  color: var(--danger);
}

.product-card.out-of-stock .product-media img {
  filter: grayscale(0.65);
  opacity: 0.65;
}

.product-card.out-of-stock .price-wrap {
  filter: grayscale(0.35);
  opacity: 0.75;
}

.btn {
  border: 0;
  border-radius: 14px;
  padding: 10px 16px;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  filter: brightness(1.03);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 6px 15px rgba(198, 40, 40, 0.2);
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn-ghost {
  background: #fff;
  color: var(--brand);
  border: 1.5px solid var(--line);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.add-to-cart {
  margin-top: auto;
  width: 100%;
}

.empty {
  text-align: center;
  padding: 56px 20px;
  background: #fff;
  border: 2px dashed var(--gold);
  border-radius: var(--radius);
}

.empty-icon {
  color: var(--brand);
  display: grid;
  place-items: center;
}

.empty-icon .icon {
  width: 44px;
  height: 44px;
}

.empty h3 {
  margin: 8px 0 4px;
}

.empty p {
  color: var(--muted);
  margin: 0 0 16px;
}

.steps {
  display: grid;
  gap: 18px;
}

.steps article {
  position: relative;
  padding: 22px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(150, 42, 24, 0.06);
}

.steps h3 {
  margin: 8px 0 4px;
  font-size: 1.1rem;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.step-no {
  display: inline-flex;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--gold);
  color: var(--brand-dark);
  font-weight: 900;
  font-size: 13px;
}

@media (min-width: 760px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.promo-footer {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--gold) 0%, #ffb21c 48%, var(--accent) 100%);
  border-top: 4px solid var(--brand);
  padding: 28px 0;
  color: var(--brand-deep);
}

.promo-footer::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 240px;
  height: 240px;
  border: 28px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  pointer-events: none;
}

.promo-footer-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.promo-kicker {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.promo-footer h2 {
  margin: 0;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 900;
  line-height: 1.1;
}

.promo-footer p {
  margin: 6px 0 2px;
  font-weight: 700;
}

.promo-footer small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.78;
}

.btn-gold {
  background: #fff;
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 12px 20px;
  box-shadow: 0 8px 18px rgba(125, 24, 20, 0.18);
  text-decoration: none;
}

.btn-gold:hover {
  background: var(--gold-soft);
}

.site-footer {
  border-top: 4px solid var(--gold);
  background: var(--brand-deep);
  color: #fff4ef;
  padding: 24px 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner strong {
  color: var(--gold);
}

.footer-inner a {
  color: var(--gold);
  font-weight: 800;
}

/* Cart drawer */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(70, 17, 17, 0.52);
  z-index: 40;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(450px, 100%);
  background: #fff;
  z-index: 50;
  display: flex;
  flex-direction: column;
  border-radius: 24px 0 0 24px;
  overflow: hidden;
  box-shadow: -14px 0 40px rgba(70, 17, 17, 0.28);
}

.drawer-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand) 60%, var(--accent));
  color: #fff;
}

.drawer-header .eyebrow {
  background: rgba(255, 255, 255, 0.16);
  color: var(--gold);
}

.drawer-header h2 {
  margin: 0;
  font-size: 1.25rem;
}

.icon-button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.icon-button .icon {
  width: 18px;
  height: 18px;
}

.drawer-header .icon-button {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: grid;
  align-content: start;
  gap: 12px;
  background: var(--bg);
}

.cart-empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 10px;
}

.cart-line {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.cart-thumb {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #fffaf0, #ffeadf);
  color: var(--brand);
}

.cart-thumb .icon {
  width: 22px;
  height: 22px;
  opacity: 0.7;
}

.cart-line-name {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.cart-line-price {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.qty-control {
  display: inline-flex;
  align-items: center;
  margin-top: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.qty-control button {
  border: 0;
  background: var(--accent-soft);
  width: 30px;
  height: 29px;
  color: var(--brand);
  display: grid;
  place-items: center;
}

.qty-control .icon {
  width: 14px;
  height: 14px;
}

.qty-control span {
  min-width: 26px;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

.drawer-footer {
  border-top: 1px solid var(--line);
  padding: 18px 20px 22px;
  background: var(--accent-soft);
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-weight: 800;
}

.total-row strong {
  font-size: 1.45rem;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}

.checkout-form {
  display: grid;
  gap: 8px;
}

.checkout-form label {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
}

.checkout-form input,
.checkout-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  resize: vertical;
}

.fineprint {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 80;
  max-width: min(90vw, 480px);
  padding: 12px 18px;
  border: 1px solid var(--gold);
  border-radius: 14px;
  background: var(--brand-dark);
  color: #fff;
  box-shadow: var(--shadow);
  text-align: center;
  font-weight: 700;
}

/* Admin */

.admin-body {
  background: #fff3ec;
}

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}

.admin-sidebar {
  background:
    radial-gradient(circle at 90% 5%, rgba(249, 115, 22, 0.45), transparent 32%),
    linear-gradient(160deg, var(--brand-deep), var(--brand-dark));
  color: #fff4ef;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand-light,
.brand-light strong {
  color: #fff;
}

.brand-light strong {
  color: var(--gold);
}

.admin-sidebar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-sidebar nav a {
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 10px;
  color: #ffe8df;
  font-size: 14px;
  font-weight: 700;
}

.admin-sidebar nav a.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.back-link .icon {
  width: 16px;
  height: 16px;
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.sidebar-note {
  margin: auto 0 0;
  font-size: 12px;
  color: #ffd9cb;
}

.admin-main {
  padding: 24px 18px 60px;
  min-width: 0;
}

.admin-topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.admin-topbar h1 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 900;
}

.admin-section {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 6px 18px rgba(150, 42, 24, 0.06);
}

.admin-section h2 {
  margin: 0 0 4px;
  font-size: 1.25rem;
}

.admin-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.admin-section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  margin-bottom: 14px;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px;
  background: linear-gradient(145deg, var(--bg), var(--accent-soft));
}

.stat-label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stat-value {
  margin: 4px 0 0;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}

.warning-card {
  border-left: 5px solid var(--accent);
  background: var(--gold-soft);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
}

.warning-card strong {
  color: var(--brand-dark);
}

.warning-card p {
  margin: 2px 0 0;
  color: #7a5a2e;
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.search-compact {
  max-width: 360px;
  box-shadow: none;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 14px;
}

.data-table th,
.data-table td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table th {
  background: var(--accent-soft);
  color: var(--brand-dark);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table td.num {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.row-actions {
  display: flex;
  gap: 6px;
}

.row-actions button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  color: var(--brand);
}

.row-actions button.danger {
  color: var(--danger);
}

.image-manager {
  display: grid;
  gap: 20px;
  align-items: start;
}

.image-preview-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
  background: var(--bg);
}

.image-preview-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.image-preview-card p {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.image-manager-copy ol {
  padding-left: 20px;
  color: var(--muted);
}

.image-manager-copy code {
  background: var(--accent-soft);
  border-radius: 6px;
  padding: 1px 5px;
  color: var(--brand-dark);
}

@media (min-width: 900px) {
  .admin-shell {
    grid-template-columns: 230px 1fr;
  }

  .admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
  }

  .admin-sidebar nav {
    flex-direction: column;
  }

  .admin-main {
    padding: 28px 32px 70px;
  }

  .image-manager {
    grid-template-columns: 320px 1fr;
  }
}

/* Modal */

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(70, 17, 17, 0.55);
}

.modal-panel {
  position: relative;
  width: min(620px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 22px;
  border-top: 5px solid var(--accent);
  box-shadow: 0 20px 60px rgba(70, 17, 17, 0.28);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.product-form {
  padding: 20px;
  display: grid;
  gap: 12px;
}

.product-form label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
}

.product-form input {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
}

.form-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}

.checkbox-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
}

/* Small-screen polish */

@media (max-width: 560px) {
  .container {
    width: min(calc(100% - 24px), var(--container));
  }

  .header-inner {
    min-height: 62px;
  }

  .account-link {
    display: none;
  }

  .search-section {
    padding-top: 10px;
  }

  .search-bar {
    min-height: 50px;
    padding-left: 14px;
  }

  .search-bar input {
    font-size: 14px;
  }

  .search-submit {
    width: 40px;
    height: 40px;
  }

  .shortcuts {
    gap: 6px;
  }

  .shortcut {
    padding: 9px 4px;
    font-size: 11px;
  }

  .hero {
    padding: 28px 0 38px;
  }

  .hero-visual {
    min-height: 190px;
  }

  .hero-ticket {
    min-width: 170px;
    padding: 15px 18px;
  }

  .hero-ticket-sub {
    right: 0;
  }

  .hero-stamp {
    width: 88px;
    height: 88px;
    font-size: 11px;
  }

  .product-grid {
    gap: 12px;
  }

  .product-body {
    padding: 12px;
    gap: 7px;
  }

  .product-name {
    font-size: 0.9rem;
  }

  .product-price {
    font-size: 1.25rem;
  }

  .price-wrap {
    padding: 7px 9px;
  }

  .media-placeholder .icon {
    width: 30px;
    height: 30px;
  }

  .media-placeholder span {
    font-size: 11px;
  }

  .media-placeholder small {
    display: none;
  }

  .cart-label {
    display: none;
  }

  .section {
    padding: 38px 0;
  }

  .promo-footer-inner {
    align-items: flex-start;
  }
}

@media (max-width: 380px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Public storefront: orders closed notice */
.order-closed {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff6e5;
  border: 1px solid #f0d49a;
  color: #7a4b00;
}
.order-closed p {
  margin: 0 0 6px;
}
.order-closed p:last-child {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
}

