/* StrojFitness.pl - "studio after hours": deep plum ink, magenta as the one accent
   (reserved for the cheapest offer and active states), cool lilac-grey floor.
   One family: Barlow Condensed for headings, Barlow for text. */

:root {
    --ink: #22192f;
    --ink-soft: #5d536b;
    --plum: #3b2160;
    --plum-soft: #5a3a8a;
    --floor: #f4f3f7;
    --white: #ffffff;
    --line: #e1dde9;
    --magenta: #c8246b;
    --magenta-soft: #fbe3ee;
    --sale: #b3262d;

    --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
    --text: "Barlow", "Segoe UI", system-ui, sans-serif;

    --wrap: 1280px;
    --gutter: clamp(16px, 3vw, 32px);
    --radius-photo: 6px;
    --radius-control: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--floor);
    color: var(--ink);
    font: 400 1rem/1.55 var(--text);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--plum-soft); text-underline-offset: 0.18em; }
a:hover { color: var(--magenta); }

:focus-visible { outline: 3px solid var(--magenta); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--display); line-height: 1; margin: 0 0 0.5em; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); font-weight: 700; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link { position: absolute; left: 8px; top: 0; transform: translateY(-120%); background: var(--magenta); color: var(--white); padding: 8px 12px; z-index: 10; }
.skip-link:focus { transform: translateY(8px); color: var(--white); }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.button {
    display: inline-block; padding: 0.7em 1.3em; border-radius: var(--radius-control);
    background: var(--plum); color: var(--white); font-weight: 600; text-decoration: none; text-align: center;
}
.button:hover { background: var(--magenta); color: var(--white); }
.button-quiet { background: var(--white); color: var(--plum); border: 1px solid var(--line); margin: 0 0.4em 0.5em 0; }
.button-quiet:hover { background: var(--magenta-soft); color: var(--plum); }

/* Header ---------------------------------------------------------------- */

.site-header { background: var(--plum); color: var(--white); }

.header-row { display: flex; align-items: center; gap: 24px; padding-top: 14px; padding-bottom: 10px; flex-wrap: wrap; }

