:root {
  --bg: #faf8f5;
  --surface: #ffffff;
  --surface-soft: #f5f0eb;
  --text: #1c120a;
  --text-muted: #7a6558;
  --primary: #1c120a;
  --secondary: #c9971a;
  --accent: #7b2d3b;
  --ring: rgba(201, 151, 26, 0.22);
  --shadow: 0 16px 42px rgba(28, 18, 10, 0.12);
}

body[data-theme='cobalt'] {
  --primary: #1f2a44;
  --secondary: #2e8bff;
  --accent: #7b2d3b;
}

body[data-theme='mono'] {
  --primary: #2f343a;
  --secondary: #7f8c8d;
  --ring: rgba(127, 140, 141, 0.2);
  --accent: #555;
}

body.theme-dark {
  --bg: #241a14;
  --surface: #2f231c;
  --surface-soft: #3a2d25;
  --text: #faf4ee;
  --text-muted: #d4c4b6;
  --primary: #faf4ee;
  --secondary: #e0b84d;
  --accent: #d48494;
  --shadow: 0 16px 42px rgba(0, 0, 0, 0.4);
}

/* Keep nav/hero gradients dark while --primary is used for readable body text */
body.theme-dark .glass-nav {
  background: linear-gradient(
    105deg,
    #2a1e14 0%,
    color-mix(in srgb, #2a1e14 78%, var(--accent)) 52%,
    color-mix(in srgb, #2a1e14 65%, var(--secondary)) 100%
  );
}

/* Bootstrap + utility contrast in dark mode */
body.theme-dark .text-dark,
body.theme-dark .text-body {
  color: var(--text) !important;
}

body.theme-dark .text-muted {
  color: var(--text-muted) !important;
}

body.theme-dark .text-secondary {
  color: var(--text-muted) !important;
}

body.theme-dark .bg-white,
body.theme-dark .table.bg-white {
  background-color: var(--surface) !important;
  color: var(--text);
}

body.theme-dark .bg-light {
  background-color: var(--surface-soft) !important;
  color: var(--text);
}

body.theme-dark .table {
  --bs-table-bg: var(--surface);
  --bs-table-color: var(--text);
  --bs-table-border-color: color-mix(in srgb, var(--text) 14%, transparent);
  color: var(--text);
}

body.theme-dark .table-bordered > :not(caption) > * {
  border-color: color-mix(in srgb, var(--text) 14%, transparent);
}

body.theme-dark .form-control,
body.theme-dark .form-select {
  background-color: var(--surface-soft);
  color: var(--text);
  border-color: color-mix(in srgb, var(--text) 18%, transparent);
}

body.theme-dark .form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}

body.theme-dark .form-control:focus,
body.theme-dark .form-select:focus {
  background-color: var(--surface-soft);
  color: var(--text);
  border-color: var(--secondary);
  box-shadow: 0 0 0 0.2rem var(--ring);
}

body.theme-dark .modal-content {
  background-color: var(--surface);
  color: var(--text);
}

body.theme-dark .modal-header,
body.theme-dark .modal-footer {
  border-color: color-mix(in srgb, var(--text) 12%, transparent);
}

body.theme-dark .btn-close {
  filter: invert(1) grayscale(1);
  opacity: 0.75;
}

body.theme-dark .alert {
  color: var(--text);
}

body.theme-dark .flash-stack .alert .btn-close {
  filter: invert(1) grayscale(1);
}

body.theme-dark .service-card,
body.theme-dark .ethos-card,
body.theme-dark .contact-card {
  color: var(--text);
}

body.theme-dark .cart-table td[data-label]::before {
  color: var(--text-muted);
}

body.theme-dark .catalog-product-card {
  background: var(--surface);
  color: var(--text);
}

body.theme-dark .catalog-product-card .catalog-description {
  color: var(--text-muted);
}

body.theme-dark .btn-brand-ghost {
  color: var(--text) !important;
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--surface) 92%, white),
    color-mix(in srgb, var(--surface-soft) 88%, white)
  );
  border-color: color-mix(in srgb, var(--text) 35%, transparent);
}

body.theme-dark .btn-brand-ghost:hover {
  color: var(--text) !important;
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--surface) 98%, white),
    color-mix(in srgb, var(--surface-soft) 94%, white)
  );
}

body.theme-dark .btn-outline-secondary {
  color: var(--text);
  border-color: color-mix(in srgb, var(--text) 32%, transparent);
}

body.theme-dark .btn-outline-secondary:hover {
  color: var(--text);
  background-color: color-mix(in srgb, var(--text) 10%, transparent);
  border-color: color-mix(in srgb, var(--text) 42%, transparent);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Georgia', 'Trebuchet MS', 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.glass-nav {
  background: linear-gradient(
    105deg,
    var(--primary) 0%,
    color-mix(in srgb, var(--primary) 78%, var(--accent)) 52%,
    color-mix(in srgb, var(--primary) 65%, var(--secondary)) 100%
  );
  box-shadow: 0 4px 24px rgba(28, 18, 10, 0.45);
  border-bottom: 1px solid rgba(201, 151, 26, 0.28);
}

.nav-link-icon {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
}

.nav-link-icon i {
  opacity: 0.88;
  font-size: 1.05rem;
}

