/* ============================================================
   HUNTER — Veikals (produkti, produkta skats, grozs)
   ============================================================ */

/* ---------- Groza poga headerī ---------- */
.cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-strong);
  transition: border-color 0.2s, color 0.2s;
}
.cart-btn:hover {
  border-color: var(--gold);
  color: var(--gold-2);
}
.cart-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--gold);
  color: #0a0a0b;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}
.cart-count[hidden] {
  display: none;
}

/* ---------- Produktu režģis ---------- */
.shop {
  padding: 48px 0 96px;
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
/* Kamēr produkti ielādējas, rezervē vietu, lai kājene nelēktu (CLS) */
.shop-grid.is-loading {
  min-height: 110vh;
}
.shop-empty {
  color: var(--text-muted);
  grid-column: 1 / -1;
  padding: 40px 0;
}
.shop-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.15s;
}
.shop-card:hover {
  border-color: var(--gold-line);
  transform: translateY(-2px);
}
.shop-card-media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--bg-elev-2);
}
.shop-card-img,
.pd-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.shop-noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-family: var(--font-display);
  letter-spacing: 0.3em;
  font-size: 1.1rem;
}
.shop-card.is-out .shop-card-img {
  opacity: 0.45;
  filter: grayscale(0.6);
}
.shop-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: rgba(10, 10, 11, 0.85);
  border: 1px solid var(--border);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}
/* Komplekts */
.shop-badge-bundle {
  background: var(--gold);
  border-color: var(--gold);
  color: #0a0a0b;
  font-weight: 700;
}
.shop-badge-2 {
  top: 46px;
}
.shop-card-comp {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}
.shop-save {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-2);
  margin-top: 2px;
}
.pd-bundle ul {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  color: var(--text);
}
.pd-bundle li {
  padding: 3px 0;
}
.pd-dim {
  color: var(--text-dim);
}
.pd-save {
  margin-top: 6px;
  color: var(--text-muted);
}
.pd-save strong {
  color: var(--gold-2);
}
.pd-comp + .pd-comp {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border-soft);
}
.pd-comp h3 {
  font-size: 1.05rem;
  margin-bottom: 12px;
}
.shop-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px 20px;
  flex: 1;
}
.shop-card-body h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.2;
}
.shop-card-body h3 a:hover {
  color: var(--gold-2);
}
.shop-card-meta {
  color: var(--text-dim);
  font-size: 0.82rem;
}
.shop-card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.shop-card-foot {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.shop-price {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-strong);
}
.btn-sm {
  padding: 11px 16px;
  font-size: 0.82rem;
}
.shop-out {
  color: var(--text-dim);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.shop-out-lg {
  margin: 18px 0;
  font-size: 0.95rem;
}

/* ---------- Produkta skats ---------- */
.shop-detail {
  padding-top: 32px;
}
.shop-back {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 24px;
}
.shop-back:hover {
  color: var(--gold-2);
}
.pd {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px;
  align-items: start;
}
.pd-media {
  position: sticky;
  top: 88px;
}
.pd-media > .pd-img {
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-elev-2);
}
.pd-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.pd-thumbs button {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: none;
}
.pd-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pd-info h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-top: 12px;
}
.pd-qty {
  color: var(--text-muted);
  margin-top: 14px;
}
.pd-price {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--text-strong);
  margin-top: 10px;
}
.pd-price small {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-dim);
}
.pd-buy {
  display: flex;
  gap: 12px;
  margin: 22px 0 8px;
  flex-wrap: wrap;
}
.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.qty button {
  width: 44px;
  height: 44px;
  border: 0;
  background: var(--bg-elev-2);
  color: var(--text-strong);
  font-size: 1.2rem;
}
.qty button:hover {
  color: var(--gold-2);
}
.qty input {
  width: 52px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--text-strong);
  text-align: center;
  font: inherit;
  -moz-appearance: textfield;
}
.qty input::-webkit-inner-spin-button,
.qty input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qty-sm button {
  width: 32px;
  height: 32px;
  font-size: 1rem;
}
.qty-sm span {
  min-width: 30px;
  text-align: center;
  font-size: 0.9rem;
}
.pd-desc {
  margin-top: 24px;
  color: var(--text);
}
.pd-facts {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft);
}
.pd-facts h2 {
  font-size: 1.4rem;
  margin-bottom: 16px;
}
.pd-facts dl {
  margin: 0;
  display: grid;
  gap: 14px;
}
.pd-facts dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  margin-bottom: 4px;
}
.pd-facts dd {
  margin: 0;
  color: var(--text);
}
.pd-facts strong {
  color: var(--text-strong);
  font-weight: 700;
}
.pd-pvd {
  color: var(--text-muted);
  font-size: 0.88rem;
}
.nutri {
  width: 100%;
  margin-top: 24px;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.nutri caption {
  text-align: left;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  padding-bottom: 8px;
}
.nutri th,
.nutri td {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  font-weight: 400;
}
.nutri td {
  text-align: right;
  color: var(--text-strong);
}
.nutri tr.sub th {
  padding-left: 16px;
  color: var(--text-muted);
}

/* ---------- Groza panelis ---------- */
.cart-lock {
  overflow: hidden;
}
.cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 180;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}
.cart-backdrop[hidden] {
  display: none;
}
.cart {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 190;
  width: min(440px, 100%);
  display: flex;
  flex-direction: column;
  background: var(--bg-elev-1);
  border-left: 1px solid var(--border);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0.28s;
  outline: none;
}
.cart.is-open {
  transform: translateX(0);
  visibility: visible;
}
.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.cart-head h2 {
  font-size: 1.5rem;
}
.cart-x {
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--text-muted);
  font-size: 1.8rem;
  line-height: 1;
}
.cart-x:hover {
  color: var(--text-strong);
}
.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 28px;
}
.cart-empty {
  color: var(--text-muted);
  padding: 24px 0;
}
.cart-line {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-soft);
}
.cart-img {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--bg-elev-2);
  font-size: 0.55rem;
}
.cart-line-name {
  color: var(--text-strong);
  font-weight: 600;
  font-size: 0.92rem;
  line-height: 1.3;
}
.cart-line-meta {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin: 2px 0 8px;
}
.cart-line-warn {
  color: var(--danger);
  font-size: 0.8rem;
  margin-bottom: 6px;
}
.cart-line-end {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  font-weight: 600;
  color: var(--text-strong);
  font-size: 0.92rem;
}
.cart-rm {
  border: 0;
  background: none;
  padding: 4px 0;
  color: var(--text-dim);
  font-size: 0.78rem;
  text-decoration: underline;
}
.cart-rm:hover {
  color: var(--danger);
}

