:root {
  --clay: #b87333;
  --clay-dark: #8b5a2b;
  --terracotta: #c75c3e;
  --sand: #e8dcc4;
  --cream: #f5f0e6;
  --charcoal: #2d2926;
  --stone: #6b635b;
  --free-shipping: #2e7d32;
  --font-display: "DM Serif Display", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--cream);
  color: var(--charcoal);
  min-height: 100vh;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

#appOutlet {
  flex: 1 0 auto;
  width: 100%;
  align-self: stretch;
}

/* Header — same max width as .products grid; align-self:center avoids flex shrink-wrap bug */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0;
  flex-shrink: 0;
  align-self: center;
  box-sizing: border-box;
}

.site-header-cluster {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  min-width: 0;
  gap: 1rem;
}

.site-footer {
  flex-shrink: 0;
  width: 100%;
  align-self: stretch;
  padding: 1.5rem 2rem 2rem;
  text-align: center;
  border-top: 1px solid rgba(45, 41, 38, 0.08);
  background: linear-gradient(180deg, var(--cream) 0%, var(--sand) 120%);
  box-sizing: border-box;
}

.site-footer-text {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--stone);
  letter-spacing: 0.02em;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--charcoal);
  text-decoration: none;
}

.logo-img {
  height: 40px;
  width: auto;
  max-width: min(120px, 28vw);
  display: block;
  object-fit: contain;
}

.logo-text {
  line-height: 1.2;
}

.logo:hover {
  color: var(--clay);
}

.logo:hover .logo-img {
  opacity: 0.92;
}

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: none;
  background: var(--sand);
  border-radius: 50%;
  cursor: pointer;
  color: var(--charcoal);
  transition: background 0.2s, transform 0.2s;
}

.cart-btn:hover {
  background: var(--clay);
  color: white;
  transform: scale(1.05);
}

.cart-btn[hidden] {
  display: none !important;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  background: var(--terracotta);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-count:empty,
.cart-count[data-count="0"] {
  display: none;
}

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

.nav-dropdown {
  position: relative;
}

.nav-dropdown > summary {
  list-style: none;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--charcoal);
  padding: 0.5rem 0.9rem;
  border: none;
  border-radius: 999px;
  background: var(--sand);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.nav-dropdown > summary::-webkit-details-marker {
  display: none;
}

.nav-dropdown > summary::marker {
  content: "";
}

.nav-dropdown > summary:hover {
  background: var(--clay);
  color: white;
}

.nav-dropdown[open] > summary {
  background: var(--clay);
  color: white;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  right: 0;
  margin: 0;
  padding: 0.4rem 0;
  min-width: 11rem;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(45, 41, 38, 0.12);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(45, 41, 38, 0.12);
  z-index: 30;
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--charcoal);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown-menu a:hover {
  background: var(--sand);
  color: var(--clay-dark);
}

.nav-dropdown-menu a[aria-current="page"] {
  font-weight: 600;
  color: var(--clay-dark);
}

.page-placeholder {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  min-height: 40vh;
}

.page-placeholder h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  margin: 0;
  color: var(--charcoal);
}

.about-prose {
  margin-top: 1.75rem;
}

.about-prose p {
  margin: 0 0 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--charcoal);
}

.about-prose p:last-child {
  margin-bottom: 0;
}

/* Socials — Linktree-style stack */
.socials-page {
  max-width: 28rem;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  min-height: 50vh;
  box-sizing: border-box;
}

.socials-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.socials-title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
  color: var(--charcoal);
}

.socials-tagline {
  margin: 0;
  font-size: 0.95rem;
  color: var(--stone);
  font-weight: 400;
}

.socials-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

.socials-link {
  --socials-icon-col: 2.35rem;
  display: grid;
  grid-template-columns: var(--socials-icon-col) minmax(0, 1fr) var(--socials-icon-col);
  align-items: center;
  column-gap: 0.45rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1.1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--charcoal);
  background: #fff;
  border: 2px solid rgba(45, 41, 38, 0.12);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(45, 41, 38, 0.06);
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.15s;
}

.socials-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--socials-icon-col);
  flex-shrink: 0;
}

.socials-link-icon img {
  width: 1.45rem;
  height: 1.45rem;
  display: block;
  object-fit: contain;
}

