/* =========================================================
   GTGSTORE — PRODUCT DETAIL / CHECKOUT
   ========================================================= */

.storefront-product-detail {
  min-height: 100vh;
  color: var(--store-text);
  background:
    radial-gradient(circle at 8% 28%, rgba(220, 227, 215, 0.28), transparent 24rem),
    radial-gradient(circle at 92% 18%, rgba(210, 184, 139, 0.12), transparent 22rem),
    #f5f1e8;
}

.storefront-checkout-shell {
  width: min(100% - 2rem, 72rem);
  margin: 0 auto;
  padding: 1.4rem 0 4rem;
}

.storefront-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  color: var(--store-text-muted);
  font-size: 0.72rem;
  font-weight: 750;
  transition: color 0.2s ease, transform 0.2s ease;
}

.storefront-back-link:hover {
  color: var(--store-primary-hover);
  transform: translateX(-2px);
}

.storefront-back-link svg {
  width: 1rem;
  height: 1rem;
}

.storefront-checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(22rem, 0.98fr);
  gap: 1.35rem;
  align-items: start;
}

.storefront-product-summary,
.storefront-checkout-card {
  border: 1px solid rgba(135, 151, 130, 0.17);
  border-radius: 1.45rem;
  background: rgba(251, 248, 242, 0.88);
  box-shadow:
    0 18px 48px rgba(68, 77, 67, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.storefront-product-summary {
  padding: 1.35rem;
}

.storefront-product-summary-top {
  display: grid;
  grid-template-columns: minmax(10rem, 0.78fr) minmax(0, 1.22fr);
  gap: 1.35rem;
  align-items: center;
}

.storefront-product-summary-media {
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(135, 151, 130, 0.16);
  border-radius: 1.2rem;
  background:
    linear-gradient(145deg, rgba(220, 227, 215, 0.54), rgba(239, 227, 206, 0.44));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.storefront-product-summary-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.storefront-detail-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: rgba(53, 64, 57, 0.22);
  font-family: var(--font-display, serif);
  font-size: 3rem;
  font-style: italic;
}


.storefront-detail-title {
  margin-top: 0.72rem;
  color: var(--store-text);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.storefront-detail-description {
  margin-top: 0.68rem;
  color: var(--store-text-soft);
  font-size: 0.76rem;
  line-height: 1.52;
  white-space: pre-line;
}









.storefront-detail-price {
  display: block;
  margin-top: 0.18rem;
  color: #526951;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 850;
  letter-spacing: -0.035em;
}

.storefront-detail-unit-price {
  display: block;
  margin-top: 0.15rem;
  color: var(--store-text-muted);
  font-size: 0.58rem;
}

.storefront-detail-stock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  font-size: 0.56rem;
  font-weight: 850;
  white-space: nowrap;
}

.storefront-detail-stock-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.55rem;
  height: 1.55rem;
  margin-left: 0.38rem;
  padding: 0 0.38rem;
  border-radius: 999px;
  color: #fffdf7;
  background: #60745f;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(70, 88, 69, 0.18);
}

.storefront-detail-stock.is-out .storefront-detail-stock-count {
  background: #a0645d;
}

.storefront-detail-stock.is-ready {
  color: #4f684f;
  border: 1px solid rgba(89, 112, 89, 0.18);
  background: rgba(135, 151, 130, 0.11);
}

.storefront-detail-stock.is-out {
  color: #9a5e58;
  border: 1px solid rgba(154, 94, 88, 0.18);
  background: rgba(154, 94, 88, 0.09);
}



.storefront-checkout-card {
  position: sticky;
  top: 5.7rem;
  padding: 1.45rem;
}

.storefront-checkout-header > span {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: var(--store-primary-hover);
  font-size: 0.62rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.storefront-checkout-header > span svg {
  width: 1rem;
  height: 1rem;
}

.storefront-checkout-header h2 {
  margin-top: 0.48rem;
  color: var(--store-text);
  font-size: clamp(1.65rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.035em;
}

.storefront-checkout-header p {
  margin-top: 0.3rem;
  color: var(--store-text-muted);
  font-size: 0.68rem;
}

.storefront-checkout-form {
  display: grid;
  gap: 0.78rem;
  margin-top: 1.05rem;
}

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

.storefront-form-group label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--store-text-soft);
  font-size: 0.62rem;
  font-weight: 800;
}

.storefront-input {
  width: 100%;
  min-height: 3rem;
  padding: 0.72rem 0.82rem;
  border: 1px solid rgba(135, 151, 130, 0.2);
  border-radius: 0.82rem;
  outline: none;
  color: var(--store-text);
  background: rgba(255, 255, 255, 0.5);
  font-size: 0.74rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.storefront-input::placeholder {
  color: rgba(91, 101, 92, 0.48);
}

.storefront-input:focus {
  border-color: rgba(104, 121, 101, 0.48);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 0 0 3px rgba(135, 151, 130, 0.1);
}

.storefront-quantity-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.storefront-quantity-control {
  display: grid;
  grid-template-columns: 2.35rem 3.25rem 2.35rem;
  overflow: hidden;
  border: 1px solid rgba(135, 151, 130, 0.2);
  border-radius: 0.78rem;
  background: rgba(255, 255, 255, 0.5);
}

.storefront-quantity-button,
.storefront-quantity-input {
  min-height: 2.55rem;
  border: 0;
  outline: 0;
  color: var(--store-text);
  background: transparent;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 800;
}

.storefront-quantity-button {
  color: var(--store-primary-hover);
  transition: background-color 0.2s ease;
}

.storefront-quantity-button:hover:not(:disabled) {
  background: rgba(135, 151, 130, 0.1);
}

.storefront-quantity-button:disabled {
  opacity: 0.38;
}

.storefront-quantity-input {
  border-left: 1px solid rgba(135, 151, 130, 0.16);
  border-right: 1px solid rgba(135, 151, 130, 0.16);
}

.storefront-quantity-note {
  color: var(--store-text-muted);
  font-size: 0.58rem;
}

.storefront-order-summary {
  margin-top: 0.18rem;
  padding: 0.88rem;
  border: 1px solid rgba(135, 151, 130, 0.18);
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.42);
}

.storefront-order-summary h3 {
  margin-bottom: 0.55rem;
  color: var(--store-text);
  font-size: 0.68rem;
  font-weight: 850;
}

.storefront-order-summary dl {
  display: grid;
  gap: 0.42rem;
}

.storefront-order-summary dl > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--store-text-muted);
  font-size: 0.62rem;
}

