/* Storefront layout only; shared brand, tokens and components live in anapa3d-craft.css. */
html { scroll-padding-bottom: var(--cookie-banner-space, 24px); }
.shop [hidden] { display: none !important; }
.shop :is(button, input, textarea, select) { font: inherit; }
.shop :is(button, a, input, textarea, select, summary) { touch-action: manipulation; }
.shop :is(img, svg) { max-width: 100%; }
.shop img { display: block; }
.shop :is(p, dd, .notice, .variants a) { overflow-wrap: anywhere; }
.shop :where(.catalog-intro, .catalog-toolbar, .search, .product-grid, .product-detail, .commerce-grid, .cart-row, .information-grid, .request-form) > * { min-width: 0; }
.shop #main { min-height: 45vh; padding-bottom: 32px; }
.shop #main:focus:not(:focus-visible) { outline: none; }
.shop :is(input, textarea, select) { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); color: var(--color-text); font-size: 16px; }
.shop textarea { resize: vertical; }
.shop input[type=checkbox] { width: 20px; height: 20px; min-height: 20px; padding: 0; flex: 0 0 20px; accent-color: var(--color-accent); }
.shop [aria-invalid=true] { border: 2px solid var(--color-accent); }
.shop label { display: block; font-size: 14px; font-weight: 600; }
.shop button:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.shop a { text-underline-offset: 4px; }

.shop .header { position: sticky; }
.shop .header__inner { gap: 24px; }
.shop :is(.header__logo, .footer__brand) .brand-text { min-width: 0; }
.shop :is(.header__logo, .footer__brand) .brand-slogan { white-space: normal; }
.shop .header__logo { min-width: 0; flex-shrink: 1; }
.shop .header__logo img { flex-shrink: 0; }
.shop .header__logo .brand-text { max-width: 128px; }
.shop .shop-menu { margin-left: auto; }
.shop .menu-toggle { list-style: none; }
.shop .menu-toggle::-webkit-details-marker { display: none; }
.shop .header__link[aria-current] { color: var(--color-accent); }
.shop .header__link[aria-current]::after { width: 100%; }
.shop .main-site { gap: 6px; }
.shop .cart-link { gap: 8px; flex-shrink: 0; }
.shop .cart-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 24px; background: var(--color-accent); color: var(--color-surface); font-size: 12px; font-weight: 700; }
.shop .preview { padding: 8px 0; border-bottom: 1px solid var(--color-border); background: var(--color-surface-soft); color: var(--color-text-light); text-align: center; font-size: 12px; line-height: 1.5; }
.shop .preview strong { color: var(--color-text); }
.shop .footer { margin-top: 32px; }
.shop .footer__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
.shop .footer__legal { gap: 8px 24px; }
.shop .skip-link { position: fixed; top: 8px; left: 8px; transform: translateY(-160%); background: var(--color-surface); padding: 12px; z-index: 110; }
.shop .skip-link:focus { transform: none; }
.shop .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Legacy buttons without btn classes, including cookie acceptance, use the source contract. */
.shop .button:not(.btn) { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs); min-height: 48px; min-width: 0; max-width: 100%; padding: 14px 24px; line-height: 1.4; text-align: center; white-space: normal; overflow-wrap: anywhere; font-family: var(--font-sans); font-size: 15px; font-weight: 600; border-radius: var(--radius); border: none; cursor: pointer; transition: all .3s ease; background: var(--color-terracotta); color: white; }
.shop .button:not(.btn):hover { background: var(--color-terracotta-dark); color: white; transform: translateY(-2px); }
.shop .button.secondary:not(.btn) { background: transparent; color: var(--color-text); border: 1px solid var(--color-border); }
.shop .button.secondary:not(.btn):hover { background: var(--color-sand); border-color: var(--color-accent); color: var(--color-accent-hover); transform: none; }
.shop .button-wide { width: 100%; }
.shop .text-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; font-weight: 600; text-decoration: underline; }
.shop .text-button { min-height: 44px; padding: 8px; border: 0; background: none; color: var(--color-accent); font-size: 14px; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.shop .small { font-size: 13px; line-height: 1.6; }
.shop .muted { color: var(--color-text-light); }
.shop .eyebrow { margin-bottom: 8px; font-size: 12px; line-height: 1.5; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--color-accent); }
.shop .eyebrow a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.shop .catalog-intro { display: grid; gap: 12px; padding: 24px 0 16px; }
.shop .catalog-intro h1 { font-size: 36px; }
.shop .intro-copy { max-width: 720px; font-size: 16px; }
.shop .catalog-toolbar { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.shop .search { display: flex; align-items: center; gap: 6px; width: 240px; max-width: 100%; }
.shop .search > div { flex: 1; }
.shop .search :is(input, .button) { height: 36px; min-height: 36px; padding: 6px 10px; border-radius: 8px; font-size: 13px; line-height: 20px; }
.shop .search input { width: 100%; margin: 0; }
.shop .search .button { flex-shrink: 0; width: auto; }
@media (pointer: coarse) {
  .shop .search :is(input, .button) { height: 44px; min-height: 44px; }
  .shop .search input { font-size: 16px; }
}
.shop .product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.shop .product-card { display: flex; flex-direction: column; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.shop .card-image { display: block; position: relative; width: 100%; aspect-ratio: 4 / 3; background: var(--color-surface-soft); border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; }
.shop .card-image > img { width: 100%; height: 100%; object-fit: contain; }
.shop .image-placeholder { display: grid; place-items: center; min-height: 150px; padding: 16px; color: var(--color-text-light); font-size: 14px; text-align: center; }
.shop .card-image .image-placeholder { height: 100%; }
.shop .image-tag { position: absolute; top: 12px; left: 12px; max-width: calc(100% - 24px); padding: 4px 8px; border-radius: 8px; background: var(--color-surface); color: var(--color-text); font-size: 11px; }
.shop .image-arrow { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--color-surface); }
.shop .card-info { display: flex; flex-direction: column; flex: 1; padding: 20px; border-top: 1px solid var(--color-border); }
.shop .card-info h3 { font-size: 20px; line-height: 1.35; }
.shop .card-info h3 a { color: var(--color-text); }
.shop .card-info h3 a:hover { color: var(--color-accent); }
.shop .card-stock { margin-top: auto; padding: 8px 0; font-size: 13px; color: var(--color-accent); }
.shop .card-bottom { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; border-top: 1px solid var(--color-border); }
.shop .card-bottom strong { font-size: 24px; font-weight: 700; letter-spacing: -.035em; }
.shop .price-prefix { font-size: 14px; font-weight: 500; }
.shop .card-bottom small { display: block; color: var(--color-text-light); font-size: 12px; }
.shop .card-bottom .button { width: 100%; }
.shop .breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 16px 0; font-size: 13px; color: var(--color-text-light); overflow-wrap: anywhere; }
.shop .breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; }
.shop .page-heading { max-width: 960px; padding: 16px 0 32px; }
.shop .page-heading h1 { font-size: 36px; }
.shop .page-heading p:not(.eyebrow) { margin-top: 16px; font-size: 16px; }