.wordmark {
    font-family: var(--display); font-weight: 800; font-style: italic; font-size: 1.9rem; line-height: 1;
    color: var(--white); text-decoration: none; white-space: nowrap; margin: 0;
}
.wordmark span { color: #ff8cc0; }
.wordmark small { font-size: 0.55em; font-weight: 600; font-style: normal; opacity: 0.75; margin-left: 1px; }
.wordmark:hover { color: var(--white); }

.search { display: flex; flex: 1 1 320px; max-width: 560px; margin-left: auto; }
.search input {
    flex: 1; min-width: 0; border: 0; border-radius: var(--radius-control) 0 0 var(--radius-control);
    padding: 0.65em 1em; font: inherit; color: var(--ink); background: var(--white);
}
.search button {
    border: 0; border-radius: 0 var(--radius-control) var(--radius-control) 0; padding: 0 1.2em;
    font: 700 1.05rem var(--display); background: var(--magenta); color: var(--white); cursor: pointer;
}
.search button:hover { background: #a91d5a; }

.main-nav { display: flex; gap: 2px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a {
    color: var(--white); text-decoration: none; white-space: nowrap; padding: 0.3em 0.75em;
    border-radius: var(--radius-control); font: 600 1.08rem var(--display);
}
.main-nav a:hover { background: rgba(255, 255, 255, 0.12); color: var(--white); }
.main-nav a.is-active { background: var(--white); color: var(--plum); }

/* Home: the slanted hero ------------------------------------------------ */

/* The hero ends on a diagonal - a sprint start, not a flat line. The tiles
   below ride up over the slope. */
.hero {
    background: var(--plum); color: var(--white); padding-bottom: 170px;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 110px), 0 100%);
}
.hero-text { padding-top: clamp(24px, 5vw, 64px); }
.hero h1 {
    font-size: clamp(2.8rem, 8vw, 6rem); font-style: italic; font-weight: 800;
    max-width: 13ch; line-height: 0.92; letter-spacing: -0.005em;
}
.hero p { max-width: 56ch; font-size: 1.12rem; color: #ddd0ee; margin: 0; }

.tiles { margin-top: -150px; position: relative; }
.tiles ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tiles a { display: block; text-decoration: none; color: var(--ink); }
.tiles img {
    aspect-ratio: 3 / 4; object-fit: cover; width: 100%; border-radius: var(--radius-photo);
    background: var(--white); box-shadow: 0 22px 40px -26px rgba(34, 25, 47, 0.6);
}
.tile-name { display: block; font: italic 800 1.6rem/1 var(--display); margin-top: 12px; }
.tile-lead { display: block; color: var(--ink-soft); font-size: 0.93rem; margin-top: 6px; }
.tiles a:hover .tile-name { color: var(--magenta); }

/* Blocks ---------------------------------------------------------------- */

.block { margin-top: clamp(40px, 6vw, 64px); }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.block-head h2 { margin: 0; }
.block-head a { font-weight: 600; }

.prose { max-width: 70ch; }
.prose p { margin: 0 0 1em; }
.prose img { border-radius: var(--radius-photo); margin: 1em 0; }
.prose h2, .prose h3 { margin-top: 1.3em; }

/* Product grid ---------------------------------------------------------- */

.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 28px 16px; }

.card a { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--ink); }
.card-photo { display: block; border-radius: var(--radius-photo); overflow: hidden; background: var(--white); }
.card-photo img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.card-name {
    margin-top: 10px; font-size: 0.92rem; color: var(--ink-soft);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-price { margin-top: auto; padding-top: 4px; font: 700 1.2rem var(--display); }
.card-from { font: 400 0.85rem var(--text); color: var(--ink-soft); }
.card a:hover .card-name { color: var(--plum); text-decoration: underline; }

/* Brands ---------------------------------------------------------------- */

.brand-cloud { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.brand-cloud a {
    display: inline-flex; align-items: baseline; gap: 6px; padding: 0.4em 0.9em; border-radius: var(--radius-control);
    background: var(--white); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600;
}
.brand-cloud a:hover { border-color: var(--magenta); color: var(--magenta); }
.brand-cloud span { font-weight: 400; font-size: 0.8rem; color: var(--ink-soft); }

.brand-index { columns: 4 220px; column-gap: 32px; }
.brand-index section { break-inside: avoid; margin-bottom: 24px; }
.brand-index h2 { font-size: 2rem; font-style: italic; color: var(--plum-soft); border-bottom: 2px solid var(--line); padding-bottom: 4px; }
.brand-index ul { list-style: none; margin: 0; padding: 0; }
.brand-index li { padding: 2px 0; }
.brand-index li span { color: var(--ink-soft); font-size: 0.85rem; }

/* Articles -------------------------------------------------------------- */

.articles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px 18px; }
.articles a { display: block; text-decoration: none; color: var(--ink); }
.articles img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-photo); background: var(--line); }
.article-title { display: block; font: 700 1.35rem/1.1 var(--display); margin-top: 10px; }
.articles time { display: block; font-size: 0.85rem; color: var(--ink-soft); margin-top: 4px; }
.articles a:hover .article-title { color: var(--magenta); }

.article { max-width: 820px; }
.article-meta { color: var(--ink-soft); margin-top: -0.3em; }
.article-cover { width: 100%; border-radius: var(--radius-photo); margin: 8px 0 28px; }

/* Listing --------------------------------------------------------------- */

.crumbs { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 20px; font-size: 0.9rem; }
.crumbs a { color: var(--ink-soft); }
.crumbs a + a::before { content: "/"; color: var(--line); margin-right: 6px; display: inline-block; text-decoration: none; }

