/* Storefront: header cart, drawer, product page, checkout. */

.announcement {
  padding: .55rem 1rem;
  background: var(--violet);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
}

.site-header { position: relative; }

.cart-button {
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--acid);
  color: var(--ink);
  font-weight: 750;
  font-size: .9rem;
  cursor: pointer;
}
.cart-button:hover { background: #c9ff4f; }
.cart-button svg { width: 20px; height: 20px; }
.cart-count {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  padding: 0 .35rem;
  border-radius: 99px;
  background: var(--ink);
  color: var(--acid);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
}
.cart-count[hidden] { display: none; }

/* Catalog */
.catalog-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.catalog-bar .filters { margin: 0; }
.catalog-count { margin: 0; color: var(--muted); font-size: .85rem; }
.product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-image { display: block; }
.product-copy h3 a { color: inherit; text-decoration: none; }
.product-copy h3 a:hover { color: var(--acid); }
.product-copy h3 { font-size: clamp(1.45rem, 2.2vw, 1.9rem); }
.choose-product { transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease); }
.choose-product:hover { background: var(--acid); border-color: var(--acid); color: var(--ink); }
.product-card-featured .choose-product { background: var(--acid); color: var(--ink); }

/* Drawer */
body.cart-is-open { overflow: hidden; }
.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.cart-overlay.is-open { opacity: 1; }
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  width: min(420px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform .35s var(--ease);
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid var(--line); }
.cart-head h2 { font-size: 2.2rem; }
.icon-button { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--bone); cursor: pointer; }
.icon-button:hover { border-color: #57575e; }
.icon-button svg { width: 20px; height: 20px; }
.cart-lines { flex: 1; overflow-y: auto; padding: .5rem 1.25rem; }
.cart-line { display: grid; grid-template-columns: 64px 1fr auto; gap: .9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.cart-line-image img { width: 64px; height: 80px; display: block; object-fit: cover; border-radius: 8px; background: #050506; }
.cart-line-info { min-width: 0; display: flex; flex-direction: column; align-items: start; gap: .2rem; }
.cart-line-info > a { color: var(--bone); font-weight: 700; text-decoration: none; line-height: 1.25; }
.cart-line-info > a:hover { color: var(--acid); }
.cart-line-end { display: flex; flex-direction: column; align-items: end; justify-content: space-between; }
.cart-line-end strong { font-variant-numeric: tabular-nums; }
.text-button { padding: .25rem 0; border: 0; background: none; color: var(--muted); font-size: .8rem; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.text-button:hover { color: var(--bone); }
.cart-empty { padding: 3rem 0; text-align: center; color: var(--muted); }
.cart-foot { padding: 1.25rem; border-top: 1px solid var(--line); background: #0d0d0f; }
.cart-foot[hidden] { display: none; }
.cart-row { display: flex; justify-content: space-between; font-size: 1.05rem; }
.cart-row strong { font-variant-numeric: tabular-nums; }
.cart-note { margin: .35rem 0 1rem; color: var(--muted); font-size: .8rem; }
.cart-checkout { width: 100%; }

.sku-tag { color: var(--acid); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

/* Dark steppers (the base stepper is styled for the light panel) */
.shop-page .stepper, .cart-drawer .stepper { border-color: var(--line); }
.shop-page .stepper button, .cart-drawer .stepper button { background: var(--panel-soft); color: var(--bone); }
.shop-page .stepper button:hover, .cart-drawer .stepper button:hover { background: #222226; }
.shop-page .stepper button:disabled, .cart-drawer .stepper button:disabled { background: var(--panel); color: #55555c; }
.stepper-small { margin-top: .4rem; }
.stepper-small button { width: 34px; height: 34px; font-size: 1.05rem; }
.stepper-small output { min-width: 32px; }

/* Product page */
.shop-page { width: min(calc(100% - 2rem), var(--max)); margin: 0 auto; padding: 1.5rem 0 6rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; color: var(--muted); font-size: .85rem; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--bone); }
.pdp { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 5vw, 4.5rem); align-items: start; }
.pdp-image { aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: #050506; }
.pdp-image img { width: 100%; height: 100%; display: block; object-fit: cover; }
.pdp-info { position: sticky; top: 1.5rem; padding-top: .5rem; }
.pdp-info h1 { margin: .4rem 0 .6rem; font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: clamp(3.2rem, 6vw, 5.2rem); line-height: .9; letter-spacing: -.02em; }
.pdp-price { margin: 0; font-size: 1.6rem; font-weight: 750; font-variant-numeric: tabular-nums; }
.pdp-description { max-width: 46ch; margin: 1rem 0 1.75rem; color: var(--muted); font-size: 1.05rem; }
.pdp-buy { display: flex; gap: .6rem; }
.pdp-buy .button { flex: 1; }
.pdp-buy .stepper output { min-width: 40px; }
.pdp-buy-now { width: 100%; margin-top: .6rem; }
.pdp-points { list-style: none; margin: 2rem 0 0; padding: 0; border-top: 1px solid var(--line); }
.pdp-points li { display: flex; flex-direction: column; padding: .95rem 0; border-bottom: 1px solid var(--line); }
.pdp-points strong { font-size: .95rem; }
.pdp-points span { color: var(--muted); font-size: .88rem; }
.related { padding-top: clamp(4rem, 8vw, 6rem); }
.related h2 { margin-bottom: 1.5rem; font-size: clamp(2.6rem, 5vw, 4rem); }
.not-found { padding: 5rem 0; text-align: center; }
.not-found h1 { font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: clamp(3rem, 7vw, 5rem); line-height: .95; margin: 0 0 1rem; }
.not-found p { color: var(--muted); }

/* Checkout */
.checkout-title { margin: .5rem 0 2rem; font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: clamp(3.2rem, 7vw, 5.5rem); line-height: .9; }
.checkout { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.checkout-form fieldset { margin: 0 0 1.75rem; padding: 0; border: 0; }
.checkout-form legend { width: 100%; margin-bottom: .9rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--acid); }
.checkout-form label { display: block; margin: .9rem 0 .35rem; font-size: .88rem; font-weight: 700; }
.checkout-form .optional { color: var(--muted); font-weight: 500; }
.checkout-form input:not([type="radio"]), .checkout-form select, .checkout-form textarea {
  width: 100%;
  min-height: 50px;
  padding: .75rem .9rem;
  border: 1px solid #3a3a40;
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--bone);
  font: inherit;
}
.checkout-form textarea { min-height: 90px; }
.checkout-form input::placeholder, .checkout-form textarea::placeholder { color: #77777e; }
.checkout-form input:focus-visible, .checkout-form select:focus-visible, .checkout-form textarea:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; border-color: var(--violet); }
.checkout-form.was-validated input:invalid, .checkout-form.was-validated select:invalid { border-color: #e0475a; }
.field-hint { margin: .45rem 0 0; color: var(--muted); font-size: .8rem; }
.pay-option { display: flex !important; gap: .8rem; align-items: start; margin: 0 !important; padding: 1rem; border: 1px solid var(--acid); border-radius: 10px; background: #141a0b; cursor: pointer; }
.pay-option input { margin-top: .3rem; accent-color: var(--acid); }
.pay-option span { display: flex; flex-direction: column; }
.pay-option small { color: var(--muted); font-weight: 500; }
.form-error { margin: 0 0 1rem; padding: .85rem 1rem; border-radius: 10px; background: #3a1016; color: #ffd5da; font-weight: 600; }
.form-error[hidden] { display: none; }
.place-order { width: 100%; min-height: 56px; font-size: 1.05rem; }
.place-order:disabled { opacity: .6; cursor: wait; transform: none; }

.order-summary { position: sticky; top: 1.5rem; padding: 1.4rem; border-radius: var(--radius); background: var(--panel); }
.order-summary h2 { margin-bottom: 1rem; font-size: 2.2rem; }
.summary-line { display: grid; grid-template-columns: 56px 1fr auto; gap: .8rem; align-items: center; padding: .6rem 0; }
.summary-line strong { font-variant-numeric: tabular-nums; }
.summary-thumb { position: relative; }
.summary-thumb img { width: 56px; height: 70px; display: block; object-fit: cover; border-radius: 8px; }
.summary-thumb b { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; display: grid; place-items: center; border-radius: 99px; background: var(--violet); color: #fff; font-size: .72rem; }
.summary-row { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--line); color: var(--muted); }
.summary-row strong { color: var(--bone); font-variant-numeric: tabular-nums; }
.summary-total { font-size: 1.2rem; color: var(--bone); }
.summary-total strong { color: var(--acid); }

.order-done { max-width: 620px; margin: 0 auto; padding: 3rem 0; }
.order-done h1 { margin: .5rem 0 1rem; font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: clamp(3.4rem, 8vw, 6rem); line-height: .9; }
.order-done > p { color: var(--muted); font-size: 1.05rem; }
.order-done > p strong { color: var(--bone); }
.order-done-lines { margin: 2rem 0; padding: 1rem 1.2rem; border-radius: var(--radius); background: var(--panel); }
.order-done-lines p { display: flex; justify-content: space-between; gap: 1rem; margin: .4rem 0; }
.order-done-total { padding-top: .6rem; border-top: 1px solid var(--line); font-weight: 750; }

@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .product-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pdp, .checkout { grid-template-columns: 1fr; }
  .pdp-info, .order-summary { position: static; }
  .order-summary { order: -1; }
}

@media (max-width: 680px) {
  .site-header nav > a:not(.nav-action) { display: none; }
  .catalog-bar { flex-direction: column; align-items: start; }
  .filters { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: .25rem; scrollbar-width: none; }
  .filter { flex: none; }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .product-copy h3 { font-size: 1.4rem; }
  .product-copy span { font-size: .64rem; }
}

@media (max-width: 430px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
  .product-copy { min-height: 96px; flex-direction: column; align-items: start; }
  .cart-button span { display: none; }
  .announcement { font-size: .72rem; }
}

@media (max-width: 430px) {
  .pdp-add-price { display: none; }
}

/* Category sliders on the home page */
.filters a.filter { text-decoration: none; }
.shelves { display: grid; gap: clamp(3rem, 6vw, 5rem); }
.shelf { scroll-margin-top: 1rem; }
.shelf-head { display: flex; align-items: end; gap: .9rem; margin-bottom: 1.1rem; }
.shelf-head h3 { margin: 0; font-family: "Bebas Neue", sans-serif; font-weight: 400; font-size: clamp(2.4rem, 4.4vw, 3.6rem); line-height: .9; }
.shelf-count { margin-bottom: .25rem; padding: .3rem .65rem; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); font-size: .76rem; font-weight: 700; letter-spacing: .04em; }
.shelf-arrows { display: flex; gap: .45rem; margin-left: auto; }
.shelf-arrows .icon-button { width: 46px; height: 46px; border-radius: 99px; background: var(--panel); transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), opacity .2s; }
.shelf-arrows .icon-button:not(:disabled):hover { background: var(--acid); border-color: var(--acid); color: var(--ink); }
.shelf-arrows .icon-button:disabled { opacity: .3; cursor: default; }
.shelf-play svg { width: 16px; height: 16px; }
.shelf-static [data-shelf-step], .shelf-static .shelf-play, .shelf-static .shelf-progress { display: none; }

.shelf-frame { position: relative; }
.shelf-frame::before, .shelf-frame::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: clamp(24px, 5vw, 64px);
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.shelf-frame::before { left: 0; background: linear-gradient(90deg, var(--ink), transparent); }
.shelf-frame::after { right: 0; background: linear-gradient(270deg, var(--ink), transparent); }
.at-start .shelf-frame::before, .at-end .shelf-frame::after, .shelf-static .shelf-frame::before, .shelf-static .shelf-frame::after { opacity: 0; }

.shelf-track {
  --gap: 1rem;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 3 * var(--gap)) / 4);
  gap: var(--gap);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: .4rem 0 .6rem;
}
.shelf-track::-webkit-scrollbar { display: none; }
.shelf-track:focus-visible { outline: 3px solid var(--violet); outline-offset: 4px; }
.shelf-track .product-card {
  scroll-snap-align: start;
  border: 1px solid var(--line);
  transition: transform .45s var(--ease), border-color .3s var(--ease), box-shadow .45s var(--ease);
}
.shelf-track .product-card:hover { transform: translateY(-6px); border-color: #3c3c43; box-shadow: 0 22px 40px -18px rgba(123, 53, 200, .55); }
.shelf-track .product-card-featured { border-color: rgba(184, 255, 25, .35); }

.shelf-progress { position: relative; height: 3px; margin-top: .9rem; overflow: hidden; border-radius: 99px; background: var(--line); }
.shelf-progress span { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--acid); transition: transform .5s var(--ease), width .3s var(--ease); }
.is-playing .shelf-progress span { box-shadow: 0 0 12px rgba(184, 255, 25, .6); }

@media (max-width: 1100px) {
  .shelf-track { grid-auto-columns: calc((100% - 2 * var(--gap)) / 3); }
}

@media (max-width: 680px) {
  .shelf-track { --gap: .65rem; grid-auto-columns: 64%; }
  .shelf-arrows [data-shelf-step] { display: none; }
  .shelf-arrows .icon-button { width: 40px; height: 40px; }
  .shelf-frame::before { display: none; }
  .shelf-track .product-card:hover { transform: none; box-shadow: none; }
}
