/* ===== Магазин: shop.html, product.html, cart.html, usloviya.html =====
   Зарежда се СЛЕД style.css */

.main-nav a.active { color: var(--accent); }

/* ---------- Шапка на страницата ---------- */
.page-intro {
  padding: 4em 0 2em;
  background: var(--surface);
}
.page-intro h1 { font-size: 3em; }
.page-intro p { color: var(--muted); font-size: 1.1em; margin: 0; max-width: 42em; }

.shop-section { background: var(--surface); }

/* ---------- Карти в магазина ---------- */
.product-card a { color: inherit; text-decoration: none; }
.product-card a:hover h3 { color: var(--accent); }
.product-card p { margin-bottom: 0.4em; }
.product-card .price,
.price {
  font-weight: 700;
  font-size: 1.1em;
  color: var(--ink);
}
.shop-note {
  clear: both;
  margin: 1em 0 0;
  padding: 1.2em 1.5em;
  background: var(--surface);
  border-radius: 8px;
  color: var(--muted);
}
.shop-note strong { color: var(--ink); }

/* ---------- Страница на продукт ---------- */
.product-page {
  display: flex;
  align-items: flex-start;
  gap: 3em;
}
.product-gallery { flex: 1 1 55%; min-width: 0; }
.product-info { flex: 1 1 45%; min-width: 0; }

.product-main {
  margin: 0 0 0.8em;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg);
}
.product-main img { width: 100%; height: 100%; object-fit: contain; }
.product-thumbs { display: flex; flex-wrap: wrap; gap: 0.6em; }
.thumb {
  width: 72px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  background: var(--bg);
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--accent); }

.breadcrumbs { margin-bottom: 0.6em; font-size: 0.9em; }
.breadcrumbs a { text-decoration: none; font-weight: 600; }
.product-info h1 { font-size: 2em; }
.price.big { font-size: 1.6em; margin-bottom: 0.6em; }
.pfield { margin-bottom: 1em; }
.hint { display: block; margin-top: 0.3em; font-size: 0.85em; color: var(--muted); }
.qty-field input { width: 6em; }
.added { display: none; margin-top: 0.8em; font-weight: 700; color: var(--ok); }
.added.show { display: block; }
.details { margin: 1.5em 0 1em; padding-left: 1.2em; color: var(--muted); }
.ship-note {
  padding: 1em;
  font-size: 0.9em;
  color: var(--muted);
  background: var(--bg);
  border-radius: 8px;
}

/* ---------- Количка ---------- */
.cart-layout {
  display: flex;
  align-items: flex-start;
  gap: 3em;
}
.cart-box { flex: 1 1 52%; min-width: 0; }
.checkout { flex: 1 1 48%; min-width: 0; }
.checkout h2 { font-size: 1.4em; }

.cart-lines { margin: 0 0 1.5em; padding: 0; list-style: none; }
.cart-line {
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 1em 0;
  border-bottom: 1px solid var(--line);
}
.cart-line img {
  flex: none;
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
}
.cl-info { flex: 1; min-width: 0; }
.cl-name { display: block; font-weight: 700; color: var(--ink); text-decoration: none; }
.cl-opt { display: block; font-size: 0.85em; color: var(--muted); }
.cart-line .cl-qty { flex: none; width: 4.5em; }
.cl-sum { flex: none; width: 6.5em; text-align: right; font-weight: 700; }
.cl-sum small { display: block; font-weight: 600; color: var(--ok); }
.cl-remove {
  flex: none;
  width: 32px;
  height: 32px;
  font-size: 1.3em;
  line-height: 1;
  color: var(--muted);
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}
.cl-remove:hover { color: var(--error); background: var(--bg); }

.cart-totals {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4em 1em;
  margin: 0;
}
.cart-totals dt { color: var(--muted); }
.cart-totals dd { margin: 0; text-align: right; font-weight: 600; }
.cart-totals .grand {
  padding-top: 0.5em;
  font-size: 1.2em;
  font-weight: 700;
  color: var(--ink);
  border-top: 1px solid var(--line);
}
.ship-hint { margin-top: 1em; font-weight: 600; color: var(--accent); }
.empty { font-size: 1.1em; }

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1em;
}
.checkout-grid .wide { grid-column: 1 / -1; }
.checkout fieldset { margin: 0 0 0.4em; padding: 0; border: 0; }
.cfield { margin-bottom: 0.4em; }
.order-done { max-width: 40em; }
.checkout select { width: 100%; }
.pay-choice { display: block; margin-bottom: 0.4em; }
.pay-choice[hidden], .cfield[hidden] { display: none; }
/* Съобщения: минимална поръчка за чужбина, отказано плащане */
.intl-notice, .pay-notice {
  margin: 0.4em 0 1em;
  padding: 0.8em 1em;
  font-weight: 600;
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
}
.pay-notice { max-width: 46em; }

/* ---------- Условия ---------- */
.terms { max-width: 46em; }
.terms h2 { font-size: 1.3em; margin-top: 1.6em; }
.terms p, .terms li { color: var(--muted); }

/* ---------- Адаптивен дизайн ---------- */
@media (max-width: 1023px) {
  .product-page, .cart-layout { flex-direction: column; gap: 2em; }
  .product-gallery, .product-info, .cart-box, .checkout { flex: none; width: 100%; }
}
@media (max-width: 479px) {
  .page-intro h1 { font-size: 2.2em; }
  .checkout-grid { grid-template-columns: 1fr; }
  .cart-line { flex-wrap: wrap; }
  .cl-info { flex-basis: calc(100% - 90px); }
  .cart-line .cl-qty { margin-left: 88px; }
  .cl-sum { flex: 1; }
}
