/* Insait EShop PRO — світла професійна тема на основі фірмових кольорів шаблону
   Orange #ff6b00 (CTA) + Deep Purple #5b21b6 (акценти) + Navy #150826 (топбар/футер) */
:root {
    --bg: #f2f4f8;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #e5e9f0;
    --line-soft: #eef2f7;
    --brand: #ea580c;          /* orange, темніший за #ff6b00 для контрасту на білому */
    --brand-2: #ff6b00;        /* фірмовий orange з шаблону */
    --brand-dark: #c2410c;
    --violet: #6d28d9;         /* фірмовий purple з шаблону, адаптований */
    --violet-dark: #4c1d95;
    --navy: #150826;           /* bg-dark з шаблону */
    --navy-2: #241043;
    --sale: #dc2626;
    --ok: #15803d;
    --ok-bg: #f0fdf4;
    --star: #f59e0b;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(15,23,42,.05), 0 10px 30px rgba(15,23,42,.08);
    --shadow-hover: 0 2px 4px rgba(15,23,42,.06), 0 18px 44px rgba(76,29,149,.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--violet-dark); }

.shop-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Topbar (фірмовий градієнт з шаблону, але стриманий) ── */
.topbar {
    background: linear-gradient(90deg, #2a0a52 0%, #4c1d95 45%, #9a3412 100%);
    color: #e9d5ff;
    font-size: .8rem;
    letter-spacing: .01em;
}
.topbar-inner {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 7px 20px;
    flex-wrap: wrap;
}
.topbar strong { color: #fff; background: rgba(255,107,0,.28); border: 1px solid rgba(255,255,255,.25); padding: 0 8px; border-radius: 999px; font-size: .76rem; }
.topbar-dot { opacity: .45; }

/* ── Header ── */
.site-header {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 60;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-top: 12px;
    padding-bottom: 12px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}
.brand-logo {
    width: 44px; height: 44px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 14px rgba(234,88,12,.35);
    border: 1px solid #fed7aa;
    background: #fff;
}
.brand-mark-fallback {
    width: 44px; height: 44px; border-radius: 12px;
    background: linear-gradient(135deg, var(--violet-dark), var(--violet) 45%, var(--brand-2));
    color: #fff; font-weight: 800; display: none;
    align-items: center; justify-content: center; letter-spacing: .5px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.06rem; letter-spacing: -.01em; }
.brand-text strong em { font-style: normal; color: var(--brand); }
.brand-text small { color: var(--muted); font-size: .75rem; }

.header-search {
    flex: 1;
    display: flex;
    max-width: 560px;
    margin-left: auto;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}
.header-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(234,88,12,.15); background: #fff; }
.header-search input {
    flex: 1;
    border: 0;
    padding: 11px 14px;
    font-size: .92rem;
    outline: none;
    background: transparent;
    min-width: 0;
}
.header-search button {
    border: 0;
    background: linear-gradient(135deg, var(--brand-2), var(--brand-dark));
    color: #fff;
    padding: 0 20px;
    font-weight: 700;
    cursor: pointer;
    font-size: .9rem;
}
.header-search button:hover { filter: brightness(1.06); }

.header-nav { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.header-nav .nav-link {
    text-decoration: none;
    color: var(--ink-2);
    font-weight: 600;
    font-size: .9rem;
    padding: 9px 13px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid transparent;
}
.header-nav .nav-link:hover { background: #fff7ed; color: var(--brand-dark); border-color: #fed7aa; }
.nav-cart { border: 1px solid var(--line) !important; background: #fff; }
.cart-badge {
    background: linear-gradient(135deg, var(--brand-2), var(--brand-dark));
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
    border-radius: 999px;
    min-width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

/* ── Page ── */
.page-body { padding: 24px 20px 56px; }

/* ── Hero PRO: темний фірмовий градієнт як у шаблоні, але преміально ── */
.hero {
    border: 0;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(42,10,82,.35);
    padding: 0;
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 0;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    background:
        radial-gradient(600px 300px at 85% 10%, rgba(255,107,0,.35), transparent 60%),
        radial-gradient(500px 320px at 10% 100%, rgba(109,40,217,.55), transparent 60%),
        linear-gradient(120deg, #1c0b38 0%, #3b1470 45%, #7c2d12 100%);
    color: #fff;
}
.hero-main { padding: 34px 32px; position: relative; z-index: 1; }
.hero-kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    color: #fdba74;
    background: rgba(255,107,0,.14);
    border: 1px solid rgba(255,107,0,.4);
    padding: 6px 12px; border-radius: 999px;
    margin-bottom: 14px;
}
.hero h1 { margin: 0 0 10px; font-size: clamp(1.6rem, 3.4vw, 2.35rem); letter-spacing: -.02em; line-height: 1.12; }
.hero h1 .grad {
    background: linear-gradient(90deg, #fdba74, #ff6b00 45%, #c084fc);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin: 0 0 20px; color: #d8c9f5; max-width: 56ch; font-size: .98rem; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-side {
    background: rgba(255,255,255,.06);
    border-left: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(4px);
    padding: 24px;
    display: grid;
    gap: 10px;
    align-content: center;
}
.hero-stat {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    gap: 12px;
    align-items: center;
}
.hero-stat .ic {
    width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
    background: linear-gradient(135deg, rgba(255,107,0,.9), rgba(76,29,149,.9));
    border: 1px solid rgba(255,255,255,.2);
}
.hero-stat strong { display: block; font-size: .95rem; line-height: 1.3; }
.hero-stat span { color: #c9b8ec; font-size: .8rem; }

/* ── Trust strip ── */
.trust {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.trust-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 13px 15px;
    display: flex; gap: 11px; align-items: center;
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.trust-item .t-ic { font-size: 1.35rem; }
.trust-item strong { display: block; font-size: .88rem; }
.trust-item span { color: var(--muted); font-size: .79rem; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 11px;
    padding: 11px 19px;
    font-weight: 700;
    font-size: .92rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .12s, box-shadow .15s, filter .15s;
    line-height: 1.4;
}
.btn-primary {
    background: linear-gradient(135deg, var(--brand-2), var(--brand-dark));
    color: #fff;
    box-shadow: 0 8px 20px rgba(234,88,12,.32);
}
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); color: #fff; }
.btn-ghost-light {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.28);
    color: #fff;
}
.btn-ghost-light:hover { background: rgba(255,255,255,.2); color: #fff; }
.btn-secondary { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand-dark); }
.btn-violet { background: linear-gradient(135deg, var(--violet), var(--violet-dark)); color: #fff; box-shadow: 0 8px 20px rgba(109,40,217,.3); }
.btn-violet:hover { filter: brightness(1.07); color: #fff; }
.btn-danger { background: #fef2f2; border-color: #fecaca; color: var(--sale); }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 13px; font-size: .85rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ── Section head ── */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 6px 2px 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 1.3rem; letter-spacing: -.01em; }
.section-head p { margin: 2px 0 0; color: var(--muted); font-size: .88rem; }

/* ── Toolbar / catalog bar ── */
.toolbar {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 13px 15px;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
    position: sticky;
    top: 69px;
    z-index: 40;
    box-shadow: 0 6px 20px rgba(15,23,42,.06);
}
.toolbar .count { color: var(--muted); font-size: .87rem; margin-right: auto; }
.toolbar .count strong { color: var(--ink); }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: 7px 13px;
    font-size: .83rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    transition: all .13s;
}
.chip:hover { border-color: var(--brand); color: var(--brand-dark); transform: translateY(-1px); }
.chip.active {
    background: linear-gradient(135deg, var(--violet-dark), var(--violet));
    border-color: transparent; color: #fff;
    box-shadow: 0 6px 16px rgba(109,40,217,.32);
}
.select {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 11px;
    font-size: .86rem;
    background: #fff;
    max-width: 100%;
}

/* ── Grid + cards ── */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
    gap: 16px;
}
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 2px rgba(15,23,42,.05);
    transition: transform .16s, box-shadow .16s, border-color .16s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: #ddd6fe; }
.card-visual {
    height: 158px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.6rem;
    position: relative;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}
.card-visual span.emoji { filter: drop-shadow(0 8px 18px rgba(0,0,0,.25)); transition: transform .18s; }
.card:hover .emoji { transform: scale(1.1) rotate(-3deg); }
.cat-electronics { background: linear-gradient(135deg, #dbeafe, #eff6ff 55%, #c7d2fe); }
.cat-fashion { background: linear-gradient(135deg, #fce7f3, #fff7ed 60%, #fbcfe8); }
.cat-home { background: linear-gradient(135deg, #fef3c7, #fffbeb 55%, #fde68a); }
.cat-sports { background: linear-gradient(135deg, #dcfce7, #f0fdf4 55%, #bbf7d0); }
.cat-books { background: linear-gradient(135deg, #e0e7ff, #f5f3ff 55%, #c4b5fd); }
.cat-beauty { background: linear-gradient(135deg, #ffe4e6, #fff1f2 55%, #fecdd3); }
.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .07em;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    z-index: 2;
}
.badge-new { background: linear-gradient(135deg, #8b5cf6, #4c1d95); box-shadow: 0 4px 12px rgba(109,40,217,.4); }
.card-body { padding: 16px 16px 15px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-cat { font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--violet); }
.card-title { margin: 0; font-size: 1.02rem; letter-spacing: -.01em; line-height: 1.35; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { color: var(--brand-dark); }
.card-desc { color: var(--muted); font-size: .86rem; margin: 0; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; justify-content: space-between; font-size: .82rem; color: var(--muted); }
.stars { color: var(--star); letter-spacing: 1px; font-size: .85rem; }
.stock-ok { color: var(--ok); font-weight: 700; font-size: .8rem; }
.stock-no { color: var(--sale); font-weight: 700; font-size: .8rem; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.price { font-size: 1.28rem; font-weight: 800; letter-spacing: -.01em; }
.price small { font-size: .82rem; font-weight: 600; color: var(--muted); }
.old-price { color: var(--muted); text-decoration: line-through; font-size: .83rem; margin-left: 6px; font-weight: 500; }

/* ── Panels / forms ── */
.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(15,23,42,.04);
    padding: 24px;
}
.panel h2 { margin-top: 0; letter-spacing: -.01em; }
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
.muted { color: var(--muted); }
.alert { border-radius: 11px; padding: 12px 14px; font-size: .89rem; margin-bottom: 14px; border: 1px solid; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-success { background: var(--ok-bg); border-color: #bbf7d0; color: #166534; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.alert a { font-weight: 700; }

.breadcrumb { font-size: .85rem; color: var(--muted); margin: 0 0 14px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

.form-grid { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { display: block; font-weight: 650; font-size: .87rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 11px;
    padding: 11px 13px;
    font-size: .93rem;
    background: #fff;
    font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid rgba(234,88,12,.15); border-color: var(--brand); }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 4px; }
.field-validation-error { font-size: .8rem; }

/* ── Cart ── */
.cart-line {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--line-soft);
}
.cart-line:last-of-type { border-bottom: 0; }
.cart-thumb {
    width: 60px; height: 60px;
    border-radius: 14px;
    border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    background: linear-gradient(135deg, #f5f3ff, #fff7ed);
}
.cart-name { font-weight: 700; }
.cart-name a { color: inherit; text-decoration: none; }
.cart-name a:hover { color: var(--brand-dark); }
.cart-unit { color: var(--muted); font-size: .85rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.qty button { border: 0; background: var(--surface-2); width: 33px; height: 33px; cursor: pointer; font-weight: 800; font-size: 1rem; }
.qty button:hover { background: #ffedd5; color: var(--brand-dark); }
.qty span { min-width: 36px; text-align: center; font-weight: 750; }
.line-sum { font-weight: 800; white-space: nowrap; font-size: 1.02rem; }
.totals { display: grid; gap: 8px; margin: 16px 0; font-size: .93rem; }
.totals .row { display: flex; justify-content: space-between; gap: 10px; }
.totals .grand { font-size: 1.22rem; font-weight: 800; border-top: 1px solid var(--line); padding-top: 11px; }

/* ── Product page ── */
.product-layout { display: grid; grid-template-columns: 1fr 1.25fr; gap: 20px; align-items: start; }
.product-gallery {
    border: 1px solid var(--line);
    border-radius: 20px;
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.product-gallery .emoji-big { filter: drop-shadow(0 16px 30px rgba(0,0,0,.2)); }
.specs { display: grid; gap: 7px; font-size: .9rem; color: var(--muted); }
.specs strong { color: var(--ink); }
.perks { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.perk { font-size: .79rem; font-weight: 650; background: var(--surface-2); border: 1px solid var(--line); padding: 6px 11px; border-radius: 999px; color: var(--ink-2); }

/* ── Orders ── */
.order { border: 1px solid var(--line); border-radius: 14px; padding: 17px 18px; margin-bottom: 13px; background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.order-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; align-items: center; }
.order-id { font-weight: 800; background: var(--navy); color: #fff; padding: 3px 11px; border-radius: 999px; font-size: .82rem; letter-spacing: .02em; }
.order-date { color: var(--muted); font-size: .84rem; }

/* ── Footer PRO ── */
.site-footer {
    background: linear-gradient(180deg, var(--navy-2), var(--navy));
    color: #c9bde3;
    padding: 36px 0 0;
    border-top: 3px solid var(--brand-2);
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 24px; }
.footer-brand { display: flex; gap: 11px; align-items: center; margin-bottom: 10px; }
.footer-brand img { width: 40px; height: 40px; border-radius: 10px; }
.footer-brand strong { color: #fff; font-size: 1.02rem; }
.site-footer p { font-size: .87rem; margin: 8px 0; }
.footer-title { color: #fff; font-weight: 750; font-size: .9rem; margin-bottom: 10px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; font-size: .87rem; }
.footer-grid a { color: #d9c8ff; text-decoration: none; }
.footer-grid a:hover { color: #fdba74; text-decoration: underline; }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    border-top: 1px solid rgba(255,255,255,.12);
    margin-top: 24px;
    padding: 15px 20px 19px;
    color: #9d8cc7;
    font-size: .82rem;
}

.empty { text-align: center; padding: 52px 20px; color: var(--muted); }
.empty .big { font-size: 3rem; display: block; margin-bottom: 10px; }

/* ── Responsive ── */
@media (max-width: 980px) {
    .hero, .two-col, .product-layout, .footer-grid { grid-template-columns: 1fr; }
    .hero-side { border-left: 0; border-top: 1px solid rgba(255,255,255,.12); }
    .trust { grid-template-columns: 1fr 1fr; }
    .toolbar { top: 0; }
}
@media (max-width: 680px) {
    .header-inner { flex-wrap: wrap; }
    .header-search { order: 3; max-width: none; flex-basis: 100%; }
    .trust { grid-template-columns: 1fr; }
    .hero-main { padding: 24px 20px; }
    .form-row { grid-template-columns: 1fr; }
    .topbar-inner { font-size: .72rem; text-align: center; }
    .cart-line { grid-template-columns: 52px 1fr; }
    .line-sum { grid-column: 2; justify-self: start; }
}