/* Navbar sign-out: button styled like other nav links */
.nav-link-btn {
  color: inherit;
  cursor: pointer;
  padding: 0.5rem 1rem;
  text-align: left;
}

.nav-link-btn:hover,
.nav-link-btn:focus {
  color: inherit;
  opacity: 0.9;
}

.nav-utility-group {
  display: flex;
  gap: 0.55rem 0.7rem;
  justify-content: flex-end;
  align-items: center;
}

.nav-utility-group form {
  margin: 0;
}

.nav-utility-group .btn,
.nav-utility-group .form-select {
  white-space: nowrap;
}

.nav-utility-group .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding-inline: 0.85rem;
  line-height: 1.2;
}

.theme-picker {
  min-width: 132px;
}

/* Keep Bootstrap collapse behavior explicit on smaller screens. */
@media (max-width: 991.98px) {
  .navbar-toggler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .navbar-collapse {
    display: none !important;
    width: 100%;
  }

  .navbar-collapse.show {
    display: block !important;
  }

  .navbar-nav {
    padding-top: 0.6rem;
    gap: 0.15rem;
  }

  .nav-utility-group {
    margin-top: 0.8rem;
    justify-content: flex-start;
  }

  .theme-picker {
    min-width: 140px;
  }

  .shop-filter-grid .form-control,
  .shop-filter-grid .form-select {
    width: 100%;
  }

  .shop-filter-actions {
    justify-content: flex-end;
  }
}

@media (max-width: 575.98px) {
  .hero-slab .display-6 {
    font-size: 1.6rem;
    line-height: 1.2;
  }
}

.admin-footer {
  background: var(--surface-soft);
  border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  margin-top: 3rem;
}

.footer-credit {
  margin: 0;
  opacity: 0.72;
  font-size: 0.75rem;
}

.admin-links {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.95rem;
  align-items: center;
  justify-content: flex-end;
}

.admin-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.45px;
  text-transform: lowercase;
  opacity: 0.62;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.admin-link:hover,
.admin-link:focus-visible {
  color: var(--secondary);
  opacity: 1;
  text-decoration: underline;
}

@media (max-width: 575.98px) {
  .admin-footer .row {
    gap: 0.45rem;
  }

  .admin-footer .col-auto {
    width: 100%;
    text-align: center;
  }

  .admin-links {
    justify-content: center;
  }
}

@media (min-width: 992px) {
  .nav-utility-group {
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
  }
}

.navbar-brand,
.nav-link {
  letter-spacing: 0.2px;
}

.site-shell {
  max-width: 1280px;
  margin: 2rem auto 3rem;
  padding: 0 1.5rem;
}

@media (max-width: 991.98px) {
  .site-shell {
    margin: 1.1rem auto 2rem;
    padding: 0 0.8rem;
  }
}

.page-panel {
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
}

@media (min-width: 768px) {
  .page-panel {
    padding: 2.5rem 3rem;
  }
}

@media (max-width: 767.98px) {
  .page-panel {
    border-radius: 16px;
    padding: 1rem;
  }
}

.page-title {
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.35px;
}

.hero-slab {
  position: relative;
  border-radius: 24px;
  padding: 2.6rem 2.2rem;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #1c120a 0%, #3a1e10 55%, #5c2d1a 100%);
}

@media (max-width: 991.98px) {
  .hero-slab {
    padding: 1.5rem 1.1rem;
    border-radius: 18px;
  }
}

.hero-slab::after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  right: -50px;
  top: -70px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.storefront-hero::before {
  content: '';
  position: absolute;
  inset: auto auto 18px 18px;
  width: 140px;
  height: 140px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  transform: rotate(18deg);
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

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

@media (max-width: 991.98px) {
  .hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }
}

@media (max-width: 575.98px) {
  .hero-stats {
    grid-template-columns: 1fr;
  }
}

.hero-stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
}

.hero-stat-card strong {
  font-size: 1.4rem;
}

.hero-stat-card span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
}

.hero-image-stack {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 991.98px) {
  .hero-image-stack {
    grid-template-columns: 1fr;
  }
}

.hero-image-stack img:first-child {
  grid-row: span 2;
  height: 100%;
  min-height: 390px;
}

@media (max-width: 991.98px) {
  .hero-image-stack img:first-child {
    grid-row: auto;
    min-height: 240px;
  }
}

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

@media (max-width: 767.98px) {
  .section-heading-row {
    align-items: flex-start;
  }
}

.section-kicker {
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.feature-lift-card {
  min-height: 180px;
}

.featured-product-card {
  overflow: hidden;
}

.featured-product-image {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 14px;
}

.featured-price {
  font-weight: 800;
  color: var(--primary);
}

.size-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--secondary) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--secondary) 28%, transparent);
  font-size: 0.78rem;
  font-weight: 700;
}

.storefront-contact-info {
  background: linear-gradient(180deg, var(--surface-soft), color-mix(in srgb, var(--secondary) 10%, var(--surface)));
}

.contact-detail-list {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.2rem;
}

.contact-detail-list div {
  display: grid;
  gap: 0.15rem;
}

.contact-detail-list strong {
  color: var(--primary);
}

.inventory-card {
  height: 100%;
}

.inventory-card-image {
  width: 100%;
}

.inventory-purchase-form {
  margin-top: 0.75rem;
}