.listing-head { padding-bottom: 8px; }
.listing-head h1 { margin: 12px 0 4px; }
.listing-count { color: var(--ink-soft); margin: 0; }

.listing { display: grid; grid-template-columns: 250px 1fr; gap: 36px; margin-top: 24px; align-items: start; }

.filters { position: sticky; top: 16px; }
.filters summary { display: none; }
.filters fieldset { border: 0; margin: 0 0 22px; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.filters legend { font: 700 1.2rem var(--display); margin-bottom: 6px; padding: 0; }
.filters fieldset a { color: var(--ink); text-decoration: none; padding: 3px 10px; margin-left: -10px; border-radius: var(--radius-control); }
.filters fieldset a:hover { background: var(--white); color: var(--plum); }
.filters fieldset a.is-on { background: var(--plum); color: var(--white); font-weight: 600; }
.filter-brands { max-height: 420px; overflow-y: auto; flex-wrap: nowrap; }

.filter-search { margin-bottom: 24px; }
.filter-search label { display: block; font: 700 1.2rem var(--display); margin-bottom: 6px; }
.filter-search-row { display: flex; gap: 6px; }
.filter-search input { flex: 1; min-width: 0; font: inherit; padding: 0.45em 0.8em; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--white); color: var(--ink); }
.filter-search button { font: 700 1rem var(--display); border: 0; border-radius: var(--radius-control); padding: 0 0.9em; background: var(--plum); color: var(--white); cursor: pointer; }

.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.active-filters a { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-control); padding: 0.3em 0.9em; color: var(--ink); text-decoration: none; font-weight: 500; }
.active-filters a span { color: var(--magenta); margin-left: 4px; }

.pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 40px; flex-wrap: wrap; }
.pager a { padding: 0.6em 1.2em; border-radius: var(--radius-control); border: 1px solid var(--line); background: var(--white); text-decoration: none; font-weight: 600; }
.pager a.pager-next { background: var(--plum); border-color: var(--plum); color: var(--white); }
.pager span { color: var(--ink-soft); }

.empty { padding: 32px 0; }
.empty h1, .empty h2 { margin-bottom: 0.4em; }

.listing-about { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ink-soft); }

/* Product --------------------------------------------------------------- */

.product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); margin-top: 18px; align-items: start; }

.gallery-main { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--white); border-radius: var(--radius-photo); }
.gallery-thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.gallery-thumbs button { padding: 0; border: 2px solid transparent; border-radius: var(--radius-control); background: var(--white); cursor: pointer; overflow: hidden; }
.gallery-thumbs button[aria-pressed="true"] { border-color: var(--magenta); }
.gallery-thumbs img { width: 72px; height: 72px; object-fit: contain; }

.product-brand { font: italic 800 1.2rem var(--display); color: var(--magenta); text-decoration: none; }
.product-info h1 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); margin-top: 6px; }
.product-price { font: 800 2.3rem var(--display); margin: 0 0 20px; }
.product-price span { font: 400 1rem var(--text); color: var(--ink-soft); }

.facts { margin-bottom: 16px; }
.facts h2, .offers h2, .product-description h2 { font-size: 1.3rem; margin-bottom: 8px; }
.facts p { margin: 0; }
.sizes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sizes li { min-width: 42px; text-align: center; padding: 0.25em 0.6em; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--white); font-weight: 600; font-size: 0.9rem; }

.offers { margin-top: 28px; }
.offers ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.offer {
    display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center;
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-control); padding: 12px 14px;
}
.offer.is-cheapest { border: 2px solid var(--magenta); }
.offer-shop strong { display: block; }
.badge-sun { display: inline-block; margin-top: 2px; background: var(--magenta); color: var(--white); font-size: 0.78rem; font-weight: 700; padding: 0.1em 0.6em; border-radius: var(--radius-control); }
.offer-price { text-align: right; font: 700 1.3rem var(--display); white-space: nowrap; }
.offer-price .is-sale { color: var(--sale); }
.offer-price s { display: block; font: 400 0.85rem var(--text); color: var(--ink-soft); }
.offers-note { font-size: 0.85rem; color: var(--ink-soft); margin-top: 10px; }

