* {
  box-sizing: border-box;
}

:root {
  --bg: #fff8ef;
  --paper: #ffffff;
  --ink: #221b15;
  --muted: #75685c;
  --line: #eadfd3;
  --accent: #b81f32;
  --accent-dark: #8d1424;
  --gold: #f1c453;
  --soft: #f7eadc;
  --shadow: 0 24px 60px rgba(75, 48, 28, 0.16);
  --radius: 24px;
}

html[data-theme="dark"] {
  --bg: #11100f;
  --paper: #1b1816;
  --ink: #f7efe6;
  --muted: #c9b9a9;
  --line: #3a3029;
  --accent: #ff596d;
  --accent-dark: #df3349;
  --gold: #f1c453;
  --soft: #27211d;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(241,196,83,0.25), transparent 35rem),
    radial-gradient(circle at top right, rgba(184,31,50,0.12), transparent 30rem),
    var(--bg);
}

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

a {
  color: inherit;
  text-decoration: none;
}

code {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.15rem 0.35rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,248,239,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(234,223,211,0.9);
}

.top-strip {
  background: var(--ink);
  color: white;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.45rem 1rem;
}

.nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--accent), #ef7c35);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
  letter-spacing: -0.05em;
  box-shadow: 0 12px 24px rgba(184,31,50,0.22);
}

.brand small {
  display: block;
  color: var(--muted);
  margin-top: 0.12rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.language-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  background: var(--paper);
  padding: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0.38rem 0.58rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  font-size: 0.78rem;
}

.lang-btn.active {
  background: var(--accent);
  color: white;
}

.cart-button, .ghost-button, .icon-button, .tab-button {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
}

.cart-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.58rem 0.8rem;
}

.cart-count {
  min-width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  background: var(--gold);
  border-radius: 999px;
  font-size: 0.8rem;
}

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 7rem) 1rem 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-weight: 900;
  font-size: 0.78rem;
  margin: 0 0 0.7rem;
}

h1, h2, h3, p {
  margin-top: 0;
}

