/* EcomStrait Fashion. Colours, radius and fonts are the variables set in
   layout/theme.liquid; change them there and the whole store follows. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1rem/1.6 var(--font-body); -webkit-font-smoothing: antialiased; }
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd, figure, fieldset { margin: 0; }
fieldset { padding: 0; border: 0; min-width: 0; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
main:focus { outline: none; }
h1, h2 { font-family: var(--font-display); font-weight: 400; line-height: 1.08; letter-spacing: -0.01em; text-wrap: balance; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }

.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 60; padding: .6rem 1rem; background: var(--ink); color: var(--bg); }
.skip-link:focus { top: 1rem; }

/* ---- Buttons and links ---- */
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: .75rem 2rem; background: var(--brand); color: var(--on-brand); border: 1px solid var(--brand); border-radius: 999px; font-weight: 600; text-align: center; transition: opacity .2s; }
.button:hover { opacity: .86; }
.button[disabled] { opacity: .45; cursor: not-allowed; }
.button--full { width: 100%; }
.button--plain { background: transparent; color: var(--ink); border-color: var(--line); }
.text-link { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.text-link:hover { text-decoration-thickness: 2px; }

/* ---- Header ---- */
.announcement { padding: .55rem 1rem; background: var(--ink); color: var(--bg); text-align: center; font-size: .875rem; }
.header { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.header__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; min-height: 68px; padding: 0 clamp(1rem, 3vw, 2.5rem); }
.header__nav { display: none; align-items: center; gap: 1.6rem; font-size: .95rem; }
.header__nav a { display: block; padding: .5rem 0; }
.header__nav a:hover, .header__nav [aria-current] { text-decoration: underline; text-underline-offset: 6px; }
.header__group { position: relative; }
.header__sub { position: absolute; left: -1.25rem; top: 100%; min-width: 220px; padding: .75rem 1.25rem; background: var(--bg); border: 1px solid var(--line); visibility: hidden; opacity: 0; transition: opacity .15s; }
.header__group:hover .header__sub, .header__group:focus-within .header__sub { visibility: visible; opacity: 1; }
.header__logo { grid-column: 2; font: 400 1.5rem/1.1 var(--font-display); text-align: center; max-width: 52vw; overflow-wrap: anywhere; }
.header__logo img { max-height: 48px; object-fit: contain; }
.header__tools { display: flex; justify-content: flex-end; gap: .25rem; }
.header__tools a, .header__toggle { position: relative; display: grid; place-items: center; width: 44px; height: 44px; }
.header__toggle { margin-left: -11px; }
.header__count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--brand); color: var(--on-brand); font-size: .7rem; font-weight: 600; line-height: 18px; text-align: center; }
@media (min-width: 900px) {
  .header__nav { display: flex; grid-column: 2; grid-row: 1; justify-content: center; }
  .header__logo { grid-column: 1; grid-row: 1; justify-self: start; text-align: left; max-width: none; }
  .header__tools { grid-column: 3; grid-row: 1; }
  .header__toggle { display: none; }
}

/* ---- Panels: mobile menu and bag ---- */
.panel { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / .4); }
.panel__box { position: absolute; inset: 0 auto 0 0; width: min(420px, 100%); display: flex; flex-direction: column; padding: 1.25rem 1.5rem; background: var(--bg); overflow-y: auto; overscroll-behavior: contain; }
.panel--right .panel__box { inset: 0 0 0 auto; }
.panel__close { display: grid; place-items: center; width: 44px; height: 44px; margin: -8px -11px 0 auto; flex: none; }
.drawer-nav { display: flex; flex-direction: column; }
.drawer-nav a { padding: .8rem 0; border-bottom: 1px solid var(--line); font: 400 1.35rem/1.2 var(--font-display); }
.drawer-nav .drawer-nav__child { padding-left: 1rem; font: 400 1rem/1.4 var(--font-body); }
.bag__head { display: flex; align-items: center; justify-content: space-between; }
.bag__items, .cart__items { border-top: 1px solid var(--line); }
.bag__items { margin-top: 1rem; }
.bag__items:empty { border: 0; }
.bag__message { font-size: .9rem; color: var(--accent); }
.bag__empty { padding: 2rem 0; color: var(--muted); }
.bag__foot { margin-top: auto; padding-top: 1.25rem; }
.bag__total { display: flex; justify-content: space-between; font-weight: 600; font-variant-numeric: tabular-nums; }
.bag__note { margin: .25rem 0 1rem; font-size: .875rem; color: var(--muted); }
.bag__view { display: block; padding: .9rem; text-align: center; text-decoration: underline; text-underline-offset: 4px; }

