/* Customer journey: header search and bag total, product, bag and checkout,
   "our clients also order these", thank you. Builds on style.css. */

/* ---------- header: links in a row, sign in, bag ---------- */

a.bag-btn { text-decoration: none; }
.bag-btn__count { background: var(--burgundy); color: var(--paper); }

/* ---------- preview without the server ---------- */

.preview-note {
  margin: 0; padding: 10px 16px; text-align: center; font-size: .88rem;
  background: var(--cream-deep); border-bottom: 1px solid var(--line); color: var(--ink);
}
.preview-note strong { color: var(--burgundy); font-weight: 500; }

/* ---------- collection search, beside the sort ---------- */

.col-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search {
  display: flex; align-items: center; gap: 10px; width: 280px; height: 42px; padding: 0 14px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  transition: border-color .15s var(--ease);
}
.search:focus-within { border-color: var(--burgundy); }
.search .ico { color: var(--muted); width: 18px; height: 18px; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-weight: 400; height: 100%; }
.search-info { margin: -16px 0 24px; color: var(--muted); }
.search-info strong { color: var(--burgundy); font-weight: 500; }

/* ---------- collection cards are links ---------- */

a.item { text-decoration: none; color: inherit; transition: border-color .15s var(--ease); }
a.item:hover { border-color: var(--gold); }
a.item:hover .item__view { background: var(--burgundy); color: var(--paper); }
.item__view { align-self: flex-start; gap: 8px; }
.item__view .ico { width: 16px; height: 16px; }
.item__dots { display: flex; gap: 6px; margin: 2px 0 10px; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(43, 29, 26, .18); flex: none; }

/* ---------- pages ---------- */

.product-page, .cart-page, .thanks-page { padding: 32px 0 88px; min-height: 60vh; }
.crumbs { display: flex; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 24px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--burgundy); }
.page-title { font-size: clamp(2.2rem, 5vw, 3.2rem); font-style: italic; font-weight: 400; margin-bottom: 28px; }

/* ---------- product ---------- */

