/* Sjors Wear store-wide styles (Step 12). Carries the homepage hero's
 * typography, gold label and pill buttons into shop, product, cart,
 * checkout and account pages. Colors come from the Blocksy palette. */

:root {
  --sw-gold: var(--theme-palette-color-1);
  --sw-gold-deep: var(--theme-palette-color-2);
  --sw-ink: var(--theme-palette-color-4);
  --sw-text: var(--theme-palette-color-3);
  --sw-line: rgba(185,168,152,.55);
  --sw-surface: #fbf8f4;
  --sw-serif: 'Cormorant Garamond', Georgia, serif;
  --theme-form-field-border-radius: 10px;
  --theme-form-field-height: 50px;
  --theme-form-field-border-initial-color: var(--sw-line);
  --theme-form-field-border-focus-color: var(--sw-gold-deep);
  --theme-form-field-background-initial-color: var(--sw-surface);
  --theme-form-field-background-focus-color: #fff;
}

/* Shared: gold collection label */
.sw-label, .woocommerce .hero-section .page-title::before {
  display: flex; align-items: center; gap: 14px; color: var(--sw-gold-deep);
  font-family: Jost, 'Helvetica Neue', Arial, sans-serif; font-size: 12px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase;
}

/* ---------- Shop, category and search archives ---------- */
.woocommerce .hero-section[data-type="type-1"] { margin-bottom: 28px; }
.woocommerce .hero-section .page-title { display: flex; flex-direction: column; gap: 18px; font-size: clamp(40px, 5vw, 64px); line-height: 1.02; font-weight: 500; }
.woocommerce .hero-section .page-title::before { content: "Fall collection"; font-size: 12px; line-height: 1; }
.tax-product_cat .hero-section .page-title::before { content: "Shop by category"; }
.search .hero-section .page-title::before { content: "Search"; }
.woocommerce .hero-section .page-description, .woocommerce .hero-section .page-description p { max-width: 52ch; color: var(--sw-text); font-size: 17px; line-height: 1.65; margin-top: 4px; }

.sw-cat-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; padding: 0; }
.sw-cat-pills a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border: 1px solid var(--sw-line); border-radius: 999px;
  color: var(--sw-ink); font-size: 14px; text-decoration: none; transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.sw-cat-pills a:hover { border-color: var(--sw-ink); }
.sw-cat-pills a[aria-current="page"] { background: var(--sw-ink); border-color: var(--sw-ink); color: var(--theme-palette-color-7); }
.sw-cat-pills a:focus-visible { outline: 2px solid var(--sw-ink); outline-offset: 3px; }
@media (max-width: 689px) {
  .sw-cat-pills { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: calc(50% - 50vw); padding-right: 24px; }
  .sw-cat-pills::-webkit-scrollbar { display: none; }
  .sw-cat-pills a { flex: none; }
}
.woocommerce-result-count { font-size: 13px; color: var(--sw-text); }

/* Product cards: 4:5 photo, small category label, readable name and price */
[data-products] .product figure, [data-products] .product .ct-media-container { border-radius: 3px; overflow: hidden; }
[data-products] .product .ct-media-container img { transition: transform 1s cubic-bezier(.2,.7,.1,1); }
[data-products] .product:hover .ct-media-container img { transform: scale(1.04); }
[data-products] .product .entry-meta, [data-products] .product .entry-meta a {
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--sw-gold-deep); text-decoration: none;
}
[data-products] .product .woocommerce-loop-product__title { font-family: Jost, 'Helvetica Neue', Arial, sans-serif; font-size: 16px; font-weight: 500; line-height: 1.35; color: var(--sw-ink); }
[data-products] .product .price { font-size: 15px; color: var(--sw-text); }
[data-products] .product a:focus-visible { outline: 2px solid var(--sw-ink); outline-offset: 3px; }