.socials-link-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  text-align: center;
  min-width: 0;
}

.socials-link-spacer {
  width: var(--socials-icon-col);
}

.socials-link-label {
  line-height: 1.25;
}

.socials-link-handle {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--stone);
  line-height: 1.3;
  word-break: break-all;
  max-width: 100%;
}

.socials-link:hover {
  border-color: var(--clay);
  box-shadow: 0 4px 20px rgba(184, 115, 51, 0.15);
  color: var(--clay-dark);
}

.socials-link:active {
  transform: scale(0.98);
}

.socials-loading,
.socials-empty,
.socials-error {
  margin: 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--stone);
  padding: 1rem;
}

.socials-error {
  color: var(--terracotta);
}

/* Hero */
.hero {
  text-align: center;
  padding: 4rem 2rem;
  background: linear-gradient(135deg, var(--sand) 0%, var(--cream) 100%);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 0 0 0.5rem;
  color: var(--charcoal);
}

.hero p {
  margin: 0;
  font-size: 1.1rem;
  color: var(--stone);
  font-weight: 300;
}

/* Products */
.products {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.products h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 0 0 2rem;
  color: var(--charcoal);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(45, 41, 38, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(45, 41, 38, 0.12);
}

.product-media {
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, var(--sand), var(--cream));
}

.product-image-main-wrap {
  aspect-ratio: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-media--grid .product-image-main {
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.product-image-emoji {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  line-height: 1;
}

.product-image-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.5rem;
  justify-content: center;
  border-top: 1px solid rgba(45, 41, 38, 0.08);
  background: rgba(255, 255, 255, 0.5);
}

.product-thumb {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  background: white;
  overflow: hidden;
  line-height: 0;
  opacity: 0.75;
  transition: opacity 0.15s, border-color 0.15s;
}

.product-thumb:hover {
  opacity: 1;
}

.product-thumb.is-active {
  opacity: 1;
  border-color: var(--clay);
}

.product-thumb img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  display: block;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  min-height: 0;
}

.product-card .product-info {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.product-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0;
  color: var(--charcoal);
}

.product-card-free-shipping {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--free-shipping);
  letter-spacing: 0.02em;
}

.product-card-price-row {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 0.5rem;
  margin: auto 0 0;
  padding-top: 0.35rem;
}

.product-card-price-row .product-price {
  margin: 0;
  padding-top: 0;
}

.product-card-low-stock-badge {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #9a1818;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: #f5d6d6;
}

.product-card-out-of-stock-badge {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #444;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: #d8d8d8;
}

.product-price {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--clay-dark);
  margin: auto 0 0;
  padding-top: 0.35rem;
}

.add-to-cart {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: white;
  background: var(--clay);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.add-to-cart:hover {
  background: var(--clay-dark);
}

.add-to-cart:disabled,
.add-to-cart.add-to-cart--sold-out {
  background: var(--stone);
  color: rgba(255, 255, 255, 0.92);
  cursor: not-allowed;
}

.add-to-cart:disabled:hover,
.add-to-cart.add-to-cart--sold-out:hover {
  background: var(--stone);
}

/* Cart Drawer */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -8px 0 32px rgba(45, 41, 38, 0.15);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  pointer-events: none;
}

.cart-drawer.open {
  transform: translateX(0);
  pointer-events: auto;
}

.cart-drawer[aria-hidden="false"] {
  transform: translateX(0);
  pointer-events: auto;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--sand);
}

.cart-header h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0;
}

.close-btn {
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  line-height: 1;
  border: none;
  background: transparent;
  color: var(--stone);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.close-btn:hover {
  background: var(--sand);
  color: var(--charcoal);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.cart-empty {
  color: var(--stone);
  text-align: center;
  padding: 2rem;
  margin: 0;
}

.cart-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--sand);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--sand);
}

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

.cart-item-thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 500;
  margin: 0 0 0.25rem;
}

.cart-item-variant {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--stone);
  margin: 0 0 0.35rem;
  line-height: 1.35;
}

.cart-item-meta {
  font-size: 0.875rem;
  color: var(--stone);
  margin: 0;
}

.cart-item-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin-top: 0.15rem;
}

.cart-item-price {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--charcoal);
  margin: 0;
  line-height: 1.3;
  flex-shrink: 0;
}