.storefront-order-summary dd {
  color: var(--store-text-soft);
  font-weight: 750;
  text-align: right;
}

.storefront-order-summary .storefront-order-total {
  margin-top: 0.35rem;
  padding-top: 0.58rem;
  border-top: 1px solid rgba(135, 151, 130, 0.16);
  color: var(--store-text);
  font-size: 0.72rem;
  font-weight: 850;
}

.storefront-order-summary .storefront-order-total dd {
  color: #526951;
  font-size: 1rem;
  font-weight: 900;
}

.storefront-checkout-button {
  min-height: 3.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  border-radius: 0.88rem;
  color: #faf8f2;
  background: linear-gradient(135deg, #879782, #657763);
  box-shadow: 0 12px 24px rgba(77, 94, 75, 0.16);
  font-size: 0.78rem;
  font-weight: 850;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.storefront-checkout-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(77, 94, 75, 0.2);
}

.storefront-checkout-button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.storefront-checkout-button svg {
  width: 1rem;
  height: 1rem;
}

.storefront-checkout-note {
  color: var(--store-text-muted);
  font-size: 0.56rem;
  line-height: 1.55;
  text-align: center;
}

.storefront-checkout-error {
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(154, 94, 88, 0.16);
  border-radius: 0.75rem;
  color: #985b55;
  background: rgba(154, 94, 88, 0.08);
  font-size: 0.62rem;
}



.storefront-out-of-stock {
  display: grid;
  place-items: center;
  min-height: 26rem;
  text-align: center;
}

.storefront-out-of-stock-icon {
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #9a5e58;
  background: rgba(154, 94, 88, 0.08);
}

.storefront-out-of-stock-icon svg {
  width: 1.4rem;
  height: 1.4rem;
}

.storefront-out-of-stock h2 {
  margin-top: 0.8rem;
  font-size: 1.7rem;
  font-weight: 600;
}

.storefront-out-of-stock p {
  max-width: 28rem;
  margin-top: 0.45rem;
  color: var(--store-text-muted);
  font-size: 0.72rem;
  line-height: 1.65;
}

.storefront-secondary-button {
  display: inline-flex;
  margin-top: 1rem;
  padding: 0.68rem 0.92rem;
  border-radius: 999px;
  color: #faf8f2;
  background: var(--store-primary-hover);
  font-size: 0.7rem;
  font-weight: 800;
}

@media (max-width: 1023px) {
  .storefront-checkout-layout {
    grid-template-columns: 1fr;
  }

  .storefront-checkout-card {
    position: static;
  }
}

@media (max-width: 639px) {
  .storefront-checkout-shell {
    width: min(100% - 1rem, 72rem);
    padding-top: 0.8rem;
  }

  .storefront-product-summary,
  .storefront-checkout-card {
    border-radius: 1.05rem;
  }

  .storefront-product-summary,
  .storefront-checkout-card {
    padding: 0.9rem;
  }

  .storefront-product-summary-top {
    grid-template-columns: 1fr;
    gap: 0.9rem;
  }

  .storefront-product-summary-media {
    max-width: 15rem;
    margin: 0 auto;
  }

  .storefront-product-summary-copy {
    text-align: left;
  }





  .storefront-form-grid {
    grid-template-columns: 1fr;
  }


}


/* Product terms */
.storefront-product-terms {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(135, 151, 130, 0.16);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.34);
}