.shop .product-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 32px; }
.shop :is(.gallery-main, .product-purchase, .summary, .request-form, .panel, .empty) { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.shop .gallery-main { overflow: hidden; margin-bottom: 16px; }
.shop .gallery-main img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; background: var(--color-surface-soft); }
.shop .gallery-main figcaption { padding: 16px; border-top: 1px solid var(--color-border); font-size: 13px; color: var(--color-text-light); }
.shop .gallery-thumbs { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.shop .gallery-thumb { width: 80px; height: 80px; padding: 4px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface); cursor: pointer; }
.shop .gallery-thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
.shop .gallery-thumb[aria-pressed=true] { border: 2px solid var(--color-accent); }
.shop .product-purchase { padding: 24px; }
.shop .product-purchase h1 { margin-bottom: 16px; font-size: 32px; }
.shop .product-purchase > p { font-size: 14px; }
.shop .tag { display: inline-block; margin: 16px 0; padding: 4px 8px; border: 1px solid var(--color-border); border-radius: 8px; background: var(--color-surface-soft); color: var(--color-accent); font-size: 12px; }
.shop .variant-section { margin: 24px 0; }
.shop .field-heading { margin-bottom: 12px; font-size: 16px; letter-spacing: 0; }
.shop .variants { display: flex; flex-wrap: wrap; gap: 8px; }
.shop .variants a { display: flex; align-items: center; justify-content: center; flex: 1 1 100px; min-height: 48px; padding: 10px; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: 15px; color: var(--color-text); text-align: center; }
.shop .variants a[aria-current=true] { padding: 9px; border: 2px solid var(--color-accent); background: var(--color-surface-soft); color: var(--color-accent); }
.shop .price-block { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin: 16px 0 8px; }
.shop .price-block strong { font-size: 32px; font-weight: 700; letter-spacing: -.035em; }
.shop .price-block span { font-size: 13px; color: var(--color-text-light); }
.shop .availability { margin: 16px 0; color: var(--color-accent); font-size: 14px; }
.shop .quantity-field { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 16px 0 8px; }
.shop .quantity-field input { width: 88px; flex-shrink: 0; }
.shop .specs { margin-top: 24px; padding-top: 8px; border-top: 1px solid var(--color-border); }
.shop :is(.specs, .product-prose) > summary { min-height: 44px; padding: 8px 0; font-size: 15px; font-weight: 600; cursor: pointer; }
.shop dl { margin: 16px 0; }
.shop dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--color-border); font-size: 14px; }
.shop dt { min-width: 0; color: var(--color-text-light); }
.shop dd { min-width: 0; text-align: right; font-weight: 600; }
.shop .product-prose { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--color-border); }
.shop .prose h2 { margin: 16px 0; font-size: 28px; }
.shop .prose h3 { margin: 24px 0 16px; font-size: 21px; }
.shop .prose p { margin: 16px 0; font-size: 15px; }
.shop .prose :is(ul, ol) { padding-left: 24px; }
.shop .prose :is(pre, table) { display: block; max-width: 100%; overflow-x: auto; }
.shop .prose :is(td, th) { padding: 8px; }
.shop :is(.prose p, .notice, .field-help, .error-summary) a { text-decoration: underline; }

