/* Studio Press public visual refresh.
   Palette remains driven by the existing Format variables: cream, ink, gold. */

:root {
  --radius: 6px;
  --radius-sm: 4px;
  --radius-pill: 6px;
  --radius-card: 6px;
  --shadow: 0 18px 46px rgba(26, 23, 20, 0.12);
  --shadow-soft: 0 10px 28px rgba(26, 23, 20, 0.08);
  --focus-ring: 0 0 0 3px rgba(200, 162, 74, 0.22);
}

body {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 96%, var(--ink) 4%) 0%, var(--bg) 420px),
    var(--bg);
}

body.dark {
  background:
    linear-gradient(180deg, #1b1812 0%, #14120e 520px),
    var(--bg);
}

a,
button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.header {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom-color: color-mix(in srgb, var(--border) 72%, transparent);
  box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 12px 32px rgba(0,0,0,.08);
}

.header-inner {
  max-width: 1440px;
  height: 72px;
  padding-inline: clamp(18px, 3vw, 40px);
}

.brand-logo__fallback {
  font-size: 24px;
}

.brand-logo__fallback::before {
  width: 34px;
  height: 34px;
  border-left-width: 5px;
  border-bottom-width: 5px;
  transform: translateY(-1px);
}

.header-search {
  max-width: 420px;
  min-width: 220px;
}

.header-search form,
.ctrl-group,
.account-btn,
.cart-btn {
  border-radius: var(--radius-pill);
}

.header-search form {
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.header-search form:focus-within {
  border-color: var(--gold);
  background: var(--surface);
  box-shadow: var(--focus-ring);
}

.header-search input {
  min-height: 40px;
}

.header-actions {
  gap: 10px;
  min-width: 0;
}

.header-utility-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.header-utility-controls .ctrl-group {
  min-height: 38px;
}

.header-utility-controls .ctrl-btn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding-inline: 12px;
}

.cart-btn,
.view-btn,
.add-btn,
.quote-btn,
.btn-submit,
.success-close {
  box-shadow: 0 10px 24px rgba(200, 162, 74, .16);
}

.cart-btn:hover,
.view-btn:hover,
.add-btn:hover:not(:disabled),
.quote-btn:hover,
.btn-submit:hover,
.success-close:hover {
  transform: translateY(-1px);
}

.cat-nav {
  background: color-mix(in srgb, var(--bg-2) 88%, var(--paper) 12%);
}

.cat-nav-inner {
  max-width: 1440px;
  padding-inline: clamp(18px, 3vw, 40px);
}

.ctrl-group {
  background: color-mix(in srgb, var(--surface) 76%, transparent);
}

.ctrl-btn {
  min-height: 30px;
  padding-inline: 12px;
}

.ctrl-btn.active {
  color: #0c0b08;
  background: var(--gold);
}

.cat-nav-inner {
  gap: 8px;
}

.cat-link {
  position: relative;
  padding: 15px 20px 14px;
  border-bottom: 0;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.cat-link::after {
  content: "";
  position: absolute;
  inset-inline: 14px;
  bottom: 0;
  height: 2px;
  background: transparent;
  transition: background .16s ease, inset .16s ease;
}

.cat-link:hover {
  background: color-mix(in srgb, var(--surface) 50%, transparent);
}

.cat-link.active {
  color: var(--gold);
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  border-bottom-color: transparent;
}

.cat-link.active::after,
.cat-link:hover::after {
  background: var(--gold);
  inset-inline: 10px;
}

.main {
  max-width: 1440px;
  padding: clamp(28px, 4vw, 52px) clamp(18px, 3vw, 40px);
}

.storefront-hero {
  margin: calc(-1 * clamp(28px, 4vw, 52px)) calc(-1 * clamp(18px, 3vw, 40px)) 36px;
  border-bottom-color: var(--line-2);
  background: var(--bg);
}

body.dark .storefront-hero {
  background: #14120e;
}

.storefront-hero__image {
  position: relative;
  border-bottom: 1px solid var(--line-2);
}

.storefront-hero__image::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 -70px 90px rgba(0,0,0,.12);
}

.storefront-hero__image img {
  max-height: 430px;
  min-height: 280px;
  object-fit: cover;
}

.storefront-hero__inner {
  max-width: 1440px;
  padding: 34px clamp(18px, 3vw, 40px) 38px;
}

.storefront-hero__grid {
  grid-template-columns: minmax(0, 1fr) minmax(360px, .74fr);
  gap: clamp(20px, 3vw, 34px);
}

.storefront-hero__kicker,
.section-kicker {
  color: var(--gold);
  font-weight: 700;
}

.storefront-hero h1 {
  max-width: 780px;
  font-size: clamp(2.1rem, 4.2vw, 4rem);
  line-height: .98;
  margin-bottom: 14px;
}

.storefront-hero__lead {
  max-width: 700px;
  font-size: clamp(15px, 1.3vw, 17px);
}

.storefront-hero__actions {
  margin-top: 22px;
}

.storefront-hero__panel {
  position: relative;
  border-color: color-mix(in srgb, var(--gold) 30%, var(--border));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, var(--gold) 4%), var(--surface));
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.storefront-hero__panel::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 4px;
  background: var(--gold);
}