.inventory-control-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.inventory-inline-label {
  min-width: 72px;
  margin-bottom: 0;
}

.inventory-inline-select {
  width: auto;
  min-width: 110px;
  flex: 0 1 180px;
}

.inventory-quantity-input {
  width: 82px;
}

.inventory-shop-card .inventory-add-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(145deg, #b9165e 0%, #7b1538 55%, #5c102c 100%);
  color: #fff;
  font-weight: 700;
  border: none;
  box-shadow: 0 6px 18px rgba(123, 45, 59, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.inventory-shop-card .inventory-add-btn:hover:not(:disabled) {
  background: linear-gradient(145deg, #c91d68 0%, #8a1740 50%, #6e1435 100%);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(123, 45, 59, 0.42);
}

.inventory-shop-card .inventory-add-btn:disabled {
  opacity: 0.55;
}

/* Shop header — same row layout on all viewports; wraps naturally on narrow screens */
.shop-shell .shop-catalog-header {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem 1rem;
}

.shop-shell .shop-page-title {
  color: #fff;
  text-align: left;
  width: auto;
  flex: 0 1 auto;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.shop-shell .catalog-filters label,
.shop-shell .catalog-filters .text-light-emphasis,
.shop-shell .catalog-filters label.small {
  color: #fff !important;
  font-weight: 700;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

/* Shop page: balanced image + description (split row on wider screens) */
.shop-shell .catalog-product-grid {
  grid-template-columns: 1fr;
  max-width: min(1040px, 100%);
  margin-inline: auto;
}

.shop-shell .catalog-card.catalog-product-card {
  cursor: default;
}

/* Shop cards: image + details side-by-side on every screen size (scaled, not stacked) */
.shop-shell .shop-card-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 0;
}

.shop-shell .shop-product-media {
  background: #e8ecf0;
  flex: 0 0 40%;
  max-width: 40%;
  min-width: 0;
  min-height: 160px;
  line-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-shell .shop-product-media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

.shop-shell .shop-product-media .shop-product-image,
.shop-shell .shop-product-media img.shop-product-image {
  width: 100%;
  height: auto;
  max-height: min(38vh, 360px);
  object-fit: contain;
  display: block;
}

.shop-shell .shop-card-copy {
  flex: 1 1 60%;
  max-width: 60%;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.shop-shell .shop-card-copy .catalog-description {
  font-size: 0.95rem;
  line-height: 1.45;
  max-height: 10.5rem;
  overflow-y: auto;
}

.shop-shell .shop-card-copy .catalog-price {
  font-size: 1.65rem;
}

@media (min-width: 768px) {
  .shop-shell .shop-product-media,
  .shop-shell .shop-product-media--empty {
    flex: 0 0 46%;
    max-width: 46%;
    min-height: min(44vh, 420px);
  }

  .shop-shell .shop-card-copy {
    flex: 1 1 54%;
    max-width: 54%;
  }

  .shop-shell .shop-product-media .shop-product-image,
  .shop-shell .shop-product-media img.shop-product-image {
    max-height: min(48vh, 440px);
  }

  .shop-shell .inventory-purchase-form {
    margin-top: auto;
  }
}

.cart-table-wrap {
  border-radius: 14px;
  overflow: hidden;
}

.cart-table {
  margin-bottom: 0;
}

.cart-product-cell {
  min-width: 180px;
}

.cart-quantity-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cart-quantity-input {
  width: 76px;
}

.service-card,
.ethos-card,
.contact-card {
  border: 1px solid color-mix(in srgb, var(--secondary) 24%, transparent);
  background: var(--surface-soft);
  border-radius: 16px;
  padding: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover,
.ethos-card:hover,
.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px var(--ring);
}

.brand-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
}

.brand-image-grid img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
}

.catalog-shell {
  background: linear-gradient(145deg, #1c120a 0%, #3a1e10 60%, #5c2d1a 100%);
  border-radius: 24px;
  padding: 1.4rem;
  color: #ffffff;
  box-shadow: 0 24px 48px rgba(28, 18, 10, 0.45);
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.catalog-date-section {
  margin-top: 1.2rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 1rem;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.9rem;
}

.catalog-product-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.catalog-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.28);
  transform: translateY(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.catalog-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 14px 30px rgba(32, 15, 63, 0.48);
}

.catalog-card img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
}

.catalog-product-card {
  background: rgba(255, 255, 255, 0.94);
  color: #122033;
}

.catalog-product-card img {
  height: 320px;
}

.catalog-product-body {
  padding: 1rem 1rem 1.1rem;
}

.catalog-description {
  color: #334a63;
  line-height: 1.45;
  min-height: 48px;
}

.catalog-price {
  font-size: 2rem;
  font-weight: 800;
  color: #0f2239;
}

.catalog-meta {
  position: absolute;
  inset: auto 0 0 0;
  background: linear-gradient(to top, rgba(10, 7, 17, 0.96), rgba(10, 7, 17, 0.42));
  color: #f8fbff;
  font-size: 0.8rem;
  padding: 0.95rem 0.7rem 0.65rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.catalog-card:hover .catalog-meta {
  opacity: 1;
  transform: translateY(0);
}

.badge-count {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(27, 18, 55, 0.72);
  color: #f8fbff;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.82rem;
}

.modal-gallery {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 12, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1050;
  padding: 1.2rem;
}

.modal-gallery.open {
  display: flex;
}

.modal-gallery-content {
  max-width: min(1000px, 92vw);
  max-height: 86vh;
  border-radius: 14px;
  overflow: hidden;
  animation: zoomIn 0.25s ease;
}

.modal-gallery-content img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(21, 23, 36, 0.88);
  color: #f8fbff;
  font-size: 1.2rem;
}

.storefront-hero .lead {
  max-width: 36rem;
}

.float-in {
  animation: floatIn 0.65s ease both;
}

.float-in.delay-1 {
  animation-delay: 0.08s;
}

.float-in.delay-2 {
  animation-delay: 0.16s;
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .site-shell {
    margin-top: 1rem;
    padding: 0 0.75rem;
  }

  .page-panel,
  .catalog-shell {
    padding: 1rem;
    border-radius: 18px;
  }

  .navbar .container {
    align-items: flex-start;
  }

  .nav-utility-group {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-utility-group > * {
    flex: 0 0 auto;
  }

  .theme-picker {
    width: 100%;
    min-width: 0;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .storefront-hero .display-5 {
    font-size: 2.1rem;
    line-height: 1.15;
  }

  .storefront-hero .lead {
    font-size: 1rem;
    max-width: none;
  }

  .hero-image-stack {
    grid-template-columns: 1fr;
  }

  .hero-image-stack img:first-child {
    min-height: 240px;
  }

  .hero-slab {
    padding: 1.4rem;
  }

  .featured-product-image {
    height: 220px;
  }

  .catalog-header {
    align-items: flex-start;
  }

  .catalog-header > div:last-child {
    width: 100%;
    justify-content: space-between;
  }

  .catalog-price {
    font-size: 1.5rem;
  }

  .modal-gallery {
    padding: 0.75rem;
  }

  .modal-gallery-content {
    max-width: 100%;
    max-height: 82vh;
    border-radius: 12px;
  }

  .modal-close {
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
  }

  .inventory-control-group {
    align-items: stretch;
  }

  .inventory-inline-label {
    min-width: auto;
    width: 100%;
  }

  .inventory-inline-select,
  .inventory-quantity-input {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }

  .cart-quantity-form {
    align-items: stretch;
  }

  .cart-quantity-input {
    width: 100%;
  }

  .cart-table {
    font-size: 0.92rem;
  }

  .cart-table thead {
    display: none;
  }

  .cart-table,
  .cart-table tbody,
  .cart-table tr,
  .cart-table td {
    display: block;
    width: 100%;
  }

  .cart-table tr {
    background: #fff;
    border: 1px solid rgba(18, 32, 51, 0.14);
    border-radius: 12px;
    padding: 0.55rem 0.65rem;
    margin-bottom: 0.75rem;
  }

  .cart-table td {
    border: 0;
    padding: 0.3rem 0.2rem;
  }

  .cart-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #566070;
    margin-bottom: 0.1rem;
  }

  .cart-table tfoot,
  .cart-table tfoot tr,
  .cart-table tfoot td {
    display: block;
    width: 100%;
    border: 0;
    padding: 0.2rem 0;
  }

  .cart-table tfoot tr {
    margin-top: 0.2rem;
  }

  .catalog-card img {
    height: 200px;
  }

  .catalog-product-card img {
    height: 250px;
  }

  .shop-shell .catalog-card img,
  .shop-shell .catalog-product-card img {
    height: auto;
  }
}

@media (max-width: 576px) {
  .storefront-hero .display-5 {
    font-size: 1.8rem;
  }

  .hero-stat-card strong {
    font-size: 1.2rem;
  }

  .section-heading-row {
    align-items: flex-start;
  }

  .brand-image-grid {
    grid-template-columns: 1fr;
  }

  .brand-image-grid img {
    height: 220px;
  }

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

  .catalog-card img,
  .catalog-product-card img {
    height: 220px;
  }

  .shop-shell .catalog-card img,
  .shop-shell .catalog-product-card img {
    height: auto;
  }
}

/* ============================================================
   HYBRID BOUTIQUE DESIGN — NEW COMPONENTS
   ============================================================ */

/* --- Support FAB (WhatsApp + AI chat) --- */
.kistie-support-stack {
  position: fixed;
  bottom: 1.35rem;
  right: 1.25rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.65rem;
}

.kistie-fab-toggle {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(145deg, var(--secondary), color-mix(in srgb, var(--accent) 55%, var(--secondary)));
  color: var(--primary);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kistie-fab-toggle:hover {
  transform: scale(1.06);
}

.kistie-fab-menu {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 168px;
}

.kistie-fab-menu[hidden] {
  display: none !important;
}

.kistie-fab-action {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

.kistie-fab-action--wa {
  background: #25d366;
  color: #0a3d1e;
  border-color: transparent;
}

.kistie-fab-action--chat {
  background: var(--surface-soft);
}

.kistie-chat-window {
  display: none;
  flex-direction: column;
  width: min(340px, calc(100vw - 2rem));
  max-height: min(420px, 70vh);
  background: var(--surface);
  color: var(--text);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}

.kistie-chat-window.open {
  display: flex;
}

.kistie-chat-header {
  background: linear-gradient(105deg, var(--primary), color-mix(in srgb, var(--accent) 40%, var(--primary)));
  color: #fff;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kistie-chat-header button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}

.kistie-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  min-height: 200px;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.kc-msg {
  max-width: 82%;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.4;
  word-break: break-word;
}

.kc-msg.bot {
  background: color-mix(in srgb, var(--secondary) 22%, var(--surface));
  color: var(--text);
  align-self: flex-start;
}

.kc-msg.user {
  background: var(--secondary);
  color: var(--primary);
  align-self: flex-end;
}

.kc-msg.typing {
  color: var(--text-muted);
  font-style: italic;
}

.kistie-chat-form {
  display: flex;
  border-top: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  background: var(--surface);
}

.kistie-chat-form input {
  flex: 1;
  border: none;
  padding: 0.6rem 0.75rem;
  font-size: 0.875rem;
  outline: none;
  background: var(--surface);
  color: var(--text);
}

.kistie-chat-form button {
  background: var(--secondary);
  color: var(--primary);
  border: none;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  font-size: 1rem;
}

.shop-results-root--loading {
  opacity: 0.55;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

@media (max-width: 575.98px) {
  .kistie-support-stack {
    bottom: 1rem;
    right: 0.75rem;
  }

  .kistie-fab-toggle {
    width: 50px;
    height: 50px;
  }
}

/* --- Text-based Category Tiles (no images needed) --- */
.category-text-tile {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--secondary) 30%, transparent);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-text-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px var(--ring);
  border-color: var(--secondary);
}

.category-text-tile-inner {
  background: var(--surface-soft);
  padding: 1.4rem 1rem 1.2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.category-tile-icon {
  font-size: 2rem;
  margin-bottom: 0.2rem;
  line-height: 1;
}

.category-tile-icon.bi {
  font-size: 2.35rem;
  color: var(--accent);
}

.category-text-tile-inner h3 {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
}

.category-text-tile-inner span {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* --- Collection photo tiles (kept for when real images are added) --- */
.collection-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

@media (max-width: 768px) {
  .collection-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px) {
  .collection-tiles {
    grid-template-columns: 1fr 1fr;
  }
}

.collection-tile {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 3/4;
  cursor: pointer;
  background: #2a1a10;
  text-decoration: none;
}

.collection-tile-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}

.collection-tile:hover .collection-tile-bg {
  transform: scale(1.05);
}

.collection-tile-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28, 18, 10, 0.88) 0%, rgba(28, 18, 10, 0.18) 55%);
}

.collection-tile-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.1rem 1rem 0.9rem;
  color: #fff;
}

.collection-tile-label h3 {
  font-size: 1rem;
  font-weight: 800;
  margin: 0 0 0.2rem;
  letter-spacing: 0.3px;
}

.collection-tile-label span {
  font-size: 0.78rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Placeholder tile colors */
.collection-tile.workwear .collection-tile-bg { background-color: #3d2b1f; }
.collection-tile.occasion .collection-tile-bg { background-color: #5c2d1a; }
.collection-tile.sets .collection-tile-bg { background-color: #4a2416; }
.collection-tile.statement .collection-tile-bg { background-color: #6b3020; }

/* --- How to Order Steps --- */
.how-to-section {
  background: #1c120a;
  border-radius: 20px;
  padding: 2rem 1.5rem;
  color: #f5ede5;
}

.how-to-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 1.5rem;
}

@media (max-width: 768px) {
  .how-to-steps {
    grid-template-columns: 1fr;
  }
}

.how-to-step {
  text-align: center;
  padding: 1.2rem;
  border-radius: 14px;
  background: rgba(201, 151, 26, 0.1);
  border: 1px solid rgba(201, 151, 26, 0.22);
}

.how-to-step-num {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--secondary);
  color: #1c120a;
  font-weight: 900;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.8rem;
}

.how-to-step h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: #f5ede5;
}

.how-to-step p {
  font-size: 0.85rem;
  opacity: 0.82;
  margin: 0;
  color: #e0cfc4;
}

/* --- Trust Signal Strips --- */
.trust-strip {
  display: flex;
  gap: 0;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--secondary) 28%, transparent);
}

.trust-strip-item {
  flex: 1;
  padding: 1.1rem 0.9rem;
  text-align: center;
  background: var(--surface-soft);
  border-right: 1px solid color-mix(in srgb, var(--secondary) 18%, transparent);
  transition: background 0.2s ease;
}

.trust-strip-item:last-child {
  border-right: none;
}

.trust-strip-item:hover {
  background: color-mix(in srgb, var(--secondary) 10%, var(--surface));
}

.trust-strip-icon {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
  display: block;
}

.trust-strip-item strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.15rem;
}

.trust-strip-item span {
  font-size: 0.79rem;
  color: var(--text-muted);
}

@media (max-width: 576px) {
  .trust-strip {
    flex-direction: column;
  }
  .trust-strip-item {
    border-right: none;
    border-bottom: 1px solid color-mix(in srgb, var(--secondary) 18%, transparent);
  }
  .trust-strip-item:last-child {
    border-bottom: none;
  }
}

/* --- Client Proof / Social Proof Section --- */
.client-proof-section {
  background: var(--surface-soft);
  border-radius: 20px;
  padding: 1.8rem 1.5rem;
  border: 1px solid color-mix(in srgb, var(--secondary) 20%, transparent);
}

.client-proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.2rem;
}

@media (max-width: 576px) {
  .client-proof-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.client-proof-card {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: color-mix(in srgb, var(--secondary) 12%, var(--surface));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-proof-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.client-proof-placeholder {
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
}

/* --- Urgency / Badge Pill --- */
.urgency-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.8rem;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  animation: pulse-badge 2.2s ease infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.78; }
}

/* --- Editorial Product Card Upgrade --- */
.featured-product-card .featured-price {
  background: var(--secondary);
  color: #1c120a;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.9rem;
}

/* --- Navbar WhatsApp Link --- */
.nav-wa-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #25d366 !important;
  font-weight: 700;
  font-size: 0.85rem;
}

.nav-wa-link:hover {
  opacity: 0.85;
}

/* --- Section divider gold line --- */
.gold-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--secondary), transparent);
  border: none;
  margin: 0.1rem 0;
  opacity: 0.6;
}

