/* HILLTILL — shop, category, collection and product pages. Clean white storefront.
   Loaded only on those pages, so the home page keeps its own look. */

body.page-shop {
    --paper: #ffffff;
    --paper-2: #f3f3f3;
    --line: #ffffff;
    --mute: #707070;
    background: #fff;
}

/* ---------- Banner ---------- */
.shop-banner { position: relative; margin: 0; overflow: hidden; background: var(--paper-2); }
.shop-banner__caption { position: absolute; left: var(--gutter); bottom: 18px; padding: 6px 12px; background: rgba(255, 255, 255, .92); font-size: 13px; }
.shop-banner img { width: 100%; height: clamp(300px, 62vh, 640px); object-fit: cover; object-position: 50% 16%; }
@media (max-width: 599px) { .shop-banner img { height: clamp(220px, 42vh, 360px); } }

/* ---------- Head ---------- */
.shop { padding-block: clamp(32px, 4vw, 56px) clamp(56px, 7vw, 96px); }
.shop__crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; font-size: 12px; color: var(--mute); }
.shop__crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.shop__title { font-family: var(--sans); font-weight: 800; font-size: clamp(38px, 5vw, 68px); line-height: 1; letter-spacing: -.03em; }
.shop__sub { margin-top: 12px; font-size: 13px; font-weight: 600; }
.shop__search { display: flex; gap: 8px; max-width: 520px; margin-top: 24px; }
.shop__search input { flex: 1; min-height: 46px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 15px; outline: none; }
.shop__search input:focus { border-color: var(--ink); }
.shop__search button, .shop-btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 24px;
    border-radius: 999px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600;
}

/* Sub-category links */
.shop__cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.shop__cats a {
    padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px;
    transition: border-color .2s, background .2s, color .2s;
}
.shop__cats a:hover { border-color: var(--ink); }
.shop__cats a.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- Filter / sort bar ---------- */
.shop__bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
    margin: 32px 0 28px; padding-block: 14px; border-block: 1px solid var(--line); font-size: 13px;
}
.shop__toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.shop__toggle input { width: 16px; height: 16px; accent-color: var(--ink); }
.shop__tools { display: flex; align-items: center; gap: 18px; }
.shop__count { color: var(--mute); }
.shop__sort select {
    appearance: none; border: 0; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23151412' stroke-width='1.3'/%3E%3C/svg%3E") right center no-repeat;
    padding: 6px 18px 6px 0; font-size: 13px; cursor: pointer;
}
.shop__view { display: flex; gap: 2px; }
.shop__view button { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 6px; color: var(--mute); }
.shop__view button[aria-pressed="true"] { background: var(--paper-2); color: var(--ink); }

