/*
 * Phase 7 — shop, product, cart/checkout, Fluent Forms.
 */

/* -------------------------------------------------------------------------
 * Shop grid (loop-project visual language)
 * ---------------------------------------------------------------------- */

.a460-shop-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.a460-product-card {
  display: flex;
  flex-direction: column;
  background: var(--a460-color-cream);
  height: 100%;
}

.a460-product-card__media {
  display: block;
  background: var(--a460-color-primary);
}

.a460-product-card__media img,
.a460-product-card .a460-product-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}

.a460-product-card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 20px 20px;
  flex: 1;
}

.a460-product-card__subtitle {
  color: var(--a460-color-secondary);
  font-size: 14px;
  font-weight: 700;
  margin: 0;
}

.a460-product-card__title {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.a460-product-card__title a {
  color: var(--a460-color-text);
  text-decoration: none;
}

.a460-product-card__title a:hover,
.a460-product-card__title a:focus {
  color: var(--a460-color-primary);
}

.a460-product-card__price,
.a460-product-single__price {
  font-size: 28px;
  font-weight: 900;
  color: var(--a460-color-primary);
  margin: 0;
}

.a460-product-card__excerpt {
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.a460-product-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-block-start: 8px;
}

.a460-product-card__actions .a460-btn-solid,
.a460-product-card__actions .a460-btn-outline,
a.a460-btn-solid,
a.a460-btn-outline,
button.a460-btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--a460-font-family);
  font-weight: 700;
  font-size: 16px;
  padding: 12px 22px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  line-height: 1.3;
}

a.a460-btn-solid,
button.a460-btn-solid {
  background: var(--a460-color-accent);
  color: var(--a460-color-white);
  border-color: var(--a460-color-accent);
}

a.a460-btn-solid:hover,
a.a460-btn-solid:focus,
button.a460-btn-solid:hover,
button.a460-btn-solid:focus {
  background: #a51d23;
  border-color: #a51d23;
  color: var(--a460-color-white);
}

a.a460-btn-outline {
  background: transparent;
  color: var(--a460-color-secondary);
  border-color: var(--a460-color-secondary);
}

a.a460-btn-outline:hover,
a.a460-btn-outline:focus {
  background: var(--a460-color-secondary);
  color: var(--a460-color-dark);
}

.a460-btn-block {
  width: 100%;
}

/* -------------------------------------------------------------------------
 * Placeholder image (whisky)
 * ---------------------------------------------------------------------- */

.a460-product-placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--a460-color-primary);
  color: var(--a460-color-white);
  min-height: 220px;
  overflow: hidden;
}

.a460-product-placeholder__emblem {
  max-height: 48%;
  width: auto;
  object-fit: contain;
  opacity: 0.35;
}

.a460-product-placeholder__mark {
  position: relative;
  z-index: 1;
  font-family: var(--a460-font-family);
  font-weight: 900;
  font-size: 72px;
  line-height: 1;
  color: var(--a460-color-secondary);
  letter-spacing: 0.04em;
}

.a460-product-placeholder__caption {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 16px;
}

/* -------------------------------------------------------------------------
 * Chips
 * ---------------------------------------------------------------------- */

.a460-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.a460-chips li {
  background: rgba(212, 160, 23, 0.15);
  border: 1px solid rgba(212, 160, 23, 0.45);
  color: var(--a460-color-primary);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
}

/* -------------------------------------------------------------------------
 * Single product
 * ---------------------------------------------------------------------- */