.cart-ship {
  border: 0;
  padding: 0;
  margin: 22px 0 0;
}
.cart-ship legend {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.ship-opt {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  transition: border-color 0.2s, background 0.2s;
}
.ship-opt:has(input:checked) {
  border-color: var(--gold);
  background: var(--gold-soft);
}
.ship-opt input {
  accent-color: var(--gold);
  width: 18px;
  height: 18px;
  margin: 0;
}
.ship-opt b {
  color: var(--text-strong);
  font-weight: 600;
}
.pp {
  margin-top: 6px;
}
.pp-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.pp-search {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-strong);
  font: inherit;
  font-size: 16px; /* iOS nezoomē */
}
.pp-search:focus {
  outline: none;
  border-color: var(--gold);
}
.pp-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  max-height: 260px;
  overflow-y: auto;
}
.pp-list button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  background: none;
  color: var(--text);
  text-align: left;
  font-size: 0.88rem;
}
.pp-list button:hover,
.pp-list button:focus-visible {
  background: var(--bg-elev-2);
  outline: none;
}
.pp-list button span,
.pp-selected span {
  color: var(--text-dim);
  font-size: 0.8rem;
}
.pp-msg {
  color: var(--text-dim);
  font-size: 0.85rem;
  padding: 10px 2px;
}
.pp-selected {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--gold-line);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 0.9rem;
}
.pp-selected[hidden],
.pp[hidden],
.pp-search[hidden] {
  display: none;
}
.pp-change {
  border: 1px solid var(--border);
  background: none;
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.8rem;
}
.pp-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

.cart-sum {
  margin: 22px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.cart-sum > div {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.92rem;
}
.cart-sum dt {
  color: var(--text-muted);
}
.cart-sum dd {
  margin: 0;
  color: var(--text-strong);
}
.cart-free {
  color: var(--gold-2);
  font-size: 0.82rem !important;
}
.cart-free[hidden] {
  display: none !important;
}
.cart-total {
  margin-top: 8px;
  padding-top: 10px !important;
  border-top: 1px solid var(--border);
  font-size: 1.05rem !important;
  font-weight: 700;
}
.cart-total dt {
  color: var(--text-strong);
}
.cart-terms {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 18px;
  font-size: 0.86rem;
  color: var(--text-muted);
  cursor: pointer;
}
.cart-terms input {
  accent-color: var(--gold);
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  flex: none;
}
.cart-terms a {
  color: var(--gold-2);
  text-decoration: underline;
}
.cart-error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--danger);
  font-size: 0.86rem;
}
.cart-error[hidden] {
  display: none;
}
.cart-pay {
  width: 100%;
  margin-top: 16px;
  min-height: 50px;
}
.cart-pay:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}
.cart-secure {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.76rem;
  margin-top: 10px;
}

/* ---------- Paldies lapa ---------- */
.thanks {
  padding: 32px 0 96px;
}
.thanks-card {
  max-width: 640px;
  background: var(--bg-elev-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.thanks-card h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}
.thanks-card p {
  color: var(--text-muted);
  margin-bottom: 10px;
}
.thanks-lines {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.92rem;
}
.thanks-lines td {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
}
.thanks-lines td:last-child {
  text-align: right;
  white-space: nowrap;
  color: var(--text-strong);
}
.thanks-lines tr.total td {
  font-weight: 700;
  color: var(--text-strong);
  border-bottom: 0;
  border-top: 1px solid var(--border);
}

/* ---------- Responsīvi ---------- */
@media (max-width: 880px) {
  .pd {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .pd-media {
    position: static;
  }
}
@media (max-width: 520px) {
  .shop {
    padding: 28px 0 64px;
  }
  .shop-grid {
    grid-template-columns: 1fr;
  }
  .cart-head,
  .cart-body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .thanks-card {
    padding: 20px;
  }
}
