/* Витрина MWS Sellers: одна вёрстка, темы = CSS-переменные (см. shop_base.html). */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--f-display); line-height: 1.15; margin: 0 0 .5em; }
a { color: inherit; }
img { max-width: 100%; }

.preview-bar {
  position: sticky; top: 0; z-index: 50;
  background: #1D2023; color: #fff; text-align: center;
  padding: 8px 16px; font-size: 14px;
}

/* ---------- header ---------- */
.shop-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 18px clamp(16px, 5vw, 64px);
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--c-bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--c-text) 10%, transparent);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; }
.brand-name { font-family: var(--f-display); font-size: 1.25rem; font-weight: 600; }
.shop-nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); font-size: 15px; }
.shop-nav a { text-decoration: none; opacity: .85; }
.shop-nav a:hover { opacity: 1; }
.cart-link { font-weight: 600; }
.cart-count:not(:empty) {
  display: inline-block; min-width: 20px; text-align: center;
  background: var(--c-primary); color: var(--c-bg);
  border-radius: 999px; padding: 1px 6px; font-size: 12px; margin-left: 2px;
}

/* ---------- hero ---------- */
.hero { padding: clamp(48px, 9vw, 110px) clamp(16px, 5vw, 64px); }
.hero-inner { max-width: 760px; margin: 0 auto; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5.5vw, 3.4rem); margin-bottom: .35em; }
.hero-sub { font-size: clamp(1.05rem, 2vw, 1.3rem); color: var(--c-muted); margin: 0 0 1.6em; }
.hero-logo { width: 88px; height: 88px; border-radius: 24px; object-fit: cover; margin-bottom: 20px;
             box-shadow: 0 12px 40px color-mix(in srgb, var(--c-primary) 35%, transparent); }

body[data-hero="soft"] .hero {
  background: radial-gradient(120% 140% at 50% 0%,
    color-mix(in srgb, var(--c-primary) 16%, var(--c-bg)) 0%, var(--c-bg) 70%);
}
body[data-hero="dark"] .hero {
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--c-primary) 12%, var(--c-bg)), var(--c-bg));
}
body[data-hero="bold"] .hero {
  background: color-mix(in srgb, var(--c-accent) 22%, var(--c-bg));
}
body[data-hero="bold"] .hero h1 { text-transform: uppercase; letter-spacing: .01em; }
body[data-hero="flat"] .hero-inner { text-align: left; margin: 0; max-width: 680px; }

/* ---------- buttons / chips ---------- */
.btn-primary, .btn-ghost, .btn-add {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-body); font-size: 16px; font-weight: 600;
  border-radius: calc(var(--radius) * .6); cursor: pointer;
  text-decoration: none; border: 0; transition: transform .12s ease, box-shadow .12s ease;
}
.btn-primary {
  background: var(--c-primary); color: var(--c-bg);
  padding: 14px 28px;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--c-primary) 35%, transparent);
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-lg { padding: 16px 36px; font-size: 17px; }
.btn-ghost {
  background: transparent; color: var(--c-text);
  border: 1.5px solid color-mix(in srgb, var(--c-text) 25%, transparent);
  padding: 12px 24px; margin-left: 10px; margin-top: 10px;
}
.chip {
  display: inline-flex; padding: 8px 18px; border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--c-text) 18%, transparent);
  background: transparent; color: var(--c-text); font-size: 14px; cursor: pointer;
  font-family: var(--f-body);
}
.chip-active, .chip:hover { background: var(--c-primary); color: var(--c-bg); border-color: var(--c-primary); }
.chip-static { cursor: default; font-size: 13px; opacity: .8; }
.chip-static:hover { background: transparent; color: var(--c-text);
                     border-color: color-mix(in srgb, var(--c-text) 18%, transparent); }

/* ---------- catalog ---------- */
.catalog, .about, .info-section { padding: clamp(28px, 4vw, 48px) clamp(16px, 5vw, 64px); max-width: 1200px; margin: 0 auto; }
.catalog h2, .about h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 24px; }
.product-grid {
  display: grid; gap: clamp(14px, 2vw, 24px);
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.product-card {
  display: flex; flex-direction: column; text-decoration: none;
  background: var(--c-surface); border-radius: var(--radius);
  overflow: hidden; position: relative;
  border: 1px solid color-mix(in srgb, var(--c-text) 8%, transparent);
  transition: transform .15s ease, box-shadow .15s ease;
}
.product-card:hover { transform: translateY(-3px);
  box-shadow: 0 14px 36px color-mix(in srgb, var(--c-text) 12%, transparent); }
.product-photo {
  aspect-ratio: 1 / 1; display: grid; place-items: center;
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--c-primary) 14%, var(--c-surface)),
    color-mix(in srgb, var(--c-accent) 10%, var(--c-surface)));
}
.product-photo img { width: 100%; height: 100%; object-fit: cover; }
.product-emoji { font-size: clamp(3rem, 8vw, 4.5rem); }
.product-info { padding: 14px 16px 6px; }
.product-title { font-weight: 600; margin-bottom: 4px; }
.product-price { color: var(--c-primary); font-weight: 700; font-size: 1.05rem; }
.btn-add {
  margin: 10px 16px 16px; padding: 10px 16px; font-size: 14px;
  background: color-mix(in srgb, var(--c-primary) 12%, var(--c-surface));
  color: var(--c-primary);
}
.btn-add:hover { background: var(--c-primary); color: var(--c-bg); }
.btn-add.added { background: var(--c-accent); color: var(--c-bg); }