.cart-item-qty-row {
  margin: 0;
  flex-shrink: 0;
}

.cart-item-qty-stepper.product-detail-qty-stepper {
  border-color: rgba(45, 41, 38, 0.12);
  border-radius: 6px;
}

.cart-item-qty-stepper .product-detail-qty-btn {
  width: 1.625rem;
  height: 1.625rem;
  min-width: 1.625rem;
  font-size: 0.9rem;
  line-height: 1;
}

.cart-item-qty-stepper .product-detail-qty-input {
  width: 2rem;
  min-width: 0;
  height: 1.625rem;
  padding: 0 0.15rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--sand);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.cart-shipping-note {
  margin: -0.5rem 0 1rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--stone);
  line-height: 1.4;
}

.checkout-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: var(--clay);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.checkout-btn:hover:not(:disabled) {
  background: var(--clay-dark);
}

.checkout-btn:disabled {
  background: var(--stone);
  cursor: not-allowed;
  opacity: 0.7;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 41, 38, 0.4);
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.overlay[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

/* Product grid: single image + dot pager */
.product-media.product-media--grid {
  position: relative;
  z-index: 2;
}

.product-image-main-wrap--grid {
  position: relative;
  touch-action: pan-y pinch-zoom;
  pointer-events: auto;
  cursor: pointer;
}

.product-card-stretched-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  text-decoration: none;
  color: transparent;
  font-size: 0;
  user-select: none;
}

.product-card-stretched-link:focus {
  outline: none;
}

.product-card-stretched-link:focus-visible {
  z-index: 3;
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}

.product-card-dots {
  position: absolute;
  bottom: 0.65rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
  z-index: 2;
  pointer-events: none;
}

.product-card-dot {
  pointer-events: auto;
  box-sizing: border-box;
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 1px 3px rgba(45, 41, 38, 0.35);
  transition: transform 0.15s, background 0.15s;
}

.product-card-dot:hover {
  background: rgba(255, 255, 255, 0.85);
}

.product-card-dot.is-active {
  background: rgba(110, 110, 110, 0.95);
  transform: scale(1.2);
}

.product-card-dot.is-active:hover {
  background: rgba(95, 95, 95, 0.98);
}

.product-card:hover .product-name .product-name-text {
  color: var(--clay);
}

/* Product detail page */
.product-detail-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 2rem 4rem;
}

.product-detail-inner {
  width: 100%;
}

.product-back-link {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--stone);
  text-decoration: none;
}

.product-back-link:hover {
  color: var(--clay-dark);
}

.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

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

.product-media--detail {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(45, 41, 38, 0.1);
}

.product-image-main-wrap--detail {
  position: relative;
  aspect-ratio: 1;
  max-height: min(90vw, 520px);
  touch-action: pan-y pinch-zoom;
}

.product-media--detail .product-image-main {
  -webkit-user-drag: none;
  user-select: none;
}

.product-image-emoji--detail {
  aspect-ratio: 1;
  max-height: min(90vw, 520px);
  font-size: 5rem;
}

.product-image-thumbs--detail {
  margin-top: 0;
}

.product-detail-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  margin: 0 0 0.5rem;
  color: var(--charcoal);
  line-height: 1.2;
}

.product-detail-price {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--clay-dark);
  margin: 0 0 1.25rem;
}

.product-detail-description {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--stone);
  margin-bottom: 1rem;
}

.product-detail-description p {
  margin: 0 0 1rem;
}

.product-detail-description p:last-child {
  margin-bottom: 0;
}

.product-detail-dimensions {
  margin: 0 0 1.35rem;
}

.product-detail-dimensions-body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.55;
  font-weight: 500;
  color: var(--charcoal);
}

.product-detail-dimensions-kicker {
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--clay-dark);
}

.product-detail-dimensions-sep {
  color: var(--clay-dark);
  font-weight: 900;
}

.product-detail-dimensions-values {
  color: var(--charcoal);
  font-weight: 500;
}

.product-detail-dimensions-axis {
  font-weight: 600;
  font-size: 0.82em;
  letter-spacing: 0.03em;
  color: var(--charcoal);
  margin-right: 0.15em;
}