.product { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: start; }
.gallery { position: sticky; top: 92px; }
.gallery__frame {
  position: relative; aspect-ratio: 4 / 5; background: var(--cream-deep); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; display: grid; place-items: center;
}
.gallery__img { width: 100%; height: 100%; object-fit: cover; }
.gallery__illo { width: 58%; height: 84%; }
.gallery__nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(42, 6, 6, .72); color: var(--paper); display: grid; place-items: center; cursor: pointer;
  transition: background .15s var(--ease);
}
.gallery__nav:hover { background: var(--wine); }
.gallery__nav--prev { left: 14px; }
.gallery__nav--next { right: 14px; }
.gallery__dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.gallery__dot { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--paper); background: rgba(241, 235, 225, .4); padding: 0; cursor: pointer; }
.gallery__dot.is-on { background: var(--paper); }
.product__name { font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 500; margin-bottom: .2em; }
.product__price { font-family: var(--font-display); font-size: 1.9rem; font-weight: 600; color: var(--burgundy); margin-bottom: 16px; }
.product__desc { color: var(--ink); font-size: 1.15rem; line-height: 1.6; max-width: 34em; margin-bottom: 14px; white-space: pre-line; }
.pick { margin: 26px 0 0; }
.pick__label { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.pick__label strong { color: var(--ink); font-weight: 500; letter-spacing: .04em; text-transform: none; font-size: .95rem; }
.variants { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 16px 12px; }
.variant { background: none; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; color: var(--ink); }
.variant__art {
  width: 100%; aspect-ratio: 1; border-radius: var(--r-lg); overflow: hidden; background: var(--cream-deep);
  border: 1px solid var(--line); display: grid; place-items: center; transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.variant__art img { width: 100%; height: 100%; object-fit: cover; }
.variant__art .card__illo { width: 60%; height: 80%; }
.variant__swatch { width: 30px; height: 18px; border-radius: 9px; margin-top: -10px; border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--line); }
.variant__name { font-size: .85rem; margin-top: 6px; }
.variant:hover .variant__art { border-color: var(--gold); }
.variant.is-on .variant__art { border-color: var(--burgundy); box-shadow: 0 0 0 2px var(--burgundy); }
.variant.is-on .variant__name { color: var(--burgundy); font-weight: 500; }
.sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.size {
  min-width: 54px; height: 44px; padding: 0 14px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--white); cursor: pointer; transition: all .15s var(--ease);
}
.size:hover { border-color: var(--burgundy); }
.size.is-on { background: var(--burgundy); border-color: var(--burgundy); color: var(--paper); }
.buy { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.buy__total { display: flex; justify-content: space-between; align-items: baseline; margin: 0; }
.buy__total span { color: var(--muted); }
.buy__total strong { font-family: var(--font-display); font-size: 1.6rem; color: var(--burgundy); }
.buy__row { display: flex; gap: 12px; }
.buy__add { flex: 1; min-height: 50px; }
.buy .form-msg { margin: 0; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r); background: var(--white); height: 50px; }
.stepper__btn { width: 44px; height: 100%; border: 0; background: none; cursor: pointer; display: grid; place-items: center; color: var(--burgundy); }
.stepper__btn:hover { background: var(--cream); }
.stepper__n { min-width: 32px; text-align: center; font-weight: 500; }
.stepper--sm { height: 38px; }
.stepper--sm .stepper__btn { width: 36px; }
.stepper--sm .ico { width: 16px; height: 16px; }
.soldout-note { margin-top: 24px; padding: 14px 16px; background: var(--cream); border-radius: var(--r); }
.product__facts { list-style: none; padding: 20px 0 0; margin: 28px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.product__facts li { display: flex; gap: 10px; align-items: center; }
.product__facts .ico { color: var(--gold); width: 18px; height: 18px; }

/* ---------- bag and checkout ---------- */

.checkout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.checkout.is-empty { grid-template-columns: 1fr; }
.checkout__h { font-size: 1.5rem; margin-bottom: 16px; }
#lines { display: grid; gap: 14px; }
.cline { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 14px; }
.cline__art { display: grid; place-items: center; width: 96px; height: 120px; border-radius: var(--r); overflow: hidden; background: var(--cream-deep); }
.cline__art img { width: 100%; height: 100%; object-fit: cover; }
.cline__art .card__illo { width: 66%; height: 84%; }
.cline__main { display: flex; flex-direction: column; min-width: 0; }
.cline__name { font-family: var(--font-display); font-size: 1.3rem; color: var(--burgundy); text-decoration: none; line-height: 1.2; }
.cline__name:hover { text-decoration: underline; }
.cline__price { font-weight: 500; margin: 4px 0 6px; }
.cline__opts { display: flex; flex-wrap: wrap; gap: 14px; font-size: .9rem; color: var(--muted); margin: 0 0 10px; }
.cline__opt { display: inline-flex; align-items: center; gap: 6px; }
.cline__size { display: inline-flex; margin: 0 0 10px; }
.cline__size select { border-color: var(--burgundy); }
#orderForm .field > span:first-child, #orderForm .field__label { color: var(--ink); font-weight: 600; }
#orderForm .field .ar { display: inline-block; color: var(--muted); font-weight: 400; letter-spacing: 0; text-transform: none; font-size: .85rem; unicode-bidi: isolate; }
.cline__row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.cline__del { border-color: var(--line); color: var(--muted); }
.cline__del:hover { color: var(--bad); }
.empty { padding: 48px 24px; text-align: center; display: grid; justify-items: center; gap: 8px; }
.empty .ico { width: 40px; height: 40px; color: var(--gold); }
.empty p { color: var(--muted); }

.input-ico { position: relative; display: block; }
.input-ico .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.field .input-ico input { padding-left: 40px; }
.field__label {
  display: block; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.field > .input-ico, .field > .select { margin: 0; font-size: inherit; letter-spacing: 0; text-transform: none; color: inherit; }
.field__hint { margin: -2px 0 8px; }
fieldset.field { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
fieldset.field legend { padding: 0; }
.select { position: relative; display: block; }
.select select {
  width: 100%; appearance: none; -webkit-appearance: none; background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r); padding: 11px 36px 11px 12px; font-weight: 400; cursor: pointer;
}
.select select:focus { border-color: var(--burgundy); outline: none; }
.select .ico { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.select--sm select { padding: 8px 32px 8px 10px; font-size: .9rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.choices { display: grid; gap: 10px; }
.choices--two { grid-template-columns: 1fr 1fr; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice__box {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r); transition: border-color .15s var(--ease), background .15s var(--ease);
}
.choice__box > .ico { color: var(--burgundy); }
.choice:hover .choice__box { border-color: var(--gold); }
.choice input:checked + .choice__box { border-color: var(--burgundy); background: var(--cream); box-shadow: inset 0 0 0 1px var(--burgundy); }
.choice input:focus-visible + .choice__box { outline: 2px solid var(--gold); outline-offset: 2px; }
.choice.is-off { opacity: .5; cursor: not-allowed; }
.choice__logo {
  width: 38px; height: 38px; border-radius: 50%; background: var(--wine); color: var(--paper); flex: none;
  display: grid; place-items: center; font-family: var(--font-display); font-size: 1.2rem;
}
.choice__text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.choice__text strong { font-weight: 500; }
.choice__price { font-size: .85rem; color: var(--muted); }

.summary { padding: 18px 20px; margin: 18px 0 14px; display: grid; gap: 8px; }
.summary p { display: flex; justify-content: space-between; gap: 12px; margin: 0; }
.summary p span:first-child { color: var(--muted); }
.summary__total { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px !important; }
.summary__total strong { font-family: var(--font-display); font-size: 1.6rem; color: var(--burgundy); }
.btn--big { min-height: 54px; font-size: .9rem; }

/* ---------- "our clients also order these" ---------- */

.upsell {
  width: min(600px, calc(100% - 32px)); max-height: calc(100% - 32px); padding: 0; margin: auto; overflow: auto;
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); color: var(--ink); box-shadow: var(--shadow);
}
.upsell::backdrop { background: rgba(42, 6, 6, .45); }
.upsell__inner { position: relative; padding: 28px 26px 22px; }
.upsell__close { position: absolute; top: 10px; right: 10px; }
.upsell h2 { font-size: 1.8rem; font-style: italic; font-weight: 400; padding-right: 36px; }
.upsell__list { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin: 18px 0 20px; }
.upsell__card { display: grid; gap: 8px; justify-items: center; text-align: center; }
.upsell__art { width: 100%; max-width: 260px; aspect-ratio: 4 / 5; border-radius: var(--r-lg); overflow: hidden; background: var(--cream-deep); display: grid; place-items: center; }
.upsell__art img { width: 100%; height: 100%; object-fit: cover; }
.upsell__card h3 { font-size: 1.25rem; margin: 6px 0 0; }
.upsell__price { font-weight: 500; margin: 0; }
.upsell__swatches { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); padding: 3px; cursor: pointer; }
.swatch span { display: block; width: 100%; height: 100%; border-radius: 50%; }
.swatch[aria-checked="true"] { border: 2px solid var(--burgundy); }
.upsell__card .select { width: 100%; max-width: 260px; }
.upsell__card .btn { max-width: 260px; }
.upsell__card .form-msg { margin: 0; min-height: 0; }
.upsell__foot { display: flex; justify-content: flex-end; border-top: 1px solid var(--line); padding-top: 16px; }

/* ---------- thank you ---------- */

.thanks { max-width: 720px; text-align: center; display: grid; justify-items: center; padding-top: 24px; }
.thanks__check {
  width: 96px; height: 96px; border-radius: 50%; border: 3px solid var(--ok); color: var(--ok);
  display: grid; place-items: center; margin-bottom: 24px;
}
.thanks__check .ico { width: 48px; height: 48px; stroke-width: 2.2; }
.thanks__title { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-style: italic; font-weight: 400; }
.thanks__lead { font-size: 1.1rem; color: var(--ink); }
.thanks__rule { width: 100%; border: 0; border-top: 1px solid var(--line); margin: 20px 0 24px; }
.thanks__label { color: var(--muted); margin-bottom: 10px; }
.ref-box {
  display: inline-flex; align-items: center; gap: 12px; padding: 14px 22px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--r-lg); cursor: pointer; box-shadow: 0 8px 24px -16px rgba(42, 6, 6, .4);
}
.ref-box:hover { border-color: var(--gold); }
.ref-box .ico { color: var(--burgundy); }
.ref-box .ref { font-family: var(--font-body); font-size: 1.2rem; letter-spacing: .08em; font-weight: 500; color: var(--ink); }
#copyMsg { margin-top: 10px; }
.thanks__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 28px; }

/* ---------- smaller screens ---------- */

@media (max-width: 980px) {
  .product { grid-template-columns: 1fr; gap: 28px; }
  .gallery { position: static; }
  .checkout { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 720px) {
  .col-tools { width: 100%; }
  .search { flex: 1; width: auto; }
  .two, .choices--two { grid-template-columns: 1fr; }
  .gallery__frame { aspect-ratio: 4 / 4.6; }
}

@media (max-width: 460px) {
  .cline { grid-template-columns: 78px 1fr; gap: 12px; padding: 12px; }
  .cline__art { width: 78px; height: 98px; }
  .buy__row { flex-direction: column; }
  .stepper { align-self: flex-start; }
  .variants { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); }
}
