/* ==========================================================================
   Shop — listing · product · cart
   ========================================================================== */
.eyebrow-amber { color: var(--amber); border-color: rgba(255,176,32,.35); background: rgba(255,176,32,.07); }
.eyebrow-amber::before { background: var(--amber); box-shadow: 0 0 8px var(--amber); }

/* listing */
.shop-search { display: flex; margin-top: 1.4rem; max-width: 560px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.shop-search:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(45,212,255,.15); }
.shop-search input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: inherit; font-size: 16px; padding: .8rem 1rem; outline: none; }
.shop-search button { width: 52px; border: 0; background: none; color: var(--cyan); cursor: pointer; }
.shop-search svg { width: 22px; height: 22px; }
.cat-filter.sub { margin-top: .7rem; }
.cat-filter.sub a { font-size: .85rem; padding: .35rem .85rem; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.tools { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.tchip { padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font-size: .88rem; font-weight: 500; }
.tchip.on { border-color: var(--cyan); color: var(--cyan); background: rgba(45,212,255,.08); }
.sort select { appearance: none; -webkit-appearance: none; font: inherit; font-size: .9rem; color: var(--text); background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: .45rem 1rem .45rem 2.2rem; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b96ab' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: left .7rem center; background-size: 16px; }

.strip-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.strip-head h2 { font-size: clamp(1.15rem, 3vw, 1.5rem); }
.strip-head a { color: var(--cyan); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.offers-strip { background: linear-gradient(180deg, rgba(255,176,32,.06), transparent); border-bottom: 1px solid var(--line); }
.h-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 250px); gap: 1rem; overflow-x: auto;
  scroll-snap-type: x mandatory; padding-bottom: .6rem; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.h-scroll > * { scroll-snap-align: start; }

/* product card */
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 1rem; }
.p-card { position: relative; display: flex; flex-direction: column; background: linear-gradient(165deg, var(--panel), var(--ink-2));
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden; transition: border-color .2s, transform .2s, box-shadow .2s; }
.p-card:hover { border-color: rgba(45,212,255,.4); transform: translateY(-3px); box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.p-media { position: relative; aspect-ratio: 1; display: grid; place-items: center; background: #fff; overflow: hidden; }
.p-media img { width: 100%; height: 100%; object-fit: contain; padding: 8%; transition: transform .35s; }
.p-card:hover .p-media img { transform: scale(1.05); }
.p-media > svg { width: 64px; height: 64px; color: #9aa5b8; }
.p-card.is-out .p-media img { filter: grayscale(1); opacity: .6; }
.p-off { position: absolute; top: .7rem; inset-inline-start: .7rem; background: #ef4444; color: #fff; font-weight: 800; font-size: .8rem;
  padding: .15rem .55rem; border-radius: 999px; direction: ltr; }
.p-off.big { top: 1rem; inset-inline-start: 1rem; font-size: .9rem; padding: .3rem .8rem; direction: rtl; }
.p-out { position: absolute; bottom: .7rem; inset-inline: .7rem; text-align: center; background: rgba(11,15,24,.85); color: var(--muted); font-size: .8rem; font-weight: 700; padding: .3rem; border-radius: 10px; }
.p-body { padding: .9rem 1rem 1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.p-brand { font-size: .75rem; color: var(--cyan); font-weight: 700; letter-spacing: .02em; }
.p-name { font-size: .95rem; font-weight: 700; line-height: 1.75; min-height: 3.4em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-name a { color: var(--white); }
.p-name a:hover { color: var(--cyan); }
.p-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: .5rem; margin-top: auto; }
.p-price { display: flex; flex-direction: column; }
.p-price del { color: var(--muted); font-size: .8rem; }
.p-price b { color: var(--white); font-size: 1.05rem; font-weight: 900; }
.p-price b small { font-size: .7rem; font-weight: 500; color: var(--muted); }
.p-add { width: 42px; height: 42px; border-radius: 12px; border: 0; background: var(--amber); color: #241700; display: grid; place-items: center; cursor: pointer; transition: transform .15s, box-shadow .2s; }
.p-add:hover { transform: scale(1.06); box-shadow: 0 8px 20px -6px rgba(255,176,32,.7); }
.p-add svg { width: 20px; height: 20px; }
.p-add.is-done { background: #34d399; }
.p-timer { font-size: .78rem; color: var(--amber); font-weight: 700; }

/* product page */
.pd-crumbs { padding-top: 1.2rem; }
.pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1.25rem, 4vw, 3rem); padding-block: 1.2rem 2.5rem; align-items: start; }
.pd-gallery { position: relative; position: sticky; top: calc(var(--header-h) + 16px); }
.pd-slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; border-radius: 22px; background: #fff; scrollbar-width: none; outline: none; }
.pd-slides::-webkit-scrollbar { display: none; }
.pd-slide { flex: 0 0 100%; aspect-ratio: 1; scroll-snap-align: center; display: grid; place-items: center; margin: 0; }
.pd-slide img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.pd-noimg svg { width: 30%; color: #9aa5b8; }
.pd-thumbs { display: flex; gap: .5rem; margin-top: .7rem; overflow-x: auto; scrollbar-width: none; }
.pd-thumbs button { flex: none; width: 68px; height: 68px; border-radius: 12px; border: 2px solid var(--line); background: #fff; padding: 4px; cursor: pointer; }
.pd-thumbs button.is-active { border-color: var(--cyan); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.pd-info h1 { font-size: clamp(1.35rem, 3.6vw, 2rem); margin-block: .3rem .6rem; }
.pd-short { color: var(--muted); line-height: 2; }
.pd-facts { display: grid; gap: .5rem; margin-block: 1.2rem; padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.pd-facts li { display: flex; justify-content: space-between; gap: 1rem; font-size: .93rem; }
.pd-facts span { color: var(--muted); }
.st-in { color: #34d399; } .st-low { color: var(--amber); } .st-out { color: #f87171; }
.buy-box { border: 1px solid rgba(255,176,32,.3); border-radius: 20px; padding: 1.25rem; background: radial-gradient(400px 160px at 50% 0%, rgba(255,176,32,.08), transparent 70%), var(--panel); display: grid; gap: 1rem; }
.offer-timer { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .55rem .8rem; border-radius: 12px; background: rgba(239,68,68,.12); color: #fca5a5; font-size: .9rem; }
.offer-timer b { font-variant-numeric: tabular-nums; color: #fff; }
.bb-price { display: flex; flex-direction: column; align-items: flex-end; }
.bb-old { display: flex; align-items: center; gap: .5rem; }
.bb-old del { color: var(--muted); }
.bb-old .p-off { position: static; }
.bb-price > b { font-size: clamp(1.5rem, 4vw, 1.9rem); font-weight: 900; color: var(--white); }
.bb-price > b small { font-size: .85rem; color: var(--muted); font-weight: 500; }
.bb-form { display: flex; gap: .6rem; }
.bb-add { flex: 1; min-height: 54px; min-width: 0; white-space: normal; padding-inline: 1rem; }
.bb-out { color: #fca5a5; text-align: center; }
.btn-block { width: 100%; }
.bb-trust { display: grid; gap: .3rem; color: var(--muted); font-size: .86rem; }
.qty { display: inline-flex; align-items: stretch; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--ink-2); flex: none; }
.qty button { width: 44px; border: 0; background: none; color: var(--cyan); font-size: 1.3rem; cursor: pointer; }
.qty button:hover { background: rgba(45,212,255,.08); }
.qty input { width: 46px; text-align: center; border: 0; background: none; color: var(--white); font: inherit; font-weight: 800; font-size: 1.05rem; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty.sm button { width: 36px; font-size: 1.1rem; }
.qty.sm input { width: 38px; font-size: .95rem; }
.pd-details { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 2rem; padding-block: 1rem 2rem; align-items: start; }
.pd-details h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.pd-specs dl { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.pd-specs dl > div { display: grid; grid-template-columns: 1fr 1.3fr; gap: .8rem; padding: .7rem 1rem; font-size: .92rem; }
.pd-specs dl > div:nth-child(odd) { background: var(--panel); }
.pd-specs dt { color: var(--muted); }
.pd-specs dd { color: var(--white); }
.pd-desc .article-body { padding-block: 0; }
.buy-bar { display: none; }

/* cart */
.cart-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.25rem; align-items: start; }
.cart-lines { display: grid; gap: .8rem; }
.c-line { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: .9rem; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.c-img { width: 96px; height: 96px; border-radius: 14px; background: #fff; overflow: hidden; display: grid; place-items: center; }
.c-img img { width: 100%; height: 100%; object-fit: contain; padding: 6px; }
.c-info { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.c-name { font-weight: 700; color: var(--white); line-height: 1.7; }
.c-name:hover { color: var(--cyan); }
.c-unit { font-size: .85rem; }
.c-unit del { margin-inline-start: .3rem; }
.c-row { display: flex; align-items: center; gap: .8rem; margin-top: .2rem; }
.c-row form { margin: 0; }
.c-remove { border: 0; background: none; color: #f87171; cursor: pointer; font: inherit; font-size: .88rem; }
.c-total { font-size: 1.05rem; white-space: nowrap; }
.c-total small { color: var(--muted); font-weight: 500; font-size: .75rem; }
.cart-sum { position: sticky; top: calc(var(--header-h) + 16px); padding: 1.25rem; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); display: grid; gap: 1rem; }
.cart-sum h2 { font-size: 1.1rem; }
.cart-sum dl { display: grid; gap: .65rem; }
.cart-sum dl > div { display: flex; justify-content: space-between; gap: 1rem; font-size: .93rem; }
.cart-sum dt { color: var(--muted); }
.cart-sum .save dd { color: #34d399; font-weight: 700; }
.cart-sum .total { padding-top: .8rem; border-top: 1px dashed var(--line); font-size: 1.05rem; }
.cart-sum .total dt { color: var(--text); font-weight: 700; }
.cart-sum .total dd { font-weight: 900; color: var(--white); }
.c-continue { text-align: center; color: var(--cyan); font-size: .9rem; }
.cart-empty svg { width: 64px; height: 64px; color: var(--muted); opacity: .6; }
.note-line { padding: .7rem 1rem; border-radius: 12px; background: rgba(255,176,32,.1); color: #fde3a7; margin-bottom: 1rem; font-size: .9rem; }
.r-alert { padding: .85rem 1rem; border-radius: 14px; background: rgba(248,113,113,.12); border: 1px solid rgba(248,113,113,.35); color: #fecaca; margin-bottom: 1rem; }

/* toasts (public) */
.s-toasts { position: fixed; inset-inline: 0; top: calc(var(--header-h) + 10px); z-index: 70; display: grid; justify-items: center; gap: .5rem; pointer-events: none; padding-inline: 1rem; }
.s-toast { pointer-events: auto; display: flex; align-items: center; gap: .8rem; max-width: 460px; width: 100%; padding: .8rem 1rem; border-radius: 14px;
  background: var(--panel-2); border: 1px solid rgba(52,211,153,.45); box-shadow: var(--shadow); animation: toast-in .3s ease; }
.s-toast.err { border-color: rgba(248,113,113,.5); }
.s-toast span { flex: 1; font-size: .92rem; }
.s-toast a { color: var(--cyan); font-weight: 700; white-space: nowrap; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

.admin-strip { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; padding: .6rem 1rem; font-size: .9rem;
  background: var(--panel-2); border-bottom: 1px solid var(--line); color: var(--muted); }
.admin-strip.is-preview { background: rgba(255,176,32,.12); color: #fde3a7; border-color: rgba(255,176,32,.35); }
.admin-strip a { color: var(--cyan); font-weight: 700; }

@media (max-width: 960px) {
  .pd { grid-template-columns: minmax(0, 1fr); }
  .pd-info, .buy-box { min-width: 0; }
  .pd-gallery { position: relative; top: 0; margin-inline: calc(clamp(1rem, 4vw, 2rem) * -1); }
  .pd-slides { border-radius: 0; }
  .pd-thumbs { padding-inline: 1rem; }
  .pd-details { grid-template-columns: minmax(0, 1fr); }
  .cart-grid { grid-template-columns: minmax(0, 1fr); }
  .cart-sum { position: static; }
  .buy-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; position: fixed; inset-inline: 0; bottom: 0; z-index: 55;
    padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom)); background: rgba(11,15,24,.95); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); transition: transform .25s; }
  .buy-bar.is-hidden { transform: translateY(110%); }
  .bb-mini { display: flex; flex-direction: column; }
  .bb-mini del { color: var(--muted); font-size: .78rem; }
  .bb-mini b { font-size: 1.15rem; font-weight: 900; }
  .bb-mini b small { font-size: .72rem; color: var(--muted); }
  .buy-bar .btn { min-height: 48px; padding-inline: 1.6rem; }
}
@media (max-width: 560px) {
  .p-grid { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .p-body { padding: .7rem .75rem .8rem; }
  .p-name { font-size: .86rem; }
  .p-price b { font-size: .95rem; }
  .p-add { width: 38px; height: 38px; }
  .h-scroll { grid-auto-columns: 44%; gap: .6rem; }
  .c-line { grid-template-columns: 76px minmax(0, 1fr); }
  .c-img { width: 76px; height: 76px; }
  .c-total { grid-column: 2; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .tools { justify-content: space-between; }
}

/* category chips (shared with blog.css) */
.cat-filter { display: flex; gap: .5rem; margin-top: 1.6rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .2rem;
  margin-inline: calc(clamp(1rem, 4vw, 2rem) * -1); padding-inline: clamp(1rem, 4vw, 2rem); }
.cat-filter::-webkit-scrollbar { display: none; }
.cat-filter a { flex: none; display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1.05rem; border-radius: 100px;
  font-weight: 500; font-size: .92rem; border: 1px solid var(--line); color: var(--muted); background: var(--panel); transition: all .15s; }
.cat-filter a small { font-size: .75rem; opacity: .75; }
.cat-filter a:hover { color: var(--white); border-color: rgba(45,212,255,.4); }
.cat-filter a.active { background: var(--cyan); color: #04222c; border-color: var(--cyan); font-weight: 700; }