.product-detail-dimensions-num {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.product-detail-dimensions-unit {
  text-decoration: none;
  font-weight: 500;
  color: var(--stone);
}

.product-detail-dimensions-tolerance {
  margin: 0.28rem 0 0;
  font-family: var(--font-body);
  font-size: 0.78rem;
  line-height: 1.45;
  font-weight: 500;
  color: var(--stone);
}

.product-detail-variants {
  margin: 0 0 1.25rem;
}

.product-variant-group {
  margin: 0 0 1rem;
  padding: 0;
  border: none;
}

.product-variant-legend {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--stone);
  margin: 0 0 0.6rem;
  padding: 0;
}

.product-variant-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.product-variant-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 5.75rem;
  margin: 0;
  padding: 0.45rem;
  border: 2px solid rgba(45, 41, 38, 0.12);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.product-variant-option:hover {
  border-color: rgba(45, 41, 38, 0.35);
}

.product-variant-option.is-active {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 1px var(--terracotta);
}

.product-variant-option-img-wrap {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(45, 41, 38, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-variant-option-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-variant-option-label {
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  color: var(--charcoal);
}

.product-detail-inventory {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--clay-dark);
  margin: 0 0 1rem;
}

.product-detail-inventory .product-detail-stock-line {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  color: var(--charcoal);
}

.product-detail-inventory .product-detail-low-stock {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--terracotta);
  line-height: 1.45;
}

.product-detail-inventory .product-detail-in-cart-line {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--stone);
}

.product-detail-inventory .product-detail-in-cart-line:first-child {
  margin-top: 0;
}

.product-detail-inventory .product-detail-in-cart-icon {
  display: inline-flex;
  color: var(--stone);
  flex-shrink: 0;
}

.product-detail-inventory .product-detail-in-cart-icon .product-detail-in-cart-svg {
  display: block;
}

.product-detail-inventory .product-detail-in-cart-text {
  color: var(--stone);
}

.product-detail-qty {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1.25rem;
}

.product-detail-qty-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--charcoal);
}

.product-detail-qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--sand);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.product-detail-qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--sand);
  color: var(--charcoal);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
}

.product-detail-qty-btn:hover:not(:disabled) {
  background: var(--clay);
  color: white;
}

.product-detail-qty-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.product-detail-qty-input {
  width: 3rem;
  height: 40px;
  border: none;
  text-align: center;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
  -moz-appearance: textfield;
}

.product-detail-qty-input::-webkit-outer-spin-button,
.product-detail-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.shop-loading,
.shop-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem;
  color: var(--stone);
  font-family: var(--font-body);
}

.shop-error {
  color: #a94442;
}

.product-detail-add {
  width: auto;
  max-width: 320px;
  padding: 0.9rem 2rem;
  font-size: 1rem;
}

.product-not-found {
  max-width: 480px;
  margin: 4rem auto;
  padding: 2rem;
  text-align: center;
  font-family: var(--font-body);
  color: var(--stone);
}

.product-not-found a {
  color: var(--clay-dark);
  font-weight: 500;
}

/* Success page */
.success-page {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.success-card {
  text-align: center;
  max-width: 420px;
  padding: 3rem;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(45, 41, 38, 0.1);
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  font-weight: bold;
  color: white;
  background: var(--clay);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-card h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
  color: var(--charcoal);
}

.success-card p {
  color: var(--stone);
  margin: 0 0 1.5rem;
}

.success-email-line {
  font-size: 0.95rem;
  color: var(--charcoal);
  line-height: 1.5;
}

.success-email-line strong {
  font-weight: 600;
  word-break: break-all;
}

.success-tracking-block {
  text-align: left;
  font-size: 0.95rem;
  color: var(--charcoal);
  line-height: 1.5;
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  background: rgba(45, 41, 38, 0.04);
  border-radius: 10px;
}

.success-tracking-block h2 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.65rem;
  color: var(--stone);
}

.success-tracking-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.success-tracking-list li {
  margin: 0.4rem 0;
  word-break: break-word;
}

.success-tracking-list a {
  color: var(--clay-dark);
  font-weight: 500;
}

.success-tracking-status {
  font-size: 0.9rem;
  color: var(--stone);
  margin: 0 0 1rem;
}

.back-btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-weight: 500;
  color: white;
  background: var(--clay);
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.2s;
}