.a460-product-single {
  max-width: 720px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.a460-product-single__subtitle {
  color: var(--a460-color-secondary);
  font-weight: 700;
  font-size: 16px;
  margin: 0;
}

.a460-product-single__title {
  font-size: 40px;
  font-weight: 900;
  margin: 0;
  line-height: 1.15;
}

.a460-product-single .a460-gold-rule {
  width: 120px;
}

.a460-product-single__image img,
.a460-product-single__image .a460-product-placeholder {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

.a460-product-single__image .a460-product-placeholder {
  min-height: 320px;
  aspect-ratio: 4 / 3;
}

.a460-product-single__buy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.a460-product-single__cart {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  flex: 1;
  align-items: center;
}

.a460-product-single__cart input[type="number"] {
  width: 5.5em;
  font-family: var(--a460-font-family);
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(59, 74, 43, 0.3);
}

.a460-product-single__cart .a460-btn-solid {
  flex: 1;
}

.a460-age-notice,
.a460-product-note {
  margin: 0;
  font-size: 15px;
}

.a460-age-notice {
  color: var(--a460-color-accent);
  font-weight: 700;
}

.woocommerce-Price-amount,
.woocommerce-Price-currencySymbol {
  font-family: var(--a460-font-family);
}

/* -------------------------------------------------------------------------
 * Cart / checkout
 * ---------------------------------------------------------------------- */

.a460-woo {
  max-width: var(--a460-content-width);
  margin-inline: auto;
  padding: 48px 24px 72px;
}

.a460-woo h1,
.woocommerce-cart .entry-title,
.woocommerce-checkout .entry-title,
.woocommerce-account .entry-title {
  font-family: var(--a460-font-family);
  font-weight: 900;
  color: var(--a460-color-primary);
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #place_order,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
  background: var(--a460-color-accent) !important;
  color: var(--a460-color-white) !important;
  border-radius: 0 !important;
  font-family: var(--a460-font-family) !important;
  font-weight: 700 !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce #place_order:hover {
  background: #a51d23 !important;
}

.woocommerce-info,
.woocommerce-message {
  border-color: var(--a460-color-secondary) !important;
}

.a460-woo-alert {
  margin-block-end: 24px;
}

/* -------------------------------------------------------------------------
 * Fluent Forms
 * ---------------------------------------------------------------------- */

.a460-form {
  max-width: 640px;
  margin-inline: auto;
}

.a460-form .ff-el-group {
  margin-block-end: 18px;
}

.a460-form .ff-el-input--label label {
  font-family: var(--a460-font-family);
  font-weight: 700;
  color: var(--a460-color-text);
}

.a460-form .ff-el-form-control,
.a460-form select,
.a460-form textarea {
  font-family: var(--a460-font-family);
  font-size: 16px;
  border: 1px solid rgba(59, 74, 43, 0.3);
  border-radius: 0;
  background: var(--a460-color-white);
}

.a460-form .ff-btn-submit,
.a460-form .ff-btn-submit:hover,
.a460-form .ff-btn-submit:focus {
  width: 100%;
  background: var(--a460-color-accent) !important;
  border-color: var(--a460-color-accent) !important;
  color: var(--a460-color-white) !important;
  font-family: var(--a460-font-family) !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  padding: 14px 28px !important;
  border-radius: 0 !important;
}

.a460-form .ff-el-is-error .text-danger,
.a460-form .error.text-danger {
  color: var(--a460-color-accent);
}

.a460-form .ff-el-form-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.a460-donate-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.a460-form--donate .ff-el-form-check {
  border: 1px solid rgba(59, 74, 43, 0.25);
  padding: 8px 14px;
}

.a460-form--donate input[type="radio"]:checked + span,
.a460-form--donate .ff-el-form-check:has(input:checked) {
  background: var(--a460-color-primary);
  color: var(--a460-color-white);
  border-color: var(--a460-color-primary);
}

.a460-donate-total {
  font-size: 22px;
  font-weight: 900;
  color: var(--a460-color-primary);
  margin: 0 0 8px;
}

.a460-form .ff-message-success {
  background: rgba(59, 74, 43, 0.08);
  border: 1px solid var(--a460-color-primary);
  color: var(--a460-color-text);
  padding: 16px 20px;
}

.a460-tier.is-selected {
  border-color: var(--a460-color-secondary);
  box-shadow: 0 12px 28px rgba(10, 10, 10, 0.12);
}

.a460-tiers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 20px;
}

.a460-tiers .a460-tier {
  height: 100%;
  min-height: 100%;
  box-sizing: border-box;
}

.a460-tiers .a460-tier--featured {
  transform: none;
}

.a460-tiers .a460-btn-solid {
  margin-top: auto;
  text-align: center;
}

@media (max-width: 900px) {
  .a460-tiers {
    grid-template-columns: 1fr;
  }
}

.a460-thankyou {
  background: var(--a460-color-cream);
  border: 1px solid var(--a460-color-primary);
  padding: 16px 20px;
  margin: 0 0 24px;
}

.a460-thankyou p {
  margin: 0 0 8px;
}

.a460-thankyou p:last-child {
  margin-bottom: 0;
}

.a460-refund-policy,
.woocommerce-terms-and-conditions-wrapper .a460-refund-policy {
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 767px) {
  .a460-shop-grid {
    grid-template-columns: 1fr;
  }

  .a460-product-single__title {
    font-size: 32px;
  }

  .a460-product-card__actions .a460-btn-solid,
  .a460-product-card__actions .a460-btn-outline,
  .a460-product-single__cart .a460-btn-solid {
    width: 100%;
  }
}

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