/* Shop listing. Shots per part are named in the comment at the top of shop.php. Values come from store.css tokens. */

.shop { padding-block: 32px var(--section); }

/* Head: centred title (Velvety) */
.shop-top { display: grid; justify-items: center; gap: 16px; padding-block: 16px 48px; text-align: center; }
.shop-top .crumbs { justify-content: center; margin: 0; }
.store .shop-title { font-size: clamp(48px, 7vw, 104px); line-height: 1.04; }
.shop-lede { max-width: 56ch; font-size: 16px; line-height: 1.5; color: var(--n-700); }

/* Tools bar between two hairlines (Hydrience) */
.shop-bar {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
    padding-block: 8px; border-block: 1px solid var(--n-100);
}
.shop-search { display: flex; align-items: center; gap: 12px; flex: 1 1 240px; max-width: 360px; color: var(--n-500); }
.shop-search svg { width: 20px; height: 20px; flex: none; margin-left: -3px; } /* cancels the glyph inset so the lens sits on the wrap edge */
.shop-search input {
    width: 100%; min-height: 44px; border: 0; background: none; padding: 0; font-size: 16px; color: var(--n-900);
}
.shop-search input::placeholder { color: var(--n-500); }
.shop-search input:focus { outline: none; }
.shop-search:focus-within { color: var(--n-900); }
.shop-bar-end { display: flex; align-items: baseline; gap: 24px; }
.shop-sort { position: relative; display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--n-500); }
.shop-sort select {
    appearance: none; min-height: 44px; padding: 0 28px 0 0; border: 0; background: none;
    font-size: 14px; font-weight: 500; color: var(--n-900); cursor: pointer;
}
.shop-sort select:focus-visible { outline: 2px solid var(--accent-600); outline-offset: 2px; border-radius: 4px; }
.shop-sort svg { position: absolute; right: 0; width: 16px; height: 16px; color: var(--n-900); pointer-events: none; }
.shop-results { display: flex; align-items: center; min-height: 44px; line-height: 20px; font-size: 14px; color: var(--n-500); font-variant-numeric: tabular-nums; white-space: nowrap; }
.shop-clear { margin-left: 8px; font-weight: 500; color: var(--accent-700); }

/* Body: category list beside the cards on desktop */
.shop-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 24px; }

/* Categories: pills on phone and tablet (Velvety) */
.shop-cats ul {
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter);
}
.shop-cats ul::-webkit-scrollbar { display: none; }
.shop-cats a {
    display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; white-space: nowrap;
    border: 1px solid var(--n-100); border-radius: 9999px; font-size: 14px; font-weight: 500; color: var(--n-700);
    transition: background-color 150ms ease-out, color 150ms ease-out, border-color 150ms ease-out;
}
.shop-cat-count { font-size: 13px; font-weight: 400; color: var(--n-500); font-variant-numeric: tabular-nums; }
.shop-cats a[aria-current="page"] { background: var(--n-950); border-color: var(--n-950); color: var(--n-0); }
.shop-cats a[aria-current="page"] .shop-cat-count { color: var(--n-400); }

/* Categories: list with counts on desktop (Eyewear) */
@media (min-width: 1024px) {
    .shop-body { grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 48px; margin-top: 32px; }
    .shop-cats { position: sticky; top: 96px; align-self: start; }
    .shop-cats ul { display: grid; gap: 4px; margin: 0; padding: 0; overflow: visible; }
    .shop-cats a { justify-content: space-between; gap: 16px; padding: 12px 16px; border: 0; border-radius: 8px; font-size: 15px; white-space: normal; }
    .shop-cats .is-child a { padding-left: 32px; font-size: 14px; font-weight: 400; }
}