.back-btn:hover {
  background: var(--clay-dark);
}

/* Checkout — shipping + Shippo rates */
.checkout-page {
  min-height: calc(100vh - 80px);
  padding: 2rem 1.25rem 3rem;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  box-sizing: border-box;
}

.checkout-inner {
  width: 100%;
}

.checkout-title {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 0 0 2rem;
  color: var(--charcoal);
}

.checkout-grid {
  display: grid;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 840px) {
  .checkout-grid {
    grid-template-columns: minmax(220px, 1fr) minmax(320px, 1.2fr);
  }
}

.checkout-section-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 0 0 1rem;
  color: var(--charcoal);
}

.checkout-cart-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(45, 41, 38, 0.1);
}

.checkout-cart-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(45, 41, 38, 0.08);
  font-size: 0.95rem;
}

.checkout-cart-line-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.checkout-cart-line-title {
  font-weight: 500;
}

.checkout-cart-variant {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--stone);
  line-height: 1.35;
}

.checkout-cart-subtotal {
  margin: 1rem 0 0;
  font-weight: 600;
  color: var(--charcoal);
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.checkout-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--stone);
}

.checkout-field input:not([type="hidden"]),
.checkout-field select {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid rgba(45, 41, 38, 0.2);
  border-radius: 8px;
  background: white;
  color: var(--charcoal);
}

.checkout-field-row {
  display: grid;
  gap: 1rem;
}

@media (min-width: 480px) {
  .checkout-field-row {
    grid-template-columns: 1fr 1fr;
  }
}

.checkout-field--country-combo .checkout-country-combo {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* One continuous “text field”; chevron sits inside on the right */
.checkout-country-combo__row {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 1px solid rgba(45, 41, 38, 0.2);
  border-radius: 8px;
  background: white;
  overflow: hidden;
}

.checkout-country-combo__row:focus-within {
  outline: 2px solid rgba(45, 41, 38, 0.35);
  outline-offset: 1px;
}

/*
 * Must beat `.checkout-field input:not([type="hidden"])` (0,2,1) or the input keeps
 * its own border → double gray outline with mismatched radii.
 */
.checkout-field--country-combo input.checkout-country-combo__input {
  flex: 1;
  min-width: 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  padding: 0.6rem 2.4rem 0.6rem 0.75rem;
  -webkit-appearance: none;
  appearance: none;
}

.checkout-field--country-combo input.checkout-country-combo__input:focus {
  outline: none;
}

.checkout-country-combo__chevron {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2.35rem;
  padding: 0;
  margin: 0;
  font: inherit;
  border: none;
  border-radius: 0 8px 8px 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--stone);
}

.checkout-country-combo__chevron:hover {
  color: var(--charcoal);
  background: rgba(45, 41, 38, 0.05);
}

.checkout-country-combo__chevron:focus {
  outline: none;
}

.checkout-country-combo__chevron:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(45, 41, 38, 0.35);
}

.checkout-country-combo__chevron-icon {
  display: block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid currentColor;
  margin-top: 2px;
}

.checkout-country-combo__list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.2rem);
  margin: 0;
  padding: 0.25rem 0;
  list-style: none;
  max-height: min(50vh, 16rem);
  overflow-y: auto;
  background: white;
  border: 1px solid rgba(45, 41, 38, 0.2);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(45, 41, 38, 0.12);
  z-index: 40;
}

/* Full list from chevron: ~50% taller cap than typeahead (was 50vh/16rem → 75vh/24rem) */
.checkout-country-combo__list--full {
  max-height: min(75vh, 24rem);
}

.checkout-country-combo__list [role="option"] {
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  color: var(--charcoal);
}

.checkout-country-combo__list [role="option"]:hover {
  background: rgba(45, 41, 38, 0.06);
}

.checkout-optional {
  font-weight: 400;
  opacity: 0.85;
}

.checkout-error {
  margin: 0;
  padding: 0.65rem 0.75rem;
  background: rgba(199, 92, 62, 0.12);
  color: var(--terracotta);
  border-radius: 8px;
  font-size: 0.9rem;
}

.checkout-btn {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.85rem 1.25rem;
  font: inherit;
  font-weight: 600;
  color: white;
  background: var(--clay);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}