h1 {
  font-size: clamp(2.7rem, 7vw, 5.7rem);
  line-height: 0.92;
  letter-spacing: -0.07em;
  margin-bottom: 1.2rem;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.hero-text {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.6;
}

.hero-actions, .form-actions, .confirmation-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.primary-button, .secondary-button, .danger-button, .add-button {
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1.15rem;
  font-weight: 900;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.primary-button {
  background: var(--accent);
  color: white;
  box-shadow: 0 16px 30px rgba(184,31,50,0.22);
}

.primary-button:hover {
  background: var(--accent-dark);
}

.secondary-button {
  background: var(--paper);
  border: 1px solid var(--line);
}

.secondary-button.compact {
  padding: 0.65rem 0.85rem;
}

.danger-button {
  background: #ffe3e3;
  color: #8f1621;
}

.full {
  width: 100%;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.trust-row span {
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.6rem 0.8rem;
  font-weight: 800;
  color: var(--muted);
}

.hero-card {
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.public-card {
  min-height: 410px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.photo-stack {
  position: relative;
  min-height: 290px;
}

.photo-card {
  position: absolute;
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(184,31,50,0.95), rgba(239,124,53,0.92)),
    var(--accent);
  color: white;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.photo-card.big {
  inset: 0.5rem 1.2rem 2rem 1.2rem;
  font-size: 7rem;
}

.photo-card.small {
  width: 120px;
  height: 120px;
  font-size: 3.6rem;
  background: white;
  border: 1px solid var(--line);
}

.photo-card.one {
  color: var(--accent);
  left: -0.2rem;
  bottom: 0.3rem;
}

.photo-card.two {
  color: #ef7c35;
  right: -0.2rem;
  bottom: 0.3rem;
}

.mini-map {
  margin-top: 1rem;
  display: flex;
  gap: 0.9rem;
  align-items: center;
  background: var(--paper);
  border-radius: 18px;
  padding: 1rem;
  border: 1px solid var(--line);
}

.mini-map span {
  font-size: 2rem;
}

.mini-map p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.section-heading {
  margin-bottom: 1.6rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.steps article, .info-band, .product-card, .modal-card, .side-panel, .admin-list-item, .admin-card, .admin-login-panel {
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(75, 48, 28, 0.08);
}

.steps article {
  padding: 1.25rem;
}

.steps span {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  display: grid;
  place-items: center;
  font-weight: 900;
  margin-bottom: 1rem;
}

.steps p {
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 0;
}

.catalogue-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
}

.filters {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.filters input, .filters select, .reservation-form input, .reservation-form select, .reservation-form textarea, .product-form input, .product-form select, .product-form textarea, #adminPin, .admin-login-panel input {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 16px;
  padding: 0.8rem 0.9rem;
  min-width: 220px;
  color: var(--ink);
  outline: none;
}

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

.product-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-image {
  aspect-ratio: 1.1 / 0.82;
  background:
    linear-gradient(135deg, rgba(241,196,83,0.28), rgba(184,31,50,0.12)),
    #f3e4d3;
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  color: rgba(34,27,21,0.35);
  font-size: 3rem;
}

.product-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.pill {
  border-radius: 999px;
  padding: 0.32rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 900;
  background: var(--soft);
  color: var(--muted);
}

.stock-pill.available {
  color: #176b3a;
  background: #ddf7e7;
}

.stock-pill.low {
  color: #9a6100;
  background: #fff0c9;
}

.stock-pill.unavailable {
  color: #8d1424;
  background: #ffe0e0;
}

.product-card h3 {
  margin-bottom: 0.45rem;
  letter-spacing: -0.02em;
}

.product-card p {
  color: var(--muted);
  line-height: 1.5;
  flex: 1;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
}

.price {
  font-size: 1.25rem;
}

.add-button {
  background: var(--ink);
  color: white;
  padding: 0.72rem 0.95rem;
}

.add-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.info-band {
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  background: linear-gradient(135deg, white, #fff1dc);
}

.info-band p {
  color: var(--muted);
  max-width: 70ch;
  line-height: 1.55;
  margin-bottom: 0;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(34,27,21,0.5);
  z-index: 90;
}

.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  width: min(440px, 100vw);
  height: 100vh;
  transform: translateX(110%);
  transition: transform 0.25s ease;
  overflow: auto;
  padding: 1rem;
  border-radius: 24px 0 0 24px;
}

.side-panel.open {
  transform: translateX(0);
}

.panel-header, .cart-row, .admin-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.7rem;
}

.icon-button {
  width: 42px;
  height: 42px;
  font-size: 1.4rem;
  display: grid;
  place-items: center;
}

.cart-items {
  display: grid;
  gap: 0.7rem;
  margin: 1rem 0;
}

.cart-row {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 0.8rem;
  background: white;
}

.cart-row small {
  color: var(--muted);
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.qty-controls button {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft);
  cursor: pointer;
}

.reservation-form, .product-form {
  display: grid;
  gap: 0.8rem;
}

.reservation-form label, .product-form label, .admin-login-panel label {
  display: grid;
  gap: 0.35rem;
  font-weight: 800;
}

.reservation-form label span, .product-form label span, .admin-login-panel label span {
  color: var(--muted);
  font-size: 0.85rem;
}

.cart-total {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
}

.small-print {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(34,27,21,0.56);
}

.modal-card {
  width: min(540px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 1.4rem;
  position: relative;
}

.confirmation-card h2 {
  font-size: clamp(2.4rem, 7vw, 4rem);
  color: var(--accent);
  margin-bottom: 1rem;
}

.confirmation-items {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
}

.confirmation-items div {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.7rem;
  background: white;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
}

[hidden] {
  display: none !important;
}

/* Admin page */
.admin-page .site-header {
  position: sticky;
}

.admin-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.admin-login-panel {
  max-width: 680px;
  padding: 1.5rem;
}

.admin-login-panel h1,
.admin-content-page h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
}

.admin-content-page {
  display: grid;
  gap: 1rem;
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tab-button {
  padding: 0.7rem 1rem;
}

.tab-button.active {
  background: var(--ink);
  color: white;
}

.admin-card {
  padding: 1rem;
  margin-bottom: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 0.8rem;
}

.form-grid input, .form-grid select {
  min-width: 0;
}

.admin-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.admin-list-item {
  padding: 0.9rem;
}

.admin-list-item p {
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-actions button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  font-weight: 800;
}

@media (max-width: 900px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .language-switch {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 2.2rem;
  }

  .steps, .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .catalogue-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .filters {
    width: 100%;
  }

  .filters input, .filters select {
    flex: 1;
    min-width: min(100%, 220px);
  }
}

@media (max-width: 620px) {
  h1 {
    font-size: 3.2rem;
  }

  .steps, .product-grid, .form-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions a, .hero-actions button, .info-band .primary-button {
    width: 100%;
  }

  .info-band {
    flex-direction: column;
    align-items: stretch;
  }

  .side-panel {
    border-radius: 0;
  }

  .photo-card.big {
    inset: 0.5rem;
  }

  .photo-card.small {
    width: 98px;
    height: 98px;
  }
}


.availability-note,
.inventory-message {
  margin: 0.45rem 0 0;
  font-size: 0.86rem;
  line-height: 1.35;
  color: var(--muted);
}

.availability-note.in_stock,
.inventory-message.in_stock {
  color: #176b3a;
}

.availability-note.low_stock,
.inventory-message.low_stock {
  color: #9a6100;
}

.availability-note.preorder,
.inventory-message.preorder {
  color: #7a4b00;
}

.availability-note.substitution,
.inventory-message.substitution {
  color: #4e3b8f;
}

.availability-note.unavailable,
.inventory-message.unavailable {
  color: #8d1424;
}

.stock-pill.in_stock {
  color: #176b3a;
  background: #ddf7e7;
}

.stock-pill.low_stock {
  color: #9a6100;
  background: #fff0c9;
}

.stock-pill.preorder {
  color: #7a4b00;
  background: #fff3d5;
}

.stock-pill.substitution {
  color: #4e3b8f;
  background: #ece7ff;
}

.stock-pill.unavailable {
  color: #8d1424;
  background: #ffe0e0;
}

.cart-warning {
  border: 1px solid #f1d091;
  background: #fff7e3;
  border-radius: 16px;
  padding: 0.75rem;
  color: #6e4d0f;
}

.cart-warning.error {
  border-color: #f0a0a7;
  background: #ffe9ec;
  color: #8d1424;
}

.cart-warning p {
  margin: 0 0 0.35rem;
}

.cart-warning p:last-child {
  margin-bottom: 0;
}

.checkbox-label {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.8rem 0.9rem;
  background: var(--paper);
  display: flex !important;
  grid-column: 1 / -1;
  align-items: center;
  gap: 0.7rem !important;
}

.checkbox-label input {
  min-width: auto !important;
  width: 18px;
  height: 18px;
}

.checkbox-label span {
  font-size: 0.95rem !important;
  color: var(--ink) !important;
}


.cart-toast {
  position: fixed;
  left: 50%;
  bottom: 1.2rem;
  transform: translate(-50%, 120%);
  z-index: 120;
  background: var(--ink);
  color: white;
  border-radius: 999px;
  padding: 0.55rem 0.65rem 0.55rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.cart-toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

.cart-toast button {
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
  font-weight: 900;
  cursor: pointer;
}

@media (max-width: 620px) {
  .cart-toast {
    width: calc(100% - 1.5rem);
    justify-content: space-between;
    border-radius: 20px;
  }
}


.hero-photo-wrap {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.hero-photo-wrap img {
  display: block;
  width: 100%;
  aspect-ratio: 1.25 / 1;
  object-fit: cover;
}

.section-intro {
  color: var(--muted);
  line-height: 1.6;
  max-width: 78ch;
}

.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.location-card {
  margin: 0;
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(75, 48, 28, 0.08);
}

.location-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1.35 / 1;
  object-fit: cover;
}

.location-card figcaption {
  padding: 0.85rem 1rem;
  color: var(--muted);
  font-weight: 800;
}

.address-box {
  margin-top: 1rem;
  display: flex;
  gap: 0.9rem;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 14px 40px rgba(75, 48, 28, 0.08);
}

.address-box span {
  font-size: 2rem;
}

.address-box p {
  margin: 0.2rem 0 0;
  color: var(--muted);
}

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


.required-star {
  color: var(--accent);
  font-weight: 900;
}

.field-helper {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  margin-top: -0.1rem;
}

.mini-map small {
  display: inline-block;
  margin-top: 0.3rem;
  color: var(--accent);
  font-weight: 900;
}

.map-link-card,
.address-box {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.map-link-card:hover,
.address-box:hover,
.mini-map:hover {
  transform: translateY(-2px);
}


.theme-toggle {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
  padding: 0.58rem 0.8rem;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(241,196,83,0.10), transparent 35rem),
    radial-gradient(circle at top right, rgba(255,89,109,0.12), transparent 30rem),
    var(--bg);
}

html[data-theme="dark"] .site-header {
  background: rgba(17,16,15,0.92);
  border-bottom-color: rgba(58,48,41,0.9);
}

html[data-theme="dark"] .top-strip {
  background: #070707;
}

html[data-theme="dark"] .brand-mark,
html[data-theme="dark"] .primary-button {
  box-shadow: 0 16px 34px rgba(255, 89, 109, 0.18);
}

html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .steps article,
html[data-theme="dark"] .info-band,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .side-panel,
html[data-theme="dark"] .admin-list-item,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .admin-login-panel,
html[data-theme="dark"] .location-card,
html[data-theme="dark"] .address-box {
  background: rgba(27, 24, 22, 0.88);
}

html[data-theme="dark"] .info-band {
  background: linear-gradient(135deg, #1b1816, #251b16);
}

html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .cart-button,
html[data-theme="dark"] .ghost-button,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .tab-button,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .language-switch,
html[data-theme="dark"] .cart-row,
html[data-theme="dark"] .mini-map,
html[data-theme="dark"] .filters input,
html[data-theme="dark"] .filters select,
html[data-theme="dark"] .reservation-form input,
html[data-theme="dark"] .reservation-form select,
html[data-theme="dark"] .reservation-form textarea,
html[data-theme="dark"] .product-form input,
html[data-theme="dark"] .product-form select,
html[data-theme="dark"] .product-form textarea,
html[data-theme="dark"] #adminPin,
html[data-theme="dark"] .admin-login-panel input {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--line);
}

html[data-theme="dark"] .product-image {
  background:
    linear-gradient(135deg, rgba(241,196,83,0.10), rgba(255,89,109,0.08)),
    #221d19;
  color: rgba(247,239,230,0.3);
}

html[data-theme="dark"] .cart-toast {
  background: #070707;
  border: 1px solid var(--line);
}

html[data-theme="dark"] .cart-warning {
  background: #2a2317;
  border-color: #6a5120;
  color: #f3d18a;
}

html[data-theme="dark"] .cart-warning.error {
  background: #321b20;
  border-color: #7f3843;
  color: #ffb5bd;
}

html[data-theme="dark"] code {
  background: var(--soft);
  color: var(--ink);
  border-color: var(--line);
}


/* ==========================================================
   Dark mode contrast patch
   Fixes bright yellow/gold text on grey cards and improves
   readability across customer and admin pages.
   ========================================================== */

html[data-theme="dark"] {
  --gold: #ffd978;
  --gold-soft: #332918;
  --muted: #d7c8b8;
  --soft: #241f1b;
}

html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .price,
html[data-theme="dark"] .required-star,
html[data-theme="dark"] .mini-map small,
html[data-theme="dark"] .location-card figcaption,
html[data-theme="dark"] .address-box strong,
html[data-theme="dark"] .brand strong {
  color: #ffe3a0;
}

html[data-theme="dark"] .hero-text,
html[data-theme="dark"] .section-intro,
html[data-theme="dark"] .small-print,
html[data-theme="dark"] .product-card p,
html[data-theme="dark"] .admin-list-item p,
html[data-theme="dark"] .field-helper,
html[data-theme="dark"] .address-box p,
html[data-theme="dark"] .cart-row small,
html[data-theme="dark"] .admin-card label span,
html[data-theme="dark"] .product-form label span,
html[data-theme="dark"] .reservation-form label span {
  color: #d7c8b8;
}

html[data-theme="dark"] .pill {
  background: #2b2520;
  color: #f7efe6;
  border-color: #4a3f36;
}

html[data-theme="dark"] .stock-pill.in_stock {
  background: #153323;
  color: #bdf4d1;
}

html[data-theme="dark"] .stock-pill.low_stock,
html[data-theme="dark"] .stock-pill.preorder {
  background: #3a2b12;
  color: #ffe1a1;
}

html[data-theme="dark"] .stock-pill.substitution {
  background: #272040;
  color: #d8ccff;
}

html[data-theme="dark"] .stock-pill.unavailable {
  background: #3a171d;
  color: #ffb8c0;
}

html[data-theme="dark"] .availability-note.in_stock,
html[data-theme="dark"] .inventory-message.in_stock {
  color: #bdf4d1;
}

html[data-theme="dark"] .availability-note.low_stock,
html[data-theme="dark"] .availability-note.preorder,
html[data-theme="dark"] .inventory-message.low_stock,
html[data-theme="dark"] .inventory-message.preorder {
  color: #ffe1a1;
}

html[data-theme="dark"] .availability-note.substitution,
html[data-theme="dark"] .inventory-message.substitution {
  color: #d8ccff;
}

html[data-theme="dark"] .availability-note.unavailable,
html[data-theme="dark"] .inventory-message.unavailable {
  color: #ffb8c0;
}

html[data-theme="dark"] .primary-button {
  color: #160f0a;
  background: linear-gradient(135deg, #ffd978, #ffb45c);
}

html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .cart-button,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .ghost-button,
html[data-theme="dark"] .tab-button {
  color: #f7efe6;
}

html[data-theme="dark"] .cart-count {
  background: #ffd978;
  color: #160f0a;
}

html[data-theme="dark"] a {
  color: inherit;
}

html[data-theme="dark"] .map-link-card:hover figcaption,
html[data-theme="dark"] .mini-map:hover small,
html[data-theme="dark"] .address-box:hover strong {
  color: #fff1c6;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #9f9082;
}


/* ==========================================================
   Dark mode button contrast patch v2
   Fixes cream/yellow/white button text collisions in dark mode.
   This targets product Add buttons, cart toast buttons, CTA buttons,
   cart controls, admin buttons, and form action buttons.
   ========================================================== */

html[data-theme="dark"] button,
html[data-theme="dark"] .primary-button,
html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .ghost-button,
html[data-theme="dark"] .cart-button,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .tab-button,
html[data-theme="dark"] .qty-controls button,
html[data-theme="dark"] .admin-actions button,
html[data-theme="dark"] .product-form button,
html[data-theme="dark"] .reservation-form button,
html[data-theme="dark"] .modal-actions button {
  text-shadow: none;
}

/* Product card Add / Preorder / Reserve buttons */
html[data-theme="dark"] .add-button,
html[data-theme="dark"] .product-card .add-button,
html[data-theme="dark"] button.add-button {
  background: #ffd978 !important;
  color: #160f0a !important;
  border: 1px solid #ffd978 !important;
  box-shadow: 0 12px 30px rgba(255, 217, 120, 0.18);
  font-weight: 950;
}

html[data-theme="dark"] .add-button:hover,
html[data-theme="dark"] .product-card .add-button:hover,
html[data-theme="dark"] button.add-button:hover {
  background: #ffe7a8 !important;
  color: #160f0a !important;
  border-color: #ffe7a8 !important;
}

html[data-theme="dark"] .add-button:disabled,
html[data-theme="dark"] .product-card .add-button:disabled,
html[data-theme="dark"] button.add-button:disabled {
  background: #3a332d !important;
  color: #a99b8d !important;
  border-color: #51463d !important;
  box-shadow: none;
  opacity: 1;
}

/* Toast button: "View cart" */
html[data-theme="dark"] .cart-toast button {
  background: #ffd978 !important;
  color: #160f0a !important;
  border: 1px solid #ffd978 !important;
  font-weight: 950;
}

html[data-theme="dark"] .cart-toast button:hover {
  background: #ffe7a8 !important;
  color: #160f0a !important;
}

/* Main CTA buttons */
html[data-theme="dark"] .primary-button,
html[data-theme="dark"] button.primary-button,
html[data-theme="dark"] a.primary-button {
  background: linear-gradient(135deg, #ffd978, #ffb45c) !important;
  color: #160f0a !important;
  border-color: transparent !important;
}

html[data-theme="dark"] .primary-button:hover,
html[data-theme="dark"] button.primary-button:hover,
html[data-theme="dark"] a.primary-button:hover {
  color: #160f0a !important;
  filter: brightness(1.04);
}

/* Secondary / outline buttons must stay dark with light text */
html[data-theme="dark"] .secondary-button,
html[data-theme="dark"] .ghost-button,
html[data-theme="dark"] .cart-button,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .tab-button,
html[data-theme="dark"] .icon-button {
  background: #1b1816 !important;
  color: #f7efe6 !important;
  border-color: #4a3f36 !important;
}

html[data-theme="dark"] .secondary-button:hover,
html[data-theme="dark"] .ghost-button:hover,
html[data-theme="dark"] .cart-button:hover,
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .tab-button:hover,
html[data-theme="dark"] .icon-button:hover {
  background: #2a231f !important;
  color: #fff6ea !important;
  border-color: #6a5a4d !important;
}

/* Active tab should be gold with dark text */
html[data-theme="dark"] .tab-button.active {
  background: #ffd978 !important;
  color: #160f0a !important;
  border-color: #ffd978 !important;
}

/* Quantity + small round controls */
html[data-theme="dark"] .qty-controls button {
  background: #2a231f !important;
  color: #fff6ea !important;
  border-color: #4a3f36 !important;
}

html[data-theme="dark"] .qty-controls button:hover {
  background: #3a3029 !important;
  color: #ffffff !important;
}

/* Admin action buttons */
html[data-theme="dark"] .admin-actions button,
html[data-theme="dark"] .product-form button,
html[data-theme="dark"] .reservation-form button,
html[data-theme="dark"] .modal-actions button {
  background: #2a231f !important;
  color: #fff6ea !important;
  border: 1px solid #4a3f36 !important;
}

html[data-theme="dark"] .admin-actions button:hover,
html[data-theme="dark"] .product-form button:hover,
html[data-theme="dark"] .reservation-form button:hover,
html[data-theme="dark"] .modal-actions button:hover {
  background: #ffd978 !important;
  color: #160f0a !important;
  border-color: #ffd978 !important;
}

/* Pills/badges on cards: keep every color pair readable */
html[data-theme="dark"] .category-pill {
  background: #2b2520 !important;
  color: #fff2d7 !important;
  border-color: #4a3f36 !important;
}

html[data-theme="dark"] .cart-count {
  background: #ffd978 !important;
  color: #160f0a !important;
}

/* Generic safety net:
   Any gold/cream button-like element should use dark text.
*/
html[data-theme="dark"] [style*="background: var(--gold)"],
html[data-theme="dark"] [style*="background-color: var(--gold)"] {
  color: #160f0a !important;
}


/* ==========================================================
   Dark mode badge / hero pill contrast patch v3
   Fixes top hero badges such as:
   "Free reservation", "Held 5 days after pickup date",
   and "Pay at the kiosk".
   Also adds a safety net for light pills/badges in dark mode.
   ========================================================== */

html[data-theme="dark"] .trust-row span,
html[data-theme="dark"] .trust-row .pill,
html[data-theme="dark"] .hero-copy .pill,
html[data-theme="dark"] .hero .pill,
html[data-theme="dark"] .info-pill,
html[data-theme="dark"] .feature-pill,
html[data-theme="dark"] .badge,
html[data-theme="dark"] .tag,
html[data-theme="dark"] .chip {
  background: #2a231f !important;
  color: #fff3dc !important;
  border: 1px solid #5a4a3f !important;
  text-shadow: none !important;
  box-shadow: none;
}

html[data-theme="dark"] .trust-row span:hover,
html[data-theme="dark"] .trust-row .pill:hover,
html[data-theme="dark"] .hero-copy .pill:hover,
html[data-theme="dark"] .hero .pill:hover,
html[data-theme="dark"] .info-pill:hover,
html[data-theme="dark"] .feature-pill:hover,
html[data-theme="dark"] .badge:hover,
html[data-theme="dark"] .tag:hover,
html[data-theme="dark"] .chip:hover {
  background: #342b25 !important;
  color: #ffffff !important;
  border-color: #746255 !important;
}

/* If any top badge is meant to be highlighted, keep it readable:
   gold background must always use dark text.
*/
html[data-theme="dark"] .trust-row span.highlight,
html[data-theme="dark"] .trust-row .pill.highlight,
html[data-theme="dark"] .badge.highlight,
html[data-theme="dark"] .tag.highlight,
html[data-theme="dark"] .chip.highlight {
  background: #ffd978 !important;
  color: #160f0a !important;
  border-color: #ffd978 !important;
}

/* Safety net for Bootstrap-like / generated light classes in dark mode */
html[data-theme="dark"] .bg-light,
html[data-theme="dark"] .bg-white,
html[data-theme="dark"] .light-pill,
html[data-theme="dark"] .white-pill {
  background: #2a231f !important;
  color: #fff3dc !important;
  border-color: #5a4a3f !important;
}

/* Safety net for pale grey rounded labels that inherit bad text color */
html[data-theme="dark"] [class*="pill"],
html[data-theme="dark"] [class*="badge"],
html[data-theme="dark"] [class*="tag"],
html[data-theme="dark"] [class*="chip"] {
  text-shadow: none !important;
}

/* Keep stock pills using their specific accessible colors from previous patches */
html[data-theme="dark"] .stock-pill.in_stock {
  background: #153323 !important;
  color: #bdf4d1 !important;
  border-color: #24543a !important;
}

html[data-theme="dark"] .stock-pill.low_stock,
html[data-theme="dark"] .stock-pill.preorder {
  background: #3a2b12 !important;
  color: #ffe1a1 !important;
  border-color: #6a5120 !important;
}

html[data-theme="dark"] .stock-pill.substitution {
  background: #272040 !important;
  color: #d8ccff !important;
  border-color: #463a73 !important;
}

html[data-theme="dark"] .stock-pill.unavailable {
  background: #3a171d !important;
  color: #ffb8c0 !important;
  border-color: #71303a !important;
}

/* Keep category pills readable but calm */
html[data-theme="dark"] .category-pill {
  background: #2b2520 !important;
  color: #fff2d7 !important;
  border-color: #4a3f36 !important;
}


/* ==========================================================
   GranViaGo brand refresh
   Uses the selected logo and its corporate palette:
   charcoal, warm gold, and Madrid red.
   Dark mode is now the default unless the visitor changes it.
   ========================================================== */

:root {
  --bg: #fff8ef;
  --paper: #ffffff;
  --ink: #1c2024;
  --muted: #6f6257;
  --line: #eadfd3;
  --accent: #cf1f2b;
  --accent-dark: #a91420;
  --gold: #c99732;
  --gold-bright: #ffd978;
  --soft: #f7eadc;
  --shadow: 0 24px 60px rgba(28, 32, 36, 0.14);
  --radius: 24px;
}

html[data-theme="dark"] {
  --bg: #0f0f0e;
  --paper: #1a1715;
  --ink: #f9f2e8;
  --muted: #d5c6b6;
  --line: #3d332b;
  --accent: #e12b38;
  --accent-dark: #ff596d;
  --gold: #d4a84d;
  --gold-bright: #ffd978;
  --soft: #241f1b;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.46);
}

.brand-with-logo {
  gap: 0.78rem;
}

.brand-logo {
  display: block;
  width: clamp(75px, 9vw, 115px);
  height: auto;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255,255,255,0.96);
  padding: 0.34rem 0.5rem;
  border: 1px solid rgba(201,151,50,0.28);
  box-shadow: 0 10px 28px rgba(28, 32, 36, 0.08);
}

.brand-text {
  display: none;
}

html[data-theme="dark"] .brand-logo {
  background: rgba(255,255,255,0.96);
  border-color: rgba(255,217,120,0.36);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.brand-mark {
  background: linear-gradient(135deg, var(--gold), var(--accent));
  color: #160f0a;
}

.top-strip {
  background: linear-gradient(90deg, #151515, #2a1b16, #151515);
  color: #fff5df;
}

html[data-theme="light"] .top-strip {
  background: linear-gradient(90deg, #1c2024, #3b241f, #1c2024);
  color: #fff5df;
}

.primary-button,
html[data-theme="dark"] .primary-button,
html[data-theme="dark"] button.primary-button,
html[data-theme="dark"] a.primary-button {
  background: linear-gradient(135deg, var(--gold-bright), #f2b44f) !important;
  color: #160f0a !important;
  border-color: transparent !important;
}

.secondary-button,
.cart-button,
.theme-toggle,
.ghost-button,
.tab-button {
  border-color: rgba(201,151,50,0.32);
}

.price,
.eyebrow {
  color: var(--gold);
}

html[data-theme="dark"] .price,
html[data-theme="dark"] .eyebrow {
  color: var(--gold-bright);
}

html[data-theme="dark"] .hero {
  background:
    radial-gradient(circle at top left, rgba(212,168,77,0.16), transparent 31rem),
    radial-gradient(circle at 65% 20%, rgba(225,43,56,0.12), transparent 26rem);
}

html[data-theme="dark"] .site-header {
  background: rgba(15, 15, 14, 0.93);
}

html[data-theme="dark"] .product-card,
html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .steps article,
html[data-theme="dark"] .info-band,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .side-panel,
html[data-theme="dark"] .admin-list-item,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .admin-login-panel,
html[data-theme="dark"] .location-card,
html[data-theme="dark"] .address-box {
  border-color: rgba(212,168,77,0.18);
}

html[data-theme="dark"] .trust-row span,
html[data-theme="dark"] .trust-row .pill,
html[data-theme="dark"] .category-pill {
  background: #2a231f !important;
  color: #fff3dc !important;
  border-color: #5b4b3e !important;
}

/* Header responsiveness with the real logo */
@media (max-width: 760px) {
  .brand-logo {
    width: 90px;
    padding: 0.28rem 0.42rem;
  }

  .nav {
    gap: 0.75rem;
  }
}

@media (max-width: 520px) {
  .brand-logo {
    width: 82px;
  }
}


/* Logo card/crop fix */
.brand-logo {
  width: clamp(95px, 10vw, 145px) !important;
  background: rgba(255,255,255,0.98) !important;
  padding: 5px 7px 10px !important;
  border-radius: 10px !important;
  border: 1px solid rgba(201,151,50,0.22) !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18) !important;
  object-fit: contain !important;
}

html[data-theme="dark"] .brand-logo {
  background: rgba(255,255,255,0.98) !important;
  border-color: rgba(255,217,120,0.28) !important;
}

@media (max-width: 760px) {
  .brand-logo {
    width: 105px !important;
    padding: 4px 6px 9px !important;
    border-radius: 9px !important;
  }
}

@media (max-width: 520px) {
  .brand-logo {
    width: 96px !important;
    padding: 4px 6px 9px !important;
    border-radius: 9px !important;
  }
}

/* ==========================================================
   FINAL GranViaGo logo size + crop/card fix
   Added after all previous logo rules so this one wins.
   ========================================================== */

.brand-logo {
  width: clamp(76px, 8vw, 116px) !important;
  height: auto !important;

  /* Keep only a tiny white backing for dark-mode contrast */
  background: rgba(255,255,255,0.96) !important;
  padding: 2px 3px 7px !important;

  /* Remove the heavy card look */
  border: 0 !important;
  border-radius: 6px !important;
  box-shadow: none !important;

  object-fit: contain !important;
  object-position: center !important;
}

html[data-theme="dark"] .brand-logo {
  background: rgba(255,255,255,0.96) !important;
  border: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 760px) {
  .brand-logo {
    width: 84px !important;
    padding: 2px 3px 7px !important;
    border-radius: 6px !important;
  }
}

@media (max-width: 520px) {
  .brand-logo {
    width: 78px !important;
    padding: 2px 3px 7px !important;
    border-radius: 6px !important;
  }
}