/* ---- Lines (bag and cart) ---- */
.line { display: grid; grid-template-columns: 96px 1fr; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.line__media { display: block; aspect-ratio: 3 / 4; background: var(--surface); overflow: hidden; }
.line__media img { width: 100%; height: 100%; object-fit: cover; }
.line__text { min-width: 0; }
.line__title { font-weight: 500; overflow-wrap: anywhere; }
.line__variant { color: var(--muted); font-size: .9rem; }
.line__row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .6rem; }
.line__price { font-variant-numeric: tabular-nums; }
.line__remove { display: inline-block; margin-top: .5rem; font-size: .875rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.stepper button { width: 40px; height: 42px; font-size: 1.1rem; }
.stepper button[disabled] { opacity: .3; }
.stepper input, .stepper output { width: 38px; text-align: center; border: 0; background: none; font-variant-numeric: tabular-nums; -moz-appearance: textfield; appearance: textfield; }
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ---- Hero ---- */
.hero { display: grid; gap: 2rem; padding: clamp(2.5rem, 7vw, 6rem) clamp(1rem, 3vw, 2.5rem) clamp(2rem, 5vw, 4rem); }
.hero__text { max-width: 36rem; }
.hero h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); }
.hero__tagline { margin-bottom: 1rem; font-size: 1.05rem; color: var(--accent); }
.hero__sub { margin-top: 1.25rem; max-width: 30rem; font-size: 1.1rem; color: var(--muted); }
.hero .button { margin-top: 2rem; }
.hero__looks { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(.5rem, 1.2vw, 1rem); }
.hero__look { overflow: hidden; background: var(--surface); border-radius: var(--radius); }
.hero__look:first-child { grid-row: span 2; }
.hero__look:only-child { grid-column: 1 / -1; }
.hero__look img { width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform .6s; }
.hero__look:hover img { transform: scale(1.03); }
@media (min-width: 900px) {
  .hero:not(.hero--media) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: end; gap: clamp(2rem, 5vw, 5rem); }
}
.hero--media { position: relative; min-height: min(86vh, 860px); align-items: end; overflow: hidden; color: #fff; }
.hero--media .hero__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero--media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgb(0 0 0 / .62), rgb(0 0 0 / .08) 65%); }
.hero--media .hero__text { position: relative; z-index: 1; }
.hero--media .hero__sub, .hero--media .hero__tagline { color: rgb(255 255 255 / .9); }
.hero--media .button { background: #fff; border-color: #fff; color: #111; }

/* ---- Sections and grids ---- */
.section { padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 3vw, 2.5rem); }
.section--page { padding-top: clamp(2rem, 4vw, 3.5rem); min-height: 50vh; }
.section--narrow { max-width: 46rem; margin-inline: auto; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem clamp(.5rem, 1.2vw, 1rem); }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.empty { padding: 2rem 0; color: var(--muted); }