.checkout-btn:hover:not(:disabled) {
  background: var(--clay-dark);
}

.checkout-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.checkout-btn--secondary {
  background: var(--stone);
}

.checkout-btn--secondary:hover:not(:disabled) {
  background: var(--charcoal);
}

.checkout-rates {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(45, 41, 38, 0.1);
}

.checkout-rates-head {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.checkout-rates-title {
  font-size: 1rem;
  margin: 0;
  color: var(--charcoal);
}

.checkout-rates-needs-address {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--terracotta);
  white-space: nowrap;
}

.checkout-rates-needs-address[hidden] {
  display: none !important;
}

.checkout-rates-loading-block {
  padding: 0.35rem 0 0.5rem;
}

.checkout-rates-loading {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--stone);
}

.checkout-rates-quote-error {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--terracotta);
}

.checkout-rate {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.6rem 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.checkout-rate--disabled {
  cursor: not-allowed;
  opacity: 0.78;
  pointer-events: none;
}

.checkout-rate--disabled input {
  cursor: not-allowed;
}

.checkout-rate input {
  margin-top: 0.2rem;
  flex-shrink: 0;
}

.checkout-rate-body {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  flex: 1;
  min-width: 0;
}

.checkout-rate-line1 {
  font-size: 0.95rem;
}

.checkout-rate-price {
  font-weight: 600;
  color: var(--charcoal);
}

.checkout-rate-price--na {
  font-weight: 600;
  color: var(--stone);
}

.checkout-free {
  margin: 0;
  padding: 0.75rem;
  background: rgba(46, 125, 50, 0.1);
  color: var(--free-shipping);
  border-radius: 8px;
  font-size: 0.95rem;
}

.checkout-note {
  margin: 1.25rem 0 0;
  font-size: 0.9rem;
}

.checkout-note a {
  color: var(--clay-dark);
  font-weight: 500;
}

.checkout-address-modal {
  position: fixed;
  inset: 0;
  z-index: 1150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  box-sizing: border-box;
}

.checkout-address-modal[hidden] {
  display: none !important;
}

.checkout-address-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 41, 38, 0.45);
  cursor: pointer;
}

.checkout-address-modal__panel {
  position: relative;
  width: 100%;
  max-width: 26rem;
  padding: 1.35rem 1.5rem 1.5rem;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(45, 41, 38, 0.2);
  border: 2px solid rgba(45, 41, 38, 0.1);
}

.checkout-address-modal__title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0 0 0.75rem;
  color: var(--charcoal);
}

.checkout-address-modal__lead {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--stone);
  line-height: 1.45;
}

.checkout-address-modal__list {
  margin: 0 0 1.25rem;
  padding: 0.85rem 1rem;
  list-style: none;
  background: rgba(45, 41, 38, 0.04);
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--charcoal);
  line-height: 1.5;
}

.checkout-address-modal__list li + li {
  margin-top: 0.35rem;
}

.checkout-address-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.checkout-address-modal__actions .checkout-btn {
  margin-top: 0;
}

.checkout-address-modal__actions .checkout-btn[hidden] {
  display: none !important;
}

/* Cart inventory updates — non-blocking (replaces alert during boot) */
.inventory-notice-host {
  position: fixed;
  z-index: 99999;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: calc(1rem + env(safe-area-inset-top, 0)) 1rem 1rem;
  pointer-events: none;
}

.inventory-notice-host .inventory-notice {
  pointer-events: auto;
}

.inventory-notice {
  width: 100%;
  max-width: 28rem;
  padding: 1rem 1.1rem;
  background: #fff;
  color: var(--charcoal);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(45, 41, 38, 0.2);
  border: 1px solid rgba(45, 41, 38, 0.12);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(-0.75rem);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.inventory-notice--visible {
  opacity: 1;
  transform: translateY(0);
}

.inventory-notice__body {
  margin-bottom: 0.75rem;
}

.inventory-notice__body p {
  margin: 0 0 0.5rem;
}

.inventory-notice__body p:last-child {
  margin-bottom: 0;
}

.inventory-notice__actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 0.25rem;
  border-top: 1px solid rgba(45, 41, 38, 0.1);
}

.inventory-notice__dismiss {
  margin: 0;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--clay-dark);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.inventory-notice__dismiss:hover {
  background: rgba(184, 115, 51, 0.12);
}

