/* Layout-safe editorial overlay: visual evolution only, no structural changes */

:root {
  --emm-focus-ring: color-mix(in srgb, var(--emm-color-accent, #1d324d) 62%, #ffffff);
  --emm-focus-offset: 2px;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--emm-focus-ring);
  outline-offset: var(--emm-focus-offset);
}

body {
  color: var(--emm-color-ink, #15181d);
  background: var(--emm-color-ivory, #fbf9f5);
  font-family: var(--emm-font-body, "Helvetica Neue", Arial, sans-serif);
}

:where(h1, h2, h3, h4, h5, h6) {
  font-family: var(--emm-font-display, Georgia, serif);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

:where(p, li, label, input, select, textarea, button, a, span) {
  font-family: var(--emm-font-body, "Helvetica Neue", Arial, sans-serif);
}

/* Keep text in natural case across UI labels */
.emm-kicker,
.emm-nav__link,
.emm-header__shortcut,
.emm-product-badge {
  text-transform: none !important;
  letter-spacing: 0.02em !important;
}

/* Shared button/input polish without changing sizing model */
:where(.btn, .emm-btn) {
  border-radius: var(--emm-radius-pill, 999px);
  transition: background var(--emm-time-base, 200ms) var(--emm-ease, ease),
              color var(--emm-time-base, 200ms) var(--emm-ease, ease),
              border-color var(--emm-time-base, 200ms) var(--emm-ease, ease),
              transform var(--emm-time-base, 200ms) var(--emm-ease, ease);
}

:where(.btn, .emm-btn):hover {
  transform: translateY(-1px);
}

:where(input, select, textarea, .form-input, .form-select, .form-textarea, .qty-input) {
  border-color: var(--emm-color-line-strong, #bfb5a8);
}

/* Catalog / collection page visual refinements (same layout) */
.catalog-title,
.catalog-page .catalog-title,
.catalog-page h1,
.shop-page .shop-title {
  font-family: var(--emm-font-display, Georgia, serif) !important;
  letter-spacing: -0.01em;
}

.catalog-subtitle,
.shop-subtitle,
.product-count {
  color: var(--emm-color-muted, #66717d) !important;
}

.catalog-page,
.shop-page {
  max-width: var(--emm-container-max, 78rem) !important;
  margin: 0 auto;
  padding: clamp(2rem, 4.6vw, 3.25rem) var(--emm-page-pad, 1rem) !important;
}

.catalog-header,
.shop-header {
  margin-bottom: var(--emm-space-8, 2rem) !important;
  padding-bottom: var(--emm-space-5, 1.25rem) !important;
  border-bottom: var(--emm-border-hairline, 1px solid #d9d2c8) !important;
}

.emm-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.38rem;
  margin: 0 0 var(--emm-space-5, 1.25rem);
  font-size: var(--emm-step--1, 0.9rem);
  color: var(--emm-color-muted, #66717d);
}

.emm-breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.emm-breadcrumbs a:hover {
  color: var(--emm-color-ink, #15181d);
}

.emm-page-head {
  margin-bottom: var(--emm-space-8, 2rem) !important;
  padding-bottom: var(--emm-space-5, 1.25rem) !important;
  border-bottom: var(--emm-border-hairline, 1px solid #d9d2c8) !important;
}

.emm-page-title {
  margin: 0;
  font-family: var(--emm-font-display, Georgia, serif) !important;
  font-size: clamp(1.9rem, 1.45rem + 1.7vw, 2.7rem);
  line-height: 1.06;
  letter-spacing: -0.01em;
}

.emm-page-subtitle {
  margin: 0.48rem 0 0;
  color: var(--emm-color-muted, #66717d);
  font-size: var(--emm-step-0, 1rem);
  max-width: 58ch;
}

.catalog-toolbar,
.shop-toolbar {
  margin-bottom: var(--emm-space-8, 2rem) !important;
}

.products-grid {
  gap: clamp(1rem, 2vw, 1.75rem) !important;
}

.product-card,
.products-grid .product-card {
  border: var(--emm-border-hairline, 1px solid #d9d2c8) !important;
  border-radius: var(--emm-radius-lg, 0.9rem) !important;
  box-shadow: none !important;
  background: var(--emm-color-white, #fff) !important;
}

.product-card:hover,
.products-grid .product-card:hover {
  box-shadow: 0 8px 24px rgba(20, 24, 30, 0.06) !important;
  border-color: var(--emm-color-line-strong, #bfb5a8) !important;
}

.emm-product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.15rem 0.55rem;
  border-radius: var(--emm-radius-pill, 999px);
  border: var(--emm-border-hairline, 1px solid #d9d2c8);
  background: color-mix(in srgb, var(--emm-color-paper, #f7f4ef) 92%, #fff);
  color: var(--emm-color-ink-soft, #262c34);
  font-size: 0.73rem;
  font-weight: 600;
  line-height: 1;
  z-index: 1;
}

.emm-empty-state__title {
  margin: 0 0 0.6rem;
  font-family: var(--emm-font-display, Georgia, serif);
  font-size: clamp(1.2rem, 0.95rem + 1vw, 1.7rem);
  letter-spacing: -0.01em;
}

.emm-filter-controls {
  align-items: center;
}

.emm-pagination .emm-btn {
  min-height: 2.35rem;
  padding: 0.45rem 0.9rem;
}

/* PDP visual overlay (structure untouched) */
.product-container .title,
.product-container h1.title {
  font-family: var(--emm-font-display, Georgia, serif) !important;
  letter-spacing: -0.01em !important;
  line-height: 1.06;
  text-transform: none !important;
}

.product-container .subtitle,
.product-container .label,
.product-container .breadcrumbs,
.product-container .accordion .content {
  color: var(--emm-color-ink-soft, #262c34);
}

.product-container .field .label,
.product-container .label {
  text-transform: none !important;
  letter-spacing: 0.01em !important;
  font-weight: 600;
}

.product-container .price-row {
  color: var(--emm-color-ink, #15181d);
}

.product-container .field,
.product-container .choices button,
.product-container .qty,
.product-container .accordion details,
.product-container .hero,
.product-container .thumbs button {
  border-color: var(--emm-color-line, #d9d2c8) !important;
}

.product-container .choices button {
  background: var(--emm-color-white, #fff) !important;
  color: var(--emm-color-ink, #15181d) !important;
  border-color: var(--emm-color-line-strong, #bfb5a8) !important;
  font-weight: 600;
}

.product-container .choices button:hover:not(:disabled) {
  background: #f2eee8 !important;
  border-color: #7f8a99 !important;
  color: var(--emm-color-ink, #15181d) !important;
}

.product-container .choices button[aria-pressed="true"] {
  background: var(--emm-color-ink, #15181d) !important;
  border-color: var(--emm-color-ink, #15181d) !important;
  color: var(--emm-color-white, #ffffff) !important;
}

.product-container .choices button[aria-pressed="true"]:hover,
.product-container .choices button[aria-pressed="true"]:focus-visible {
  background: var(--emm-color-ink, #15181d) !important;
  border-color: var(--emm-color-ink, #15181d) !important;
  color: var(--emm-color-white, #ffffff) !important;
}

.product-container .choices button:disabled,
.product-container .choices button[disabled] {
  opacity: 1 !important;
  background: #eceff3 !important;
  border-color: #cfd4dc !important;
  color: #5f6874 !important;
}

.product-container .buy {
  display: grid;
  grid-template-columns: auto minmax(10rem, 1fr) minmax(10rem, 1fr);
  align-items: stretch;
  gap: 0.75rem;
}

.product-container .buy .qty {
  min-width: 10.25rem;
  border-radius: var(--emm-radius-md, 0.6rem);
  border: var(--emm-border-hairline, 1px solid #d9d2c8);
  background: var(--emm-color-white, #fff);
}

.product-container .buy .qty button,
.product-container .buy .qty input {
  font-family: var(--emm-font-body, "Helvetica Neue", Arial, sans-serif);
}

.product-container .buy .btn {
  min-height: 3.25rem;
  border-radius: var(--emm-radius-md, 0.6rem);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
  border-width: 1px;
}

.product-container .buy #addBtn.btn-primary {
  background: var(--emm-color-ink, #15181d) !important;
  border-color: var(--emm-color-ink, #15181d) !important;
  color: var(--emm-color-white, #fff) !important;
}

.product-container .buy #addBtn.btn-primary:disabled {
  opacity: 1 !important;
  background: #d3d6db !important;
  border-color: #c0c6cf !important;
  color: #15181d !important;
}

.product-container .buy #buyBtn.btn-secondary,
.product-container .buy #wishlistBtn.btn-outline {
  background: var(--emm-color-white, #fff) !important;
  border-color: #9ea7b3 !important;
  color: var(--emm-color-ink, #15181d) !important;
}

.product-container .buy #buyBtn.btn-secondary:hover:not(:disabled),
.product-container .buy #wishlistBtn.btn-outline:hover:not(:disabled) {
  background: var(--emm-color-paper, #f7f4ef) !important;
  border-color: #7f8a99 !important;
}

.product-container .stock-badge {
  border: 1px solid var(--emm-color-line, #d9d2c8);
  border-radius: var(--emm-radius-pill, 999px);
  box-shadow: none;
}

.product-container .stock-badge.in-stock,
.product-container .stock-badge.low-stock,
.product-container .stock-badge.backorder,
.product-container .stock-badge.out-of-stock {
  background: color-mix(in srgb, var(--emm-color-paper, #f7f4ef) 90%, #fff) !important;
  color: var(--emm-color-ink-soft, #262c34) !important;
}

.product-container .stock-badge .dot {
  width: 6px !important;
  height: 6px !important;
}

.emm-sticky-atc {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 49;
  padding: 0.65rem var(--emm-page-pad, 1rem) calc(env(safe-area-inset-bottom) + 0.65rem);
  background: color-mix(in srgb, var(--emm-color-ivory, #fbf9f5) 90%, #fff);
  border-top: var(--emm-border-hairline, 1px solid #d9d2c8);
  transform: translateY(110%);
  transition: transform var(--emm-time-base, 200ms) var(--emm-ease, ease);
}

.emm-sticky-atc.is-visible {
  transform: translateY(0);
}

.emm-sticky-atc__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.emm-sticky-atc__meta {
  min-width: 0;
}

.emm-sticky-atc__title,
.emm-sticky-atc__price {
  margin: 0;
}

.emm-sticky-atc__title {
  font-size: 0.95rem;
  font-weight: 600;
}

.emm-sticky-atc__price {
  color: var(--emm-color-ink-soft, #262c34);
  font-size: 0.82rem;
}

.emm-sticky-atc .emm-btn {
  min-width: 10rem;
}

/* Cart visual overlay (structure untouched) */
.cart-main,
.cart-sidebar {
  border: var(--emm-border-hairline, 1px solid #d9d2c8) !important;
  border-radius: var(--emm-radius-lg, 0.9rem) !important;
  box-shadow: none !important;
}

.page-title {
  font-family: var(--emm-font-display, Georgia, serif) !important;
  letter-spacing: -0.01em;
}

.cart-page,
.cart-page .summary-row,
.cart-page .cart-item-title,
.cart-page .cart-item-variant,
.cart-page .continue-shopping,
.cart-page .btn {
  font-family: var(--emm-font-body, "Helvetica Neue", Arial, sans-serif);
}

.cart-page .summary-title,
.cart-page .page-title {
  font-family: var(--emm-font-display, Georgia, serif) !important;
}

.cart-item {
  border-bottom-color: var(--emm-color-line, #d9d2c8) !important;
}

.qty-selector,
.qty-btn,
.qty-input {
  border-color: var(--emm-color-line-strong, #bfb5a8) !important;
}

.remove-btn {
  color: color-mix(in srgb, var(--emm-color-ink, #15181d) 74%, #b42318) !important;
}

.summary-row.total {
  border-top-color: var(--emm-color-line, #d9d2c8) !important;
}

/* Empty states */
.empty-cart p,
.empty-state .empty-text {
  color: var(--emm-color-muted, #66717d) !important;
}

/* About/static pages (no layout changes) */
main h1,
main h2,
main .emm-title {
  font-family: var(--emm-font-display, Georgia, serif);
  letter-spacing: -0.01em;
}

/* Checkout page overlay (existing layout preserved) */
.checkout-page .page-title,
.checkout-page .section-title,
.checkout-page .summary-title {
  font-family: var(--emm-font-display, Georgia, serif);
  letter-spacing: -0.01em;
}

.checkout-page .checkout-main,
.checkout-page .checkout-sidebar,
.checkout-page .section {
  border-color: var(--emm-color-line, #d9d2c8) !important;
}

.checkout-page .form-input,
.checkout-page .checkbox-input {
  border-color: var(--emm-color-line-strong, #bfb5a8) !important;
}

.checkout-page .breadcrumb,
.checkout-page .summary-note,
.checkout-page .form-label,
.checkout-page .section-title {
  color: var(--emm-color-ink-soft, #262c34) !important;
}

/* Order confirmation / thank-you overlay (existing layout preserved) */
.oc-modern .oc-hero-title,
.oc-modern .oc-card h2,
.oc-modern .oc-summary-total {
  font-family: var(--emm-font-display, Georgia, serif) !important;
  letter-spacing: -0.01em;
}

.oc-modern .oc-card,
.oc-modern .oc-hero,
.oc-modern .oc-item,
.oc-modern .oc-pill,
.oc-modern .oc-summary-divider {
  border-color: var(--emm-color-line, #d9d2c8) !important;
  box-shadow: none !important;
}

.oc-modern .oc-card-sub,
.oc-modern .oc-item-variant,
.oc-modern .oc-bullets {
  color: var(--emm-color-ink-soft, #262c34) !important;
}

.oc-modern .oc-item-img {
  overflow: hidden;
}

.oc-modern .oc-item-qty,
.checkout-page .cart-item-qty {
  min-width: 1.1rem;
  min-height: 1.1rem;
  padding: 0 0.2rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--emm-color-paper, #f7f4ef) 86%, #fff);
  border: var(--emm-border-hairline, 1px solid #d9d2c8);
  color: var(--emm-color-ink, #15181d);
}

/* About page */
.about-page .about-page__story,
.about-page .about-page__approach {
  align-items: center;
}

.about-page__media {
  overflow: hidden;
}

.about-page__media img {
  display: block;
  width: 100%;
  height: auto;
}

.about-page__values {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.about-page__value {
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
}

.about-page__richtext {
  color: var(--emm-color-ink-soft, #262c34);
  max-width: 65ch;
}

.contact-page__layout {
  align-items: start;
}

.contact-page__card {
  padding: clamp(1rem, 2vw, 1.5rem);
}

.contact-page__card label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--emm-color-ink-soft, #262c34);
}

.contact-page__richtext {
  color: var(--emm-color-ink-soft, #262c34);
  max-width: 65ch;
}

.delivery-page__cards {
  align-items: stretch;
}

.delivery-page__card {
  padding: clamp(1rem, 2vw, 1.5rem);
}

.delivery-page__richtext {
  color: var(--emm-color-ink-soft, #262c34);
  line-height: 1.65;
  max-width: 70ch;
}

/* Footer calm refinement */
.emm-site-footer {
  border-top: var(--emm-border-hairline, 1px solid #d9d2c8);
  background: var(--emm-color-paper, #f7f4ef);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (max-width: 800px) {
  .product-container .buy {
    grid-template-columns: 1fr;
  }

  .product-container .buy .qty,
  .product-container .buy .btn {
    width: 100%;
  }

  .about-page__values {
    grid-template-columns: 1fr;
  }

  .emm-sticky-atc__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .emm-sticky-atc .emm-btn {
    width: 100%;
    min-width: 0;
  }
}
