/* Storefront: shared styles for every /store page. Colours and type come from community.css tokens. */

.sf-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.sf-tile { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.4); }
.sf-tile img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--paper-2); display: block; }
.sf-tile-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.sf-tile h2 { margin: 0; font-size: 22px; letter-spacing: -.03em; font-weight: 500; }
.sf-tile p { margin: 0; color: var(--muted); font-size: 13px; }

.sf-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.sf-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; }
.sf-chip[aria-current="true"], .sf-chip:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sf-chip span { color: inherit; opacity: .6; }

.sf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.sf-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(255,255,255,.4); text-decoration: none; color: inherit; }
.sf-card:hover { box-shadow: var(--shadow); }
.sf-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; background: var(--white); display: block; }
.sf-card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.sf-card h3 { margin: 0; font-size: 14px; line-height: 1.3; font-weight: 500; letter-spacing: -.01em; }
.sf-card .sf-meta { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.sf-price { font-size: 15px; color: var(--ink); font-weight: 500; }

.sf-more { display: flex; justify-content: center; margin: 32px 0 0; }
.sf-status { color: var(--muted); font-size: 14px; min-height: 1.5em; }

.sf-product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; padding: 48px 0 40px; }
.sf-product-image { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--white); }
.sf-product-image img { width: 100%; height: auto; display: block; }
.sf-product-info h1 { margin: 0 0 12px; font-size: clamp(28px, 4vw, 44px); line-height: 1.05; letter-spacing: -.04em; font-weight: 500; }
.sf-product-info .sf-price { font-size: 22px; margin-bottom: 18px; }
.sf-product-info p { color: var(--muted); font-size: 14px; line-height: 1.6; }
.sf-add { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.sf-qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.sf-qty select { appearance: none; border: 0; background: transparent; padding: 11px 16px; font: inherit; color: var(--ink); cursor: pointer; }
.sf-add-status { width: 100%; color: var(--clay); font-size: 13px; }
.sf-back { display: inline-block; margin-bottom: 18px; color: var(--clay); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; text-decoration: none; }

.sf-cart { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; padding: 48px 0 40px; }
.sf-cart-lines { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.sf-line { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.sf-line img { width: 84px; height: 84px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.sf-line h3 { margin: 0 0 4px; font-size: 15px; font-weight: 500; }
.sf-line .sf-meta { color: var(--muted); font-size: 12px; }
.sf-line-actions { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; }
.sf-line-actions button { background: none; border: 0; padding: 0; color: var(--clay); font: inherit; cursor: pointer; text-decoration: underline; }
.sf-summary { border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: rgba(255,255,255,.4); display: flex; flex-direction: column; gap: 14px; }
.sf-summary .sf-total { display: flex; justify-content: space-between; font-size: 18px; }
.sf-summary p { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0; }
.sf-summary .button { width: 100%; justify-content: center; }
.sf-summary .button[disabled] { opacity: .5; cursor: default; }

.sf-more-title { margin: 0 0 18px; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--clay); font-weight: 500; }

@media (max-width: 760px) {
  .sf-product, .sf-cart { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; }
  .sf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sf-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .sf-tile h2 { font-size: 17px; }
  .sf-tile-body { padding: 12px 12px 14px; }
}

[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.sf-policy { max-width: 760px; }
.sf-policy h2 { font-size: 22px; letter-spacing: -.03em; font-weight: 500; margin: 0 0 14px; }
.sf-policy p { color: var(--ink); font-size: 15px; line-height: 1.65; margin: 0 0 14px; }
.sf-policy a { color: var(--clay); }