/* Cards (Dorian Horvat): photo panel, white body overlapping its foot, price left and Add to cart right */
.shop-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 768px) { .shop-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
.tile-card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: 16px; background: var(--n-0); outline: 1px solid var(--outline); outline-offset: -1px; }
.tile-card-media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--n-50); }
.tile-card-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; transition: scale 300ms var(--ease); }
.tile-card-flag { position: absolute; top: 12px; left: 12px; padding: 4px 12px; border-radius: 9999px; background: var(--n-0); font-size: 12px; font-weight: 500; color: var(--n-900); }
.is-sold-out .tile-card-media img { opacity: 0.6; }
.tile-card-body { position: relative; flex: 1; display: flex; flex-direction: column; gap: 8px; margin-top: -16px; padding: 16px; border-radius: 16px 16px 0 0; background: var(--n-0); }
.tile-card-name { font-size: 15px; font-weight: 500; line-height: 1.3; letter-spacing: -0.01em; }
.tile-card-name a { color: var(--n-900); transition: color 150ms ease-out; }
.tile-card-name a::after { content: ''; position: absolute; inset: 0; }
.tile-card-rating { display: inline-flex; }
.tile-card-text { font-size: 13px; line-height: 1.5; color: var(--n-500); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-card-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-top: auto; padding-top: 8px; }
.tile-card-price { display: flex; align-items: baseline; gap: 8px; font-size: 18px; color: var(--n-900); }
.tile-card-price s { font-size: 13px; color: var(--n-500); }
.tile-card-add {
    position: relative; z-index: 1; min-height: 44px; padding: 8px 16px; border-radius: 8px;
    background: var(--n-950); color: var(--n-0); font-size: 14px; font-weight: 500; white-space: nowrap;
    transition-property: background-color, scale; transition-duration: 150ms; transition-timing-function: ease-out;
}
.tile-card-add:active { scale: 0.96; }
.tile-card-add:disabled { opacity: 0.6; cursor: progress; }
.tile-card-name a:focus-visible { outline: 2px solid var(--accent-600); outline-offset: 2px; }
@media (max-width: 479px) {
    .tile-card-body { padding: 12px; gap: 4px; }
    .tile-card-text { display: none; }
    .tile-card-price { font-size: 16px; }
    .tile-card-add { width: 100%; }
}
@media (min-width: 1024px) { .tile-card-price { font-size: 20px; } }

/* Pager (Untitled UI): Previous left, pages centred, Next right, hairline above */
.shop-pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--n-100); }
.shop-pager-step { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--n-700); transition: background-color 150ms ease-out; }
.shop-pager-step:first-child { justify-self: start; margin-left: -12px; }
.shop-pager-step:last-child { justify-self: end; margin-right: -12px; }
.shop-pager-step svg { width: 16px; height: 16px; }
.shop-pager-pages { display: flex; gap: 4px; }
.shop-pager-pages a { min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--n-700); font-variant-numeric: tabular-nums; transition: background-color 150ms ease-out; }
.shop-pager-pages a[aria-current="page"] { background: var(--n-50); color: var(--n-900); }
@media (max-width: 479px) { .shop-pager-step { font-size: 0; gap: 0; } }

/* Empty state (Dmitry Sergushkin): centred icon, title, one line, one action */
.shop-none { display: grid; justify-items: center; gap: 12px; padding-block: 64px; text-align: center; }
.shop-none-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 8px; border-radius: 12px; background: var(--n-50); color: var(--n-700); }
.shop-none-icon svg { width: 24px; height: 24px; }
.shop-none h2 { font-size: 20px; font-weight: 500; letter-spacing: -0.01em; }
.shop-none p { max-width: 44ch; margin-bottom: 12px; font-size: 16px; line-height: 1.5; color: var(--n-500); }

@media (hover: hover) and (pointer: fine) {
    .shop-cats a:not([aria-current="page"]):hover { background: var(--n-50); color: var(--n-900); }
    .tile-card:hover .tile-card-media img { scale: 1.03; }
    .tile-card:hover .tile-card-name a { color: var(--accent-600); }
    .tile-card-add:hover { background: var(--accent-600); }
    .shop-pager-step:hover, .shop-pager-pages a:not([aria-current="page"]):hover { background: var(--n-50); }
}