.woocommerce-info, .woocommerce-message, .woocommerce-error, .woocommerce-no-products-found .woocommerce-info {
  background: var(--sw-surface); border: 1px solid var(--sw-line); border-left: 3px solid var(--sw-gold); border-radius: 10px; color: var(--sw-ink);
}
.woocommerce-error { border-left-color: #9c2f2f; }

/* ---------- Product page ---------- */
.single-product .product_title { font-size: clamp(36px, 4vw, 52px); line-height: 1.04; font-weight: 500; margin-bottom: 10px; }
.single-product .entry-summary .price { font-size: 22px; color: var(--sw-ink); }
.single-product .woocommerce-product-details__short-description { font-size: 17px; line-height: 1.65; color: var(--sw-text); }
.single-product .entry-summary::before {
  content: "Fall collection"; display: flex; align-items: center; gap: 14px; margin-bottom: 14px; font-family: Jost, 'Helvetica Neue', Arial, sans-serif;
  color: var(--sw-gold-deep); font-size: 12px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase;
}
.single-product .variations th, .single-product .variations .label label { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--sw-ink); }
.single-product .variations select { border-radius: 10px; }
.single-product .reset_variations { font-size: 13px; }
.single-product .single_add_to_cart_button { border-radius: 999px; }
.single-product .single_add_to_cart_button.disabled { opacity: .55; }
.single-product .woocommerce-variation-availability .stock { font-size: 14px; color: var(--sw-gold-deep); }
.single-product .woocommerce-variation-availability .out-of-stock { color: #9c2f2f; }
.single-product .product_meta { font-size: 13px; color: var(--sw-text); }
.single-product .woocommerce-product-gallery, .single-product .ct-product-gallery-container { border-radius: 3px; }
.single-product .woocommerce-tabs .ct-accordion-heading, .single-product .woocommerce-tabs .tabs a { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.single-product .woocommerce-Tabs-panel ul { padding-left: 1.1em; }
.single-product .woocommerce-Tabs-panel li { margin-bottom: 6px; }
.single-product .related > h2, .single-product .up-sells > h2 { font-size: clamp(30px, 3.4vw, 44px); font-weight: 500; }

/* ---------- Cart, checkout, account ---------- */
.woocommerce-cart .entry-title, .woocommerce-checkout .entry-title, .woocommerce-account .entry-title { font-size: clamp(38px, 4.4vw, 56px); font-weight: 500; }
.woocommerce-cart table.shop_table, .woocommerce-checkout table.shop_table { border-color: var(--sw-line); border-radius: 12px; overflow: hidden; }
.woocommerce-cart .product-name a { color: var(--sw-ink); font-weight: 500; text-decoration: none; }
.woocommerce-cart .cart_totals, .woocommerce-checkout #order_review, .woocommerce-checkout .woocommerce-checkout-review-order {
  background: var(--sw-surface); border: 1px solid var(--sw-line); border-radius: 14px; padding: clamp(20px, 3vw, 32px);
}
.woocommerce-cart .cart_totals h2, .woocommerce-checkout h3, .woocommerce-account h2 { font-size: 28px; font-weight: 500; }
.woocommerce .button, .woocommerce button.button, .woocommerce a.button, .woocommerce #place_order, .checkout-button { border-radius: 999px !important; }
.woocommerce-checkout #place_order, .woocommerce-cart .checkout-button { min-height: 54px; font-size: 16px; }
/* Coupon and cart updates are secondary actions */
.woocommerce-cart .coupon .button, .woocommerce-cart button[name="update_cart"], .woocommerce-checkout .checkout_coupon .button {
  background: transparent !important; color: var(--sw-ink) !important; border: 1px solid var(--sw-ink) !important;
}
.woocommerce-cart .coupon .button:hover, .woocommerce-checkout .checkout_coupon .button:hover { background: var(--sw-ink) !important; color: var(--theme-palette-color-7) !important; }
.woocommerce-account .woocommerce-form-login, .woocommerce-account .woocommerce-form-register {
  background: var(--sw-surface); border: 1px solid var(--sw-line); border-radius: 14px; padding: clamp(22px, 3vw, 36px);
}
.woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; }
.woocommerce-MyAccount-navigation a { display: block; padding: 10px 0; border-bottom: 1px solid var(--sw-line); color: var(--sw-ink); text-decoration: none; }
.woocommerce-MyAccount-navigation .is-active a { color: var(--sw-gold-deep); }
.woocommerce-cart .cart-empty, .woocommerce-cart .return-to-shop { text-align: center; }

/* Size buttons (store.js) */
.sw-visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sw-option-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.sw-option-pills button {
  min-width: 52px; min-height: 44px; padding: 0 16px; border: 1px solid var(--sw-line); border-radius: 999px; background: var(--sw-surface);
  color: var(--sw-ink); font: 500 14px/1 Jost, 'Helvetica Neue', Arial, sans-serif; cursor: pointer; transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.sw-option-pills button:hover { border-color: var(--sw-ink); }
.sw-option-pills button[aria-checked="true"] { background: var(--sw-ink); border-color: var(--sw-ink); color: var(--theme-palette-color-7); }
.sw-option-pills button.is-unavailable { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.sw-option-pills button:focus-visible { outline: 2px solid var(--sw-ink); outline-offset: 3px; }

/* Detail section headings under the purchase block */
.single-product .woocommerce-tabs h2, .single-product .woocommerce-Tabs-panel > h2 {
  margin: 26px 0 12px; padding-top: 22px; border-top: 1px solid var(--sw-line);
  font: 500 12px/1 Jost, 'Helvetica Neue', Arial, sans-serif; letter-spacing: .24em; text-transform: uppercase; color: var(--sw-gold-deep);
}
.single-product .woocommerce-product-attributes { border-radius: 10px; overflow: hidden; }

/* ---------- 404 ---------- */
.error404 .page-title { font-size: clamp(40px, 5vw, 64px); font-weight: 500; }