.card__link { display: block; }
.card__media { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--surface); border-radius: var(--radius); }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__second { position: absolute; inset: 0; opacity: 0; transition: opacity .35s; }
@media (hover: hover) { .card__link:hover .card__second { opacity: 1; } .card__link:hover .card__title { text-decoration: underline; text-underline-offset: 4px; } }
.card__placeholder { width: 100%; height: 100%; color: var(--ink); }
.card__text { padding-top: .75rem; }
.card__title { font: 500 .98rem/1.35 var(--font-body); overflow-wrap: anywhere; }
.tag { position: absolute; left: .6rem; top: .6rem; padding: .2rem .55rem; background: var(--bg); color: var(--ink); font-size: .8rem; font-weight: 500; }
.tag--sale { background: var(--accent); color: #fff; }
.price { font-variant-numeric: tabular-nums; }
.price s { color: var(--muted); }
.price--sale span { color: var(--accent); }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.5rem, 1.2vw, 1rem); }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { display: block; }
.tile__media { display: block; aspect-ratio: 4 / 5; overflow: hidden; background: var(--surface); border-radius: var(--radius); }
.tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.tile:hover img { transform: scale(1.03); }
.tile__text { display: flex; align-items: center; justify-content: space-between; padding: .8rem 0; font: 400 clamp(1.05rem, 2vw, 1.35rem)/1.2 var(--font-display); }

.story { display: grid; gap: clamp(1.5rem, 4vw, 4rem); padding: clamp(2.5rem, 6vw, 5rem) clamp(1rem, 3vw, 2.5rem); }
.story:not(.story--media) .story__text { max-width: 46rem; margin-inline: auto; text-align: center; }
.story__media { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; background: var(--surface); border-radius: var(--radius); }
video.story__media { aspect-ratio: 16 / 10; }
@media (min-width: 900px) { .story--media { grid-template-columns: 1fr 1fr; align-items: center; } }
.prose { margin-top: 1rem; max-width: 68ch; }
.prose > * + * { margin-top: 1rem; }
.prose ul, .prose ol { padding-left: 1.25rem; list-style: disc; }
.prose ol { list-style: decimal; }
.prose h2 { margin-top: 2rem; font-size: 1.6rem; }
.prose h3 { margin-top: 1.5rem; font-size: 1.15rem; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.features { display: grid; gap: 2rem; }
@media (min-width: 700px) { .features { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); } }
.features h3 { font-size: 1.05rem; }
.features p { color: var(--muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 45%), 1fr)); gap: clamp(.5rem, 1.2vw, 1rem); }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; font-weight: 500; cursor: pointer; list-style: none; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .icon { flex: none; transition: transform .2s; }
.accordion details[open] summary .icon { transform: rotate(180deg); }
.accordion details > :not(summary) { margin: 0 0 1.25rem; color: var(--muted); }

.newsletter { padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1rem, 3vw, 2.5rem); background: var(--surface); text-align: center; }
.newsletter__form { display: flex; flex-wrap: wrap; gap: .5rem; max-width: 30rem; margin: 1.5rem auto 0; justify-content: center; }
.newsletter__form input[type="email"], .search input[type="search"] { flex: 1 1 14rem; min-height: 50px; padding: .6rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }

