/*
 * base.css — NorApotek
 * Shared across ALL pages.
 * CSS custom properties (:root) are injected inline per-tenant by the server.
 * ─────────────────────────────────────────────────────────────────────────── */

/* ══════════════════
   RESET & BASE
══════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Jost', sans-serif;
  background: var(--off);
  color: var(--text);
  font-size: 17px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ══════════════════
   LAYOUT
══════════════════ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

/* ══════════════════
   TYPOGRAPHY
══════════════════ */
.section-label {
  font-size: 12px; font-weight: 600; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--g600); margin-bottom: 10px;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(32px, 3.8vw, 50px);
  font-weight: 700; color: var(--g900); line-height: 1.1; letter-spacing: -.5px;
}
.divider {
  width: 40px; height: 3px; background: var(--g500);
  border-radius: 2px; margin: 16px 0 32px;
}
.section-head {
  display: flex; align-items: flex-end;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.link-all {
  color: var(--g600); font-size: 13px; font-weight: 600;
  text-decoration: none; white-space: nowrap;
}
.link-all:hover { color: var(--g800); text-decoration: underline; }

/* ══════════════════
   TOP BAR
══════════════════ */
.top-bar {
  background: var(--g900); color: rgba(255,255,255,.6);
  font-size: 12px; padding: 7px 0;
}
.top-bar .container {
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.top-bar a { color: rgba(255,255,255,.6); text-decoration: none; transition: color .2s; }
.top-bar a:hover { color: #fff; }
.tb-left { display: flex; gap: 20px; flex-wrap: wrap; }
.tb-right { display: flex; gap: 20px; }

/* ══════════════════
   MAIN NAV (sticky)
══════════════════ */
nav.main-nav {
  position: sticky; top: 0; z-index: 300;
  background: var(--white); border-bottom: 2px solid var(--g700);
  box-shadow: 0 2px 20px rgba(11,42,26,.08);
}
.nav-inner { display: flex; align-items: center; height: 64px; gap: 24px; }

.logo {
  font-family: 'Cormorant Garamond', serif; font-size: 24px; font-weight: 700;
  color: var(--g800); text-decoration: none; letter-spacing: -.5px;
  display: flex; align-items: center; gap: 10px; white-space: nowrap; flex-shrink: 0;
}
.logo-icon {
  width: 34px; height: 34px; background: var(--g700); border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0;
}
.logo em { color: var(--g500); font-style: normal; }

.nav-links { display: flex; gap: 2px; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500;
  padding: 8px 12px; border-radius: 6px; transition: color .2s, background .2s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--g700); background: var(--g50); }

.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-phone {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-phone-img {
    height: 18px;
    width: auto;
    vertical-align: middle;
}
.cart-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--g700); color: #fff; border-radius: 6px;
  padding: 9px 16px; font-size: 13px; font-weight: 600;
  text-decoration: none; transition: background .2s; white-space: nowrap; flex-shrink: 0;
}
.cart-btn:hover { background: var(--g800); }
.cart-count {
  background: var(--red); border-radius: 50px;
  font-size: 10px; font-weight: 700; padding: 2px 6px;
  min-width: 18px; text-align: center;
}

/* ══════════════════
   HAMBURGER
══════════════════ */
.hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; cursor: pointer; background: none; border: none;
  padding: 6px; border-radius: 6px; flex-shrink: 0;
}
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--g800); border-radius: 2px; transition: all .3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ══════════════════
   MOBILE NAV DRAWER
══════════════════ */
.mobile-nav { display: none; position: fixed; inset: 0; z-index: 400; }
.mobile-nav-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.mobile-nav-panel {
  position: absolute; top: 0; left: 0; bottom: 0;
  width: min(300px, 85vw); background: var(--white); padding: 24px 20px;
  overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
  box-shadow: 4px 0 32px rgba(0,0,0,.15);
  transform: translateX(-100%); transition: transform .3s ease;
}
.mobile-nav.open .mobile-nav-panel { transform: translateX(0); }
.mobile-nav-logo {
  font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 700;
  color: var(--g800); display: flex; align-items: center; gap: 8px;
  margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border);
}
.mobile-nav-logo em { color: var(--g500); font-style: normal; }
.mobile-nav-panel a {
  display: block; padding: 12px 14px; border-radius: 8px;
  text-decoration: none; color: var(--text); font-size: 15px; font-weight: 500;
  transition: background .15s;
}
.mobile-nav-panel a:hover { background: var(--g50); color: var(--g700); }
.mobile-nav-phone { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border); }
.mobile-nav-phone a { color: var(--g700) !important; font-weight: 600 !important; }

