/* Volterra Market — белая минималистичная тема */
:root {
  --c-text: #111111;
  --c-text-soft: #555555;
  --c-muted: #8a8a8a;
  --c-border: #e6e6e6;
  --c-bg: #ffffff;
  --c-bg-soft: #f7f7f7;
  --c-accent: #f5a000;     /* молния из логотипа */
  --c-accent-2: #1d9bf0;
  --c-red: #d92b2b;        /* лента логотипа */
  --c-green: #1e9e4a;
  --c-kaspi: #f14635;
  --c-whatsapp: #25d366;
  --radius: 10px;
  --shadow: 0 2px 14px rgba(0,0,0,.07);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--c-text);
  background: var(--c-bg);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: #000; }
p a, .muted a, td a { text-decoration: underline; text-underline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .6em; font-weight: 700; }
h1 { font-size: 26px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
.muted { color: var(--c-muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
.ta-r { text-align: right; }
.text-danger { color: var(--c-red); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 860px; }

/* ---------- Шапка ---------- */
.site-header {
  border-bottom: 1px solid var(--c-border);
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
}
.header-inner { display: flex; align-items: center; gap: 18px; padding: 10px 16px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo img { border-radius: 9px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-name { font-weight: 800; font-size: 17.5px; letter-spacing: .4px; color: #22324a; }
.logo-ribbon {
  font-size: 9.5px; color: #fff; background: var(--c-red);
  padding: 2.5px 8px 2px; border-radius: 3px;
  text-transform: uppercase; letter-spacing: .8px; font-weight: 700;
  margin-top: 3px; align-self: flex-start;
}
.search { flex: 1; display: flex; max-width: 560px; }
.search input {
  flex: 1; border: 1.5px solid var(--c-border); border-right: 0;
  border-radius: 8px 0 0 8px; padding: 9px 14px; font-size: 14px; outline: none;
  font-family: inherit; min-width: 0;
}
.search input:focus { border-color: #bbb; }
.search button {
  border: 1.5px solid var(--c-text); background: var(--c-text); color: #fff;
  border-radius: 0 8px 8px 0; padding: 0 16px; cursor: pointer;
}
.header-actions { display: flex; gap: 6px; margin-left: auto; }
.icon-link {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 10px; border-radius: 8px; position: relative; color: var(--c-text-soft);
}
.icon-link:hover { background: var(--c-bg-soft); color: #000; }
.icon-label { font-size: 11px; }
.cart-count {
  position: absolute; top: 0; right: 2px;
  background: var(--c-red); color: #fff; font-size: 10.5px; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid transparent; border-radius: 8px;
  padding: 9px 18px; font-size: 14.5px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: .15s; text-decoration: none !important; line-height: 1.2;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--c-text); color: #fff !important; }
.btn-primary:hover:not(:disabled) { background: #333; }
.btn-accent { background: var(--c-accent); color: #fff !important; }
.btn-accent:hover:not(:disabled) { background: #d98e00; }
.btn-outline { background: #fff; border-color: var(--c-border); color: var(--c-text) !important; }
.btn-outline:hover:not(:disabled) { border-color: var(--c-text); }
.btn-danger { background: #fff; border-color: var(--c-red); color: var(--c-red) !important; }
.btn-danger:hover:not(:disabled) { background: var(--c-red); color: #fff !important; }
.btn-kaspi { background: var(--c-kaspi); color: #fff !important; }
.btn-kaspi:hover:not(:disabled) { background: #d63a2a; }
.btn-link { background: none; color: var(--c-muted) !important; text-decoration: underline !important; }
.btn-lg { padding: 13px 26px; font-size: 16px; }
.btn-sm { padding: 5px 11px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- Герой ---------- */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #f1f6fb 55%, #e8eff7 100%);
  border: 1px solid var(--c-border);
  color: var(--c-text); border-radius: 16px; padding: 38px 48px; margin: 20px 0 30px;
}
.hero::after {
  content: ''; position: absolute; right: -70px; top: -90px; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(245,160,0,.16), transparent 62%); pointer-events: none;
}
.hero-text { position: relative; z-index: 1; max-width: 660px; }
.hero-kicker {
  display: inline-block; background: #22324a; color: #ffd23f;
  padding: 5px 14px; border-radius: 16px; font-size: 12.5px; font-weight: 700;
  letter-spacing: .4px; margin-bottom: 16px;
}
.hero h1 { font-size: 38px; font-weight: 900; margin-bottom: 12px; color: #22324a; line-height: 1.18; }
.hero-accent { color: var(--c-red); }
.hero p { color: #5a6b7e; margin: 0 0 24px; font-size: 16px; }
.hero-logo { max-width: 300px; height: auto; position: relative; z-index: 1; }
.btn-hero-cta { box-shadow: 0 6px 20px rgba(245,160,0,.35); padding: 14px 32px; }
.btn-hero { background: #22324a; color: #fff !important; }
.btn-hero:hover:not(:disabled) { background: #2e4160; }
@media (max-width: 720px) {
  .hero { flex-direction: column-reverse; text-align: center; padding: 28px 20px; }
  .hero h1 { font-size: 27px; }
  .hero-logo { max-width: 220px; }
  .hero-text { max-width: 100%; }
}

/* ---------- Каталог ---------- */
.catalog-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin: 18px 0 14px; }
.catalog-head h2 { margin: 0; }
.sort-form { display: flex; align-items: center; gap: 8px; }
select, input, textarea {
  font-family: inherit; font-size: 14.5px; color: var(--c-text);
  border: 1.5px solid var(--c-border); border-radius: 8px; padding: 9px 12px; background: #fff;
  max-width: 100%;
}
select:focus, input:focus, textarea:focus { outline: none; border-color: #999; }

.product-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin-bottom: 28px;
}
.product-card {
  display: flex; flex-direction: column;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  overflow: hidden; background: #fff; transition: .18s;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-img-wrap { position: relative; aspect-ratio: 3/4; background: var(--c-bg-soft); }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.card-discount {
  position: absolute; top: 10px; left: 10px;
  background: var(--c-red); color: #fff; font-weight: 700; font-size: 13px;
  padding: 3px 9px; border-radius: 6px;
}
.card-out {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.55); font-weight: 700; color: var(--c-text-soft);
}
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.card-title { font-size: 14.5px; font-weight: 600; margin: 0; flex: 1; }
.card-rating { font-size: 12.5px; display: flex; gap: 6px; align-items: center; min-height: 18px; }
.btn-cart { margin-top: 4px; }
.is-out .card-img-wrap img { filter: grayscale(.7); opacity: .7; }

.stars .star { color: #d9d9d9; font-size: 14px; }
.stars .star.on { color: var(--c-accent); }

.price-block { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.price-current { font-size: 18px; font-weight: 800; }
.price-old { color: var(--c-muted); text-decoration: line-through; font-size: 14px; }
.price-badge { background: var(--c-red); color: #fff; font-size: 12.5px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.price-lg .price-current { font-size: 30px; }
.price-lg .price-old { font-size: 17px; }
.price-lg .price-badge { font-size: 14px; }

.pagination { display: flex; gap: 6px; justify-content: center; margin: 10px 0 30px; flex-wrap: wrap; }
.pagination a, .page-cur, .page-dots { padding: 7px 13px; border-radius: 8px; border: 1.5px solid var(--c-border); }
.pagination a:hover { border-color: var(--c-text); }
.page-cur { background: var(--c-text); color: #fff; border-color: var(--c-text); font-weight: 700; }
.page-dots { border: none; }
.empty-note { padding: 30px 0 50px; color: var(--c-muted); }

/* ---------- Страница товара ---------- */
.breadcrumbs { padding: 14px 0 6px; font-size: 13px; color: var(--c-muted); display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumbs a:hover { color: #000; }
.product-layout { display: grid; grid-template-columns: minmax(320px, 480px) 1fr; gap: 36px; margin-bottom: 36px; }
@media (max-width: 860px) { .product-layout { grid-template-columns: 1fr; gap: 20px; } }

.gallery-main {
  aspect-ratio: 3/4; border-radius: 14px; overflow: hidden;
  background: var(--c-bg-soft); border: 1px solid var(--c-border);
}
.gallery-main img, .gallery-main video { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.gallery-main video { cursor: default; background: #000; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.thumb {
  width: 64px; height: 80px; border-radius: 8px; overflow: hidden;
  border: 2px solid var(--c-border); padding: 0; cursor: pointer; background: var(--c-bg-soft);
  font-size: 20px; color: var(--c-text-soft);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active { border-color: var(--c-text); }

.product-info h1 { font-size: 24px; }
.product-meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; font-size: 13.5px; }
.stock-status { font-weight: 600; margin: 10px 0 16px; }
.stock-in { color: var(--c-green); }
.stock-out { color: var(--c-red); }
.stock-low {
  color: var(--c-red); font-weight: 800; font-size: 16.5px;
  display: inline-block; background: #fdeaea; border: 1.5px solid #f3c4c4;
  padding: 7px 14px; border-radius: 9px;
}
.stock-low::before { content: '🔥 '; }

.buy-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; margin-bottom: 20px; }
.qty-box { display: flex; border: 1.5px solid var(--c-border); border-radius: 8px; overflow: hidden; }
.qty-box button { width: 38px; border: 0; background: #fff; font-size: 18px; cursor: pointer; }
.qty-box button:hover { background: var(--c-bg-soft); }
.qty-box input { width: 52px; border: 0; text-align: center; font-weight: 600; border-radius: 0; padding: 9px 2px; }
.qty-box input::-webkit-outer-spin-button, .qty-box input::-webkit-inner-spin-button { -webkit-appearance: none; }

.delivery-box {
  background: var(--c-bg-soft); border-radius: 10px; padding: 14px 18px; margin-bottom: 20px;
}
.delivery-box h4 { margin-bottom: 6px; }
.delivery-box p { margin: 4px 0; font-size: 14px; color: var(--c-text-soft); }
.delivery-price-line b { color: var(--c-text); }

.chars-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.chars-table td { padding: 7px 0; border-bottom: 1px dashed var(--c-border); vertical-align: top; }
.chars-table td:first-child { color: var(--c-muted); width: 45%; padding-right: 14px; }

.product-description { max-width: 860px; margin-bottom: 36px; }
.description-text { color: var(--c-text-soft); }

/* ---------- Отзывы ---------- */
.reviews { margin-bottom: 40px; }
.reviews-layout { display: grid; grid-template-columns: 280px 1fr; gap: 32px; }
@media (max-width: 860px) { .reviews-layout { grid-template-columns: 1fr; } }
.reviews-summary { align-self: start; position: sticky; top: 80px; }
.avg-big { font-size: 44px; font-weight: 800; line-height: 1; }
.dist { margin: 14px 0; display: flex; flex-direction: column; gap: 5px; }
.dist-row { display: grid; grid-template-columns: 34px 1fr 30px; gap: 8px; align-items: center; font-size: 12.5px; }
.dist-bar { height: 7px; background: var(--c-border); border-radius: 4px; overflow: hidden; }
.dist-bar i { display: block; height: 100%; background: var(--c-accent); border-radius: 4px; }

.review-item { border-bottom: 1px solid var(--c-border); padding: 14px 0; }
.review-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 5px; }
.review-author { font-weight: 700; }
.review-text { margin: 0; color: var(--c-text-soft); }
#reviews-more { margin-top: 16px; }

.review-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.rating-input { display: flex; gap: 2px; }
.rating-input button { border: 0; background: none; font-size: 26px; color: #d9d9d9; cursor: pointer; padding: 0 2px; }
.rating-input button.on { color: var(--c-accent); }

.related { margin-bottom: 40px; }

/* ---------- Корзина ---------- */
.cart-item {
  display: grid; grid-template-columns: 76px 1fr auto auto auto; gap: 14px;
  align-items: center; padding: 14px 0; border-bottom: 1px solid var(--c-border);
}
.cart-item img { width: 76px; height: 95px; object-fit: cover; border-radius: 8px; background: var(--c-bg-soft); }
.cart-item-title { font-weight: 600; }
.cart-remove { border: 0; background: none; color: var(--c-muted); cursor: pointer; font-size: 18px; padding: 6px; }
.cart-remove:hover { color: var(--c-red); }
.cart-summary { margin: 18px 0; display: flex; flex-direction: column; gap: 6px; max-width: 360px; margin-left: auto; }
.cart-summary .row { display: flex; justify-content: space-between; }
.cart-summary .row.total { font-size: 19px; font-weight: 800; border-top: 1.5px solid var(--c-border); padding-top: 9px; margin-top: 4px; }
.cart-actions { display: flex; justify-content: flex-end; gap: 12px; margin-bottom: 40px; flex-wrap: wrap; }
@media (max-width: 640px) {
  .cart-item { grid-template-columns: 64px 1fr auto; }
  .cart-item .price-block, .cart-item-qty { grid-column: 2; }
}

/* ---------- Оформление ---------- */
.checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; margin-bottom: 50px; }
@media (max-width: 860px) { .checkout-layout { grid-template-columns: 1fr; } }
.checkout-form h3 { margin: 22px 0 12px; }
.checkout-form h3:first-child { margin-top: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form-grid label, .auth-card label, .review-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; font-weight: 600; color: var(--c-text-soft); }
.form-grid .span2 { grid-column: span 2; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } .form-grid .span2 { grid-column: span 1; } }

.pay-methods { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.pay-method input { position: absolute; opacity: 0; }
.pay-method-card {
  display: flex; flex-direction: column; gap: 2px; min-width: 170px;
  border: 2px solid var(--c-border); border-radius: 10px; padding: 12px 16px; cursor: pointer; transition: .15s;
}
.pay-method input:checked + .pay-method-card { border-color: var(--c-text); background: var(--c-bg-soft); }
.kaspi-brand { display: flex; align-items: center; gap: 9px; }
.kaspi-brand b { color: var(--c-kaspi); font-size: 17px; letter-spacing: .2px; }
.kaspi-brand svg { border-radius: 7px; flex-shrink: 0; }
.pay-method input:checked + .pay-method-card.pay-method-kaspi { border-color: var(--c-kaspi); background: #fff6f5; }

.order-summary {
  background: var(--c-bg-soft); border-radius: 12px; padding: 18px 20px;
  align-self: start; position: sticky; top: 80px;
}
.summary-line { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: 14px; }
.summary-line.total { font-weight: 800; font-size: 17px; border-top: 1.5px solid var(--c-border); padding-top: 10px; margin-top: 6px; }

.form-error { color: var(--c-red); font-weight: 600; }
.form-success { color: var(--c-green); font-weight: 600; }

/* ---------- Страницы статуса ---------- */
.center-page { text-align: center; padding: 60px 16px 80px; }
.success-icon {
  width: 74px; height: 74px; border-radius: 50%; background: var(--c-green); color: #fff;
  font-size: 38px; display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.center-page .btn { margin-top: 18px; }

.kaspi-card {
  max-width: 420px; margin: 0 auto; text-align: center;
  border: 1px solid var(--c-border); border-radius: 16px; padding: 30px 28px; box-shadow: var(--shadow);
}
.kaspi-logo { font-size: 30px; font-weight: 800; color: var(--c-kaspi); margin-bottom: 4px; }
.kaspi-logo span { color: var(--c-kaspi); }
.kaspi-amount { font-size: 34px; font-weight: 800; margin: 6px 0 10px; }
.kaspi-steps { text-align: left; margin: 18px 0; padding-left: 22px; color: var(--c-text-soft); }
.kaspi-steps li { margin-bottom: 8px; }
.kaspi-card form { margin-top: 10px; }

.auth-card {
  max-width: 400px; margin: 0 auto; text-align: left;
  border: 1px solid var(--c-border); border-radius: 16px; padding: 28px; box-shadow: var(--shadow);
}
.auth-card h1 { text-align: center; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; margin: 14px 0; }
.auth-card p { text-align: center; }

.track-form { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 24px; }
.track-form input { flex: 1; min-width: 160px; }

.order-card { border: 1px solid var(--c-border); border-radius: 12px; padding: 16px 20px; margin-bottom: 14px; }
.order-card-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.account-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.mini-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.mini-table td { padding: 6px 0; border-bottom: 1px dashed var(--c-border); }
.mini-table .total-row td { border-bottom: 0; font-size: 16px; }

.status { display: inline-block; padding: 3px 10px; border-radius: 14px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.status-new { background: #e8f1ff; color: #1c64d9; }
.status-awaiting_payment { background: #fff4dd; color: #b97d00; }
.status-paid { background: #e3f6e9; color: #1e9e4a; }
.status-processing { background: #eee9ff; color: #6a3fd6; }
.status-shipped { background: #e0f4f8; color: #0e7d96; }
.status-delivered { background: #e3f6e9; color: #1e9e4a; }
.status-cancelled { background: #fde7e7; color: #c92a2a; }
.status-pending { background: #fff4dd; color: #b97d00; }
.status-review { background: #ffe9c7; color: #a36a00; }

/* ---------- Подвал ---------- */
.site-main { min-height: 60vh; }
.site-footer { background: #101010; color: #bdbdbd; margin-top: 50px; }
.footer-inner { display: flex; gap: 50px; padding: 36px 16px 22px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col h4 { color: #fff; margin-bottom: 4px; }
.footer-col a:hover { color: #fff; }
.footer-tagline { color: var(--c-red); text-transform: uppercase; font-size: 11px; letter-spacing: 1px; font-weight: 700; margin: 0; }
.footer-about { max-width: 380px; }
.footer-logo { display: block; margin: -10px 0 4px -8px; }
.footer-logo img { max-width: 230px; height: auto; }
.footer-about h4 { margin-top: 10px; }
.footer-about-text { font-size: 13.5px; line-height: 1.6; color: #a9a9a9; margin: 0 0 10px; }
.footer-mp-title { color: #fff; font-weight: 700; font-size: 13.5px; margin: 8px 0 6px; }
.footer-mp { display: flex; flex-direction: column; gap: 7px; }
.mp-link { font-size: 13.5px; color: #c9c9c9; }
.mp-link b { color: #fff; }
.mp-link:hover { color: #fff; }
.mp-link.mp-kaspi b { color: #ff6757; }
.mp-link.mp-wb b { color: #c887ff; }
.footer-bottom { border-top: 1px solid #2a2a2a; padding: 14px 16px; font-size: 13px; color: #8a8a8a; }

/* ---------- WhatsApp ---------- */
.whatsapp-fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--c-whatsapp); display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, .45); transition: .18s;
}
.whatsapp-fab:hover { transform: scale(1.08); }

/* ---------- Тосты ---------- */
.toast-wrap { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--c-text); color: #fff; border-radius: 10px; padding: 12px 20px;
  font-weight: 600; box-shadow: var(--shadow); animation: toast-in .25s ease;
}
.toast.error { background: var(--c-red); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; gap: 10px; }
  .search { order: 3; min-width: 100%; }
  .icon-label { display: none; }
  h1 { font-size: 22px; }
}