/* ---- Listing ---- */
.listing__head { max-width: 46rem; }
.listing__intro { color: var(--muted); }
.filters { display: flex; gap: .5rem; margin: 1.75rem 0 1rem; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters a { flex: none; padding: .55rem 1rem; border: 1px solid var(--line); border-radius: 999px; }
.filters [aria-current] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.listing__count { margin: 1rem 0; color: var(--muted); font-size: .95rem; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 1.25rem; margin-top: 3rem; }
.pagination ol { display: flex; gap: .25rem; }
.pagination li > * { display: grid; place-items: center; min-width: 42px; height: 42px; }
.pagination [aria-current] { border: 1px solid var(--ink); }
.search { display: flex; flex-wrap: wrap; gap: .5rem; max-width: 34rem; margin: 1.5rem 0; }

/* ---- Product ---- */
.crumbs { display: flex; flex-wrap: wrap; gap: .35rem .75rem; padding: 1rem clamp(1rem, 3vw, 2.5rem); font-size: .9rem; color: var(--muted); }
.crumbs a:hover { text-decoration: underline; }
.crumbs a::after { content: "/"; margin-left: .75rem; opacity: .5; }
.product { display: grid; gap: 1.75rem; padding: 0 0 3rem; }
.product__gallery { display: flex; gap: 2px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.product__gallery::-webkit-scrollbar { display: none; }
.product__gallery figure { flex: 0 0 88%; scroll-snap-align: start; background: var(--surface); }
.product__gallery figure:only-child { flex-basis: 100%; }
.product__gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.product__info { padding: 0 clamp(1rem, 3vw, 2.5rem); min-width: 0; }
.product__info h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.product__price { margin-top: .75rem; font-size: 1.2rem; }
.product__form { margin: 1.75rem 0; }
.option { margin-bottom: 1.4rem; }
.option legend { margin-bottom: .6rem; padding: 0; font-weight: 500; }
.option legend span { font-weight: 400; color: var(--muted); }
.option__values { display: flex; flex-wrap: wrap; gap: .5rem; }
.option label { display: grid; place-items: center; min-width: 50px; min-height: 46px; padding: .4rem .9rem; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.option input:checked + label { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.option input:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 3px; }
.option input[data-off] + label { color: var(--muted); text-decoration: line-through; }
.product__buy { display: grid; grid-template-columns: auto 1fr; gap: .75rem; }
.product__buy .stepper button { height: 48px; }
.product__error { margin-top: .6rem; color: var(--accent); }
.product__error:empty { display: none; }
.product__facts { margin-bottom: 1.5rem; color: var(--muted); }
.product__facts li { padding: .15rem 0; }
.specs { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.5rem; }
.specs dt { color: var(--ink); }
@media (min-width: 900px) {
  .product { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: clamp(1rem, 3vw, 3rem); padding-left: clamp(1rem, 3vw, 2.5rem); }
  .product__gallery { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(.5rem, 1vw, 1rem); overflow: visible; align-content: start; }
  .product__gallery figure:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
  .product__info { position: sticky; top: 92px; align-self: start; padding-left: 0; }
}

/* ---- Cart, blog, other pages ---- */
.cart__form { display: grid; gap: 2rem; margin-top: 1.5rem; }
.cart__summary { align-self: start; padding: 1.5rem; background: var(--surface); }
.cart__summary .button--plain { margin-top: .5rem; }
@media (min-width: 900px) { .cart__form { grid-template-columns: minmax(0, 1fr) 360px; gap: 4rem; } .cart__summary { position: sticky; top: 92px; } }
.posts { display: grid; gap: 2.5rem clamp(1rem, 2vw, 2rem); margin-top: 2rem; }
@media (min-width: 700px) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.post__media { display: block; background: var(--surface); }
.post__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.post__date { margin: .75rem 0 .35rem; font-size: .9rem; color: var(--muted); }
.post h2 { font-size: 1.5rem; }
.article__cover { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-top: 1.5rem; }
.not-found { text-align: center; }
.not-found p { margin: 1rem 0 2rem; color: var(--muted); }

.footer { padding: clamp(2.5rem, 5vw, 4rem) clamp(1rem, 3vw, 2.5rem) 1.5rem; background: var(--ink); color: var(--bg); }
.footer :focus-visible { outline-color: var(--bg); }
.footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.footer__brand { max-width: 24rem; color: color-mix(in srgb, var(--bg) 70%, var(--ink)); }
.footer__name { margin-bottom: .4rem; color: var(--bg); font: 400 1.5rem/1.2 var(--font-display); }
.footer__links { display: grid; gap: .5rem; }
.footer__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__base { margin-top: 2.5rem; font-size: .875rem; color: color-mix(in srgb, var(--bg) 70%, var(--ink)); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