/* --- Hero eyebrow upgrade --- */
.hero-slab .eyebrow-pill {
  background: rgba(201, 151, 26, 0.18);
  border-color: rgba(201, 151, 26, 0.38);
}

/* --- Branded gradient buttons (CSS3) --- */
.btn-brand-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.35rem;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  color: #1c120a !important;
  background: linear-gradient(145deg, #f0d78c 0%, var(--secondary) 45%, #a67c12 100%);
  box-shadow: 0 6px 20px rgba(201, 151, 26, 0.42);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-brand-primary:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(201, 151, 26, 0.5);
}

.btn-brand-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1.35rem;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  color: #fff !important;
  background: linear-gradient(145deg, #9c2745 0%, var(--accent) 48%, #4a1520 100%);
  box-shadow: 0 6px 18px rgba(123, 45, 59, 0.38);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-brand-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(123, 45, 59, 0.48);
  color: #fff !important;
}

.btn-brand-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 1rem;
  font-weight: 600;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  color: #1c120a !important;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.76));
  backdrop-filter: blur(6px);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-brand-ghost:hover {
  border-color: rgba(255, 255, 255, 0.95);
  background: linear-gradient(160deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.86));
  color: #1c120a !important;
}

.btn-brand-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.35rem;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  color: #062e14 !important;
  background: linear-gradient(145deg, #5cef8f 0%, #25d366 48%, #128c7e 100%);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.38);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-brand-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.48);
  color: #062e14 !important;
}

