/* ============================================================================
   VITRINE DESIGN SYSTEM — Components
   Requires colors_and_type.css. Pure CSS recreations of the component grammar.
   States documented: DEFAULT and ACTIVE (pressed) only — no hover color shifts.
   ============================================================================ */

/* ===== BUTTONS ============================================================ */
.btn {
  font-family: var(--font-text);
  font-feature-settings: var(--font-features);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  white-space: nowrap;
  transition: transform 0.18s var(--ease-standard), opacity 0.18s var(--ease-standard);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(var(--press-scale)); }
.btn:focus-visible { outline: 2px solid var(--color-primary-focus); outline-offset: 2px; }

/* Primary — the signature pill */
.btn-primary {
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: var(--type-body-size);
  font-weight: 400;
  line-height: 1;
  border-radius: var(--radius-pill);
  padding: 11px 22px;
}

/* Secondary pill — the "ghost pill" partner CTA */
.btn-secondary-pill {
  background: transparent;
  color: var(--color-primary);
  font-size: var(--type-body-size);
  font-weight: 400;
  line-height: 1;
  border: 1px solid var(--color-primary);
  border-radius: var(--radius-pill);
  padding: 10px 21px; /* -1px to absorb the border */
}

/* Dark utility — global nav actions (Sign In, Bag) */
.btn-dark-utility {
  background: var(--color-ink);
  color: var(--color-body-on-dark);
  font-size: var(--type-button-utility-size);
  font-weight: 400;
  letter-spacing: var(--type-button-utility-ls);
  line-height: var(--type-button-utility-lh);
  border-radius: var(--radius-sm);
  padding: 8px 15px;
}

/* Pearl capsule — product-card secondary */
.btn-pearl {
  background: var(--color-surface-pearl);
  color: var(--color-ink-muted-80);
  font-size: var(--type-caption-size);
  border: 3px solid var(--color-divider-soft);
  border-radius: var(--radius-md);
  padding: 8px 14px;
}

/* Store hero — large primary, the rare weight-300 label */
.btn-store-hero {
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-size: var(--type-button-large-size);
  font-weight: 300;
  line-height: 1;
  border-radius: var(--radius-pill);
  padding: 14px 28px;
}

/* Circular icon control — floats over photography */
.btn-icon-circular {
  width: 44px; height: 44px;
  padding: 0;
  background: var(--color-surface-chip-translucent);
  color: var(--color-ink);
  border-radius: var(--radius-full);
  backdrop-filter: var(--blur-frosted);
}

.btn[disabled] { color: var(--color-ink-muted-48); cursor: default; }
.btn[disabled]:active { transform: none; }

/* ===== TEXT LINKS ========================================================= */
.text-link { color: var(--color-primary); }
.text-link-on-dark { color: var(--color-primary-on-dark); }

/* ===== GLOBAL NAV ========================================================= */
.global-nav {
  height: var(--nav-height);
  background: var(--color-surface-black);
  color: var(--color-body-on-dark);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 22px;
}
.global-nav a {
  color: var(--color-body-on-dark);
  font-size: var(--type-nav-link-size);
  letter-spacing: var(--type-nav-link-ls);
  opacity: 0.8;
}
.global-nav a:hover { opacity: 1; text-decoration: none; }

/* ===== SUB-NAV (frosted) ================================================== */
.sub-nav {
  height: var(--subnav-height);
  background: color-mix(in srgb, var(--color-canvas-parchment) 80%, transparent);
  backdrop-filter: var(--blur-frosted);
  border-bottom: var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}
.sub-nav .category {
  font-family: var(--font-display);
  font-size: var(--type-tagline-size);
  font-weight: 600;
  letter-spacing: var(--type-tagline-ls);
  color: var(--color-ink);
}
.sub-nav .links { display: flex; align-items: center; gap: 24px; }
.sub-nav .links a {
  color: var(--color-ink);
  font-size: var(--type-button-utility-size);
  letter-spacing: var(--type-button-utility-ls);
}

/* ===== PRODUCT TILE ======================================================= */
.product-tile {
  border-radius: var(--radius-none);
  padding: var(--space-section) var(--space-lg);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}
.product-tile .tile-cta-row { display: flex; gap: var(--space-md); align-items: center; }

/* The single product shadow — applies to product imagery only */
.product-shadow { box-shadow: var(--shadow-product); }

/* ===== UTILITY / STORE CARD =============================================== */
.store-card {
  background: var(--color-canvas);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.store-card .thumb {
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
}
.store-card .name { font-size: var(--type-body-strong-size); font-weight: 600; letter-spacing: var(--type-body-strong-ls); }
.store-card .price { font-size: var(--type-body-size); }

/* ===== CONFIGURATOR OPTION CHIP =========================================== */
.option-chip {
  background: var(--color-canvas);
  color: var(--color-ink);
  font-size: var(--type-caption-size);
  border: 1px solid var(--color-hairline);
  border-radius: var(--radius-pill);
  padding: 12px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  transition: border-color 0.15s var(--ease-standard);
}
.option-chip.selected { border: 2px solid var(--color-primary-focus); padding: 11px 15px; }

/* ===== SEARCH INPUT ======================================================= */
.search-input {
  height: 44px;
  background: var(--color-canvas);
  color: var(--color-ink);
  font-family: var(--font-text);
  font-size: var(--type-body-size);
  border: 1px solid var(--color-border-card);
  border-radius: var(--radius-pill);
  padding: 12px 20px;
}
.search-input::placeholder { color: var(--color-ink-muted-48); }

/* ===== FLOATING STICKY BAR ================================================ */
.sticky-bar {
  height: 64px;
  background: color-mix(in srgb, var(--color-canvas-parchment) 80%, transparent);
  backdrop-filter: var(--blur-frosted);
  border-top: var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
}

/* ===== FOOTER ============================================================= */
.footer {
  background: var(--color-canvas-parchment);
  color: var(--color-ink-muted-80);
  padding: 64px 22px;
}
.footer .col-head { font-size: var(--type-caption-strong-size); font-weight: 600; letter-spacing: var(--type-caption-strong-ls); margin-bottom: var(--space-xs); }
.footer .links a { display: block; color: var(--color-ink-muted-80); font-size: var(--type-dense-link-size); line-height: var(--type-dense-link-lh); }
.footer .legal { font-size: var(--type-fine-print-size); color: var(--color-ink-muted-48); letter-spacing: var(--type-fine-print-ls); }