/* ---------- about / sections ---------- */
.about-text { max-width: 720px; font-size: 1.1rem; }
.info-section {
  border-top: 1px solid color-mix(in srgb, var(--c-text) 8%, transparent);
}
.info-section h3 { font-size: 1.25rem; }
.info-section p { max-width: 720px; color: color-mix(in srgb, var(--c-text) 80%, var(--c-muted)); }

/* ---------- product page ---------- */
.product-page { padding: clamp(24px, 4vw, 48px) clamp(16px, 5vw, 64px); max-width: 1100px; margin: 0 auto; }
.back-link { display: inline-block; text-decoration: none; opacity: .7; margin-bottom: 20px; }
.product-layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); align-items: start; }
.product-photo-lg { border-radius: var(--radius); overflow: hidden; }
.product-detail h1 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
.product-price-lg { font-size: 1.6rem; margin-bottom: 16px; }
.product-desc { color: color-mix(in srgb, var(--c-text) 85%, var(--c-muted)); margin-bottom: 24px; }
.badge-out { display: inline-block; padding: 8px 16px; border-radius: 999px;
             background: color-mix(in srgb, var(--c-text) 8%, var(--c-surface)); color: var(--c-muted); }
@media (max-width: 720px) { .product-layout { grid-template-columns: 1fr; } }

/* ---------- cart / checkout ---------- */
.cart-page, .order-page { padding: clamp(24px, 4vw, 48px) clamp(16px, 5vw, 64px); max-width: 760px; margin: 0 auto; }
.cart-items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.cart-item {
  display: flex; align-items: center; gap: 14px;
  background: var(--c-surface); border-radius: calc(var(--radius) * .75); padding: 12px 16px;
  border: 1px solid color-mix(in srgb, var(--c-text) 8%, transparent);
}
.cart-item-photo { width: 56px; height: 56px; border-radius: 12px; overflow: hidden;
  display: grid; place-items: center; font-size: 1.8rem; flex: none;
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--c-primary) 14%, var(--c-surface)),
    color-mix(in srgb, var(--c-accent) 10%, var(--c-surface))); }
.cart-item-photo img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-title { flex: 1; font-weight: 600; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 30px; height: 30px; border-radius: 8px; border: 1.5px solid
  color-mix(in srgb, var(--c-text) 20%, transparent); background: transparent;
  color: var(--c-text); font-size: 16px; cursor: pointer; }
.cart-item-price { min-width: 90px; text-align: right; font-weight: 700; }
.cart-item-remove { background: none; border: 0; color: var(--c-muted); cursor: pointer; font-size: 18px; }

.checkout h2 { margin-top: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.checkout label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; position: relative; }
.checkout input, .checkout select {
  font: inherit; font-weight: 400; padding: 12px 14px;
  border-radius: 12px; border: 1.5px solid color-mix(in srgb, var(--c-text) 18%, transparent);
  background: var(--c-surface); color: var(--c-text);
}
.checkout input:focus, .checkout select:focus { outline: 2px solid var(--c-primary); border-color: transparent; }
.delivery-mode { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; font-size: 15px; }
.delivery-mode label { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.suggest { position: absolute; top: 100%; left: 0; right: 0; z-index: 30;
  background: var(--c-surface); border-radius: 12px; overflow: hidden;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--c-text) 18%, transparent); }
.suggest div { padding: 10px 14px; cursor: pointer; font-weight: 400; }
.suggest div:hover { background: color-mix(in srgb, var(--c-primary) 12%, var(--c-surface)); }
.delivery-price { margin: 4px 0 12px; color: var(--c-muted); font-size: 15px; min-height: 22px; }
.cart-total { font-size: 1.3rem; margin: 18px 0; }
.form-error { color: #D8400C; margin-top: 12px; min-height: 22px; }
.muted { color: var(--c-muted); }
.small { font-size: 13px; }
.empty-note { color: var(--c-muted); font-size: 1.05rem; }

/* ---------- order page ---------- */
.order-badge { display: inline-block; padding: 8px 18px; border-radius: 999px; margin-bottom: 16px; font-weight: 600; }
.order-badge-ok { background: #BEF4BD; color: #007502; }
.order-badge-fail { background: #FCD4C9; color: #AD3400; }
.order-card { background: var(--c-surface); border-radius: var(--radius); padding: 20px 24px; margin: 20px 0;
  border: 1px solid color-mix(in srgb, var(--c-text) 8%, transparent); }
.order-line { display: flex; justify-content: space-between; padding: 8px 0;
  border-bottom: 1px dashed color-mix(in srgb, var(--c-text) 12%, transparent); }
.order-line:last-child { border-bottom: 0; }
.order-line-total { font-weight: 700; font-size: 1.15rem; }

/* ---------- footer ---------- */
.shop-footer { margin-top: clamp(32px, 6vw, 64px);
  border-top: 1px solid color-mix(in srgb, var(--c-text) 10%, transparent);
  background: color-mix(in srgb, var(--c-text) 4%, var(--c-bg)); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 32px clamp(16px, 5vw, 64px);
  display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; }
.footer-name { font-family: var(--f-display); font-weight: 600; font-size: 1.1rem; }
.footer-slogan { color: var(--c-muted); font-size: 14px; }
.footer-contacts { display: flex; gap: 16px; font-size: 15px; }
.footer-contacts a { text-decoration: none; color: var(--c-primary); font-weight: 600; }
.footer-powered { font-size: 13px; color: var(--c-muted); width: 100%; }
.footer-powered a { color: inherit; }