/* PDP / shop shell: white label on WhatsApp green for WCAG contrast */
.pdp-shell .btn-brand-whatsapp,
.shop-shell .btn-brand-whatsapp {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.pdp-shell .btn-brand-whatsapp:hover,
.shop-shell .btn-brand-whatsapp:hover {
  color: #ffffff !important;
}

.shop-instagram-card {
  background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%);
  min-height: 140px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.shop-instagram-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.btn-brand-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 999px;
  border: 2px solid color-mix(in srgb, var(--accent) 55%, var(--text));
  color: var(--accent) !important;
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--accent) 8%, var(--surface)));
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.btn-brand-outline:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(123, 45, 59, 0.18);
  color: var(--accent) !important;
}

body.theme-dark .btn-brand-primary {
  color: #1c120a !important;
}

/* --- Flash messages --- */
.flash-stack .flash-alert {
  border: none;
  border-radius: 14px;
  border-left: 4px solid transparent;
}

.flash-stack .alert-success {
  border-left-color: #198754;
  background: linear-gradient(90deg, rgba(25, 135, 84, 0.12), var(--surface));
}

.flash-stack .alert-danger {
  border-left-color: #dc3545;
  background: linear-gradient(90deg, rgba(220, 53, 69, 0.12), var(--surface));
}

