/* ═══════════ Oshias Auto Mart — store page ═══════════ */
:root { --gold: #f5c518; }

.shop-page { background: var(--black); }

/* ── page head ── */
.sh-head { padding: 9rem 6vw 2.6rem; max-width: 1500px; margin: 0 auto; }
.crumb { display: flex; align-items: center; gap: .55rem; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--grey); }
.crumb a:hover { color: var(--red); }
.crumb span { opacity: .35; }
.crumb b { color: var(--white); font-weight: 500; }
.sh-title { font-family: var(--display); font-weight: 400; font-size: clamp(2.8rem, 6vw, 5rem); letter-spacing: .03em; line-height: 1; margin: 1rem 0 .7rem; }
.sh-sub { color: var(--grey); max-width: 34rem; line-height: 1.8; font-size: .95rem; }

/* ── layout ── */
.store {
  display: grid; grid-template-columns: 250px 1fr; gap: 3rem;
  max-width: 1500px; margin: 0 auto; padding: 1.5rem 6vw 12vh;
  align-items: start;
}

/* ── filters ── */
.filters { position: sticky; top: 6.2rem; }
.filters__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.8rem; }
.filters__head h2 { font-family: var(--display); font-size: 1.5rem; letter-spacing: .08em; font-weight: 400; }
.filters__clear { background: none; border: 0; color: var(--grey); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; cursor: pointer; }
.filters__clear:hover { color: var(--red); }
.filters__close, .filters-backdrop { display: none; }

.fgroup { padding: 1.2rem 0; border-top: 1px solid var(--line); }
.fgroup__label { display: block; font-size: .64rem; letter-spacing: .26em; text-transform: uppercase; color: var(--white); margin-bottom: .9rem; }

.fsearch { position: relative; }
.fsearch svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--grey); }
.fsearch input {
  width: 100%; background: var(--black-2); border: 1px solid var(--line); border-radius: 5px;
  color: var(--white); font-family: var(--sans); font-size: .85rem; padding: .7rem .8rem .7rem 2.2rem; outline: none;
}
.fsearch input:focus { border-color: var(--red); }
.fsearch input::-webkit-search-cancel-button { filter: invert(.6); }

.fchecks { display: flex; flex-direction: column; gap: .1rem; }
.fcheck { display: flex; align-items: center; gap: .65rem; padding: .45rem 0; cursor: pointer; font-size: .85rem; color: var(--grey); }
.fcheck:hover { color: var(--white); }
.fcheck input { appearance: none; width: 15px; height: 15px; border: 1px solid var(--line); border-radius: 3px; background: var(--black-2); cursor: pointer; position: relative; flex-shrink: 0; }
.fcheck input:checked { background: var(--red); border-color: var(--red); }
.fcheck input:checked::after { content: '✓'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .62rem; color: #fff; }
.fcheck em { font-style: normal; margin-left: auto; opacity: .5; font-size: .74rem; }

.fchips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  background: var(--black-2); border: 1px solid var(--line); border-radius: 100px;
  color: var(--grey); font-family: var(--sans); font-size: .7rem; letter-spacing: .04em;
  padding: .42rem .8rem; cursor: pointer; display: inline-flex; align-items: center; gap: .4rem;
  transition: border-color .25s, color .25s;
}
.chip:hover { color: var(--white); }
.chip.is-on { border-color: var(--red); color: var(--white); }
.chip i { width: 9px; height: 9px; border-radius: 50%; display: block; }

.fgroup input[type=range] { width: 100%; accent-color: var(--red); background: transparent; }
.frange-out { display: block; margin-top: .5rem; font-size: .8rem; color: var(--white); }