.storefront-stats {
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.storefront-stat {
  background: color-mix(in srgb, var(--bg-2) 88%, var(--gold) 12%);
}

.storefront-chip-row a,
.product-flags span,
.tag,
.pill,
.stock-badge {
  border-radius: var(--radius-sm);
}

.storefront-chip-row a {
  transition: border-color .16s ease, color .16s ease, transform .16s ease, background .16s ease;
}

.storefront-chip-row a:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--gold) 10%, var(--surface));
}

.listing-toolbar {
  align-items: stretch;
  padding: 16px;
  margin-bottom: 28px;
  background: color-mix(in srgb, var(--surface) 94%, var(--gold) 6%);
  border-color: color-mix(in srgb, var(--gold) 28%, var(--border));
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
}

.listing-tools-main {
  gap: 10px;
}

.listing-toolbar label {
  min-width: 132px;
}

.listing-toolbar select,
.listing-toolbar input {
  border-radius: var(--radius-sm);
  background: var(--paper);
  transition: border-color .16s ease, box-shadow .16s ease;
}

body.dark .listing-toolbar select,
body.dark .listing-toolbar input {
  background: var(--bg-3);
}

.listing-toolbar button,
.listing-toolbar a {
  border-radius: var(--radius-sm);
  transition: border-color .16s ease, color .16s ease, background .16s ease, transform .16s ease;
}

.listing-toolbar button:hover,
.listing-toolbar a:hover {
  transform: translateY(-1px);
}

.listing-count {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  min-height: 37px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  border-radius: var(--radius-sm);
}

.product-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: clamp(18px, 2vw, 28px);
}

.product-card {
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--surface) 96%, var(--gold) 4%);
  box-shadow: 0 1px 0 rgba(255,255,255,.04);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.product-img {
  aspect-ratio: 4 / 3.45;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--bg-3) 80%, var(--gold) 20%), var(--surface2));
}

.product-img::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,.08);
  pointer-events: none;
}

.product-img img {
  transition: transform .38s ease, filter .38s ease;
}

.product-card:hover .product-img img {
  transform: scale(1.035);
  filter: saturate(1.04) contrast(1.02);
}

.featured-badge {
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 18px rgba(0,0,0,.14);
}

.product-body {
  padding: 18px;
  gap: 9px;
}

.product-name {
  font-size: 20px;
  line-height: 1.1;
}

.product-name:hover {
  color: var(--gold);
}

.product-desc {
  font-size: 13px;
  min-height: 39px;
}

.product-flags span {
  background: color-mix(in srgb, var(--surface2) 86%, var(--gold) 14%);
}

.product-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 2px;
  font-size: 18px;
}

.view-btn {
  border-radius: var(--radius-sm);
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.related-products {
  margin-top: 64px;
  padding-top: 32px;
}

.trust-strip {
  gap: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,.04);
}

.trust-item {
  background: color-mix(in srgb, var(--surface) 96%, var(--gold) 4%);
  transition: background .16s ease, color .16s ease;
}

.trust-item:hover {
  background: color-mix(in srgb, var(--surface) 88%, var(--gold) 12%);
}

.product-page {
  grid-template-columns: minmax(330px, .9fr) minmax(0, 1.1fr);
  gap: clamp(30px, 5vw, 70px);
}

.product-page .product-gallery {
  max-width: 560px;
}

.product-page .product-gallery .gallery-main {
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  background: color-mix(in srgb, var(--surface2) 88%, var(--gold) 12%);
}

.product-page .gallery-thumbs .thumb {
  border-radius: var(--radius-sm);
}

.product-details .brand-line {
  display: inline-flex;
  padding: 5px 8px;
  background: color-mix(in srgb, var(--gold) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 28%, transparent);
  border-radius: var(--radius-sm);
}

.product-title-row {
  align-items: center;
}

.product-details h1 {
  font-size: clamp(2.15rem, 4vw, 4rem);
  line-height: .95;
}

.product-save-btn {
  border-radius: var(--radius-sm);
}

.product-details .price-block {
  margin-bottom: 24px;
  padding-bottom: 24px;
}

.product-details .price-block .price-value {
  font-size: clamp(30px, 3.4vw, 42px);
}

.product-details .pd-desc {
  max-width: 760px;
  font-size: 15px;
}

.guided-form,
.quote-workflow,
.modal,
.cart-panel,
.success-box {
  border-radius: var(--radius-card);
}

.quote-workflow {
  border-color: color-mix(in srgb, var(--gold) 25%, var(--border));
  box-shadow: var(--shadow-soft);
}

.quote-workflow-head {
  padding: 18px 20px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--gold) 10%, transparent), transparent 70%),
    var(--bg-2);
}

.quote-workflow-progress {
  gap: 8px;
}

.quote-workflow-progress button,
.quote-step-next,
.quote-step-prev,
.pill-btn,
.addn-button,
.qty-stepper,
.qty,
.form-input,
.form-textarea,
.variant-select,
.config-input,
.sample-btn,
.disc-apply,
.file-input,
.share-row {
  border-radius: var(--radius-sm);
}

