/* realfilmreel storefront: same structure as the original shop
   (centred menu, large title, 3-column grid, grey product band),
   with tighter typography and a cart that opens in place. */
:root {
  --bg: #ffffff;
  --band: #f3f3f3;
  --text: #1f1f1f;
  --muted: #6f6f6f;
  --line: #1f1f1f;
  --soft-line: #e3e3e3;
  --accent: #8e1b1b;   /* hover and "On sale", as on the original shop */
  --wrap: 1320px;
  --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { font-weight: 400; margin: 0; line-height: 1.2; }
p { margin: 0 0 1em; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 100; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
@media (min-width: 900px) { .wrap { padding: 0 40px; } }
.center { text-align: center; }
.muted { color: var(--muted); }

/* ---------- header ---------- */
.site-header { text-align: center; padding: 22px 20px 0; }
.main-nav { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 4px 40px; padding: 0 12px 22px; border-bottom: 1px solid var(--line); font-size: 19px; }
.main-nav a, .nav-cart { padding: 6px 0; }
.nav-cart { background: none; border: 0; cursor: pointer; }
.nav-cart:hover { color: var(--accent); }
.site-title { display: block; font-size: clamp(40px, 5.2vw, 60px); letter-spacing: -.01em; padding: 72px 0 40px; line-height: 1; }
.site-title:hover { color: var(--text); }
@media (max-width: 700px) {
  .main-nav { gap: 2px 20px; font-size: 16px; padding-bottom: 14px; }
  .site-title { padding: 40px 0 16px; }
}

/* ---------- sections ---------- */
.section { padding: 48px 0 72px; }
.section-title { text-align: center; font-size: clamp(28px, 2.6vw, 36px); margin-bottom: 48px; }
.home .section:first-of-type { padding-top: 40px; }

/* ---------- product grid ---------- */
.product-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 56px 30px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.product-card a { display: block; text-align: center; }
.product-card-img { aspect-ratio: 1; overflow: hidden; border-radius: 4px; background: var(--band); }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, opacity .3s; }
.product-card a:hover .product-card-img img, .category-grid a:hover img { transform: scale(1.03); }
.product-card-text { padding: 22px 8px 0; }
.product-card h3 { font-size: 20px; line-height: 1.3; transition: color .15s; }
.product-card a:hover h3 { color: var(--accent); }
.dash { display: block; width: 20px; height: 1px; background: currentColor; opacity: .55; margin: 12px auto 10px; }
.product-card-price { font-size: 19px; margin: 0; }
.on-sale { color: #c0141b; font-style: italic; margin: 6px 0 0; }

/* ---------- categories ---------- */
.category-grid { list-style: none; margin: 0 0 64px; padding: 0; display: grid; gap: 40px 30px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .category-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.category-grid a { display: block; text-align: center; }
.category-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.category-grid h3 { font-size: 22px; margin-top: 22px; }
.category-grid a:hover h3 { color: var(--accent); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 64px; padding: 0 48px; background: #000; color: #fff; border: 1.5px solid #000; border-radius: 0; font-size: 19px; cursor: pointer; transition: background-color .15s, color .15s; }
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-outline { background: transparent; color: var(--text); min-width: min(375px, 100%); }
.btn-outline:hover { background: #000; border-color: #000; color: #fff; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- filter + search on Products ---------- */
.filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin: -24px 0 24px; font-size: 17px; }
.filter a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.search-inline { display: flex; justify-content: center; margin-bottom: 48px; }
.search-inline input, .search input { font: inherit; font-size: 17px; border: 1px solid #8a8a8a; border-radius: 2px; padding: 10px 14px; width: min(300px, 100%); background: #fff; }

/* ---------- product page ---------- */
.product-band { background: var(--band); padding: 64px 0 80px; }
.product-grid-2 { display: grid; gap: 40px; }
.product-grid-2 > * { min-width: 0; }
body { overflow-x: clip; }
@media (min-width: 900px) { .product-grid-2 { grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 60px; align-items: start; } .product-info { position: sticky; top: 24px; } }
@media (max-width: 899px) { .product-band { padding-top: 0; } .gallery { order: -1; margin: 0 -20px; } .thumbs { padding: 0 20px; } }
.product-info { text-align: center; }
.product-info h1 { font-size: clamp(30px, 2.8vw, 42px); line-height: 1.3; }
.product-info .dash { width: 30px; height: 2px; opacity: 1; margin: 18px auto 22px; }
.product-price { font-size: 24px; margin-bottom: 40px; }
.product-info .on-sale { margin: -32px 0 32px; }
.description { text-align: left; margin-top: 44px; font-size: 17px; }
.description ul { padding-left: 1.1em; margin: 0 0 1em; }
.description li { margin-bottom: .3em; }
.description strong { font-weight: 600; }
.description .warn { color: var(--accent); }
.gallery-main { background: #fff; border-radius: 4px; overflow: hidden; }
.gallery-main img { width: 100%; }
@media (max-width: 899px) { .gallery-main { border-radius: 0; } }
.thumbs { list-style: none; margin: 14px 0 0; padding: 0; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.thumbs button { border: 2px solid transparent; padding: 0; background: #fff; cursor: pointer; width: 86px; height: 86px; overflow: hidden; flex: none; opacity: .6; transition: opacity .15s; }
.thumbs button:hover { opacity: 1; }
.thumbs button[aria-current="true"] { border-color: #000; opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.sticky-buy { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--soft-line); padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); z-index: 20; }
.sticky-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; font-size: 19px; }
.sticky-row .btn { min-height: 50px; padding: 0 28px; font-size: 17px; flex: 1; max-width: 260px; }
@media (min-width: 900px) { .sticky-buy { display: none !important; } }

/* related carousel */
.related { padding-top: 72px; }
.related-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 36px; }
.related-head h2 { font-size: clamp(26px, 2.4vw, 32px); }
.related-nav { margin: 0; display: flex; gap: 14px; font-size: 19px; }
.related-nav button { background: none; border: 0; cursor: pointer; padding: 4px 0; }
.related-nav button:hover { color: var(--accent); }
.carousel { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: calc((100% - 60px) / 3); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.carousel > li { scroll-snap-align: start; }
@media (max-width: 899px) { .carousel { grid-auto-columns: calc((100% - 30px) / 2); } }
@media (max-width: 559px) { .carousel { grid-auto-columns: 80%; } }

/* ---------- text pages ---------- */
.prose { max-width: 760px; }
.prose p { font-size: 18px; }
.reviews { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px; }
.reviews blockquote { margin: 0; font-size: 22px; line-height: 1.45; }
.reviews .who { color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { padding: 0 0 56px; }
.site-footer .wrap { border-top: 1px solid var(--line); padding-top: 36px; text-align: center; }
.search { display: inline-block; position: relative; margin-bottom: 40px; width: min(300px, 100%); }
.search input { width: 100%; }
.search input { padding-right: 46px; }
.search button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: 0; width: 40px; height: 40px; cursor: pointer; display: grid; place-items: center; }
.search svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.site-footer nav p { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 40px; font-size: 19px; margin: 0 0 30px; }
.footer-note { color: var(--muted); font-size: 15px; margin: 8px 0 0; }
@media (max-width: 700px) { .site-footer nav p { gap: 6px 22px; font-size: 16px; margin-bottom: 18px; } }
.product-page .site-footer { padding-bottom: 96px; }
@media (min-width: 900px) { .product-page .site-footer { padding-bottom: 56px; } }

/* ---------- cart drawer ---------- */
.cart-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 40; }
.cart { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: #fff; z-index: 41; display: flex; flex-direction: column; box-shadow: -10px 0 40px rgba(0,0,0,.15); transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.cart.closing { transform: translateX(100%); }
.cart-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 16px 24px; border-bottom: 1px solid var(--soft-line); }
.cart-head h2 { font-size: 24px; }
.icon-button { background: none; border: 0; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; }
.icon-button svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.6; fill: none; }
.cart-body { flex: 1; overflow-y: auto; padding: 0 24px; }
.cart-empty { padding: 40px 0; text-align: center; }
.cart-empty .btn { min-height: 54px; padding: 0 32px; font-size: 17px; }
.cart-line { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--soft-line); align-items: start; }
.cart-line img { width: 76px; height: 76px; object-fit: cover; background: var(--band); }
.cart-line a { font-size: 16px; line-height: 1.35; display: block; }
.cart-line .line-price { white-space: nowrap; }
.line-ctrl { display: flex; align-items: center; gap: 4px; margin-top: 10px; font-size: 15px; }
.line-ctrl button { background: #fff; border: 1px solid #bdbdbd; width: 30px; height: 30px; cursor: pointer; line-height: 1; }
.line-ctrl span { min-width: 24px; text-align: center; }
.line-ctrl .remove { width: auto; border: 0; background: none; color: var(--muted); text-decoration: underline; margin-left: 10px; }
.line-warn { color: var(--accent); font-size: 14px; margin: 6px 0 0; }
.cart-foot { padding: 18px 24px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--soft-line); }
.field { display: grid; gap: 6px; font-size: 15px; }
.field select { font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #8a8a8a; border-radius: 2px; background: #fff; min-height: 46px; }
.totals { margin: 16px 0; }
.totals div { display: flex; justify-content: space-between; padding: 3px 0; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; }
.totals .grand { font-size: 20px; padding-top: 8px; }
.totals .grand dt { color: var(--text); }
.cart-error { color: var(--accent); font-size: 15px; }
.cart-foot .btn { min-height: 58px; }
.fine { font-size: 14px; color: var(--muted); text-align: center; margin: 12px 0 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