/* Reviews */
.reviews-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
  min-height: 40vh;
}

.reviews-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  margin: 0 0 0.5rem;
  color: var(--charcoal);
}

.reviews-intro {
  margin: 0 0 1.25rem;
  color: var(--stone);
  font-size: 1rem;
  line-height: 1.5;
}

.reviews-add-btn {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--clay);
  border: none;
  border-radius: 8px;
  padding: 0.75rem 1.35rem;
  cursor: pointer;
  transition: background 0.2s;
}

.reviews-add-btn:hover {
  background: var(--clay-dark);
}

.reviews-status {
  margin: 1rem 0;
  font-size: 0.95rem;
  color: var(--stone);
}

.reviews-list {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.review-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  box-shadow: 0 2px 16px rgba(45, 41, 38, 0.08);
  border: 1px solid rgba(45, 41, 38, 0.08);
}

.review-card-header {
  margin-bottom: 1rem;
}

.review-card-header-row {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.review-author-name {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--charcoal);
  min-width: 0;
}

.review-date {
  flex-shrink: 0;
  font-size: 0.85rem;
  color: var(--stone);
}

.review-date--empty {
  display: none;
}

.review-card-stars-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin-top: 0.35rem;
}

.review-stars {
  margin: 0;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: var(--clay);
}

.review-verified {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--free-shipping);
  border: 1px solid rgba(46, 125, 50, 0.35);
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
}

.review-card-body {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  margin-bottom: 1.1rem;
}

.review-card-body--text-only .review-message {
  flex: 1;
  max-width: none;
}

.review-message {
  margin: 0;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--charcoal);
  white-space: pre-wrap;
}

.review-photo-wrap {
  flex-shrink: 0;
  width: fit-content;
  max-width: min(220px, 42%);
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
}

.review-photo {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
}

.review-card-product {
  padding-top: 0.85rem;
  margin-top: auto;
  border-top: 1px solid rgba(45, 41, 38, 0.1);
}

.review-card-product-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  margin: -0.35rem -0.35rem -0.35rem -0.35rem;
  padding: 0.35rem;
  min-height: 2.75rem;
  text-decoration: none;
  color: inherit;
  border-radius: 10px;
  -webkit-tap-highlight-color: rgba(184, 115, 51, 0.2);
}

.review-card-product-link:hover .review-product-label {
  color: var(--clay-dark);
}

.review-card-product-link:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

.review-product-thumb {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(45, 41, 38, 0.06);
}

.review-product-thumb-placeholder {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: rgba(45, 41, 38, 0.08);
}

.review-product-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--stone);
  min-width: 0;
}

/* Reviews photo: shared `image-upload-control` (storefront / sand palette) */
.image-upload-control--reviews .image-upload-control__label-row {
  margin-bottom: 0.35rem;
}

.image-upload-control--reviews .image-upload-control__field-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--charcoal);
}

.image-upload-control--reviews .image-upload-control__optional {
  font-weight: 500;
  color: var(--stone);
}

.image-upload-control--reviews .image-upload-control__box {
  background: #fff;
  border: 1px solid rgba(45, 41, 38, 0.15);
  border-radius: 8px;
  padding: 0.75rem;
}

.image-upload-control--reviews .image-upload-control__preview-wrap {
  margin-bottom: 0.75rem;
}

.image-upload-control--reviews .image-upload-control__thumb {
  display: block;
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid rgba(45, 41, 38, 0.12);
}

.image-upload-control--reviews .image-upload-control__thumb[hidden] {
  display: none !important;
}

.image-upload-control--reviews .image-upload-control__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.image-upload-control--reviews .image-upload-control__choose {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  margin: 0;
  font: inherit;
}

.image-upload-control--reviews .image-upload-control__input--visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}

.image-upload-control--reviews .image-upload-control__choose-text {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--charcoal);
  background: var(--sand);
  border: 1px solid rgba(45, 41, 38, 0.18);
  border-radius: 8px;
}

.image-upload-control--reviews .image-upload-control__choose:hover .image-upload-control__choose-text {
  background: rgba(232, 220, 196, 0.95);
}

.image-upload-control--reviews .image-upload-control__meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1 1 10rem;
}