.product-description { margin-top: 28px; }

/* Footer ---------------------------------------------------------------- */

.site-footer { margin-top: 80px; background: var(--ink); color: #cfc7da; padding: 40px 0 28px; }
.site-footer a { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px 48px; }
.footer-grid p { max-width: 60ch; margin: 0 0 0.8em; }
.footer-grid nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 20px; align-content: start; }
.wordmark-small { font-size: 1.6rem; }
.footer-note { grid-column: 1 / -1; font-size: 0.85rem; border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 18px; }
.footer-popular { grid-column: 1 / -1; display: flex !important; flex-wrap: wrap; gap: 6px 18px; font-size: 0.9rem; }

/* Landing pages, features, finder, helpers ----------------------------- */

.listing-lead { max-width: 70ch; font-size: 1.05rem; margin: 0 0 6px; }
.block-note { color: var(--ink-soft); margin: -8px 0 16px; }
.related { margin-top: 40px; }
.related h2 { font-size: 1.4rem; }

.sizes li a { color: inherit; text-decoration: none; }
.sizes li a:hover { color: var(--magenta); }
.facts-note { margin-top: 6px !important; font-size: 0.82rem; color: var(--ink-soft); }
.facts-help { display: inline-block; margin-bottom: 16px; font-size: 0.95rem; }

.helpers { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.helpers a { display: grid; gap: 4px; height: 100%; padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-photo); text-decoration: none; color: var(--ink); }
.helpers a:hover { border-color: var(--magenta); }
.helpers strong { font: 700 1.35rem var(--display); color: var(--plum); }
.helpers span { color: var(--ink-soft); font-size: 0.93rem; }

.finder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); margin-top: 24px; align-items: start; }
.finder-form { display: grid; gap: 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-photo); padding: clamp(18px, 3vw, 28px); }
.finder-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.finder-form legend { font: 700 1.3rem var(--display); margin-bottom: 4px; padding: 0; }
.finder-choice { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.finder-choice input { width: 18px; height: 18px; accent-color: var(--plum); }
.finder-form .button { border: 0; font: 700 1.1rem var(--display); cursor: pointer; justify-self: start; }
.finder-result ul { padding-left: 1.2em; }
.finder-note { color: var(--ink-soft); font-size: 0.88rem; }

/* Smaller screens ------------------------------------------------------- */

@media (max-width: 960px) {
    .tiles ul { grid-template-columns: repeat(2, 1fr); }
    .listing { grid-template-columns: 1fr; gap: 20px; }
    .filters { position: static; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-control); padding: 4px 16px; }
    .filters summary { display: list-item; cursor: pointer; font: 700 1.2rem var(--display); padding: 10px 0; }
    .filters[open] summary { margin-bottom: 8px; }
    .filters fieldset { flex-direction: row; flex-wrap: wrap; gap: 6px; }
    .filters fieldset a { margin-left: 0; border: 1px solid var(--line); }
    .filter-brands { max-height: 180px; }
    .product { grid-template-columns: 1fr; }
    .finder { grid-template-columns: 1fr; }
    .helpers { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .header-row { gap: 10px; }
    .search { flex-basis: 100%; }
    .hero { padding-bottom: 130px; clip-path: polygon(0 0, 100% 0, 100% calc(100% - 60px), 0 100%); }
    .tiles { margin-top: -110px; }
    .tiles ul { gap: 12px; }
    .tile-lead { display: none; }
    .tile-name { font-size: 1.3rem; }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
    .offer { grid-template-columns: 1fr auto; }
    .offer .button { grid-column: 1 / -1; }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto !important; transition: none !important; }
}