/* ── results ── */
.results__bar { display: flex; align-items: center; gap: 1.2rem; padding-bottom: 1.4rem; border-bottom: 1px solid var(--line); margin-bottom: 1.8rem; }
.results__count { font-size: .8rem; color: var(--grey); letter-spacing: .04em; }
.results__sort { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.results__sort label { font-size: .64rem; letter-spacing: .24em; text-transform: uppercase; color: var(--grey); }
.results__sort select {
  background: var(--black-2); border: 1px solid var(--line); border-radius: 5px; color: var(--white);
  font-family: var(--sans); font-size: .82rem; padding: .5rem 2rem .5rem .75rem; cursor: pointer; outline: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--grey) 50%), linear-gradient(135deg, var(--grey) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.results__sort select:focus { border-color: var(--red); }
.results__filterbtn { display: none; }
.results__empty { color: var(--grey); padding: 4rem 0; text-align: center; }
.results__empty button { background: none; border: 0; color: var(--red); cursor: pointer; text-decoration: underline; font-size: inherit; font-family: inherit; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.4rem; }

.pcard {
  background: var(--black-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column; cursor: pointer; position: relative;
  transition: transform .45s cubic-bezier(.2,.7,.2,1), border-color .4s, box-shadow .45s;
}
.pcard:hover { transform: translateY(-6px); border-color: rgba(225,6,0,.45); box-shadow: 0 26px 60px -26px var(--red-glow); }
.pcard__media { aspect-ratio: 1; overflow: hidden; background: #000; position: relative; }
.pcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.pcard:hover .pcard__media img { transform: scale(1.06); }
.pcard__flag { position: absolute; top: .7rem; left: .7rem; background: var(--red); color: #fff; font-size: .53rem; letter-spacing: .22em; text-transform: uppercase; padding: .3rem .55rem; border-radius: 3px; }
.pcard__body { padding: 1rem 1.05rem 1.15rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.pcard__cat { font-size: .56rem; letter-spacing: .28em; color: var(--red); text-transform: uppercase; }
.pcard__name { font-size: .92rem; font-weight: 500; line-height: 1.35; }
.pcard__rate { display: flex; align-items: center; gap: .4rem; font-size: .72rem; color: var(--grey); }
.pcard__foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: auto; padding-top: .7rem; }
.pcard__price { font-family: var(--display); font-size: 1.35rem; letter-spacing: .05em; }
.pcard__add {
  border: 1px solid rgba(225,6,0,.5); background: transparent; color: var(--white);
  font-family: var(--sans); font-size: .6rem; letter-spacing: .18em; text-transform: uppercase;
  padding: .55rem .75rem; border-radius: 4px; cursor: pointer; white-space: nowrap; transition: background .3s;
}
.pcard__add:hover { background: var(--red); }

/* ── stars ── */
.stars { position: relative; display: inline-block; color: #3b3b42; font-size: .82rem; letter-spacing: 1px; line-height: 1; }
.stars::before { content: '★★★★★'; }
.stars i { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: var(--gold); width: 0; }
.stars i::before { content: '★★★★★'; }

/* ═══════════ product detail ═══════════ */
.pd { position: fixed; inset: 0; z-index: 120; visibility: hidden; }
.pd.is-open { visibility: visible; }
.pd__scrim { position: absolute; inset: 0; background: rgba(4,4,6,.86); backdrop-filter: blur(6px); opacity: 0; }
.pd__panel {
  position: absolute; inset: 3vh 4vw; border-radius: 16px; overflow: hidden;
  background: var(--black-2); border: 1px solid var(--line);
  box-shadow: 0 50px 140px -40px rgba(0,0,0,1);
  opacity: 0; display: flex; flex-direction: column;
}
.pd__close {
  position: absolute; top: 1rem; right: 1rem; z-index: 6;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: rgba(14,14,16,.8); backdrop-filter: blur(10px);
  border: 1px solid var(--line); color: var(--white); cursor: pointer; font-size: .9rem;
}
.pd__close:hover { border-color: var(--red); color: var(--red); }
.pd__scroll { overflow-y: auto; overscroll-behavior: contain; padding: 2.2rem clamp(1.2rem, 3vw, 2.8rem) 3rem; }

.pd__crumb { margin-bottom: 1.6rem; }
.pd__top { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }

.pd__stage { aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #000; border: 1px solid var(--line); }
.pd__stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin-top: .7rem; }
.pd__thumb { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: #000; border: 1px solid var(--line); cursor: pointer; padding: 0; transition: border-color .3s; }
.pd__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd__thumb.is-on { border-color: var(--red); }

.pd__brand { display: flex; align-items: center; gap: .6rem; font-size: .74rem; color: var(--grey); }
.pd__brand img { width: 22px; height: 22px; border-radius: 50%; }
.pd__brand span { color: var(--white); font-weight: 500; }
.pd__brand i { margin-left: auto; font-style: normal; font-size: .66rem; letter-spacing: .16em; opacity: .55; }
.pd__title { font-family: var(--display); font-weight: 400; font-size: clamp(1.9rem, 3.4vw, 2.9rem); letter-spacing: .03em; line-height: 1.05; margin: .8rem 0 .6rem; }
.pd__rate { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.2rem; }
.pd__ratelink { background: none; border: 0; color: var(--grey); font-size: .74rem; cursor: pointer; font-family: inherit; }
.pd__ratelink:hover { color: var(--red); }
.pd__price { font-family: var(--display); font-size: clamp(2rem, 3.6vw, 2.8rem); letter-spacing: .04em; margin-bottom: 1.6rem; }

.pd__opt { margin-bottom: 1.5rem; }
.pd__opt h4 { display: flex; align-items: baseline; gap: .7rem; font-size: .64rem; letter-spacing: .26em; text-transform: uppercase; color: var(--grey); font-weight: 500; margin-bottom: .8rem; }
.pd__opt h4 b { color: var(--white); font-weight: 400; letter-spacing: .04em; text-transform: none; font-size: .78rem; }
.swatches { display: flex; gap: .55rem; flex-wrap: wrap; }
.swatch { width: 2.6rem; height: 2.6rem; border-radius: 8px; border: 1px solid var(--line); background: var(--black); cursor: pointer; padding: 0; display: grid; place-items: center; transition: border-color .25s; }
.swatch i { width: 1.35rem; height: 1.35rem; border-radius: 5px; display: block; }
.swatch.is-on { border-color: var(--red); }
.sizes { display: flex; flex-wrap: wrap; gap: .5rem; }
.size {
  min-width: 3.4rem; padding: .6rem .75rem; border-radius: 6px; cursor: pointer;
  background: var(--black); border: 1px solid var(--line); color: var(--grey);
  font-family: var(--sans); font-size: .8rem; transition: border-color .25s, color .25s;
}
.size:hover { color: var(--white); }
.size.is-on { border-color: var(--red); color: var(--white); background: rgba(225,6,0,.1); }

.pd__buy { display: flex; gap: .7rem; margin-top: 1.8rem; }
.pd__add {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  background: var(--white); color: #0a0a0c; border: 0; border-radius: 100px;
  font-family: var(--sans); font-size: .76rem; letter-spacing: .2em; text-transform: uppercase;
  padding: 1.05rem 1.4rem; cursor: pointer; transition: background .3s, color .3s;
}
.pd__add svg { width: 17px; height: 17px; }
.pd__add:hover { background: var(--red); color: #fff; }
.pd__wish { width: 3.2rem; border-radius: 100px; background: transparent; border: 1px solid var(--line); color: var(--white); font-size: 1.1rem; cursor: pointer; transition: color .3s, border-color .3s; }
.pd__wish:hover, .pd__wish.is-on { color: var(--red); border-color: rgba(225,6,0,.55); }
.pd__ship { margin-top: .9rem; font-size: .74rem; color: var(--grey); text-align: center; }

/* tabs */
.pd__tabs { display: flex; gap: 2rem; border-bottom: 1px solid var(--line); margin: 3rem 0 2rem; }
.pd__tab {
  background: none; border: 0; padding: 0 0 .9rem; cursor: pointer; position: relative;
  font-family: var(--sans); font-size: .9rem; color: var(--grey); transition: color .3s;
}
.pd__tab:hover { color: var(--white); }
.pd__tab.is-active { color: var(--white); font-weight: 500; }
.pd__tab.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--red); }
.pd__pane { display: none; }
.pd__pane.is-active { display: block; }
.pd__long {
  color: var(--grey); line-height: 1.9; max-width: 46rem; margin-bottom: 2rem;
  max-height: 13rem; overflow-y: auto; padding-right: 1rem;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent;
}
.pd__long::-webkit-scrollbar { width: 6px; }
.pd__long::-webkit-scrollbar-track { background: transparent; }
.pd__long::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.pd__long::-webkit-scrollbar-thumb:hover { background: var(--grey); }
.pd__empty { color: var(--grey); line-height: 1.8; }
.pd__empty a { color: var(--red); }

.specs-table { width: 100%; max-width: 46rem; border-collapse: collapse; }
.specs-table td { padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: .86rem; }
.specs-table td:first-child { color: var(--grey); width: 40%; letter-spacing: .04em; }
.specs-table td:last-child { color: var(--white); }

/* reviews */
.rv { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start; }
.rv__sort { margin-bottom: 1.4rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.rv__sort select {
  background: var(--black); border: 1px solid var(--line); border-radius: 5px; color: var(--white);
  font-family: var(--sans); font-size: .8rem; padding: .5rem 2rem .5rem .75rem; cursor: pointer; outline: none; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--grey) 50%), linear-gradient(135deg, var(--grey) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
.rv__writebtn {
  background: transparent; border: 1px solid var(--line); border-radius: 100px; color: var(--white);
  font-family: var(--sans); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase;
  padding: .6rem 1.1rem; cursor: pointer; white-space: nowrap; transition: border-color .3s, color .3s;
}
.rv__writebtn:hover { color: var(--red); border-color: rgba(225,6,0,.5); }
.rv__writebtn.is-on { color: var(--red); border-color: rgba(225,6,0,.55); }

.rv__form { background: var(--black); border: 1px solid var(--line); border-radius: 10px; padding: 1.5rem 1.5rem .3rem; margin-bottom: 1.8rem; }
.rv__starpick { display: flex; gap: .25rem; padding-top: .4rem; }
.rv__starpick button { background: none; border: 0; cursor: pointer; padding: 0 .1rem; font-size: 1.6rem; line-height: 1; color: #3b3b42; transition: color .15s; }
.rv__starpick button.is-on { color: var(--gold); }
.rv__formacts { display: flex; align-items: center; gap: 1rem; margin: .2rem 0 .3rem; }
.rv__formacts .btn { width: auto; padding: .8rem 1.6rem; }
.rv__formacts .btn--ghost { margin-top: 0; }
.rv__form .form-msg:empty { margin-top: 0; }
.rvitem { display: grid; grid-template-columns: 34px 1fr; gap: .9rem; padding: 1.3rem 0; border-bottom: 1px solid var(--line); }
.rvitem__av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(150deg, #3a2b2b, #1a1418); display: grid; place-items: center; font-size: .78rem; color: var(--white); }
.rvitem__top { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.rvitem__name { font-size: .85rem; font-weight: 500; }
.rvitem__when { font-size: .7rem; color: var(--grey); }
.rvitem__text { color: var(--grey); line-height: 1.75; font-size: .87rem; margin: .55rem 0 .7rem; }
.rvitem__acts { display: flex; gap: 1.2rem; font-size: .72rem; color: var(--grey); }
.rvitem__acts button { background: none; border: 0; color: inherit; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.rvitem__acts button:hover { color: var(--red); }

.rv__summary { background: var(--black); border: 1px solid var(--line); border-radius: 12px; padding: 1.6rem; }
.rv__big { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.3rem; }
.rv__bigstars { font-size: 1.35rem; letter-spacing: 2px; }
.rv__big b { font-family: var(--display); font-size: 2.2rem; letter-spacing: .04em; font-weight: 400; }
.rv__row { display: grid; grid-template-columns: 12px 1fr 24px; align-items: center; gap: .7rem; margin-bottom: .55rem; font-size: .74rem; color: var(--grey); }
.rv__track { height: 6px; border-radius: 3px; background: rgba(244,242,239,.08); overflow: hidden; }
.rv__fill { height: 100%; background: var(--gold); border-radius: 3px; }

/* ── responsive ── */
@media (max-width: 1100px) {
  .store { grid-template-columns: 210px 1fr; gap: 2rem; }
  .rv { grid-template-columns: 1fr; gap: 2rem; }
  .rv__summary { order: -1; }
}
@media (max-width: 880px) {
  .sh-head { padding: 7rem 6vw 1.6rem; }
  .store { grid-template-columns: 1fr; padding-top: 0; }
  .filters {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 88vw); z-index: 110;
    background: var(--black-2); border-left: 1px solid var(--line);
    padding: 5.5rem 1.5rem 2rem; overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(100%); transition: transform .45s cubic-bezier(.2,.8,.2,1);
  }
  .filters.is-open { transform: translateX(0); }
  .filters__close {
    display: grid; place-items: center; position: absolute; top: 1.2rem; right: 1rem;
    width: 44px; height: 44px; border-radius: 50%; cursor: pointer; font-size: 1rem;
    background: transparent; border: 1px solid var(--line); color: var(--white);
  }
  .filters-backdrop {
    display: block; position: fixed; inset: 0; z-index: 105;
    background: rgba(4,4,6,.6); backdrop-filter: blur(3px);
    opacity: 0; pointer-events: none; transition: opacity .35s;
  }
  .filters-backdrop.is-open { opacity: 1; pointer-events: auto; }
  .results__filterbtn {
    display: inline-block; margin-left: auto; background: transparent; border: 1px solid var(--line);
    border-radius: 100px; color: var(--white); font-family: var(--sans); font-size: .66rem;
    letter-spacing: .18em; text-transform: uppercase; padding: .55rem 1rem; cursor: pointer;
  }
  .results__sort { margin-left: 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .9rem; }
  .pd__panel { inset: 0; border-radius: 0; }
  .pd__top { grid-template-columns: 1fr; }
  .pd__tabs { gap: 1.4rem; margin-top: 2.2rem; }
  .pcard__add { padding: .7rem .8rem; min-height: 40px; }
  .rv__form .field-row { grid-template-columns: 1fr; }
  .rv__sort { flex-wrap: wrap; }
}

/* phones: the store's single column was sized by the bar's widest line, which
   pushed the grid and the Filters button off the right edge */
@media (max-width: 880px) {
  .store { grid-template-columns: minmax(0, 1fr); }
  .results__bar { flex-wrap: wrap; row-gap: .8rem; }
  .results__count { white-space: nowrap; }
  .results__filterbtn { min-height: 44px; }

  /* 16px fields stop iOS zooming the page; 44px targets for thumbs */
  .fsearch input, .results__sort select, .rv__sort select { font-size: 16px; }
  .fcheck { min-height: 44px; }
  .chip { min-height: 40px; }
  .filters__clear { padding: .8rem 0; }
  .crumb a { padding: .6rem 0; margin: -.6rem 0; }

  /* price and Add share a row as on desktop; on the narrowest phones Add drops below */
  .pcard__body { padding: .9rem .8rem 1rem; }
  .pcard__foot { flex-wrap: wrap; gap: .5rem; }
  .pcard__price { font-size: clamp(1rem, 4.4vw, 1.35rem); }
  .pcard__add { min-height: 44px; padding: .55rem .6rem; }

  .pd__close { width: 2.75rem; height: 2.75rem; }
  .pd__long { max-height: none; overflow: visible; padding-right: 0; }   /* no scroll box inside the scrolling page */
  .swatch { width: 2.75rem; height: 2.75rem; }
  .size { min-height: 44px; }
  .pd__wish { min-height: 44px; }
  .pd__tab { padding-top: .7rem; }
  .rv__writebtn { min-height: 44px; }
  .rv__starpick button { padding: .3rem .25rem; }
}