.shop .commerce-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 32px; margin-bottom: 32px; }
.shop .summary { position: sticky; top: 104px; padding: 24px; }
.shop .summary h2 { font-size: 24px; }
.shop .summary .small { margin: 16px 0; }
.shop .summary dd { max-width: 60%; }
.shop .cart-row { display: grid; grid-template-columns: 86px minmax(0, 1fr) auto; gap: 16px; padding: 24px 0; border-bottom: 1px solid var(--color-border); }
.shop .cart-row:first-child { padding-top: 0; }
.shop .cart-image img { width: 86px; height: 105px; object-fit: contain; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); }
.shop .cart-image .image-placeholder { min-height: 105px; padding: 8px; font-size: 12px; }
.shop .cart-row h2 { font-size: 18px; line-height: 1.4; }
.shop .cart-row h2 a { color: var(--color-text); }
.shop .cart-row p { margin-top: 8px; font-size: 13px; }
.shop .cart-update { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 16px; }
.shop .cart-quantity input { display: block; width: 88px; margin-top: 4px; }
.shop .cart-update .button { width: auto; padding-inline: 16px; }
.shop .cart-update .submit-status { flex-basis: 100%; }
.shop .cart-row-price { text-align: right; font-size: 18px; }
.shop .cart-row-price strong { display: block; }
.shop .cart-row .row-error { color: var(--color-accent); }
/* Checkout and order pages reuse the existing commerce panels and brand controls. */
.shop .checkout-lines { margin: 16px 0; padding: 0; list-style: none; }
.shop .checkout-lines > li { min-width: 0; padding: 16px 0; border-bottom: 1px solid var(--color-border); overflow-wrap: anywhere; }
.shop .checkout-lines h3 { font-size: 16px; line-height: 1.5; }
.shop .checkout-lines .small { margin: 8px 0; }
.shop .checkout-grid .summary { position: static; }
.shop .order-sections { display: grid; gap: 24px; }
.shop .order-sections h2 { font-size: 24px; }
.shop .order-heading h1, .shop .order-comment { overflow-wrap: anywhere; }
.shop .order-lines > li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.shop .order-lines > li > div { min-width: 0; flex: 1 1 200px; }
.shop .order-contacts dl > div { flex-wrap: wrap; gap: 8px 16px; }
.shop .order-contacts dd { text-align: left; }
.shop .order-cancel { margin-top: 24px; padding-top: 8px; border-top: 1px solid var(--color-border); }
.shop .request-form { padding: 24px; }
.shop .request-form textarea { height: 128px; }
.shop .form-field { margin: 0 0 24px; }
.shop .form-field > label { margin-bottom: 8px; }
.shop .checkbox { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; font-size: 14px; line-height: 1.6; font-weight: 400; cursor: pointer; }
.shop .checkbox input { margin-top: 3px; }
.shop .field-help { margin: 8px 0 16px; }
.shop .errorlist { margin: 8px 0; padding-left: 24px; color: var(--color-accent); font-size: 14px; }
.shop .messages { display: grid; gap: 16px; margin: 24px 0; list-style: none; }
.shop .notice { margin-bottom: 24px; padding: 16px; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-surface-soft); font-size: 14px; }
.shop .messages .notice { margin: 0; }
.shop :is(.warning, .notice.error) { border-left: 4px solid var(--color-accent); }
.shop .error-summary h2 { font-size: 21px; }
.shop .error-summary ul { padding-left: 24px; }
.shop .error-summary a { display: inline-flex; align-items: center; min-height: 44px; }
.shop .submit-status:not(:empty) { margin-top: 12px; }
.shop .submit-status:empty { display: none; }
.shop .information-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-bottom: 32px; }
.shop .panel { padding: 24px; }
.shop .panel .tag { margin-top: 0; }
.shop .delivery-list { list-style: none; padding: 0; margin: 24px 0; }
.shop .delivery-list li { padding: 16px 0; border-bottom: 1px solid var(--color-border); }
.shop .delivery-list strong { display: block; font-size: 16px; }
.shop .delivery-list span { display: block; margin-top: 8px; font-size: 14px; color: var(--color-text-light); }
.shop .contact-phone { display: inline-flex; align-items: center; min-height: 48px; font-size: clamp(22px, 3vw, 32px); font-weight: 700; }
.shop .contact-panel p { margin-top: 16px; font-size: 14px; }
.shop .narrow { max-width: 760px; margin-bottom: 32px; }
.shop .actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.shop .empty { grid-column: 1 / -1; padding: 32px 24px; text-align: center; }
.shop .empty h2 { font-size: 28px; }
.shop .empty p { max-width: 560px; margin: 16px auto 24px; }

