/* Page headers, shop listing, product page, forms, checkout */

/* --------------------------------------------------------- page head --- */
.page-head { padding: 44px 0 34px; background: var(--soft); position: relative; overflow: hidden; }
.page-head p { color: var(--muted); max-width: 640px; margin: 0; }
.page-head.with-img { color: #fff; padding: 80px 0 56px; }
.page-head.with-img p, .page-head.with-img .crumbs, .page-head.with-img .crumbs a { color: rgba(255, 255, 255, .9); }
.page-head-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-head.with-img::before { content: ''; position: absolute; inset: 0; background: rgba(30, 24, 20, .5); z-index: 1; }
.page-head .wrap { position: relative; z-index: 2; }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.crumbs a:hover { color: var(--accent); }
.page-pad { padding-top: 80px; padding-bottom: 80px; }
.empty { text-align: center; padding: 50px 16px; }

/* -------------------------------------------------------------- shop --- */
.shop { display: grid; grid-template-columns: 240px 1fr; gap: 40px; padding-top: 36px; padding-bottom: 80px; }
.filters { position: sticky; top: 96px; align-self: start; }
.shop-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 12px; }
.sort { display: flex; align-items: center; gap: 8px; font-size: .88rem; white-space: nowrap; }
.sort select { width: auto; padding: 8px 10px; }
.cards-grid { gap: 32px 22px; }
/* phones: two rugs per row in the shop, like most stores, so the catalogue is quick to browse */
@media (max-width: 560px) {
  .shop .cards-grid { grid-template-columns: 1fr 1fr; gap: 24px 12px; }
  .shop .card-body h3 { font-size: .92rem; }
  .shop .card-body .small { font-size: .78rem; }
  .shop .badge { font-size: .64rem; padding: 2px 7px; }
}
@media (max-width: 960px) {
  .shop { grid-template-columns: 1fr; gap: 16px; }
  .filters { position: static; }
  .filter-form { display: none; padding-top: 16px; }
  .filter-form.open { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
}

/* ----------------------------------------------------------- product --- */
.pd { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; padding-top: 36px; padding-bottom: 40px; }
/* grid items default to min-width:auto, so a wide photo or the thumbnail strip would push the page sideways on phones */
.pd > * { min-width: 0; }
.pd-gallery { position: sticky; top: 96px; align-self: start; }
/* The whole rug is always shown, never cropped: wide photos fill the width, tall ones are
   capped to the screen height (leaving room for the thumbnails) and centred. */
.pd-main { border-radius: var(--radius); overflow: hidden; background: var(--soft); min-height: 280px; display: flex; align-items: center; justify-content: center; cursor: zoom-in; }
.pd-main img { width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 240px); }
/* previous / next arrows and a counter right on the photo, so every customer sees there are more */
.pd-stage { position: relative; }
.pd-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .92); color: var(--ink); box-shadow: 0 4px 14px rgba(0, 0, 0, .18); transition: background .2s, transform .2s; }
.pd-nav:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.pd-nav.prev { left: 12px; }
.pd-nav.next { right: 12px; }
.pd-count { position: absolute; right: 12px; bottom: 12px; background: rgba(42, 37, 33, .78); color: #fff; font-size: .78rem; font-weight: 500; padding: 3px 10px; border-radius: 999px; font-variant-numeric: tabular-nums; pointer-events: none; }
@media (max-width: 860px) {
  .pd-main img { max-height: 70vh; }
  .pd-nav { width: 38px; height: 38px; }
  .pd-thumbs { scrollbar-width: none; }
  .pd-thumbs::-webkit-scrollbar { display: none; }
  .pd-thumbs button { width: 64px; height: 76px; }
}
.pd-thumbs { position: relative; display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; }
.pd-thumbs button { width: 78px; height: 92px; flex: none; border-radius: 8px; overflow: hidden; border: 2px solid transparent; opacity: .7; }
.pd-thumbs button.on, .pd-thumbs button:hover { border-color: var(--ink); opacity: 1; }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .14em; font-size: .75rem; color: var(--accent); font-weight: 600; margin-bottom: 8px; }
.pd-info h1 { font-size: clamp(2rem, 3.6vw, 2.8rem); }
.pd-price { font-size: 1.5rem; font-weight: 600; margin-bottom: 22px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pd-price s { font-size: 1.1rem; }
.sizes { border: 0; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.sizes legend { font-size: .82rem; font-weight: 600; margin-bottom: 8px; padding: 0; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: inline-block; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .88rem; cursor: pointer; transition: .15s; }
.pill input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.buy-row { display: flex; gap: 12px; margin-bottom: 12px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.qty button { width: 40px; height: 46px; font-size: 1.1rem; }
.qty input { width: 40px; text-align: center; border: 0; background: none; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty.sm button { width: 30px; height: 32px; }
.qty.sm span { min-width: 22px; text-align: center; font-size: .9rem; }
.pd-perks { list-style: none; padding: 18px 0; margin: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; gap: 10px; }
.pd-perks li { display: flex; gap: 10px; font-size: .9rem; color: var(--muted); }
.pd-perks strong { color: var(--ink); font-weight: 600; }
.pd-perks .ic { color: var(--accent); }
details { border-bottom: 1px solid var(--line); }
summary { padding: 16px 0; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.3rem; font-weight: 300; line-height: 1; }
details[open] summary::after { content: '−'; }
details > div, details > dl { padding-bottom: 14px; color: var(--muted); }
.specs { display: grid; grid-template-columns: 130px 1fr; gap: 8px; margin: 0; }
.specs dt { color: var(--ink); font-weight: 500; }
.specs dd { margin: 0; }
@media (max-width: 860px) { .pd { grid-template-columns: 1fr; gap: 28px; padding-top: 20px; } .pd-gallery { position: static; } }

/* ------------------------------------------------------ forms & split --- */
.split { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; padding-top: 64px; padding-bottom: 80px; align-items: start; }
.split.about { grid-template-columns: 1.1fr 1fr; align-items: center; }
.prose p { font-size: 1.06rem; }
.rounded { border-radius: var(--radius); }
@media (max-width: 860px) { .split, .split.about { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; } }
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.success { text-align: center; padding: 30px 10px; }
.success h3, .success h1 { color: var(--ok); }
.success.big { max-width: 560px; margin: 0 auto; }
.note { background: var(--soft); padding: 12px 14px; border-radius: 8px; font-size: .88rem; color: var(--muted); }
.services { margin-top: 36px; }
.contact-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding-top: 36px; }
.qc { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.qc:hover { border-color: var(--accent); }
.qc .ic { width: 28px; height: 28px; color: var(--accent); }
.qc span { display: flex; flex-direction: column; font-size: .9rem; color: var(--muted); }
.qc strong { color: var(--ink); }
@media (max-width: 720px) { .contact-quick { grid-template-columns: 1fr; } }
.summary { background: var(--soft); border-radius: var(--radius); padding: 26px; position: sticky; top: 96px; }
.sum-line { display: grid; grid-template-columns: 60px 1fr auto; gap: 12px; align-items: center; margin-bottom: 14px; }
.sum-img { width: 60px; height: 72px; object-fit: cover; border-radius: 6px; }
.summary .row-between { padding: 10px 0; border-top: 1px solid var(--line); }
.summary .total { font-size: 1.15rem; }
.split.checkout { grid-template-columns: 1.2fr 1fr; }
@media (max-width: 860px) {
  .split.checkout { grid-template-columns: 1fr; }
  .summary { position: static; order: -1; }  /* phones: show what they're buying first */
}