/* ---------- Product grid (same edge-to-edge cards as everywhere) ---------- */
.shop-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-inline: calc(var(--gutter) * -1); }
.shop-grid.is-small { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.shop-grid.is-small .card__body { padding-inline: 10px; }
.shop-grid.is-small .card__title { font-size: 12px; }
@media (max-width: 1023px) { .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .shop-grid.is-small { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 599px) { .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .shop-grid.is-small { grid-template-columns: repeat(3, minmax(0, 1fr)); } .shop-grid.is-small .card__bag { display: none; } }

.shop__empty { padding: 72px 0; text-align: center; color: var(--ink-2); }
.shop__empty .shop-btn { margin-top: 20px; }

/* Collections page / related */
.shop-collection { margin-top: clamp(40px, 5vw, 72px); }
.shop-collection__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.shop-collection__head h2 { font-family: var(--sans); font-weight: 700; font-size: clamp(24px, 2.4vw, 34px); letter-spacing: -.02em; }
.shop-collection__head a { font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.shop-collection .shop__cats { margin: -6px 0 22px; }
.shop--related { padding-top: clamp(48px, 6vw, 88px); border-top: 1px solid var(--line); }

/* ---------- Product page ---------- */
.pd { display: grid; grid-template-columns: minmax(0, 63fr) minmax(0, 37fr); }
.pd__gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; align-content: start; }
.pd__gallery[data-count="1"] { grid-template-columns: 1fr; }
.pd__gallery figure { margin: 0; background: var(--paper-2); }
.pd__gallery img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 18%; }
.pd__gallery[data-count="1"] img { aspect-ratio: 4 / 4.4; }

.pd__info { padding: 28px clamp(24px, 3.4vw, 56px) 48px; }
.pd__sticky { position: sticky; top: calc(var(--header-h) + 24px); max-width: 440px; }
.pd__title { font-family: var(--sans); font-weight: 600; font-size: clamp(22px, 2vw, 28px); line-height: 1.2; letter-spacing: -.01em; }
.pd__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-top: 10px; font-size: 16px; }
.pd__price ins { font-weight: 600; color: var(--ink); }
.pd__price del { font-size: 14px; color: var(--mute); }
.pd__off { padding: 2px 8px; border-radius: 999px; background: #fbe9e2; color: var(--sale); font-size: 11px; font-weight: 600; }
.pd__tax { margin-top: 4px; font-size: 12px; color: var(--mute); }
.pd__stock { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 13px; }
.pd__stock span { width: 10px; height: 10px; border-radius: 50%; background: #2f9e5b; box-shadow: 0 0 0 4px rgba(47, 158, 91, .15); }
.pd__stock.is-out span { background: #b0b0b0; box-shadow: 0 0 0 4px rgba(0, 0, 0, .06); }

.pd__opt { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.pd__label { padding: 0; margin-bottom: 10px; font-size: 13px; font-weight: 500; }
.pd__label strong { font-weight: 600; }
.pd__label-note { margin-left: 6px; color: var(--mute); font-weight: 400; }

/* Option borders. The theme's --line is white (invisible on this white page), which is why the
   size pills and colour photos had no outline — the product options use their own visible tone. */
.pd { --pd-line: #cdc8c0; --pd-line-hover: #8d877e; }

/* Sizes — pills */
.pd__pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pd__pills label { position: relative; }
.pd__pills input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pd__pills span {
    display: inline-flex; align-items: center; justify-content: center; min-width: 54px; height: 40px; padding: 0 16px;
    border: 1px solid var(--pd-line); border-radius: 999px; background: #fff; font-size: 13px;
    transition: border-color .2s, background .2s, color .2s;
}
.pd__pills label:hover span { border-color: var(--pd-line-hover); }
.pd__pills input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.pd__pills input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 3px; }
.pd__pills input:disabled + span { color: #b3aea6; border-style: dashed; cursor: not-allowed; }

/* More colours — photo of each linked colour product (each links to that colour's page) */
.pd__more-title { font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.pd__more-current { margin-left: 10px; color: var(--mute); font-weight: 400; }
.pd__more-current strong { color: var(--ink); }
.pd__colors { display: flex; flex-wrap: wrap; gap: 10px; }
.pd__color { position: relative; display: grid; gap: 6px; width: 60px; text-align: center; font-size: 11px; color: var(--mute); border-radius: 8px; }
.pd__color img {
    width: 60px; height: 75px; object-fit: cover; object-position: 50% 20%; border-radius: 6px;
    border: 1px solid var(--pd-line); background: var(--paper-2); transition: border-color .2s, box-shadow .2s, opacity .2s;
}
.pd__color span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd__color:hover img { border-color: var(--pd-line-hover); }
.pd__color:hover span { color: var(--ink); }
/* Selected = solid ink ring with a white gap, so it reads even on dark photos */
.pd__color.is-current img { border-color: var(--ink); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink); }
.pd__color.is-current span { color: var(--ink); font-weight: 600; }
.pd__color:focus-visible { outline: none; }
.pd__color:focus-visible img { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2f6fed; }
/* Sold out: faded photo with a diagonal strike */
.pd__color.is-out img { opacity: .45; }
.pd__color.is-out::after { content: ""; position: absolute; left: 4px; right: 4px; top: 37px; height: 1px; background: var(--ink-2); transform: rotate(-50deg); pointer-events: none; }

/* Colour options inside one product — round swatches */
.pd__dots { display: flex; flex-wrap: wrap; gap: 10px; }
.pd__dots label { position: relative; cursor: pointer; }
.pd__dots input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pd__dot { display: block; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--pd-line); box-shadow: inset 0 0 0 3px #fff; transition: box-shadow .2s; }
.pd__dots label:hover .pd__dot { box-shadow: inset 0 0 0 3px #fff, 0 0 0 1px var(--pd-line-hover); }
.pd__dots input:checked + .pd__dot { box-shadow: inset 0 0 0 3px #fff, 0 0 0 2px var(--ink); }
.pd__dots input:focus-visible + .pd__dot, .pd__dots input:focus-visible + .pd__dot-text { outline: 2px solid var(--ink); outline-offset: 3px; }
.pd__dot-text { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 1px solid var(--pd-line); border-radius: 999px; font-size: 12.5px; }
.pd__dots label:hover .pd__dot-text { border-color: var(--pd-line-hover); }
.pd__dots input:checked + .pd__dot-text { background: var(--ink); border-color: var(--ink); color: #fff; }

.pd__actions { display: grid; gap: 10px; margin-top: 26px; }
.pd__add, .pd__buy {
    display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; border-radius: 10px;
    font-size: 14px; font-weight: 600; transition: background .2s, color .2s, transform .1s;
}
.pd__add { border: 2px solid var(--ink); background: #fff; color: var(--ink); }
.pd__add:hover { background: var(--paper-2); }
.pd__buy { background: var(--ink); color: #fff; letter-spacing: .08em; text-transform: uppercase; }
.pd__buy:hover { background: #333; }
.pd__add:active, .pd__buy:active { transform: scale(.99); }
.pd__add:disabled, .pd__buy:disabled { opacity: .6; }
.pd__soldout { margin-top: 22px; padding: 16px; border-radius: 10px; background: var(--paper-2); font-size: 14px; }
.pd__soldout a { text-decoration: underline; }

.pd__acc { margin-top: 30px; border-top: 1px solid var(--ink); }
.pd__acc details { border-bottom: 1px solid var(--ink); }
.pd__acc summary {
    display: flex; align-items: center; justify-content: space-between; padding-block: 15px; cursor: pointer; list-style: none;
    font-size: 12px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
}
.pd__acc summary::-webkit-details-marker { display: none; }
.pd__acc summary::after {
    content: ""; width: 7px; height: 7px; margin-right: 4px; border: solid currentColor; border-width: 0 1.4px 1.4px 0;
    transform: rotate(45deg) translateY(-3px); transition: transform .25s;
}
.pd__acc details[open] summary::after { transform: rotate(-135deg) translateY(-1px); }
.pd__acc .prose { padding-bottom: 18px; font-size: 14px; line-height: 1.65; }
.pd__acc .prose a { text-decoration: underline; }

@media (max-width: 899px) {
    .pd { grid-template-columns: 1fr; }
    .pd__gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 4px; scrollbar-width: none; }
    .pd__gallery::-webkit-scrollbar { display: none; }
    .pd__gallery figure { flex: 0 0 86%; scroll-snap-align: start; }
    .pd__gallery[data-count="1"] figure { flex-basis: 100%; }
    .pd__info { padding: 22px var(--gutter) 40px; }
    .pd__sticky { position: static; max-width: none; }
}

/* ---------- Cart ---------- */
.bag { padding-block: clamp(32px, 4vw, 56px) clamp(40px, 5vw, 72px); }
.bag__title { display: flex; align-items: center; gap: 12px; font-family: var(--sans); font-weight: 700; font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.02em; margin-bottom: 28px; }
.bag__count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--paper-2); font-size: 13px; font-weight: 500; letter-spacing: 0; }
.bag__empty { display: grid; justify-items: center; gap: 14px; padding: 64px 0; color: var(--mute); text-align: center; }
.bag__empty p { font-size: 16px; color: var(--ink); }
.bag__grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(28px, 4vw, 64px); align-items: start; }

.bag-line { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto 110px; gap: 20px; align-items: start; padding-block: 18px; border-bottom: 1px solid var(--line); }
.bag-line:first-child { padding-top: 0; }
.bag-line__img img { width: 110px; height: 138px; object-fit: cover; object-position: 50% 20%; border-radius: 6px; background: var(--paper-2); }
.bag-line__name { font-size: 15px; }
.bag-line__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.bag-line__opts { margin-top: 4px; font-size: 13px; color: var(--mute); }
.bag-line__price { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.bag-line__price del { margin-left: 6px; color: var(--mute); }
.bag-line__qty { display: flex; align-items: center; gap: 12px; }
.bag-line__total { text-align: right; font-size: 14px; }
.bag-line__remove { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: var(--ink-2); }
.bag-line__remove:hover { background: var(--paper-2); color: var(--sale); }

.stepper { display: inline-flex; align-items: center; height: 40px; border: 1px solid var(--line); border-radius: 8px; }
.stepper button { width: 36px; height: 100%; font-size: 18px; color: var(--ink-2); }
.stepper button:hover { color: var(--ink); }
.stepper input { width: 36px; height: 100%; border: 0; text-align: center; font-size: 14px; background: transparent; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper:focus-within { border-color: var(--ink); }

.bag__summary { position: sticky; top: calc(var(--header-h) + 24px); padding: 24px; border-radius: 12px; background: var(--paper-2); }
.bag__summary dl > div { display: flex; justify-content: space-between; padding-block: 6px; font-size: 14px; }
.bag__summary dd { margin: 0; }
.bag__total { margin-top: 8px; padding-top: 14px !important; border-top: 1px solid var(--line); font-size: 17px !important; font-weight: 700; }
.bag__note { margin-top: 10px; font-size: 12.5px; color: var(--mute); }
.bag__checkout { display: flex; align-items: center; justify-content: center; min-height: 52px; margin-top: 18px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 600; transition: background .2s; }
.bag__checkout:hover { background: #333; }
.bag__continue { display: block; margin-top: 14px; text-align: center; font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 899px) {
    .bag__grid { grid-template-columns: 1fr; }
    .bag__summary { position: static; }
}
@media (max-width: 599px) {
    .bag-line { grid-template-columns: 88px minmax(0, 1fr) auto; gap: 14px; }
    .bag-line__img { grid-row: span 2; }
    .bag-line__img img { width: 88px; height: 110px; }
    .bag-line__qty { grid-column: 2; grid-row: 2; }
    .bag-line__total { grid-column: 3; grid-row: 1; }
}

/* Size chart inside "Description & size chart" */
.pd__chart { display: block; margin-top: 12px; border: 1px solid var(--pd-line); border-radius: 8px; overflow: hidden; cursor: zoom-in; }
.pd__chart img { width: 100%; height: auto; }
.pd__fit { padding: 10px 12px; border-radius: 8px; background: var(--paper-2); font-size: 13.5px; }

/* Product photos used as colour choices */
.pd__color--pick { cursor: pointer; }
.pd__color--pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pd__color--pick:has(input:checked) img { border-color: var(--ink); box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--ink); }
.pd__color--pick:has(input:checked) span { color: var(--ink); font-weight: 600; }
.pd__color--pick:has(input:focus-visible) img { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- Product photo viewer (lightbox) ---------- */
.pd__zoom { display: block; cursor: zoom-in; }
.pd__zoom:focus-visible { outline-offset: -3px; }
.lb {
    width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0;
    background: #fff; color: var(--ink); overflow: hidden;
}
.lb[open] { display: grid; grid-template-columns: minmax(0, 1fr) 92px; animation: lb-in .25s var(--ease); }
.lb::backdrop { background: #fff; }
@keyframes lb-in { from { opacity: 0; } }
.lb__stage { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; padding: 24px 64px; touch-action: pan-y pinch-zoom; }
/* contain = the whole photo at its true aspect ratio, never cropped or stretched */
.lb__img { max-width: 100%; max-height: calc(100dvh - 48px); width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: opacity .2s; }
.lb__img.is-loading { opacity: .35; }
.lb__nav { position: absolute; top: 50%; display: grid; place-items: center; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; background: rgba(255, 255, 255, .9); box-shadow: 0 1px 6px rgba(0, 0, 0, .15); }
.lb__nav:hover { background: #fff; }
.lb__nav--prev { left: 12px; }
.lb__nav--prev svg { transform: rotate(180deg); }
.lb__nav--next { right: 12px; }
.lb__counter { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .9); font-size: 12px; color: var(--ink-2); }
.lb__thumbs { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 64px 14px 24px; overflow-y: auto; scrollbar-width: thin; }
.lb__thumb { flex: 0 0 auto; width: 60px; border: 1px solid transparent; opacity: .55; transition: opacity .2s, border-color .2s; }
.lb__thumb img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; background: var(--paper-2); }
.lb__thumb:hover { opacity: .9; }
.lb__thumb[aria-current="true"] { opacity: 1; border-color: var(--ink); }
.lb__close { position: absolute; top: 12px; right: 16px; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .9); }
.lb__close:hover { background: var(--paper-2); }
.lb__stage:only-of-type { grid-column: 1 / -1; }
@media (max-width: 767px) {
    .lb[open] { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
    .lb__stage { padding: 56px 8px 12px; }
    .lb__img { max-height: calc(100dvh - 160px); }
    .lb__nav { width: 40px; height: 40px; margin-top: -20px; }
    .lb__nav--prev { left: 6px; }
    .lb__nav--next { right: 6px; }
    .lb__thumbs { flex-direction: row; justify-content: flex-start; padding: 8px 12px max(12px, env(safe-area-inset-bottom)); overflow-x: auto; overflow-y: hidden; }
    .lb__thumb { width: 52px; }
    .lb__close { top: 8px; right: 8px; }
}
.shop-banner__edit { position: absolute; top: 16px; right: var(--gutter); display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: rgba(20, 20, 20, .82); color: #fff; font-size: 13px; font-weight: 500; backdrop-filter: blur(4px); }
.shop-banner__edit:hover { background: #141414; }