.flash-stack .alert-warning {
  border-left-color: #ffc107;
  background: linear-gradient(90deg, rgba(255, 193, 7, 0.18), var(--surface));
}

.flash-stack .alert-info {
  border-left-color: #0dcaf0;
  background: linear-gradient(90deg, rgba(13, 202, 240, 0.14), var(--surface));
}

.flash-alert__icon {
  font-size: 1.25rem;
  margin-top: 0.1rem;
}

body.theme-dark .flash-stack .alert-success {
  background: linear-gradient(90deg, rgba(25, 135, 84, 0.22), var(--surface));
}

body.theme-dark .flash-stack .alert-danger {
  background: linear-gradient(90deg, rgba(220, 53, 69, 0.18), var(--surface));
}

body.theme-dark .flash-stack .alert-warning {
  background: linear-gradient(90deg, rgba(255, 193, 7, 0.12), var(--surface));
}

body.theme-dark .flash-stack .alert-info {
  background: linear-gradient(90deg, rgba(13, 202, 240, 0.14), var(--surface));
}

/* --- Bootstrap modal polish --- */
.modal-content.modal-brand {
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--secondary);
}

.modal-brand .modal-header {
  background: linear-gradient(105deg, color-mix(in srgb, var(--primary) 12%, var(--surface)), var(--surface-soft));
  border-bottom: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}

.modal-brand .modal-footer {
  border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  background: var(--surface-soft);
}

/* --- Terms: table of contents --- */
.terms-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--surface-soft), color-mix(in srgb, var(--secondary) 12%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
}