.shop.cookie-banner-visible { padding-bottom: var(--cookie-banner-space); }
.shop .cookie-banner { width: calc(100% - 32px); max-width: 760px; margin: 16px auto; padding: 12px; background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(53, 41, 33, .08); }
.shop .cookie-banner--ready { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 90; max-height: calc(100dvh - 112px - max(16px, env(safe-area-inset-bottom))); margin: 0; overflow-y: auto; overscroll-behavior: contain; transform: translateX(-50%); }
.shop .cookie-banner__content { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.shop .cookie-banner p { font-size: 13px; line-height: 1.5; }
.shop .cookie-banner a { text-decoration: underline; }
.shop .cookie-banner .button { flex-shrink: 0; width: auto; }

@media (min-width: 1101px) {
  .shop .card-image { max-height: 240px; }
  .shop .shop-menu > .site-navigation { display: flex; }
}
@media (max-width: 1100px) {
  /* An expanded inline menu must scroll away rather than cover focused page content. */
  .shop .header:has(.shop-menu[open]) { position: relative; }
  .shop .header__inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; gap: 16px; height: auto; min-height: 80px; padding-block: 13px; }
  .shop .header__logo { grid-column: 1; grid-row: 1; }
  .shop .cart-link { grid-column: 2; grid-row: 1; }
  .shop .shop-menu { display: contents; }
  .shop .menu-toggle { position: absolute; right: 24px; top: 18px; }
  .shop .shop-menu::details-content { grid-column: 1 / -1; }
  .shop .shop-menu:not([open])::details-content { display: none; }
  .shop .site-navigation { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: stretch; gap: 0; max-height: calc(100dvh - 160px); overflow-y: auto; padding: 8px 4px; border-top: 1px solid var(--color-border); }
  .shop .site-navigation .header__link { white-space: normal; min-height: 48px; }
  .shop .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop .cart-row { grid-template-columns: 72px minmax(0, 1fr); }
  .shop .cart-image img { width: 72px; height: 88px; }
  .shop .cart-row-price { grid-column: 2; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; text-align: left; }
}
@media (max-width: 800px) {
  .shop .commerce-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .shop .summary { position: static; }
  .shop .product-detail { gap: 24px; }
  .shop .product-purchase { padding: 16px; }
  .shop .product-purchase h1 { font-size: 28px; }
}
@media (max-width: 768px) {
  .shop .footer__grid { grid-template-columns: minmax(0, 1fr); }
  .shop .cookie-banner__content { flex-direction: column; align-items: stretch; gap: 8px; }
  .shop .cookie-banner .button { align-self: flex-end; }
}
@media (max-width: 700px) {
  .shop .catalog-intro { padding: 16px 0; gap: 8px; }
  .shop :is(.catalog-intro h1, .page-heading h1) { font-size: 28px; }
  .shop .intro-copy { font-size: 14px; }
  .shop .product-grid { gap: 16px; }
  .shop .card-info { padding: 16px; }
  .shop :is(.product-detail, .information-grid) { grid-template-columns: minmax(0, 1fr); }
  .shop .page-heading { padding: 8px 0 24px; }
  .shop .page-heading p:not(.eyebrow) { font-size: 14px; }
  .shop .product-purchase { padding: 24px; }
  .shop :is(.panel, .request-form, .summary) { padding: 24px; }
}
@media (max-width: 540px) {
  .shop .product-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .shop .card-info { padding: 16px; }
  .shop .cart-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
}
@media (max-width: 480px) {
  .shop .header__inner { gap: 12px; padding-block: 10px; }
  .shop .menu-toggle { right: 16px; }
  .shop :is(.product-purchase, .request-form, .summary, .panel) { padding: 16px; }
  .shop .cookie-banner { width: calc(100% - 20px); }
}
@media (prefers-reduced-motion: reduce) {
  .shop .button:not(.btn):hover { transform: none; }
}