.quote-workflow-progress button {
  min-height: 40px;
}

.quote-workflow-step {
  padding: 22px;
}

.quote-step-heading {
  margin-bottom: 20px;
}

.quote-workflow-step .config-field,
.artwork-choice,
.quote-summary-box,
.quote-flag,
.shipping-note {
  border-radius: var(--radius-card);
}

.quote-workflow-step .config-field {
  background: color-mix(in srgb, var(--bg-2) 90%, var(--gold) 10%);
}

.pill-btn {
  min-height: 40px;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.pill-btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.pill-btn.selected,
.swatch.selected {
  box-shadow: 0 0 0 2px rgba(200,162,74,.18);
}

.swatch {
  width: 38px;
  height: 38px;
}

.size-active-editor {
  border-radius: var(--radius-card);
}

.additions-list {
  gap: 10px;
}

.addn-button {
  min-height: 82px;
  background: color-mix(in srgb, var(--surface2) 92%, var(--gold) 8%);
}

.addn-row.selected .addn-button {
  background: color-mix(in srgb, var(--gold) 15%, var(--surface));
}

.artwork-choice {
  background: color-mix(in srgb, var(--bg-2) 88%, var(--gold) 12%);
}

.quote-summary-box {
  background: color-mix(in srgb, var(--gold) 9%, var(--surface));
}

.quote-summary-row {
  align-items: center;
}

.quote-summary-total {
  margin-top: 4px;
  padding: 10px 0 0;
}

.cart-panel {
  overflow: hidden;
  box-shadow: -24px 0 60px rgba(0,0,0,.22);
}

.cart-header,
.cart-footer {
  background: color-mix(in srgb, var(--surface) 94%, var(--gold) 6%);
}

.cart-item {
  border-bottom-color: color-mix(in srgb, var(--border) 78%, transparent);
}

.wa-float {
  border: 2px solid rgba(255,255,255,.28);
}

@media (min-width: 1180px) {
  .product-page .product-gallery .gallery-main {
    aspect-ratio: 1 / 1.06;
  }
}

@media (max-width: 880px) {
  .header-inner {
    height: auto;
    min-height: 62px;
    flex-wrap: wrap;
    padding-block: 9px;
  }

  .header-search {
    order: 3;
    flex: 1 0 100%;
    max-width: none;
  }

  .header-actions {
    flex: 1 1 auto;
    justify-content: flex-end;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .header-actions::-webkit-scrollbar {
    display: none;
  }

  .header-utility-controls {
    flex-shrink: 0;
  }

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

  .storefront-hero__panel {
    box-shadow: none;
  }

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

@media (max-width: 640px) {
  :root {
    --radius: 5px;
    --radius-sm: 4px;
    --radius-pill: 5px;
    --radius-card: 5px;
  }

  .main {
    padding-inline: 14px;
  }

  .header-actions {
    order: 2;
    flex-basis: auto;
    justify-content: flex-end;
  }

  .header-utility-controls {
    gap: 5px;
  }

  .header-utility-controls .ctrl-group {
    min-height: 32px;
  }

  .header-utility-controls .ctrl-btn {
    min-height: 30px;
    padding-inline: 8px;
    font-size: 10px;
  }

  .storefront-hero {
    margin-inline: -14px;
  }

  .storefront-hero__inner {
    padding-inline: 14px;
  }

  .storefront-hero__image img {
    min-height: 190px;
    object-position: center center;
  }

  .listing-toolbar {
    padding: 12px;
  }

  .listing-toolbar label {
    min-width: calc(50% - 5px);
    flex: 1;
  }

  .listing-toolbar button,
  .listing-toolbar a {
    flex: 1;
  }

  .product-body {
    padding: 16px;
  }

  .quote-workflow-step {
    padding: 16px;
  }
}

/* Typography consistency */
.storefront-hero__kicker,
.storefront-hero h1,
.storefront-hero__panel strong,
.storefront-stat b,
.storefront-stat span,
.storefront-chip-row a,
.listing-toolbar label span,
.listing-toolbar button,
.listing-toolbar a,
.listing-count,
.section-kicker,
.featured-badge,
.product-name,
.product-flags span,
.product-configurator .config-label,
.variant-select,
.config-input,
.ctrl-btn,
.cat-link,
.account-btn,
.cart-btn {
  font-family: var(--font-ui);
}

.storefront-hero__kicker,
.storefront-hero__panel strong,
.storefront-stat span,
.listing-toolbar label span,
.listing-count,
.section-kicker,
.featured-badge,
.product-flags span,
.product-configurator .config-label {
  font-size: 12px;
}

.ctrl-btn,
.cat-link,
.account-btn,
.cart-btn,
.listing-toolbar button,
.listing-toolbar a,
.variant-select,
.config-input {
  font-size: 14px;
}

.product-name { font-size: 18px; }
.product-desc { font-size: 13px; }

html:lang(ar) *,
html:lang(he) * {
  letter-spacing: 0;
}