.storefront-product-terms-heading {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.72rem;
}

.storefront-product-terms-heading > span {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 999px;
  color: var(--store-primary-hover);
  background: rgba(135, 151, 130, 0.1);
}

.storefront-product-terms-heading svg { width: 1rem; height: 1rem; }
.storefront-product-terms-heading h2 { color: var(--store-text); font-size: 0.72rem; font-weight: 850; }
.storefront-product-terms-heading p { margin-top: 0.08rem; color: var(--store-text-muted); font-size: 0.56rem; }
.storefront-product-terms ul { display: grid; gap: 0.46rem; padding-left: 0; color: var(--store-text-soft); font-size: 0.6rem; line-height: 1.52; list-style: none; }
.storefront-product-terms li { position: relative; padding-left: 0.9rem; }
.storefront-product-terms li::before { content: ""; position: absolute; left: 0; top: 0.58em; width: 0.28rem; height: 0.28rem; border-radius: 999px; background: var(--store-primary-hover); opacity: 0.72; }

.storefront-quantity-notes { display: grid; gap: 0.15rem; }
.storefront-quantity-note strong { color: #526951; font-size: 0.68rem; font-weight: 900; }

/* Remove native number steppers in every supported browser. */
.storefront-quantity-input::-webkit-outer-spin-button,
.storefront-quantity-input::-webkit-inner-spin-button,
.no-spinner::-webkit-outer-spin-button,
.no-spinner::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.storefront-quantity-input,
.no-spinner { appearance: textfield; -moz-appearance: textfield; }

/* Checkout confirmation */
.storefront-confirmation-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.storefront-confirmation-modal.is-open { visibility: visible; opacity: 1; }
.storefront-confirmation-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(43, 49, 44, 0.48); backdrop-filter: blur(5px); }
.storefront-confirmation-dialog {
  position: relative;
  width: min(100%, 27rem);
  padding: 2rem 1.6rem 1.5rem;
  border: 1px solid rgba(135, 151, 130, 0.2);
  border-radius: 1.25rem;
  background: #faf7f0;
  box-shadow: 0 28px 80px rgba(37, 43, 38, 0.24);
  text-align: center;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.2s ease;
}
.storefront-confirmation-modal.is-open .storefront-confirmation-dialog { transform: translateY(0) scale(1); }
.storefront-confirmation-close { position: absolute; top: 0.8rem; right: 0.8rem; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 999px; color: var(--store-text-muted); background: rgba(135,151,130,.08); }
.storefront-confirmation-close svg { width: 1rem; height: 1rem; }
.storefront-confirmation-icon { width: 3.2rem; height: 3.2rem; display: grid; place-items: center; margin: 0 auto 0.8rem; border-radius: 999px; color: var(--store-primary-hover); background: rgba(135,151,130,.11); }
.storefront-confirmation-icon svg { width: 1.35rem; height: 1.35rem; }
.storefront-confirmation-eyebrow { color: var(--store-primary-hover); font-size: .58rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.storefront-confirmation-dialog h2 { margin-top: .35rem; color: var(--store-text); font-size: 1.8rem; font-weight: 600; letter-spacing: -.035em; }
.storefront-confirmation-dialog > p:not(.storefront-confirmation-eyebrow) { max-width: 22rem; margin: .55rem auto 0; color: var(--store-text-muted); font-size: .68rem; line-height: 1.65; }
.storefront-confirmation-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; margin-top: 1.25rem; }
.storefront-confirmation-actions button { min-height: 2.9rem; border-radius: .78rem; font-size: .67rem; font-weight: 850; }
.storefront-confirmation-cancel { border: 1px solid rgba(135,151,130,.24); color: var(--store-text-soft); background: transparent; }
.storefront-confirmation-accept { color: #faf8f2; background: linear-gradient(135deg,#879782,#657763); box-shadow: 0 10px 22px rgba(77,94,75,.16); }
.storefront-confirmation-actions button:disabled { opacity: .55; cursor: not-allowed; }
.storefront-checkout-confirmation-open { overflow: hidden; }

@media (max-width: 639px) {
  .storefront-confirmation-actions { grid-template-columns: 1fr; }
  .storefront-confirmation-dialog { padding: 1.8rem 1rem 1rem; }
}


/* Hard fallback: quantity never shows browser-native steppers. */
input.storefront-quantity-input[type="number"]::-webkit-inner-spin-button,
input.storefront-quantity-input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none !important;
  appearance: none !important;
  margin: 0 !important;
}
input.storefront-quantity-input[type="number"] {
  -moz-appearance: textfield !important;
  appearance: textfield !important;
}