.terms-toc a {
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  color: var(--primary);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--text) 10%, transparent);
}

.terms-toc a:hover {
  border-color: var(--secondary);
}

.terms-section[id],
.contact-card[id] {
  scroll-margin-top: 5.5rem;
}

/* --- Mobile readability: phones (Bootstrap xs) --- */
@media (max-width: 575.98px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    font-size: 1rem;
    line-height: 1.55;
  }

  .site-shell {
    margin: 0.85rem auto 1.75rem;
    padding: 0 1rem;
  }

  .page-panel,
  .catalog-shell {
    padding: 1.15rem 1rem;
  }

  .page-title {
    line-height: 1.25;
  }

  .navbar-nav .nav-link {
    font-size: 1rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .nav-utility-group {
    gap: 0.5rem 0.55rem;
  }

  .nav-utility-group .btn {
    min-height: 44px;
    font-size: 0.9375rem;
    padding-inline: 0.75rem;
  }

  .nav-utility-group .small {
    font-size: 0.8125rem;
  }

  .catalog-description {
    font-size: 1rem;
    line-height: 1.55;
    max-height: 11rem;
  }

  .catalog-filters .form-select-sm,
  .catalog-filters .form-control-sm {
    font-size: 0.875rem;
    min-height: 2rem;
  }

  .badge-count {
    font-size: 0.875rem;
    padding: 0.3rem 0.7rem;
  }

  .inventory-shop-card .inventory-add-btn {
    font-size: 1rem;
    min-height: 48px;
  }

  .flash-stack .flash-alert {
    font-size: 0.9375rem;
    line-height: 1.45;
  }

  .cart-table {
    font-size: 0.9375rem;
    line-height: 1.45;
  }

  .terms-toc a {
    font-size: 0.875rem;
    padding: 0.35rem 0.65rem;
  }

  .modal-brand .modal-body {
    font-size: 0.98rem;
    line-height: 1.5;
  }

  .modal-brand .modal-title {
    font-size: 1.05rem;
  }

  .section-kicker {
    font-size: 0.8125rem;
    letter-spacing: 0.45px;
  }
}

/* --- Admin/Staff footer (inconspicuous) --- */
.admin-footer {
  background: var(--surface-soft);
  border-top: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
  margin-top: 3rem;
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

body.theme-dark .admin-footer {
  background: color-mix(in srgb, var(--surface) 6%, transparent);
  border-top-color: color-mix(in srgb, var(--text) 15%, transparent);
}

.footer-credit {
  margin: 0;
  opacity: 0.7;
  font-size: 0.75rem;
}

.admin-links {
  display: inline-flex;
  gap: 1.2rem;
  align-items: center;
}

.admin-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: lowercase;
  opacity: 0.6;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.admin-link:hover {
  opacity: 1;
  color: var(--secondary);
  text-decoration: underline;
}

body.theme-dark .admin-link {
  color: var(--text-muted);
}

@media (max-width: 575.98px) {
  .admin-footer .row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .admin-links {
    gap: 0.8rem;
    justify-content: center;
  }
}

/* --- Permanent clearance: keep support FAB from covering footer admin links --- */
@media (min-width: 576px) {
  .admin-links {
    padding-right: 4.8rem;
  }
}

@media (max-width: 575.98px) {
  .admin-footer {
    padding-bottom: 4rem !important;
  }
}

/* --- Product detail page (PDP) --- */
.pdp-shell {
  padding-bottom: 0.5rem;
}

.pdp-carousel-image,
.pdp-carousel--empty {
  width: 100%;
  min-height: min(34vh, 320px);
  max-height: min(48vh, 480px);
  object-fit: contain;
  background: var(--surface-soft);
}

.pdp-carousel--empty {
  min-height: min(34vh, 320px);
}

.pdp-thumb-btn {
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 0;
  background: none;
  cursor: pointer;
  width: 64px;
  height: 64px;
  overflow: hidden;
  flex-shrink: 0;
}

.pdp-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pdp-thumb-btn.active {
  border-color: var(--secondary);
}

.pdp-buy-panel .inventory-add-btn {
  min-height: 48px;
}

/*
 * PDP sits on .catalog-shell’s dark gradient. Light mode --text is dark brown, so
 * use light copy on the gradient; dark mode keeps token-based colors.
 */
.pdp-shell {
  color: #faf4ee;
}

.pdp-shell .breadcrumb-item {
  color: rgba(255, 255, 255, 0.78);
}

.pdp-shell .breadcrumb-item.active {
  color: #ffffff;
}

.pdp-shell .breadcrumb-item a {
  color: var(--secondary);
}

.pdp-shell .text-muted {
  color: rgba(255, 255, 255, 0.72) !important;
}

.pdp-shell h2.h5,
.pdp-shell .pdp-buy-panel .fw-semibold {
  color: #ffffff;
}

.pdp-buy-panel h1 {
  color: #ffffff;
}

.pdp-shell .catalog-price.pdp-price {
  color: #ffffff;
  font-size: clamp(1.75rem, 4.5vw, 2.35rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.pdp-shell .catalog-price.pdp-price .text-muted {
  color: rgba(255, 255, 255, 0.65) !important;
  font-size: 0.55em;
  font-weight: 600;
}

.pdp-shell .pdp-description {
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.55;
}

.pdp-shell .pdp-related-card .fw-semibold {
  color: #ffffff;
}

body.theme-dark .pdp-shell {
  color: var(--text);
}

body.theme-dark .pdp-shell .breadcrumb-item {
  color: var(--text-muted);
}

body.theme-dark .pdp-shell .breadcrumb-item.active {
  color: var(--text);
}

body.theme-dark .pdp-shell .text-muted {
  color: var(--text-muted) !important;
}

body.theme-dark .pdp-shell h2.h5,
body.theme-dark .pdp-shell .pdp-buy-panel .fw-semibold,
body.theme-dark .pdp-buy-panel h1,
body.theme-dark .pdp-shell .pdp-description,
body.theme-dark .pdp-shell .pdp-related-card .fw-semibold {
  color: var(--text);
}

body.theme-dark .pdp-shell .catalog-price.pdp-price {
  color: var(--secondary);
  text-shadow: 0 1px 12px color-mix(in srgb, var(--secondary) 35%, transparent);
}

body.theme-dark .pdp-shell .catalog-price.pdp-price .text-muted {
  color: var(--text-muted) !important;
}

.pdp-sticky-price {
  color: var(--text-muted);
}

.pdp-sticky-price strong {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 800;
}

body.theme-dark .pdp-sticky-price strong {
  color: var(--secondary);
}

.pdp-related-image {
  height: 140px;
  object-fit: cover;
}

.pdp-related-card {
  color: inherit;
}

.pdp-related-card:hover {
  opacity: 0.92;
}

.pdp-sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  background: var(--surface);
  border-top: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
  padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
}

.pdp-sticky-bar-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 1280px;
  margin: 0 auto;
}

.pdp-sticky-price strong {
  font-size: 1.05rem;
}

@media (min-width: 768px) {
  .pdp-layout {
    align-items: flex-start;
  }

  .pdp-buy-panel {
    position: sticky;
    top: 1rem;
  }
}

body.theme-dark .pdp-sticky-bar {
  background: var(--surface);
}

body.theme-dark .pdp-shell .breadcrumb-item a {
  color: var(--secondary);
}

/* --- Order tracking timeline --- */
.order-timeline {
  position: relative;
  padding-left: 0.25rem;
}

.order-timeline__step {
  position: relative;
  display: flex;
  gap: 0.85rem;
  padding-bottom: 1.15rem;
  padding-left: 1.75rem;
}

.order-timeline__step:last-child {
  padding-bottom: 0;
}

.order-timeline__step::before {
  content: '';
  position: absolute;
  left: 0.45rem;
  top: 1.1rem;
  bottom: 0;
  width: 2px;
  background: color-mix(in srgb, var(--text) 18%, transparent);
}

.order-timeline__step:last-child::before {
  display: none;
}

.order-timeline__marker {
  position: absolute;
  left: 0;
  top: 0.2rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--text) 28%, transparent);
  background: var(--surface);
  flex-shrink: 0;
}