.image-upload-control--reviews .image-upload-control__meta[hidden] {
  display: none !important;
}

.image-upload-control--reviews .image-upload-control__name {
  font-size: 0.9rem;
  color: var(--charcoal);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.image-upload-control--reviews .image-upload-control__remove {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: #c62828;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
}

.image-upload-control--reviews .image-upload-control__remove:hover {
  background: rgba(198, 40, 40, 0.12);
}

.image-upload-control__hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #6b6b6b;
  line-height: 1.35;
}

.reviews-modal-overlay {
  z-index: 1000;
}

.reviews-modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  pointer-events: none;
}

.reviews-modal[hidden] {
  display: none !important;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45, 41, 38, 0.38);
  pointer-events: auto;
}

.loading-overlay[hidden] {
  display: none !important;
}

.loading-overlay-spinner {
  width: 3rem;
  height: 3rem;
  box-sizing: border-box;
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--clay);
  border-radius: 50%;
  animation: loading-overlay-spin 0.72s linear infinite;
  box-shadow: 0 4px 20px rgba(45, 41, 38, 0.2);
}

@keyframes loading-overlay-spin {
  to {
    transform: rotate(360deg);
  }
}

.reviews-modal-panel {
  pointer-events: auto;
  width: 100%;
  max-width: 35rem;
  max-height: min(90vh, 853px);
  overflow-y: auto;
  background: var(--cream);
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(45, 41, 38, 0.25);
  border: 1px solid rgba(45, 41, 38, 0.1);
}

.reviews-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 0;
}

.reviews-modal-head h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  margin: 0;
  color: var(--charcoal);
}

.reviews-modal-close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  margin: -0.25rem -0.25rem 0 0;
  border: none;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--stone);
  cursor: pointer;
  border-radius: 8px;
}

.reviews-modal-close:hover {
  background: rgba(45, 41, 38, 0.06);
  color: var(--charcoal);
}

.reviews-form {
  padding: 1rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.reviews-form-error {
  margin: 0;
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  background: rgba(199, 92, 62, 0.12);
  color: var(--terracotta);
  border-radius: 8px;
  border: 1px solid rgba(199, 92, 62, 0.25);
}

.reviews-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0;
  border: none;
  padding: 0;
  min-width: 0;
}

.reviews-rating-field {
  gap: 0.5rem;
}

.reviews-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--charcoal);
}

.reviews-optional {
  font-weight: 400;
  color: var(--stone);
}

.reviews-hint {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--stone);
  line-height: 1.4;
}

.reviews-char-row {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 0.25rem;
}

.reviews-char-hint {
  flex: 1 1 auto;
  min-width: 0;
}

.review-char-count {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
}

.review-char-count--ok {
  color: var(--free-shipping);
}

.review-char-count--bad {
  color: var(--terracotta);
}

.reviews-input {
  font: inherit;
  font-size: 1rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(45, 41, 38, 0.18);
  border-radius: 8px;
  background: #fff;
  color: var(--charcoal);
}

.reviews-input:focus {
  outline: 2px solid var(--clay);
  outline-offset: 1px;
}

.reviews-select {
  cursor: pointer;
}

.reviews-textarea {
  resize: vertical;
  min-height: 6rem;
}

.reviews-stars-input {
  display: flex;
  gap: 0.15rem;
}

.reviews-star-btn {
  padding: 0.15rem 0.2rem;
  font-size: 1.75rem;
  line-height: 1;
  border: none;
  background: transparent;
  color: rgba(45, 41, 38, 0.22);
  cursor: pointer;
  border-radius: 4px;
  transition: color 0.15s, transform 0.12s;
}

.reviews-star-btn:hover {
  color: rgba(184, 115, 51, 0.55);
  transform: scale(1.06);
}

.reviews-star-btn.is-selected {
  color: var(--clay);
}

.reviews-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.reviews-cancel-btn {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.65rem 1rem;
  color: var(--stone);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.reviews-cancel-btn:hover {
  background: rgba(45, 41, 38, 0.06);
  color: var(--charcoal);
}

.reviews-submit-btn {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.65rem 1.15rem;
  color: #fff;
  background: var(--clay);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.reviews-submit-btn:hover:not(:disabled) {
  background: var(--clay-dark);
}

.reviews-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