/* ══════════════════
   BREADCRUMB
   — normal flow, never sticky
══════════════════ */
.breadcrumb-wrap { background: var(--white); border-bottom: 1px solid var(--border); }
.breadcrumb { padding: 13px 0; }
.breadcrumb ol { list-style: none; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.breadcrumb li { display: flex; align-items: center; font-size: 13px; color: var(--muted); }
.breadcrumb li + li::before { content: '/'; color: var(--border); margin: 0 6px; }
.breadcrumb a { color: var(--muted); text-decoration: none; transition: color .2s; }
.breadcrumb a:hover { color: var(--g600); }
.breadcrumb li:last-child span,
.breadcrumb li:last-child { color: var(--text); font-weight: 500; }

/* ══════════════════
   SHARED BUTTONS
══════════════════ */
.btn-primary {
  background: var(--g500); color: #fff; border: none; cursor: pointer;
  border-radius: 6px; padding: 13px 26px; font-size: 14px; font-weight: 600;
  font-family: 'Jost', sans-serif; text-decoration: none;
  transition: background .2s, transform .2s; display: inline-block;
}
.btn-primary:hover { background: var(--g600); transform: translateY(-2px); }

.btn-white {
  background: #fff; color: var(--g800); border: none; cursor: pointer;
  border-radius: 6px; padding: 13px 26px; font-size: 14px; font-weight: 700;
  font-family: 'Jost', sans-serif; text-decoration: none;
  transition: opacity .2s; display: inline-block; white-space: nowrap;
}
.btn-white:hover { opacity: .9; }

/* ══════════════════
   SHARED PRODUCT FLAGS
══════════════════ */
.product-flag {
  position: absolute; top: 10px; left: 10px; z-index: 1;
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  text-transform: uppercase; padding: 3px 9px; border-radius: 3px;
}
.flag-sale { background: var(--red); color: #fff; }
.flag-new  { background: var(--g600); color: #fff; }
.flag-rx   { background: var(--g900); color: #fff; }



.blister-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    box-sizing: border-box;
}

/* ── Pill Card ──────────────────────────────────────────────── */

.prod-img-link {
    display: block;
    text-decoration: none;
}

.product-card {
    border: 1.5px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--white);
    transition: border-color .25s, box-shadow .25s, transform .2s;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

    .product-card:hover {
        border-color: var(--g500);
        box-shadow: 0 8px 32px rgba(11,42,26,.1);
        transform: translateY(-2px);
    }

.prod-img {
    width: 100%;
    height: 180px;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    transition: background .25s;
}

.product-card:hover .prod-img {
    background: var(--white);
}

.product-card:hover .prod-body {
    background: var(--g50);
}
.prod-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 12px;
}
.prod-brand {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.prod-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--g900);
    line-height: 1.35;
    text-decoration: none;
    display: block;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

    .prod-name:hover {
        color: var(--g700);
    }

.prod-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.prod-price-wrap {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.price-from-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
}

.price-cur {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--g900);
    line-height: 1;
}
.prod-stars {
    color: #b8942c;
    font-size: 12px;
}

.prod-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.price-old {
    font-size: 11px;
    color: var(--muted);
    text-decoration: line-through;
}

.price-cur {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--g900);
    line-height: 1;
}

.btn-add {
    background: var(--g700);
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 6px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Jost', sans-serif;
    transition: background .2s;
    flex-shrink: 0;
    white-space: nowrap;
}

    .btn-add:hover {
        background: var(--g800);
    }

/* btn-add as a link — same look as button */
a.btn-add, button.btn-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--g700);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Jost', sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, transform .15s;
    flex-shrink: 0;
    white-space: nowrap;
}

    a.btn-add:hover, button.btn-add:hover {
        background: var(--g800);
        transform: translateY(-1px);
    }

    a.btn-add:active, button.btn-add:active {
        transform: translateY(0);
    }

/* ══════════════════
   FOOTER (base)
══════════════════ */
footer {
    background: var(--g900);
    padding: 48px 0 0;
}

.footer-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

    .footer-logo em {
        color: var(--g400);
        font-style: normal;
    }