.order-timeline__step--complete .order-timeline__marker {
  background: var(--secondary);
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--secondary) 28%, transparent);
}

.order-timeline__step--current .order-timeline__marker {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent);
}

.order-timeline__step--failed .order-timeline__marker {
  background: #dc3545;
  border-color: #dc3545;
}

.order-timeline__step--upcoming .order-timeline__marker {
  opacity: 0.45;
}

.order-timeline__step--upcoming .order-timeline__label {
  opacity: 0.65;
}

.order-timeline__label {
  color: var(--text);
}

.order-timeline__when {
  font-size: 0.78rem;
}

/* --- Unified mobile: same layout as desktop, scaled to viewport (no alternate mobile UI) --- */
html {
  overflow-x: clip;
}

body {
  overflow-x: clip;
  max-width: 100vw;
}

.catalog-shell,
.page-panel {
  max-width: 100%;
}

/* Shop + PDP: proportional type on narrow screens (same hierarchy as desktop) */
@media (max-width: 767.98px) {
  .shop-shell .shop-card-copy .catalog-price {
    font-size: clamp(1.15rem, 4.2vw, 1.65rem);
  }

  .shop-shell .shop-card-copy h2.h5 {
    font-size: clamp(0.9rem, 3.2vw, 1.1rem);
  }

  .shop-shell .shop-card-copy .catalog-description {
    font-size: clamp(0.78rem, 2.6vw, 0.95rem);
    max-height: 10.5rem;
  }

  .shop-shell .shop-card-head .btn {
    font-size: clamp(0.65rem, 2.2vw, 0.8rem);
    padding: 0.25rem 0.45rem;
  }

  .pdp-buy-panel h1 {
    font-size: clamp(1rem, 4vw, 1.35rem);
  }

  .pdp-shell .catalog-price.pdp-price {
    font-size: clamp(1.25rem, 5vw, 1.85rem);
  }

  .pdp-carousel-image {
    min-height: 120px;
    max-height: min(32vh, 280px);
  }

  .pdp-thumb-btn {
    width: 48px;
    height: 48px;
  }

  .site-shell {
    margin: 1.25rem auto 2rem;
    padding: 0 1rem;
  }

  .catalog-shell {
    padding: 1.25rem 1rem;
    border-radius: 20px;
  }
}