.footer-logo-icon {
    width: 30px;
    height: 30px;
    background: var(--g700);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.footer-about {
    color: rgba(255,255,255,.4);
    font-size: 13px;
    line-height: 1.75;
    max-width: 260px;
    margin-bottom: 14px;
}

.footer-lic {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 4px;
    padding: 5px 11px;
    font-size: 11px;
    color: rgba(255,255,255,.35);
}

.footer-col h4 {
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 14px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.footer-col ul {
    list-style: none;
}

    .footer-col ul li {
        margin-bottom: 9px;
    }

        .footer-col ul li a {
            color: rgba(255,255,255,.4);
            text-decoration: none;
            font-size: 13px;
            transition: color .2s;
        }

            .footer-col ul li a:hover {
                color: var(--g400);
            }

/* footer grid — 4-column (main page) */
.footer-grid {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

/* footer grid — inner pages (compact) */
.footer-mini-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-mini-brand {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

    .footer-mini-brand .footer-logo {
        margin-bottom: 0;
    }

    .footer-mini-brand .footer-lic {
        margin-top: 0;
    }

.footer-bottom {
    padding: 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-bottom-strip {
    padding: 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,.08);
}

    .footer-bottom span,
    .footer-bottom-strip span {
        color: rgba(255,255,255,.25);
        font-size: 12px;
    }

.footer-pay {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.pay-badge {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,.35);
    letter-spacing: .3px;
}
/* ══════════════════
   ANIMATIONS
   opacity set via JS so content
   stays visible if JS fails
══════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════
   RESPONSIVE — shared breakpoints
══════════════════════════════════════ */
@media (max-width: 960px) {
  .container { padding: 0 20px; }
  .nav-links { display: none; }
  .nav-phone { display: none; }
  .hamburger { display: flex; }
  .top-bar .tb-right { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-mini-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-mini-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-bottom-strip { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
  .logo { font-size: 20px; }
  .logo-icon { width: 28px; height: 28px; font-size: 14px; }
  .cart-btn { padding: 8px 12px; font-size: 12px; }
}

.logo svg {
    height: 52px;
    width: auto;
}
    .logo svg text:first-child {
        fill: var(--g900);
    }

    .logo svg text:last-child {
        fill: var(--g600);
    }

.nav-search {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-search-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    color: var(--g700);
}

.nav-search-box {
    display: none;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 4px 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
    white-space: nowrap;
}

    .nav-search-box.open {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .nav-search-box input {
        border: none;
        outline: none;
        font-size: 14px;
        font-family: 'Jost', sans-serif;
        width: 220px;
        color: var(--g900);
    }

.nav-search-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    font-size: 14px;
}

.home-page .nav-search {
    display: none;
}

.footer-mini-social {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}
.search-input-wrap {
    position: relative;
    flex: 1;
}

.search-suggestions {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.1);
    z-index: 200;
    overflow: hidden;
}

    .search-suggestions.open {
        display: block;
    }

.suggestion-item {
    padding: 10px 16px;
    font-size: 14px;
    color: var(--g800);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background .15s;
}

    .suggestion-item:hover {
        background: var(--g50);
    }

    .suggestion-item::before {
        content: '💊';
        font-size: 14px;
    }

    .suggestion-item mark {
        display: inline;
        margin: 0;
        padding: 0;
        background: none;
        color: var(--g700);
        font-weight: 600;
    }

.search-suggestions.open {
    z-index: 9999;
}
.si-text {
    display: inline;
}

/* в body оставь 17px */
/* nav */
.nav-links a {
    font-size: 16px;
}

/* footer */
.footer-about {
    font-size: 14px;
}

.footer-col ul li a {
    font-size: 14px;
}

.footer-col h4 {
    font-size: 12px;
}

/* product card */
.prod-name {
    font-size: 17px;
}

.prod-stars {
    font-size: 13px;
}

.btn-add {
    font-size: 14px;
}

/* top bar */
.top-bar {
    font-size: 13px;
}

/* breadcrumb */
.breadcrumb li {
    font-size: 14px;
}

/* suggestion */
.suggestion-item {
    font-size: 15px;
}

/* section label */
.section-label {
    font-size: 13px;
}

/* link-all */
.link-all {
    font-size: 14px;
}

#seoBody {
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease;
}

    #seoBody.open {
        max-height: 2000px;
    }
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}
.cat-icon svg {
    width: 28px;
    height: 28px;
    display: block;
}