/* ============================================================
   pro.instrumenti.lv — redesign.css (single, self-contained)
   Header #0f1923 · Nav #1a2535 · Search #151f2c · Orange #e87b24
   ============================================================ */

:root {
    --header:  #0f1923;
    --nav:     #1a2535;
    --search:  #151f2c;
    --orange:  #e87b24;
    --orange-d:#cf6a1a;
    --nav-txt: #c0c8d0;
    --blue:    #7ba3c8;
    --ink:     #1f2733;
    --ink-2:   #5a6675;
    --ink-3:   #8a94a3;
    --line:    #eee;
    --line-2:  #f1f3f5;
    --bg:      #f3f5f7;
    --white:   #fff;
    --green:   #2e9c5a;
    --nav-w:   560px;   /* shared width: logo == nav block (4 buttons) */
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; overflow-y: scroll; }
body {
    min-height: 133.333vh;   /* = 100vh / zoom(0.75) — компенсация под zoom, чтобы footer не задирался */
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font: 14px/1.45 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    zoom: 0.75;
    -moz-transform: scale(0.75);
    -moz-transform-origin: 0 0;
}
a { color: var(--ink); text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3 { font-weight: 600; }
.empty-state { padding: 40px; text-align: center; color: var(--ink-3); }

/* full-bleed bars → inner content centered at 1200px */
#top, #menu, #search-row, #footer { width: 100%; }
.hdr-inner {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

/* ============================================================
   1. HEADER — #0f1923, SVG logo 51px
   ============================================================ */
#top { background: var(--header); }
#top .hdr-inner {
    display: flex;
    align-items: center;
    padding-top: 7px;
    padding-bottom: 7px;
}
/* Logo scales to --nav-w; height follows the SVG aspect ratio (390:64) */
#logo-link { display: block; line-height: 0; width: var(--nav-w); }
#logo-link svg { display: block; width: 100%; height: auto; }

/* ============================================================
   2. NAV — #1a2535, buttons #c0c8d0 / 12px / padding 8px 18px
   ============================================================ */
#menu { background: var(--nav); }
#menu .hdr-inner { display: flex; padding-left: 16px; padding-right: 16px; }
#menu a {
    flex: 1 1 0;                          /* 4 equal buttons... */
    max-width: calc(var(--nav-w) / 4);    /* ...capped so 4 == --nav-w == logo width */
    text-align: center;
    color: var(--nav-txt);
    font-size: 12px;
    font-weight: 500;
    padding: 8px 18px;
    border-bottom: 2px solid transparent;
    transition: color .12s, background .12s;
}
#menu a:hover { color: #fff; background: rgba(255,255,255,0.05); }
#menu a.active {
    color: #fff;
    border-bottom-color: var(--orange);
    background: rgba(232,123,36,0.10);
}

/* ============================================================
   3. SEARCH — #151f2c, input + orange button + lang switch
   ============================================================ */
#search-row { background: var(--search); }
#search-row .hdr-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
    padding-bottom: 8px;
}
.search-container {
    flex: 1 1 auto;
    position: relative;
    min-width: 0;
}
#header-search {
    display: flex;
    width: 100%;
    height: 34px;
}
#header-search input {
    flex: 1 1 auto;
    border: 1px solid #2a3950;
    border-right: 0;
    background: #fff;
    padding: 0 12px;
    font: inherit;
    font-size: 13px;
    outline: none;
    min-width: 0;
    border-radius: 8px 0 0 8px;
}
#header-search input:focus { border-color: var(--orange); }
#header-search button {
    flex: 0 0 auto;
    width: 42px;
    background: var(--orange);
    color: #fff;
    border: 1px solid var(--orange);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 8px 8px 0;
}
#header-search button:hover { background: var(--orange-d); }

/* ---- Live search dropdown ---- */
#search-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0; right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
    z-index: 1000;
    max-height: 500px;
    overflow-y: auto;
    color: var(--ink);
}
.search-section-title {
    font-size: 0.7rem;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 14px 4px;
    border-top: 1px solid #f0f0f0;
}
.search-section-title:first-child { border-top: 0; }
.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    text-decoration: none;
    color: var(--ink);
    cursor: pointer;
}
.search-item:hover { background: #f5f5f5; }
.search-item img {
    width: 50px; height: 50px;
    object-fit: contain;
    border-radius: 4px;
    background: #fafafa;
    flex-shrink: 0;
}
.search-item .search-cat-icon { width: 30px; height: 30px; background: none; }
.search-item .search-brand-logo { width: auto; height: 24px; background: none; border-radius: 0; }
.search-item-info { flex: 1; min-width: 0; }
.search-item-name {
    font-size: 0.9rem; font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-item-sku { font-size: 0.72rem; color: var(--ink-3); margin-top: 2px; }
.search-item-price {
    font-size: 0.95rem; font-weight: 500;
    color: var(--orange); white-space: nowrap; flex-shrink: 0;
}
.search-show-all {
    display: block; text-align: center;
    padding: 10px;
    color: var(--orange); font-weight: 500;
    border-top: 1px solid #f0f0f0;
    text-decoration: none;
}
.search-show-all:hover { background: #fff5ee; }
.search-empty { padding: 16px; text-align: center; color: var(--ink-3); font-size: 0.85rem; }

/* AI search section (added by layout.php dropdown JS via appendAiSection) */
.search-section-ai { color: var(--orange); }
.search-section-ai .ti { vertical-align: -2px; margin-right: 4px; }
.search-item-ai { border-left: 2px solid rgba(232,123,36,0.4); }

/* Header search dropdown — ALWAYS dark regardless of body cards theme.
   Reason: site header itself is dark (#0f1923), so a light dropdown on a
   dark header always looks broken. Previous attempt scoped these rules
   to `body.cards-dark` — but the class is set client-side by
   _card_theme.php JS, leaving a paint window where it's absent AND
   missing entirely when user has localStorage pi-cards-theme=light.
   Specificity (0,1,0) equals the default `#search-dropdown` rule above,
   and these come later in the file → they win. No !important needed. */
#search-dropdown {
    background: #1a2535;
    border-color: #2a3a4a;
    color: #c0c8d0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.55);
}
.search-section-title {
    color: #7a8392;
    border-top-color: #2a3a4a;
}
.search-item { color: #c0c8d0; }
.search-item:hover { background: #2a3a4a; }
.search-item img { background: #2a3a4a; }
.search-item-sku { color: #7a8392; }
.search-show-all {
    border-top-color: #2a3a4a;
}
.search-show-all:hover { background: rgba(232,123,36,0.12); }
.search-empty { color: #7a8392; }
.search-section-ai { color: var(--orange); }
.search-item-ai { border-left-color: rgba(232,123,36,0.55); }

/* Loading state — shown while AI fetch is in-flight, replaces the
   "Nav atrasta" placeholder so user doesn't see false "no results"
   for the 2-8s before AI responds. */
.search-loading {
    display: flex; align-items: center; justify-content: center;
    gap: 10px; padding: 24px;
    color: #7a8392; font-size: 0.85rem;
}
.search-loading .ti {
    font-size: 18px; color: var(--orange);
    animation: search-loading-spin 1s linear infinite;
}
@keyframes search-loading-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* Dark theme — full /search.html page elements (loader, empty-state box). */
body.cards-dark .search-loader { color: #c0c8d0; }
body.cards-dark .search-empty {
    background: #1a2535;
    border-color: #2a3a4a;
    color: #c0c8d0;
}
body.cards-dark .search-empty-title { color: #fff; }
body.cards-dark .search-empty-hint { color: #7a8392; }

/* S5 — "Не нашли?" form. Palette per TZ_Search_Analytics_LENS:
   bg #1a2535, text rgba(255,255,255,.85), accent #E87A2E.
   Always-dark (independent of body.cards-* class) — form lives inside the
   dark .search-empty block on full search page. */
.search-request-form {
    max-width: 480px;
    margin: 18px auto 4px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}
.search-request-form input,
.search-request-form textarea {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.85);
    padding: 10px 12px;
    border-radius: 6px;
    font: inherit;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
}
.search-request-form input:focus,
.search-request-form textarea:focus {
    outline: none;
    border-color: var(--orange);
    background: rgba(255,255,255,0.10);
}
.search-request-form input::placeholder,
.search-request-form textarea::placeholder {
    color: rgba(255,255,255,0.45);
}
.search-request-form textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}
.search-request-form button[type="submit"] {
    background: var(--orange);
    color: #fff;
    border: 0;
    padding: 11px 20px;
    border-radius: 6px;
    font: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.15s;
}
.search-request-form button[type="submit"]:hover { background: var(--orange-d); }
.search-request-form button[type="submit"]:disabled { opacity: 0.55; cursor: wait; }
.search-request-error {
    color: #ff9a8b;
    font-size: 0.85rem;
    padding: 6px 0;
    text-align: center;
}
.search-request-success {
    background: rgba(232,123,36,0.10);
    border: 1px solid rgba(232,123,36,0.35);
    color: rgba(255,255,255,0.85);
    padding: 16px 18px;
    border-radius: 8px;
    margin: 18px auto 4px;
    max-width: 480px;
    text-align: center;
    font-size: 0.95rem;
}
#lang {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    height: 34px;
    border: 1px solid #2a3950;
    border-radius: 8px;
    overflow: hidden;
}
#lang a {
    color: var(--nav-txt);
    font-size: 11px;
    font-weight: 600;
    padding: 0 8px;
    height: 100%;
    display: flex;
    align-items: center;
    border-right: 1px solid #2a3950;
}
#lang a:last-child { border-right: 0; }
#lang a:hover { background: #20304a; color: #fff; }
#lang a.active { background: var(--orange); color: #fff; }
/* Mobile lang dropdown — button hidden on desktop, links shown inline */
#lang-mob-btn { display: none; }
#lang-links { display: contents; }

/* user link — first child in #menu, identical look to other nav links */
#menu #hdr-user {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}
#menu #hdr-user .ti { font-size: 14px; line-height: 1; vertical-align: middle; flex: 0 0 auto; }
#menu #hdr-user .hu-avatar {
    width: 22px; height: 22px;
    border-radius: 50%;
    object-fit: cover;
    flex: 0 0 22px;
    border: 1px solid rgba(255,255,255,0.18);
}
#menu #hdr-user .hu-text {
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (max-width: 480px) {
    #menu #hdr-user .hu-text { display: none; }
}

/* ============================================================
   4. CONTENT — 1200px container, sidebar 180px + 4-col products
   ============================================================ */
#container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    background: var(--white);
    flex: 1 0 auto;          /* fills vertical space → sticky footer */
}
#center {
    display: flex;
    align-items: stretch;
    gap: 16px;
    padding: 16px 0;
}
#leftblock { flex: 0 0 215px; width: 215px; background: var(--nav); border-radius: 8px; }
#leftblock .cat-sidebar { background: transparent; border-radius: 0; padding-top: 0; }
#rightblock { display: none; }
#content { flex: 1 1 auto; min-width: 0; align-self: flex-start; }

/* ---- Sidebar — dark navy, 220px, rounded ---- */
.cat-sidebar {
    background: var(--nav);          /* #1a2535 */
    border-radius: 8px;
    overflow: hidden;
    padding: 6px 0;
}
.cat-root { border-bottom: 1px solid rgba(255,255,255,0.06); }
.cat-root:last-child { border-bottom: 0; }
.cat-root > summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    cursor: pointer;
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
    user-select: none;
}
.cat-root > summary::-webkit-details-marker { display: none; }
.cat-root > summary:hover { background: rgba(255,255,255,0.05); }
.cat-root-link-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}
.cat-root-link-main:hover .cat-root-name { color: var(--orange); }
.cat-root-link-main:hover .cat-icon { color: var(--orange); }
.cat-icon {
    flex: 0 0 18px;
    width: 18px;
    font-size: 18px;
    color: #7a8a9a;
    line-height: 1;
    text-align: center;
}
.cat-root-name { flex: 1 1 auto; line-height: 1.25; }
.cat-arrow {
    flex: 0 0 auto;
    width: 0; height: 0;
    border-left: 5px solid #7a8a9a;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transition: transform .15s;
}
.cat-root[open] > summary .cat-arrow { transform: rotate(90deg); }
/* Open category: text + arrow + icon orange (2026-06-09) */
.cat-root[open] > summary .cat-root-name { color: var(--orange); }
.cat-root[open] > summary .cat-arrow { border-left-color: var(--orange); }
.cat-root[open] > summary .cat-icon { color: var(--orange); }
body.cards-light .cat-root[open] > summary { background: transparent; }
body.cards-light .cat-root[open] > summary .cat-root-name { color: #e87b24; font-weight: 700; }
body.cards-light .cat-root[open] > summary .cat-arrow { border-left-color: #e87b24; }
body.cards-light .cat-root[open] > summary .cat-icon { color: #e87b24; }
.cat-subs { list-style: none; background: rgba(0,0,0,0.18); }
.cat-subs li { border-top: 1px solid rgba(255,255,255,0.05); }
.cat-subs li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px 8px 24px;
    font-size: 12px;
    color: var(--nav-txt);          /* #c0c8d0 */
    line-height: 1.3;
    text-decoration: none;
}
.cat-subs li a .cat-icon { flex: 0 0 14px; width: 14px; font-size: 14px; }
.cat-sub-name { flex: 1 1 auto; min-width: 0; }
.cat-subs li a:hover { color: var(--orange); }
.cat-subs li a:hover .cat-icon { color: var(--orange); }
.cat-subs li.is-current a { color: var(--orange); font-weight: 600; }
.cat-subs li.is-current a .cat-icon { color: var(--orange); }
.cat-root-link {
    display: block;
    padding: 8px 12px 8px 34px;
    font-size: 11px;
    color: var(--orange);
    background: rgba(0,0,0,0.18);
    border-top: 1px solid rgba(255,255,255,0.05);
}
.cat-root-link:hover { color: var(--orange-d); }
.cat-root-leaf {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
}
.cat-root-leaf:hover { background: rgba(255,255,255,0.05); }
.cat-root-leaf:hover .cat-root-name { color: var(--orange); }
.cat-root-leaf:hover .cat-icon { color: var(--orange); }

/* ---- Contextual sidebar — subcategories of the current section ---- */
.cat-sidebar-ctx {
    background: var(--nav);          /* #1a2535 */
    border-radius: 8px;
    overflow: hidden;
}
.ctx-root {
    display: block;
    padding: 12px;
    background: rgba(0,0,0,0.25);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.3;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ctx-root:hover { color: var(--orange); }
.ctx-subs { list-style: none; }
.ctx-subs li { border-bottom: 1px solid rgba(255,255,255,0.05); }
.ctx-subs li:last-child { border-bottom: 0; }
.ctx-subs li a {
    display: block;
    padding: 8px 12px;
    font-size: 12px;
    color: var(--nav-txt);           /* #c0c8d0 */
    line-height: 1.3;
}
.ctx-subs li a:hover { color: var(--orange); background: rgba(255,255,255,0.04); }
.ctx-subs li.is-current a {
    color: var(--orange);
    font-weight: 600;
    background: rgba(232,123,36,0.10);
}

/* ---- Sidebar light-theme overrides (body.cards-light) ---- */
body.cards-light #leftblock { background: #ebedf0; }
body.cards-light .cat-sidebar { background: #ebedf0; }
body.cards-light .cat-root { border-bottom-color: rgba(0,0,0,0.09); }
body.cards-light .cat-root > summary { color: #1a2535; font-weight: 500; }
body.cards-light .cat-root > summary:hover { background: transparent; }
body.cards-light .cat-icon { color: #1a2535; }
body.cards-light .cat-arrow { border-left-color: #1a2535; }
body.cards-light .cat-subs { background: rgba(0,0,0,0.08); }
body.cards-light .cat-subs li { border-top-color: rgba(0,0,0,0.07); }
body.cards-light .cat-subs li a { color: #1a2535; }
body.cards-light .cat-subs li a:hover { color: #e87b24; }
body.cards-light .cat-subs li a:hover .cat-icon { color: #e87b24; }
body.cards-light .cat-root-link { background: rgba(0,0,0,0.04); border-top-color: rgba(0,0,0,0.07); }
body.cards-light .cat-root-leaf { color: #1a2535; font-weight: 500; }
body.cards-light .cat-root-leaf:hover { background: transparent; }
body.cards-light .cat-sidebar-ctx { background: #ebedf0; }
body.cards-light .ctx-root { background: rgba(0,0,0,0.06); color: #1a2535; font-weight: 500; border-bottom-color: rgba(0,0,0,0.09); }
body.cards-light .ctx-subs li { border-bottom-color: rgba(0,0,0,0.07); }
body.cards-light .ctx-subs li a { color: #1a2535; }
body.cards-light .ctx-subs li a:hover { color: #e87b24; }
/* ── Sidebar: hover + active + current → navy in light theme ── */
body.cards-light .cat-root-link-main:hover .cat-root-name { color: #e87b24; }
body.cards-light .cat-root-link-main:hover .cat-icon { color: #e87b24; }
body.cards-light .cat-subs li.is-current a { color: #e87b24; font-weight: 600; }
body.cards-light .cat-subs li.is-current a .cat-icon { color: #e87b24; }
body.cards-light .cat-root-leaf:hover .cat-root-name { color: #e87b24; }
body.cards-light .cat-root-leaf:hover .cat-icon { color: #e87b24; }
body.cards-light .cat-root-link { color: #1a2535; }
body.cards-light .cat-root-link:hover { color: #e87b24; }
body.cards-light .ctx-root:hover { color: #e87b24; }
body.cards-light .ctx-subs li.is-current a { color: #e87b24; font-weight: 600; background: rgba(232,123,36,0.12); }

/* ============================================================
   5. PRODUCT GRID — 3 columns, riki.lv card style
   ============================================================ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    align-items: start;
}
.product-card {
    border: 1px solid #e0e0e0;
    background: var(--white);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    padding: 12px;
    text-align: center;
    transition: border-color .12s, box-shadow .12s;
}
.product-card:hover { border-color: #e87b24; box-shadow: 0 6px 20px rgba(232,123,36,0.22); transition: box-shadow 0.2s ease, border-color 0.2s ease; }
.product-card .product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}
.product-card .product-image img { max-width: 100%; max-height: 190px; object-fit: contain; }
.product-card .product-name,
.product-card h3,
.product-card h4 {
    display: block;
    overflow: hidden;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
    margin-top: 5px;
    height: 2.6em;
}
.product-card .product-name:hover { color: var(--orange); }
.product-card .price,
.product-card .product-price {
    font-size: 1rem;
    font-weight: 500;
    color: #e87b24;
    letter-spacing: 0.5px;
    text-align: center;
    margin-top: 8px;
    min-height: 1.5em;
}
.product-card .product-price-req { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.product-card .product-btn {
    margin-top: 8px;
    background: var(--orange);
    color: #fff;
    text-align: center;
    height: 32px;
    line-height: 32px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
}
.product-card .product-btn:hover { background: var(--orange-d); }
.product-card .product-article {
    font-size: 11px;
    color: var(--ink-3);
    text-align: center;
    margin-top: 6px;
    cursor: pointer;
    user-select: none;
    transition: color .15s;
    border-radius: 4px;
    padding: 2px 4px;
}
.product-card .product-article:hover { color: var(--orange); }
.product-card .product-article.pa-copied { color: #2d8a3f; }

/* ---- Category tiles (catalog.html landing + subcats inside a category) — horizontal cards ---- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
}
.category-card {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px 18px;
    background: #fff;
    text-decoration: none;
    min-height: 60px;
    transition: border-color 0.2s;
}
.category-card:hover {
    border-color: #e87b24;
}
.category-card img,
.category-card .cat-card-noimg {
    width: 56px;
    height: 56px;
    object-fit: contain;
    flex-shrink: 0;
}
.category-card .cat-card-noimg { background: var(--bg); border-radius: 4px; }
.category-card .cat-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.category-card .cat-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1a2535;
    line-height: 1.3;
}
.category-card .cat-count {
    font-size: 0.8rem;
    color: #888;
    margin-top: 2px;
}

/* ============================================================
   6. FOOTER — #0f1923, single line
   ============================================================ */
#footer {
    background: var(--header);
    color: var(--blue);
    margin-top: auto;        /* sticky footer — pinned to bottom */
    flex: 0 0 auto;
}
#footer .hdr-inner {
    padding-top: 14px;
    padding-bottom: 14px;
    text-align: center;
    font-size: 12px;
}
.footer-links { margin-bottom: 8px; line-height: 1.9; }
.footer-links a { color: inherit; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-sep { opacity: 0.4; margin: 0 5px; }
.footer-user { margin-bottom: 6px; opacity: 0.55; }
.footer-user a { color: inherit; text-decoration: none; }
.footer-user a:hover { text-decoration: underline; }

/* ============================================================
   SHARED — internal pages (catalog / product / cart / account)
   ============================================================ */
#content h1 { font-size: 19px; margin-bottom: 10px; }
.cat-page-title { text-align: center; font-size: 17px; color: var(--nav); }
#content h2 { font-size: 16px; margin: 14px 0 8px; }
.section { margin-bottom: 16px; }

.breadcrumb { font-size: 12px; color: var(--ink-3); margin-bottom: 10px; }
.breadcrumb a { color: #666; }
.breadcrumb a:nth-last-of-type(1) { color: var(--orange); }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb .sep { margin: 0 5px; color: var(--line); }
.breadcrumb .current { color: var(--ink); font-weight: 500; }

.pagination { display: flex; justify-content: center; gap: 3px; margin: 16px 0; flex-wrap: wrap; }
.pagination a, .pagination .pg-current, .pagination .pg-gap {
    padding: 5px 10px; border: 1px solid var(--line); font-size: 13px;
    color: var(--ink-2); background: var(--white);
}
.pagination a:hover { border-color: var(--orange); color: var(--ink); }
.pagination .pg-current { background: var(--nav); color: #fff; border-color: var(--nav); }
.pagination .pg-gap { border: 0; }

.btn-buy, .btn-secondary, .btn-small {
    display: inline-block; cursor: pointer; font: inherit;
    font-weight: 500; text-align: center; border-radius: 8px;
}
.btn-buy { background: var(--orange); color: #fff; border: 0; padding: 9px 22px; font-size: 14px; }
.btn-buy:hover { background: var(--orange-d); }
.btn-secondary { background: var(--white); color: var(--ink); border: 1px solid var(--line); padding: 8px 18px; }
.btn-secondary:hover { border-color: var(--orange); }
.btn-small { background: var(--nav); color: #fff; padding: 4px 10px; font-size: 12px; }
.btn-link-danger { background: none; border: 0; color: #d9534f; cursor: pointer; font-size: 15px; }

.subcat-strip { margin-bottom: 12px; }
.subcat-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; margin: 0 3px 3px 0;
    background: var(--bg); border: 1px solid var(--line);
    color: var(--ink-2); font-size: 12px; border-radius: 2px;
    text-decoration: none;
}
.subcat-chip:hover { border-color: var(--orange); color: var(--ink); }
.subcat-chip-img { width: 18px; height: 18px; object-fit: contain; flex: 0 0 18px; }
.catalog-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    gap: 10px; flex-wrap: wrap; padding: 8px 10px;
    background: var(--bg); border: 1px solid var(--line); margin-bottom: 12px;
}
.filter-form { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-form input, .filter-form select {
    padding: 5px 7px; border: 1px solid var(--line); font: inherit; font-size: 13px;
}
.filter-form button {
    background: var(--nav); color: #fff; border: 0; padding: 6px 14px;
    cursor: pointer; font-weight: 500;
}
.result-count { font-size: 12px; color: var(--ink-3); }

/* Category tiles + filter-bar wrapper — scrolls with content */
.cat-sticky-wrap {
    margin: 0 0 16px;
    padding-top: 8px;
}
.cat-sticky-wrap > .category-grid { margin-bottom: 12px; }
.cat-sticky-wrap > .filter-bar { margin-bottom: 0; }

/* ---- AJAX filter bar (category pages) ---- */
.filter-bar {
    background: #f8f9fa;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
}
.filter-controls {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.filter-brand-wrap {
    position: relative;
    display: flex; align-items: center; gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--line); border-radius: 6px;
    background: #fff; min-width: 160px;
}
.filter-brand-wrap > .ti { color: var(--ink-3); font-size: 16px; line-height: 1; }
.filter-brand-wrap input {
    border: 0; outline: none; font-size: 0.85rem;
    width: 110px; background: transparent;
}
.brand-dropdown {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border: 1px solid var(--line);
    border-radius: 0 0 6px 6px; max-height: 220px; overflow-y: auto;
    z-index: 100; box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.brand-option { padding: 6px 12px; font-size: 0.85rem; cursor: pointer; }
.brand-option:hover { background: #f5f5f5; }
.filter-price-range { display: flex; align-items: center; gap: 4px; }
.filter-price-range input {
    width: 70px; padding: 6px 8px;
    border: 1px solid var(--line); border-radius: 6px;
    font-size: 0.85rem; text-align: center;
}
.filter-stock-label {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px;
    background: #fff; font-size: 0.85rem; color: var(--ink-2); cursor: pointer;
    user-select: none;
}
.filter-stock-label > .ti { font-size: 16px; line-height: 1; color: var(--ink-3); }
.filter-stock-label input:checked ~ .ti { color: var(--orange); }
.filter-stock-label input:checked ~ span { color: var(--orange); font-weight: 500; }
.filter-select {
    padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px;
    background: #fff; font-size: 0.85rem; cursor: pointer;
}
.filter-count {
    margin-left: auto; font-size: 0.8rem; color: var(--ink-3);
}
#products-grid { transition: opacity 0.15s; }

/* ---- AI-augmented search banner (search.html) ---- */
#ai-suggest { margin: 12px 0 18px; }
.ai-suggest-header {
    display: flex; align-items: stretch; gap: 10px;
    background: #fff8f0;
    border-left: 3px solid var(--orange);
    padding: 12px 16px;
    border-radius: 0 6px 6px 0;
    font-size: 0.92rem;
    color: var(--ink);
    margin-bottom: 12px;
    line-height: 1.45;
}
.ai-suggest-header .ti {
    color: var(--orange);
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}
#ai-suggest-grid:empty { display: none; }
#ai-suggest-grid { transition: opacity 0.15s; }
#ai-suggest-pagination { margin-top: 16px; }
#ai-suggest-pagination:empty { display: none; }
#ai-suggest-action {
    margin-top: 14px;
    text-align: center;
}
#ai-suggest-action[hidden] { display: none; }
#ai-suggest-action .btn-ai-open {
    background: var(--orange); color: #fff;
    border: 0; padding: 10px 18px; border-radius: 8px;
    cursor: pointer; font-size: 0.9rem; font-weight: 500;
    display: inline-flex; align-items: center; gap: 6px;
}
#ai-suggest-action .btn-ai-open:hover { background: var(--orange-d); }

/* ---- Search page: compact dark filter bar + empty state ---- */
.search-filter-bar {
    background: #1a2535;
    color: #c0c8d0;
    border-radius: 6px;
    padding: 8px 12px;
    margin: 12px 0 16px;
}
.search-filter-form {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    font-size: 0.85rem;
}
.search-filter-form select,
.search-filter-form input[type="number"] {
    background: #2a3a4a; color: #fff;
    border: 1px solid #2a3a4a; border-radius: 4px;
    padding: 5px 8px; font-size: 0.82rem;
    font-family: inherit; outline: none;
}
.search-filter-form select:hover,
.search-filter-form input[type="number"]:hover { border-color: var(--orange); }
.search-filter-form input.sf-price { width: 70px; text-align: center; }
.search-filter-form .sf-dash { color: #6b7785; }
.search-filter-form .sf-stock {
    display: flex; align-items: center; gap: 5px;
    cursor: pointer; user-select: none;
    padding: 4px 6px;
}
.search-filter-form .sf-stock input { accent-color: var(--orange); }
.search-filter-form .sf-stock .ti { color: #9ca3af; font-size: 14px; }
.search-filter-form .sf-stock input:checked ~ .ti { color: var(--orange); }
.search-filter-form .sf-brand { margin-left: auto; min-width: 140px; }
.search-filter-form .sf-apply {
    background: var(--orange); color: #fff; border: 0;
    padding: 5px 12px; border-radius: 4px; cursor: pointer;
    font: inherit; font-size: 0.82rem;
}

.search-loader {
    margin: 48px auto;
    text-align: center;
    color: var(--ink-2);
    font-size: 0.95rem; font-weight: 500;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.search-loader[hidden] { display: none; }
.search-loader-svg {
    width: 220px; height: 180px;
    filter: drop-shadow(0 0 6px rgba(232,123,36,0.0));
    animation: sl-glow 2.5s ease-in-out infinite;
}
@keyframes sl-glow {
    0%, 100% { filter: drop-shadow(0 0 2px rgba(232,123,36,0.2)); }
    50%      { filter: drop-shadow(0 0 10px rgba(232,123,36,0.55)); }
}
.search-loader-svg .sl-dots circle {
    opacity: 0.25;
    transform-box: fill-box;
    transform-origin: center;
    animation: sl-dot 1.8s ease-in-out infinite;
}
.search-loader-svg .sl-dots circle:nth-of-type(1) { animation-delay: 0.00s; }
.search-loader-svg .sl-dots circle:nth-of-type(2) { animation-delay: 0.12s; }
.search-loader-svg .sl-dots circle:nth-of-type(3) { animation-delay: 0.24s; }
.search-loader-svg .sl-dots circle:nth-of-type(4) { animation-delay: 0.36s; }
.search-loader-svg .sl-dots circle:nth-of-type(5) { animation-delay: 0.48s; }
.search-loader-svg .sl-dots circle:nth-of-type(6) { animation-delay: 0.60s; }
.search-loader-svg .sl-dots circle:nth-of-type(7) { animation-delay: 0.72s; }
.search-loader-svg .sl-dots circle:nth-of-type(8) { animation-delay: 0.84s; }
@keyframes sl-dot {
    0%, 100% { opacity: 0.25; transform: scale(0.8); }
    50%      { opacity: 1;    transform: scale(1.15); }
}
.search-loader-svg .sl-lines line {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    opacity: 0;
    animation: sl-line 1.8s ease-in-out infinite;
}
.search-loader-svg .sl-lines line:nth-of-type(1) { animation-delay: 0.08s; }
.search-loader-svg .sl-lines line:nth-of-type(2) { animation-delay: 0.20s; }
.search-loader-svg .sl-lines line:nth-of-type(3) { animation-delay: 0.32s; }
.search-loader-svg .sl-lines line:nth-of-type(4) { animation-delay: 0.44s; }
.search-loader-svg .sl-lines line:nth-of-type(5) { animation-delay: 0.56s; }
.search-loader-svg .sl-lines line:nth-of-type(6) { animation-delay: 0.68s; }
.search-loader-svg .sl-lines line:nth-of-type(7) { animation-delay: 0.80s; }
.search-loader-svg .sl-lines line:nth-of-type(8) { animation-delay: 0.92s; }
.search-loader-svg .sl-lines line:nth-of-type(9) { animation-delay: 1.04s; }
.search-loader-svg .sl-lines line:nth-of-type(10){ animation-delay: 1.16s; }
@keyframes sl-line {
    0%        { stroke-dashoffset: 30; opacity: 0; }
    30%, 70%  { stroke-dashoffset: 0;  opacity: 0.7; }
    100%      { stroke-dashoffset: 30; opacity: 0; }
}
.search-empty[hidden] { display: none; }
.search-empty {
    margin: 40px auto;
    max-width: 480px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 40px 24px;
    color: var(--ink-2);
}
.search-empty > .ti {
    font-size: 56px; color: var(--ink-3); display: block;
    margin-bottom: 14px; line-height: 1;
}
.search-empty-title {
    font-size: 1.1rem; font-weight: 500;
    color: var(--ink); margin-bottom: 10px;
}
.search-empty-hint {
    font-size: 0.85rem; color: var(--ink-3);
    line-height: 1.5; margin-bottom: 20px;
}
.search-empty .btn-ai-open {
    background: var(--orange); color: #fff;
    border: 0; padding: 10px 18px;
    border-radius: 8px; cursor: pointer;
    font: inherit; font-size: 0.9rem; font-weight: 500;
    display: inline-flex; align-items: center; gap: 6px;
    transition: background 0.15s;
}
.search-empty .btn-ai-open:hover { background: var(--orange-d); }
.search-empty .btn-ai-open .ti { font-size: 18px; }

/* ---- AI consultant floating chat widget ---- */
@keyframes ai-btn-float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-5px); }
}
/* ─────────────────────────────────────────────────────────────
   ORB BUTTON — shared 3-D sphere (AI chat + cart)
   .orb-wrap   = outer wrapper: shadow here, clip-path NOT here → shadow survives
   .orb-sphere = inner sphere: clip-path:circle(50%) → crisp edge
───────────────────────────────────────────────────────────── */
.orb-wrap {
    border-radius: 50%;
    background: #c75f18;
    box-shadow: 0 14px 26px rgba(0,0,0,.40),
                0 8px 12px rgba(0,0,0,.28);
    animation: ai-btn-float 6s ease-in-out infinite;
    will-change: transform;
    transition: transform 0.25s, box-shadow 0.25s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}
.orb-wrap:hover {
    animation: none;
    transform: translateY(-8px);
    box-shadow: 0 20px 36px rgba(0,0,0,.45),
                0 10px 16px rgba(0,0,0,.30);
}
.orb-sphere {
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 32% 28%, #ffb066 0%, #f08a30 38%, #e87a2e 62%, #c75f18 100%);
    color: #fff;
    border: 0; border-radius: 50%;
    -webkit-appearance: none; appearance: none;
    outline: none; padding: 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    box-shadow: inset 0 -6px 12px rgba(0,0,0,.25);
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    clip-path: circle(50%);
    position: relative;
}
.orb-sphere::before {
    content: '';
    position: absolute;
    top: 7px; left: 9px;
    width: 22px; height: 13px;
    background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 100%);
    border-radius: 50%;
    pointer-events: none;
}
/* Icons inside orb — drop-shadow follows icon outline (not box), gives depth */
.orb-sphere svg,
.orb-sphere .ti {
    filter: drop-shadow(0 -1px 1px rgba(255,255,255,.40))
            drop-shadow(0 2px 4px rgba(0,0,0,.40));
}
/* AI chat button — position + size only (appearance from .orb-wrap/.orb-sphere) */
#ai-chat-btn {
    position: fixed; bottom: 24px; right: 24px;
    width: 60px; height: 60px;
    z-index: 9998;
}
#ai-chat-btn .ai-chat-sphere { width: 60px; height: 60px; font-size: 26px; }
#ai-chat-btn .ti { line-height: 1; position: relative; }
#ai-chat-btn.ai-chat-btn-hidden { display: none !important; }

#ai-chat-window {
    position: fixed; bottom: 90px; right: 24px;
    width: 380px; height: 520px; max-height: calc(100vh - 110px);
    background: #2a3a4a;
    border-radius: 16px; border: 1px solid #0f1923;
    box-shadow: 0 8px 40px rgba(0,0,0,0.35);
    z-index: 9999;
    display: flex; flex-direction: column;
    overflow: visible;
    color: #e8e8e8;
    will-change: transform;
}
#ai-chat-window[hidden] { display: none; }

/* Avatar floats above the window's top-left corner */
.ai-avatar-float {
    position: absolute;
    top: -50px;
    left: 16px;
    z-index: 10000;
}
.ai-avatar-float img {
    width: 90px; height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: none !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    background: #2a3a4a;
    display: block;
}

/* AI avatar — subtle "alive" animation: breathe + micro-sway + rare blink */
@keyframes ai-avatar-breathe {
    0%, 100% { transform: scale(1)    rotate(0deg); }
    40%       { transform: scale(1.02) rotate(0.4deg); }
    60%       { transform: scale(1.02) rotate(-0.3deg); }
}
.ai-avatar-float img {
    animation:
        ai-avatar-breathe 8s ease-in-out infinite;
    transform-origin: center 90%;
    will-change: transform;
}
@media (prefers-reduced-motion: reduce) {
    .ai-avatar-float img { animation: none; }
}

.ai-chat-header {
    background: #0f1923; color: #fff;
    padding: 14px 40px;
    border-radius: 16px 16px 0 0;
    display: flex; align-items: center;
    position: relative;
    min-height: 60px;
    font-size: 0.95rem;
    cursor: move;
    user-select: none;
}
.ai-header-info {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; align-items: center;
    gap: 2px;
}
.ai-header-name {
    font-weight: 500;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 100%;
}
.ai-header-status {
    font-size: 0.78rem; color: #9ca3af;
    display: flex; align-items: center; gap: 5px;
    white-space: nowrap;
}
.ai-status-dot {
    width: 7px; height: 7px;
    background: #22c55e; border-radius: 50%;
    animation: ai-pulse-dot 2s infinite;
    flex-shrink: 0;
}
@keyframes ai-pulse-dot {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}
.ai-chat-close {
    position: absolute; top: 8px; right: 10px;
    background: transparent; border: 0; color: #fff;
    cursor: pointer; font-size: 18px; line-height: 1; padding: 4px;
    border-radius: 4px;
}
.ai-chat-close:hover { background: rgba(255,255,255,0.1); }
.ai-chat-resize {
    position: absolute; bottom: 4px; right: 4px;
    width: 14px; height: 14px;
    cursor: nwse-resize;
    background:
      linear-gradient(135deg, transparent 0 60%, #6b7785 60% 70%, transparent 70% 80%, #6b7785 80% 90%, transparent 90% 100%);
    border-bottom-right-radius: 12px;
    z-index: 10001;
}
.ai-chat-resize-sw {
    position: absolute; bottom: 0; left: 0;
    width: 14px; height: 14px;
    cursor: nesw-resize;
    background: transparent;
    z-index: 10001;
}
.ai-chat-header :is(button, a) { cursor: pointer; }

#ai-chat-messages {
    flex: 1; overflow-y: auto; padding: 12px;
    display: flex; flex-direction: column; gap: 10px;
    background: #2a3a4a;
}
.ai-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    max-width: 100%;
}
.ai-row.bot  { align-self: flex-start; max-width: 85%; }
.ai-row.user { align-self: flex-end; justify-content: flex-end; max-width: 80%; }
.ai-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f2f5;
    flex-shrink: 0;
    margin-bottom: 2px;
}
.ai-msg {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.85rem; line-height: 1.5;
    overflow-wrap: break-word;
    word-break: normal;
    white-space: normal;
    /* Cap done at .ai-row level (max-width:80/85%). Bubble fills row, breaks only on long unbreakable strings */
    max-width: 100%;
    min-width: 0;
}
.ai-msg.bot {
    background: #354555; color: #e8e8e8;
    border-bottom-left-radius: 4px;
}
.ai-msg.user {
    background: var(--orange); color: #fff;
    border-bottom-right-radius: 4px;
}
.ai-msg .ai-products {
    display: flex; flex-direction: column; gap: 6px; margin-top: 10px;
}
.ai-product-card {
    display: flex; align-items: center; gap: 8px;
    white-space: nowrap; min-width: 120px;
    padding: 6px 8px;
    background: #fff;
    border: 1px solid var(--line); border-radius: 8px;
    text-decoration: none; color: var(--ink);
    font-size: 0.78rem;
    transition: border-color 0.15s;
}
.ai-product-card:hover { border-color: var(--orange); }
.ai-product-card img {
    width: 40px; height: 40px; flex-shrink: 0;
    object-fit: contain; border-radius: 4px; background: #fafafa;
}
.ai-prod-info { flex: 1; min-width: 0; }
.ai-prod-name { font-weight: 500; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-prod-sku  { font-size: 0.7rem; color: var(--ink-3); margin-top: 2px; }
.ai-prod-price { color: var(--orange); font-weight: 600; margin-left: 4px; white-space: nowrap; }
.ai-prod-stock { color: #2e9c5a; margin-left: 4px; }
.ai-followup {
    margin-top: 8px; padding-top: 8px;
    border-top: 1px dashed rgba(255,255,255,0.15);
    font-style: italic; color: #b0bac5; font-size: 0.8rem;
}

.ai-chat-input-wrap {
    display: flex; align-items: center; padding: 10px 12px;
    border-top: 1px solid #0f1923;
    gap: 8px; background: #1e2d3d;
    border-radius: 0 0 16px 16px;
}
.ai-chat-input-wrap input {
    flex: 1;
    background: #ffffff; color: #1a2535;
    border: 1px solid #0f1923; border-radius: 8px;
    padding: 8px 12px; font-size: 0.85rem; outline: none;
    font-family: inherit;
}
.ai-chat-input-wrap input::placeholder { color: #9ca3af; }
.ai-chat-input-wrap input:focus { border-color: var(--orange); }
.ai-chat-input-wrap button {
    background: var(--orange); color: #fff;
    border: 0; border-radius: 8px; padding: 8px 12px;
    cursor: pointer; font-size: 1rem; line-height: 1;
}
.ai-chat-input-wrap button:hover { background: var(--orange-d); }

.ai-typing {
    display: flex; gap: 4px; padding: 10px 14px;
    background: #354555; border-radius: 12px; border-bottom-left-radius: 4px;
}
.ai-typing span {
    width: 6px; height: 6px; background: #999;
    border-radius: 50%; animation: ai-typing 1s infinite;
}
.ai-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes ai-typing {
    0%, 100% { opacity: 0.3; }
    50%      { opacity: 1; }
}
@media (max-width: 480px) {
    #ai-chat-window {
        width: auto; right: 8px; left: 8px;
        top: 58px !important;   /* аватар -34px → виден с 24px от верха экрана */
        bottom: 80px !important;
        height: auto !important; /* заполняет между top и bottom */
    }
    .ai-avatar-float { top: -34px; left: 12px; }
    .ai-avatar-float img { width: 68px; height: 68px; }
    .ai-chat-header { padding: 14px 36px 14px 94px; }   /* 68 avatar + 12 left + 14 gap */
}

/* ============================================================
   AUTH-DARK — login page, dark theme + animated molecular bg
   ============================================================ */
.auth-dark {
    position: relative;
    min-height: 720px;
    margin: -16px;                   /* break out: #center pad 16px (top/bottom), #container pad 16px (left/right) */
    padding: 48px 16px 64px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f7fa 60%, #eef2f6 100%);
    overflow: hidden;
    display: flex;
    align-items: stretch;        /* pin card to top of 720px container so
                                       Ieiet + register/forgot links stay above
                                       the fold without scrolling */
    justify-content: center;
}
.auth-dark-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}
.auth-dark-bg .ad-net line {
    stroke-dasharray: 240;
    stroke-dashoffset: 240;
    animation: ad-line-draw 12s ease-in-out infinite;
}
.auth-dark-bg .ad-net line:nth-of-type(2n)  { animation-delay: 0.5s; }
.auth-dark-bg .ad-net line:nth-of-type(3n)  { animation-delay: 1.2s; }
.auth-dark-bg .ad-net line:nth-of-type(5n)  { animation-delay: 1.8s; }
.auth-dark-bg .ad-net line:nth-of-type(7n)  { animation-delay: 2.4s; }
@keyframes ad-line-draw {
    0%        { stroke-dashoffset: 240; opacity: 0; }
    20%       { opacity: 0.6; }
    50%       { stroke-dashoffset: 0;   opacity: 0.85; }
    80%       { opacity: 0.6; }
    100%      { stroke-dashoffset: -240; opacity: 0; }
}
.auth-dark-bg .ad-atoms circle {
    transform-box: fill-box;
    transform-origin: center;
    animation: ad-atom-pulse 4s ease-in-out infinite;
}
.auth-dark-bg .ad-atoms circle:nth-of-type(2n) { animation-delay: 0.6s; }
.auth-dark-bg .ad-atoms circle:nth-of-type(3n) { animation-delay: 1.3s; }
.auth-dark-bg .ad-atoms circle:nth-of-type(5n) { animation-delay: 2.0s; }
.auth-dark-bg .ad-atoms circle:nth-of-type(7n) { animation-delay: 2.7s; }
@keyframes ad-atom-pulse {
    0%, 100% { opacity: 0.4;  transform: scale(0.9); }
    50%      { opacity: 0.95; transform: scale(1.25); }
}

.auth-dark-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    background: linear-gradient(180deg, #1a2535 0%, #16202e 100%);
    border: none;
    border-radius: 14px;
    padding: 32px 32px 28px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.75), 0 8px 32px rgba(0,0,0,0.5);
}

.auth-dark-logo {
    display: block; width: 78%; margin: 0 auto 24px;
}
.auth-dark-logo svg { display: block; width: 100%; height: auto; }
.auth-dark-brand { display: flex; flex-direction: column; line-height: 1; }
.auth-dark-brand .adb-name {
    color: #fff;
    font: 800 18px/1 'Arial Black', Inter, sans-serif;
    letter-spacing: 0.5px;
}
.auth-dark-brand .adb-tld { color: var(--orange); }
.auth-dark-brand .adb-tag {
    color: #7ba3c8;
    font: 500 9px/1 Inter, sans-serif;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-top: 5px;
}

.auth-dark-title {
    color: #e87b24;
    font: 700 26px/1.1 Inter, sans-serif;
    margin-bottom: 4px;
}
.auth-dark-sub {
    color: #8a94a3;
    font-size: 13px;
    margin-bottom: 22px;
}

.auth-dark-field.has-error > input,
.auth-dark-field.has-error > select {
    border-color: #d9534f !important;
    box-shadow: 0 0 0 2px rgba(217,83,79,0.25);
}
.auth-field-err {
    display: block;
    color: #ff9ea5;
    font: 500 11px/1.3 Inter, sans-serif;
    margin-top: 4px;
}
.auth-dark-error {
    background: rgba(220, 53, 69, 0.12);
    border: 1px solid rgba(220, 53, 69, 0.35);
    color: #ff9ea5;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
}
.auth-dark-success {
    background: #1a3a2a;
    border: 1px solid rgba(80, 200, 120, 0.35);
    color: #6fcf8e;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 16px;
}

.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    width: 100%;
    background: #fff;
    color: #2f3438;
    border: 0;
    border-radius: 8px;
    padding: 13px 16px;
    font: 600 14px/1 Inter, sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.btn-google:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,0.35); }
.btn-google svg { width: 18px; height: 18px; flex: 0 0 18px; }

.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 22px 0;
    color: #5a6675;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: rgba(255,255,255,0.10);
}

.auth-dark-form { display: flex; flex-direction: column; gap: 14px; }
.auth-dark-field { display: flex; flex-direction: column; gap: 6px; }
.auth-dark-field > span {
    font: 600 11px/1 Inter, sans-serif;
    color: #8a94a3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.auth-dark-field input {
    background: #0f1923;
    border: 1px solid rgba(255,255,255,0.10);
    color: #fff;
    border-radius: 8px;
    padding: 12px 14px;
    font: 14px/1.2 Inter, sans-serif;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.auth-dark-field input::placeholder { color: #4f5b6e; }
.auth-dark-field input:focus {
    outline: 0;
    border-color: var(--orange);
    background: #0c151e;
    box-shadow: 0 0 0 3px rgba(232,123,36,0.18);
}

.btn-auth-primary {
    width: 100%;
    background: linear-gradient(180deg, var(--orange) 0%, #d96e1a 100%);
    color: #fff;
    border: 0;
    border-radius: 8px;
    padding: 13px 16px;
    font: 700 14px/1 Inter, sans-serif;
    cursor: pointer;
    margin-top: 4px;
    transition: filter 0.15s ease, transform 0.15s ease;
    box-shadow: 0 6px 18px rgba(232,123,36,0.30);
}
.btn-auth-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }

.auth-dark-note {
    margin-top: 16px;
    padding: 10px 14px;
    background: rgba(123, 163, 200, 0.06);
    border: 1px solid rgba(123, 163, 200, 0.20);
    border-radius: 6px;
    color: #7ba3c8;
    font-size: 12px;
    display: flex; align-items: center; gap: 8px;
    white-space: nowrap; min-width: 120px;
}
.auth-dark-note .ti { font-size: 16px; flex: 0 0 16px; }

.auth-dark-links {
    margin-top: 22px;
    text-align: center;
    font-size: 13px;
    color: #5a6675;
}
.auth-dark-links a { color: var(--orange); text-decoration: none; }
.auth-dark-links a:hover { text-decoration: underline; }
.auth-dark-links .adl-sep { margin: 0 6px; color: #3a4456; }

@media (max-width: 480px) {
    .auth-dark { padding: 24px 12px 40px; }
    .auth-dark-card { padding: 24px 22px 22px; }
    .auth-dark-title { font-size: 22px; }
    .auth-dark-logo svg { width: 100%; height: auto; }
}

/* ============================================================
   AUTH — login / register / forgot / change-pass (light cards)
   ============================================================ */
.auth-page {
    max-width: 460px;
    margin: 36px auto;
}
.auth-page h1 {
    font: 700 22px/1.2 Inter, sans-serif;
    color: var(--nav);
    margin-bottom: 16px;
    text-align: center;
}
.auth-form, .search-form-page {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 26px 24px;
    box-shadow: 0 4px 14px rgba(15,25,35,0.06);
}
.auth-form p { margin-bottom: 14px; }
.auth-form label,
.search-row label,
.checkout-form label {
    display: block;
    font: 600 12px/1 Inter, sans-serif;
    color: var(--ink-2);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}
.auth-form input, .auth-form textarea, .auth-form select,
.search-form-page input, .search-form-page select,
.checkout-form input:not([type="radio"]):not([type="checkbox"]), .checkout-form textarea, .checkout-form select,
.cart-table .qty-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--white);
    color: var(--ink);
    font: 14px/1.3 Inter, sans-serif;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.checkout-form input[type="radio"],
.checkout-form input[type="checkbox"] {
    width: auto;
    padding: 0;
    border: none !important;
    background: none;
    box-shadow: none;
}
.auth-form input:focus, .auth-form textarea:focus,
.search-form-page input:focus,
.checkout-form input:focus, .checkout-form textarea:focus, .checkout-form select:focus,
.cart-table .qty-input:focus {
    outline: 0;
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(232,123,36,0.15);
}
.auth-form .btn-buy {
    width: 100%;
    margin-top: 4px;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
}
.auth-form .auth-links {
    margin-top: 14px;
    font-size: 13px;
    text-align: center;
    color: var(--ink-3);
}
.auth-form .auth-links a { color: var(--orange); }
.auth-form .auth-links a:hover { text-decoration: underline; }
.search-row { margin-bottom: 8px; }

/* ============================================================
   FLASH MESSAGES
   ============================================================ */
.flash {
    padding: 12px 16px;
    margin-bottom: 14px;
    font-size: 13px;
    border-radius: 6px;
    border-left: 4px solid;
    background: var(--white);
}
.flash-success { background: #1a3a2a; border-color: #2d8a3f; color: rgba(255,255,255,0.85); }
.flash-error   { background: #3a1a1a; border-color: #d9534f; color: rgba(255,255,255,0.85); }
.flash-info    { background: #1a2535; border-color: #4a7aaa; color: rgba(255,255,255,0.75); }

/* ============================================================
   CART
   ============================================================ */
.cart-form {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(15,25,35,0.06);
    padding: 18px 22px;
    margin-bottom: 14px;
}
.cart-table, .orders-table, .summary-table, .profile-table, .kv-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
}
.cart-table th, .orders-table th {
    background: var(--bg);
    text-align: center;
    padding: 10px 12px;
    border-bottom: 2px solid var(--line);
    font: 600 11px/1 Inter, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--ink-3);
}
.cart-table td, .orders-table td,
.summary-table td, .profile-table td, .kv-table td {
    padding: 12px;
    border-bottom: 1px solid var(--line-2);
    vertical-align: middle;
}
.cart-table .col-img { width: 80px; }
.cart-table .col-img img {
    width: 64px; height: 64px;
    object-fit: contain;
    background: var(--bg);
    border-radius: 6px;
    padding: 4px;
}
.cart-table .col-name a {
    font-weight: 500;
    color: var(--ink);
    line-height: 1.35;
}
.cart-table .col-name a:hover { color: var(--orange); }
.cart-table .col-art code {
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--ink-2);
    font-size: 12px;
}
.cart-table .col-qty { width: 90px; }
.cart-table .qty-input {
    width: 70px;
    padding: 6px 8px;
    text-align: center;
    font-weight: 500;
}
.cart-table .col-actions { width: 44px; text-align: right; }
.btn-link-danger {
    width: 30px; height: 30px;
    display: inline-flex;
    align-items: center; justify-content: center;
    background: var(--bg);
    color: #b04; border: 0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: background 0.15s ease, color 0.15s ease;
}
.btn-link-danger:hover { background: #fdeded; color: #d9534f; }
.cart-total { font-size: 20px; font-weight: 700; color: var(--orange); }
.cart-total-label {
    text-align: right;
    font: 600 13px/1 Inter, sans-serif;
    color: var(--ink-2);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.cart-actions {
    display: flex;
    gap: 10px;
    margin: 16px 0 4px;
    flex-wrap: wrap;
    align-items: center;
}
.cart-actions .btn-buy { margin-left: auto; padding: 10px 22px; font-size: 14px; }
.cart-empty {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(15,25,35,0.06);
    padding: 48px 24px;
    text-align: center;
    margin: 24px auto;
    max-width: 480px;
}
.cart-empty .ti {
    font-size: 56px;
    color: var(--ink-3);
    margin-bottom: 12px;
    display: block;
}
.cart-empty-text {
    font: 500 16px/1.4 Inter, sans-serif;
    color: var(--ink-2);
    margin-bottom: 20px;
}

/* ============================================================
   CART — dark theme override (scoped to .cart-page)
   Palette: #1a2535 card · #7a8fa8 muted · #d9e3ef text · #e87b24 accent
   ============================================================ */
.cart-page { color: #d9e3ef; }
.cart-page h1 { color: #ffffff; }

.cart-page .cart-form,
.cart-page .cart-empty {
    background: linear-gradient(180deg, #1a2535 0%, #16202e 100%);
    border: none;
    box-shadow: 0 12px 40px rgba(0,0,0,0.35);
    color: #d9e3ef;
}
.cart-page .cart-table th {
    background: transparent;
    color: #7a8fa8;
    border-bottom-color: rgba(255,255,255,0.12);
}
.cart-page .cart-table td {
    border-bottom-color: rgba(255,255,255,0.08);
    color: #d9e3ef;
}
.cart-page .cart-table tr:last-child td { border-bottom: 0; }
.cart-page .cart-table .col-img img { background: rgba(255,255,255,0.05); }
.cart-page .cart-table .col-name a { color: #d9e3ef; }
.cart-page .cart-table .col-name a:hover { color: #e87b24; }
.cart-page .cart-table .col-art code {
    background: rgba(255,255,255,0.06);
    color: #c8d4e0;
}
.cart-page .cart-table .qty-input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.15);
    color: #ffffff;
}
.cart-page .cart-table .qty-input:focus {
    border-color: #e87b24;
    background: rgba(255,255,255,0.08);
    outline: 0;
}
.cart-page .cart-total-label { color: #7a8fa8; }
.cart-page .btn-link-danger {
    background: rgba(255,255,255,0.05);
    color: #ff8a99;
}
.cart-page .btn-link-danger:hover {
    background: rgba(255,80,100,0.18);
    color: #ffb0bb;
}
.cart-page .cart-empty .ti { color: #7a8fa8; }
.cart-page .cart-empty-text { color: #c8d4e0; }

.cart-page .btn-secondary {
    background: rgba(255,255,255,0.06);
    color: #d9e3ef;
    border: 1px solid rgba(255,255,255,0.15);
}
.cart-page .btn-secondary:hover {
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.25);
}

/* Delivery estimator (inline-styled in template — override with !important) */
.cart-page .cart-delivery {
    background: rgba(255,255,255,0.03) !important;
    border-color: rgba(255,255,255,0.08) !important;
}
.cart-page .cart-delivery h3 { color: #ffffff !important; }
.cart-page .cart-delivery .dlv-method {
    background: rgba(255,255,255,0.04) !important;
    border-color: rgba(255,255,255,0.12) !important;
    color: #d9e3ef !important;
}
.cart-page .cart-delivery .dlv-method strong { color: #ffffff; }
.cart-page .cart-delivery .dlv-method small { color: #7a8fa8 !important; }
.cart-page .cart-delivery .dlv-quote {
    background: rgba(255,255,255,0.04) !important;
    color: #d9e3ef !important;
}

/* ============================================================
   CHECKOUT
   ============================================================ */
.checkout-grid, .profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
    margin-top: 20px;
}
.checkout-form {
    background: var(--nav);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    padding: 22px;
}
.checkout-form h2 {
    font: 700 14px/1 Inter, sans-serif;
    color: rgba(255,255,255,0.90);
    border-bottom: 2px solid var(--orange);
    padding-bottom: 6px;
    margin: 18px 0 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.checkout-form h2:first-child { margin-top: 0; }
.checkout-form p { margin-bottom: 12px; }
.checkout-form textarea { min-height: 70px; resize: vertical; }
.checkout-summary {
    background: var(--nav);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    padding: 18px;
    position: sticky; top: 14px;
}
.checkout-summary h2 {
    font: 700 14px/1 Inter, sans-serif;
    color: rgba(255,255,255,0.90);
    border-bottom: 2px solid var(--orange);
    padding-bottom: 6px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.summary-table { font-size: 13px; }
.summary-table td { padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,0.07); color: rgba(255,255,255,0.80); }
.summary-table tr.summary-total td {
    border-top: 2px solid var(--orange);
    border-bottom: 0;
    padding-top: 12px;
    font-size: 15px;
    white-space: nowrap;
    vertical-align: middle;
}
.summary-table tr.summary-total td strong:last-child { color: var(--orange); font-size: 17px; white-space: nowrap; }
.checkout-summary a {
    display: inline-block;
    margin-top: 12px;
    color: var(--blue);
    font-size: 13px;
}
.checkout-summary a:hover { color: var(--orange); }

.radio-row {
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid transparent;
    border-radius: 6px;
    margin: 6px 0;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.radio-row:hover { border-color: var(--line); background: #fafbfc; }
.radio-row label { display: flex; align-items: stretch; gap: 10px; cursor: pointer;
    text-transform: none; letter-spacing: 0; font-size: 14px; margin: 0; color: var(--ink); font-weight: 400; }
.radio-row input[type="radio"] {
    accent-color: var(--orange);
    width: 18px; height: 18px;
    margin: 1px 0 0;
    flex: 0 0 18px;
    cursor: pointer;
}
.radio-row strong { font-weight: 600; color: var(--nav); }
.radio-row em { color: var(--orange); font-style: normal; font-weight: 600; font-size: 13px; }
.radio-row small { color: var(--ink-3); font-size: 12px; display: block; margin-top: 3px; }
.radio-row:has(input:checked) {
    background: #fff7f0;
    border-color: var(--orange);
}

/* ============================================================
   ACCOUNT V2 — dark scene · narrow sidebar · cards
   ============================================================ */
.acct2-wrap {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 22px;
    align-items: start;
    margin: -22px -16px 0;
    padding: 22px 16px 32px;
    background: #0f1923;
    min-height: calc(100vh - 64px);
}
@media (max-width: 900px) {
    .acct2-wrap {
        grid-template-columns: 1fr;
        gap: 14px;
        margin: -14px -8px 0;
        padding: 14px 12px 28px;
    }
}

/* Narrow icon-only sidebar */
.acct2-side {
    position: sticky; top: 14px;
    background: #1a2535;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 12px 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.acct2-nav { display: flex; flex-direction: column; gap: 6px; }
.acct2-spacer { flex: 1; min-height: 16px; }
.acct2-link {
    position: relative;
    display: flex; align-items: center; justify-content: center;
    width: 50px; height: 50px;
    border-radius: 12px;
    color: rgba(255,255,255,0.55);
    transition: background 0.15s, color 0.15s, transform 0.15s;
    text-decoration: none;
    margin: 0 auto;
}
.acct2-link .ti { font-size: 24px; line-height: 1; }
.acct2-link:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
    transform: scale(1.05);
}
.acct2-link.active {
    background: transparent;
    color: var(--orange);
    box-shadow: inset 0 0 0 2px var(--orange);
}
.acct2-link.active .ti { color: var(--orange); }

/* Sidebar tooltips removed — `data-tip` attribute dropped from _sidebar.php,
   replaced by native HTML `title` (browser draws tooltip on long hover, never sticks).
   No CSS pseudo-element generation at all → impossible to leak a stray letter. */

/* Badge dot — small orange circle in top-right of icon */
.acct2-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--orange);
    color: #fff;
    font: 700 10px/18px Inter, sans-serif;
    text-align: center;
    border-radius: 9px;
    box-shadow: 0 0 0 2px #1a2535;
    font-style: normal;
}
.acct2-link.active .acct2-dot { box-shadow: 0 0 0 2px #d96e1a; }

.acct2-link-danger:hover { background: rgba(217,83,79,0.20); color: #ff9ea5; }

/* Mobile — sidebar becomes horizontal sticky strip at top */
@media (max-width: 900px) {
    .acct2-side {
        position: sticky; top: 0;
        padding: 8px;
        z-index: 50;
    }
    .acct2-nav { flex-direction: row; gap: 4px; overflow-x: auto; }
    .acct2-spacer { display: none; }
    .acct2-link { width: 44px; height: 44px; flex: 0 0 44px; margin: 0; }
    .acct2-link .ti { font-size: 21px; }
    .acct2-link.active::before { display: none; }
}

/* Main content area */
.acct2-main { animation: a2-fade 0.25s ease both; min-width: 0; }
/* NB: `to { opacity:1 }` only — NO `transform: translateY(0)`. With fill-mode: both,
   a final-keyframe transform would persist after animation and turn the element into
   a containing block for `position: fixed` descendants (breaks .acct2-suggest overlay). */
@keyframes a2-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }
.acct2-h1-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.acct2-h1-row h1 { font: 700 24px/1.2 Inter, sans-serif; color: #fff; margin: 0; }
.acct2-h1-count {
    font: 600 13px/1 Inter, sans-serif;
    color: rgba(255,255,255,0.55);
    background: rgba(255,255,255,0.08);
    padding: 5px 10px;
    border-radius: 12px;
}
.acct2-edit-link {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 5px;
    color: var(--orange);
    font: 500 13px/1 Inter, sans-serif;
    text-decoration: none;
}
.acct2-edit-link:hover { text-decoration: underline; }

/* HERO header (profile page only) — big clickable avatar + name */
.acct2-hero {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 22px 24px;
    background: linear-gradient(135deg, #1a2535 0%, #2a3950 100%);
    border-radius: 14px;
    margin-bottom: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.22);
    position: relative;
    overflow: hidden;
}
.acct2-hero::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(232,123,36,0.20), transparent 70%);
    pointer-events: none;
}
.acct2-hero-av-wrap { position: relative; flex: 0 0 auto; }
.acct2-hero-av {
    width: 100px; height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 3px solid var(--orange);
    box-shadow: 0 6px 22px rgba(232,123,36,0.45);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
    position: relative;
}
.acct2-hero-av:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 26px rgba(232,123,36,0.65);
}
.acct2-hero-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acct2-hero-av > .ti { font-size: 48px; color: rgba(255,255,255,0.6); }
.acct2-hero-av-edit {
    position: absolute;
    bottom: -2px; right: -2px;
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--orange);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.30);
    font-size: 16px;
    transition: transform 0.18s;
}
.acct2-hero-av:hover .acct2-hero-av-edit { transform: scale(1.12); }
.acct2-hero-info { flex: 1 1 auto; min-width: 0; }
.acct2-hero-name {
    font: 700 28px/1.1 Inter, sans-serif;
    color: #fff;
    margin: 0;
    /* `overflow-wrap: anywhere` works cross-browser for unbreakable strings
       (e.g. when name field contains an email like instrumenti@instrumenti.lv).
       `word-break: break-word` alone gets clipped by parent overflow:hidden in FF. */
    overflow-wrap: anywhere;
    word-break: break-word;
    letter-spacing: -0.5px;
}

.acct2-hero-contacts {
    display: flex; flex-direction: column; gap: 4px;
    margin-top: 8px;
}
.acct2-hero-contact {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px;
    color: rgba(255,255,255,0.70);
}
.acct2-hero-contact .ti { color: var(--orange); font-size: 14px; flex-shrink: 0; }
.acct2-hero-contact .acct2-inline { color: rgba(255,255,255,0.70); cursor: pointer; }
.acct2-hero-contact .acct2-inline:hover { color: #fff; }

/* Hero stats — premium mono */
.acct2-hero-stats {
    display: flex; gap: 28px;
    flex: 0 0 auto;
    padding-left: 14px;
    border-left: 1px solid rgba(255,255,255,0.10);
}
.acct2-stat { text-align: center; min-width: 70px; }
.acct2-stat-num {
    font: 700 26px/1 'JetBrains Mono', ui-monospace, monospace;
    color: var(--orange);
    letter-spacing: -1px;
    text-shadow: 0 2px 8px rgba(232,123,36,0.20);
}
.acct2-stat-lbl {
    font: 600 10px/1 Inter, sans-serif;
    color: rgba(255,255,255,0.50);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 6px;
}

/* Full-width Cart card on /account.html — dark theme, between hero and 3-grid */
.acct2-cartcard { margin-bottom: 18px; }
.acct2-cartcard .acct2-card-head { display: flex; align-items: center; justify-content: center; gap: 10px; }
.acct2-cartcard .acct2-card-head .ti { color: var(--orange); }
.acct2-cartcard .acct2-card-head h3 { font-size: 18px; font-weight: 700; text-transform: none; letter-spacing: 0; }
.acct2-cartcard-badge {
    display: inline-block;
    background: var(--orange);
    color: #fff;
    font: 700 11px/1 Inter, sans-serif;
    padding: 3px 9px;
    border-radius: 11px;
    margin-left: 8px;
    vertical-align: middle;
}
.acct2-vat-badge { display: block; margin-top: 2px; }
.acct2-cartcard-ordnum {
    color: rgba(255,255,255,0.70);
    font-weight: 700;
    font-size: 1em;
    letter-spacing: 0;
}
.acct2-cartcard-orderdate {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 13px;
    color: #7ba3c8;
    white-space: nowrap;
}
.acct2-cartcard-actions-left  { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.acct2-cartcard-actions-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.acct2-cartcard-tablewrap {
    overflow-x: auto;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    margin-bottom: 16px;
}
.acct2-cartcard-table {
    width: 100%;
    border-collapse: collapse;
    /* table-layout: fixed → thead column widths match tbody exactly,
       so "ARTIKULS" sits over articles, "CENA" over prices, "KOPĀ" over sums. */
    table-layout: fixed;
    color: rgba(255,255,255,0.92);
    font-size: 14px;
}
.acct2-cartcard-table th {
    text-align: center;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    font: 400 10px/1 Inter, sans-serif;
    color: rgba(255,255,255,0.50);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    background: rgba(255,255,255,0.03);
}
.acct2-cartcard-table th.num { text-align: center; }
.acct2-cartcard-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    vertical-align: middle;
}
.acct2-cartcard-table td.num { text-align: right; white-space: nowrap; }
.acct2-cartcard-table tr:last-child td { border-bottom: 0; }
/* Explicit column widths (with table-layout:fixed) so thead aligns with tbody */
.acct2-cartcard-table .col-img   { width: 88px; }
.acct2-cartcard-table .col-art   { width: 140px; text-align: center; }
.acct2-cartcard-table .col-price { width: 100px; color: rgba(255,255,255,0.75); text-align: center; }
.acct2-cartcard-table .col-qty   { width: 96px; }
.acct2-cartcard-table .col-sum   { width: 120px; text-align: center; }
.acct2-cartcard-table .col-act   { width: 56px; }
/* col-name absorbs remaining space — no fixed width */

.acct2-cartcard-table .col-img img {
    width: 68px; height: 68px;
    object-fit: contain;
    background: #ffffff;                /* white square inside the cell so photos read clearly */
    border-radius: 6px;
    padding: 4px;
    display: block;
}
.acct2-cartcard-table .col-name { overflow: hidden; }
.acct2-cartcard-table .col-name a {
    color: rgba(255,255,255,0.95);
    text-decoration: none;
    font-weight: 400;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.acct2-cartcard-table .col-name a:hover { color: var(--orange); }
.acct2-cartcard-table .col-art code {
    background: rgba(255,255,255,0.06);
    padding: 3px 8px;
    border-radius: 4px;
    color: rgba(255,255,255,0.70);
    font: 500 12px/1 'JetBrains Mono', ui-monospace, monospace;
}
.acct2-cartcard-qty {
    width: 64px;
    padding: 7px 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 6px;
    color: #ffffff;
    text-align: center;
    font: 600 14px/1 'JetBrains Mono', ui-monospace, monospace;
    transition: border-color .15s;
}
.acct2-cartcard-qty:focus {
    border-color: var(--orange);
    background: rgba(255,255,255,0.08);
    outline: 0;
}
.acct2-cartcard-table .col-sum strong { color: var(--orange); font-size: 15px; }
.acct2-cartcard-table td.col-price { text-align: center; }
.acct2-cartcard-table td.col-sum   { text-align: center; }
.acct2-cartcard-table .col-act { width: 50px; text-align: center; vertical-align: middle; }
.acct2-cartcard-remove {
    width: 22px; height: 22px;
    background: transparent;
    border: 1px solid #e74c3c;
    border-radius: 50%;
    color: #e74c3c;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    margin-right: 0;
    transition: background .15s, color .15s, border-color .15s;
}
.acct2-cartcard-remove:hover {
    background: rgba(231,76,60,0.15);
    color: #ff6b6b;
    border-color: #ff6b6b;
}
.acct2-cartcard-remove:disabled { opacity: 0.4; cursor: wait; }

/* Footer: KOPĀ SUMMA + 2 big buttons */
.acct2-cartcard-foot {
    display: flex; flex-wrap: wrap; gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin-top: 4px;
}
.acct2-cartcard-total {
    flex: 0 0 auto;
    display: flex; align-items: baseline; gap: 10px;
    padding: 0;
    background: none;
    border: none !important;
    border-radius: 0;
    box-shadow: none;
}
.acct2-cartcard-total span {
    font: 600 13px/1 Inter, sans-serif;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.acct2-cartcard-total strong {
    font: 700 26px/1 'JetBrains Mono', ui-monospace, monospace;
    color: var(--orange);
    letter-spacing: -0.5px;
}
.acct2-cartcard-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.acct2-cartcard-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 24px;
    border-radius: 8px;
    font: 400 14px/1 Inter, sans-serif;
    text-decoration: none;
    transition: background .15s, transform .12s, box-shadow .15s;
    border: 0; cursor: pointer;
    flex: 1 1 auto; min-width: 180px;
}
.cart-action-btn {
    padding: 10px 24px;
    font-size: 14px;
    min-width: 180px;
    text-align: center;
}
.acct2-cartcard-btn .ti { font-size: 18px; }
.acct2-cartcard-btn-primary {
    background: var(--orange);
    color: #fff;
    box-shadow: 0 4px 14px rgba(232,123,36,0.30);
}
.acct2-cartcard-btn-primary:hover {
    background: #d36a18;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(232,123,36,0.40);
}
.acct2-cartcard-btn-secondary {
    background: transparent;
    color: #7ba3c8;
    border: 1px solid #7ba3c8;
}
.acct2-cartcard-btn-secondary:hover {
    background: rgba(123,163,200,0.10);
    border-color: #adc4d8;
    color: #adc4d8;
}
/* Compact modifier for print + other small buttons inside actions-right */
.acct2-cartcard-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    min-width: 0;
    flex: 0 0 auto;
}
/* Ghost btns in left action group — compact */
.acct2-cartcard-actions-left .acct2-cartcard-btn-secondary {
    padding: 6px 16px;
    font-size: 13px;
    min-width: 0;
    flex: 0 0 auto;
}

/* Empty state */
.acct2-cartcard-empty {
    display: flex; flex-direction: column; align-items: center; gap: 14px;
    padding: 48px 24px;
    text-align: center;
}
.acct2-cartcard-empty .ti {
    font-size: 56px;
    color: rgba(255,255,255,0.25);
}
.acct2-cartcard-empty p {
    font: 500 16px/1.4 Inter, sans-serif;
    color: rgba(255,255,255,0.55);
    margin: 0;
}

@media (max-width: 768px) {
    .acct2-cartcard-table .col-art,
    .acct2-cartcard-table .col-price { display: none; }
    .acct2-cartcard-foot { flex-direction: column; align-items: stretch; }
    .acct2-cartcard-actions-left  { flex-direction: column; align-items: stretch; }
    .acct2-cartcard-actions-right { flex-direction: column; align-items: stretch; }
    .acct2-cartcard-btn { width: 100%; }
}

/* Toggle inside Company card head */
.acct2-toggle {
    margin-left: auto;
    display: inline-flex;
    background: rgba(255,255,255,0.05);
    border: none;
    border-radius: 8px;
    padding: 3px;
    gap: 0;
}
.acct2-toggle-opt {
    display: inline-flex; align-items: center; gap: 5px;
    border: 0; background: transparent;
    color: rgba(255,255,255,0.55);
    font: 600 11px/1 Inter, sans-serif;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.acct2-toggle-opt .ti { font-size: 13px; }
.acct2-toggle-opt:hover { color: #fff; }
.acct2-toggle-opt.active { background: var(--orange); color: #fff; }
/* account-type-tabs: underline tab style */
.account-type-tabs { display: flex; justify-content: center; width: 100%; padding-bottom: 7px; }
.account-type-tabs .acct2-toggle-opt { background: transparent; color: #7ba3c8; border: none !important; border-bottom: 2px solid transparent; padding: 4px 12px; font-size: 13px; display: inline-flex; align-items: center; cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.account-type-tabs .acct2-toggle-opt:hover { color: #cbd8e4; }
.account-type-tabs .acct2-toggle-opt.active { color: #e87a1e; border-bottom-color: #e87a1e; }
/* Header alignment: block 1 kv aligned with block 2 tab-header */
.acct2-grid-3 > :nth-child(1) .acct2-kv { padding-top: 13px; }
/* Uniform row spacing across all three grid cards */
.acct2-grid-3 .acct2-kv { gap: 9px; }
.acct2-grid-3 .acct2-kv-row { gap: 4px; padding-bottom: 7px; }
.acct2-grid-3 .acct2-kv-row:last-child { padding-bottom: 0; }
@media (max-width: 600px) {
    .acct2-hero { flex-direction: column; text-align: center; padding: 22px 16px; }
    .acct2-hero-info { width: 100%; }
    .acct2-hero-email + .acct2-hero-email { margin-left: 0; display: flex; justify-content: center; }
}

/* Cards grid */
.acct2-grid { display: grid; gap: 16px; }
.acct2-grid-3 { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
@media (max-width: 980px) { .acct2-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 680px) { .acct2-grid-3 { grid-template-columns: 1fr; } }
.acct2-grid-2 { grid-template-columns: repeat(2, 1fr); align-items: stretch; }
@media (max-width: 680px) { .acct2-grid-2 { grid-template-columns: 1fr; } }

.acct2-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.18s ease, transform 0.18s ease;
    animation: a2-up 0.35s cubic-bezier(0.22,1,0.36,1) both;
}
.acct2-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); }

/* Dark card variant for dark account scene */
.acct2-card-dark {
    background: #1a2535;
    border: 1px solid rgba(255,255,255,0.06);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.20);
    display: flex;
    flex-direction: column;
}
.acct2-card-dark:hover { box-shadow: 0 8px 28px rgba(0,0,0,0.32); }
.acct2-card-dark .acct2-card-head h3 { color: #fff; }
.acct2-card-dark .acct2-card-head .ti { color: var(--orange); }
.acct2-card-dark .acct2-kv-row { border-bottom-color: rgba(255,255,255,0.06); }
.acct2-card-dark .acct2-kv-k { color: #7ba3c8; font-size: 11px; }
.acct2-card-dark .acct2-kv-v { color: #fff; }
.acct2-card-dark .acct2-kv-ph { color: rgba(255,255,255,0.30); font-weight: 400; }
.acct2-card-dark .acct2-empty-mini { color: rgba(255,255,255,0.55); }
.acct2-card-dark .acct2-empty-mini .ti { color: rgba(255,255,255,0.40); }
.acct2-card-dark .acct2-empty-mini p { color: rgba(255,255,255,0.70); }
.acct2-card-dark .acct2-addr-line { color: rgba(255,255,255,0.85); }
.acct2-card-dark .acct2-addr-country { color: rgba(255,255,255,0.50); }
.acct2-card-dark .acct2-addr-recipient { color: #fff; }

/* Inline-edit fields */
.acct2-inline {
    cursor: text;
    outline: 0;
    padding: 3px 6px;
    margin: -3px -6px;
    border-radius: 5px;
    transition: background 0.15s, box-shadow 0.15s;
    min-height: 1.2em;
}
.acct2-inline:hover { background: rgba(255,255,255,0.04); }
.acct2-inline:focus, .acct2-inline.editing {
    background: rgba(255,255,255,0.06);
    box-shadow: inset 0 0 0 1px var(--orange);
}
.acct2-inline.saving { box-shadow: inset 0 0 0 1px var(--orange); animation: a2-edit-pulse 1.2s ease-in-out infinite; }
.acct2-inline.saved  { box-shadow: inset 0 0 0 1px var(--green); background: rgba(46,156,90,0.10); }
.acct2-inline.failed { box-shadow: inset 0 0 0 1px #ef4444; background: rgba(239,68,68,0.10); }
@keyframes a2-edit-pulse { 0%,100% { background: rgba(232,123,36,0.06); } 50% { background: rgba(232,123,36,0.16); } }

.acct2-validate.validating { box-shadow: inset 0 0 0 1px var(--orange); }
.acct2-validate.valid     { box-shadow: inset 0 0 0 1px #10b981; background: rgba(16,185,129,0.10); }
.acct2-validate.invalid   { box-shadow: inset 0 0 0 1px #ef4444; background: rgba(239,68,68,0.10); }
.acct2-card-wide { padding: 18px 22px; }
/* See note on a2-fade — same trap: final-keyframe `transform: translateY(0)` makes the
   animated element a containing block for `position: fixed`, breaking the overlay. */
@keyframes a2-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; } }

.acct2-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.acct2-card-head .ti { color: var(--orange); font-size: 18px; }
.acct2-card-head h3 {
    font: 700 13px/1 Inter, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--nav);
    margin: 0;
}
.acct2-card-link { margin-left: auto; color: var(--orange); font: 500 13px/1 Inter, sans-serif; text-decoration: none; }
.acct2-card-link:hover { text-decoration: underline; }

.acct2-kv { display: flex; flex-direction: column; gap: 9px; }
.acct2-kv-row { display: flex; flex-direction: column; gap: 2px; padding-bottom: 8px; border-bottom: 1px solid var(--line-2); }
.acct2-kv-row:last-child { border-bottom: 0; padding-bottom: 0; }
.acct2-kv-k {
    font: 600 10px/1 Inter, sans-serif;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.acct2-kv-v { color: var(--ink); font-size: 14px; overflow-wrap: anywhere; word-break: break-word; min-width: 0; }

.acct2-empty-mini { text-align: center; padding: 12px 0 4px; color: var(--ink-3); }

/* Company-name autocomplete dropdown (pi_lv_companies search) — Variant A.
   ── Stacking strategy ──
   All .acct2-card siblings get baseline position:relative + z-index:1 so their
   stacks are explicitly equal — no implicit ordering from animation-layers.
   The UZŅĒMUMS card boosts to z-index:100 ONLY while dropdown is visible
   (:has + :not([hidden])), so it sits above sibling cards (Pēdējie pasūtījumi etc).
   Inside that card the dropdown's z-index:9999 is local — wins easily over card body. */
.acct2-card { position: relative; z-index: 1; }
.acct2-card.acct2-card-dark:has(.acct2-suggest)          { overflow: visible !important; }
.acct2-card.acct2-card-dark:has(.acct2-suggest:not([hidden])) { z-index: 100; }
.acct2-kv-row.acct2-kv-row-suggest { position: relative; }
.acct2-suggest {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    padding: 4px 0;
    list-style: none;
    background: #1a2535;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.45);
    max-height: 480px;
    overflow-y: auto;
    z-index: 9999 !important;
}
.acct2-suggest[hidden] { display: none; }
.acct2-suggest-item {
    padding: 8px 12px; cursor: pointer;
    display: flex; flex-direction: column; gap: 2px;
    border-left: 2px solid transparent;
}
.acct2-suggest-item:hover { background: rgba(232,123,36,0.10); border-left-color: var(--orange); }
.acct2-suggest-item .as-name { color: #fff; font: 500 13px/1.3 Inter, sans-serif; }
.acct2-suggest-item .as-meta { color: rgba(255,255,255,0.5); font: 400 11px/1.3 Inter, sans-serif; }
.acct2-suggest-item.is-terminated .as-name { color: rgba(255,255,255,0.45); text-decoration: line-through; }
.acct2-suggest-item.is-terminated .as-meta::after { content: ' · LIK'; color: #e07070; }
.acct2-empty-mini .ti { font-size: 32px; color: var(--ink-3); display: block; margin-bottom: 6px; }
.acct2-empty-mini p { font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.acct2-link-orange { color: var(--orange); font: 500 13px/1 Inter, sans-serif; text-decoration: none; }
.acct2-link-orange:hover { text-decoration: underline; }

.acct2-addr-block { font-size: 14px; color: var(--ink); line-height: 1.5; }
.acct2-addr-recipient { font-weight: 600; margin-bottom: 4px; }
.acct2-addr-line { color: var(--ink-2); }
.acct2-addr-country { color: var(--ink-3); font-size: 12px; }
.acct2-addr-phone { margin-top: 8px; color: var(--ink-2); font-size: 13px; display: flex; align-items: center; gap: 4px; }
.acct2-addr-phone .ti { color: var(--orange); }

/* Recent orders strip on profile */
.acct2-recent-list { display: flex; flex-direction: column; gap: 0; }
.acct2-recent-row { display: flex; align-items: center; }
.acct2-recent-row > .acct2-recent-item { flex: 1; min-width: 0; }
.acct2-recent-row > form { flex: 0 0 auto; padding-left: 8px; }
.acct2-recent-row.deleting { opacity: 0; transform: translateX(30px); transition: opacity 1.8s ease, transform 1.8s ease; }
.acct2-recent-item {
    display: grid;
    background: #1a2235;
    grid-template-columns: 120px 1fr 110px 16px;
    align-items: center;
    gap: 14px;
    padding: 12px;

    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s;
}
.acct2-recent-item { border-bottom: 1px solid rgba(255,255,255,0.1); }
.acct2-recent-item:hover { background: #243048; }
.acct2-recent-item .ti { color: var(--ink-3); }
.acct2-recent-num { font-weight: 700; color: #c0c8d0; }
.acct2-recent-date { font-size: 13px; color: #8a94a3; }
.acct2-recent-status { margin-top: 4px; }
.acct2-recent-total { font-weight: 700; color: var(--orange); text-align: right; }

/* Mobile: keep the order total inside the card. The desktop grid uses fixed
   120px/110px columns that don't shrink, so on ~390-412px screens the total
   overflows the right edge and gets clipped. Let num/date flex + ellipsis and
   size the total to its content so it never overflows. */
@media (max-width: 480px) {
    .acct2-recent-item {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto 14px;
        gap: 8px;
        padding: 10px;
    }
    .acct2-recent-num {
        min-width: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 13px;
    }
    .acct2-recent-info { min-width: 0; }
    .acct2-recent-date {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 12px;
    }
    .acct2-recent-total {
        min-width: 0;
        white-space: nowrap;
        text-align: right;
        font-size: 13px;
    }
}

/* Order cards */
.acct2-chips { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.acct2-chip {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.70);
    padding: 7px 14px;
    border-radius: 20px;
    font: 500 13px/1 Inter, sans-serif;
    text-decoration: none;
    transition: all 0.15s;
}
.acct2-chip:hover { border-color: var(--orange); color: var(--orange); background: rgba(232,123,36,0.10); }
.acct2-chip.active { background: var(--orange); color: #fff; border-color: var(--orange); box-shadow: 0 4px 12px rgba(232,123,36,0.30); }

.acct2-orders {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}
.acct2-order {
    display: block;
    background: #1a2235 !important;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 18px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    transition: box-shadow 0.18s, transform 0.18s, border-color 0.18s;
    animation: a2-up 0.35s cubic-bezier(0.22,1,0.36,1) both;
}
.acct2-order:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    border-color: var(--orange);
}
.acct2-order-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.acct2-order-num {
    white-space: nowrap;
    font: 700 16px/1 Inter, sans-serif;
    color: var(--nav);
    display: flex; align-items: center; gap: 8px;
    white-space: nowrap; min-width: 150px; flex-shrink: 0; overflow: hidden; word-break: keep-all;
}
.acct2-order-hash { color: var(--ink-3); }
.acct2-order-date { color: var(--ink-3); font-size: 12px; }
.acct2-order-thumbs {
    display: flex; gap: 6px;
    margin-bottom: 14px;
    flex-wrap: nowrap;
    overflow: hidden;
}
.acct2-thumb {
    width: 52px; height: 52px;
    border-radius: 8px;
    background: var(--bg);
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 52px;
}
.acct2-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.acct2-thumb .ti { color: var(--ink-3); font-size: 22px; }
.acct2-thumb-more {
    width: 52px; height: 52px;
    border-radius: 8px;
    background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-2);
    font: 600 13px/1 Inter, sans-serif;
    flex: 0 0 52px;
}
.acct2-mini-tl { display: flex; gap: 6px; margin-bottom: 14px; }
.acct2-tldot {
    flex: 1;
    height: 4px;
    background: var(--line);
    border-radius: 2px;
}
.acct2-tldot.done { background: var(--green); }
.acct2-tldot.current { background: var(--orange); box-shadow: 0 0 6px rgba(232,123,36,0.5); }
.acct2-order-foot {
    display: flex; align-items: center; gap: 10px;
    border-top: 1px solid var(--line-2);
    padding-top: 12px;
    font-size: 13px;
}
.acct2-order-items { color: var(--ink-3); }
.acct2-order-total { margin-left: auto; font: 700 16px/1 Inter, sans-serif; color: var(--orange); }
.acct2-order-cta {
    color: var(--orange);
    font-weight: 500;
    display: inline-flex; align-items: center; gap: 4px;
}
.acct2-order-cta .ti { transition: transform 0.18s; }
.acct2-order:hover .acct2-order-cta .ti { transform: translateX(3px); }

.acct2-pages { margin-top: 20px; text-align: center; }

/* Empty state full card */
.acct2-empty {
    text-align: center;
    padding: 56px 24px;
}
.acct2-empty > .ti {
    font-size: 56px;
    color: var(--ink-3);
    display: block;
    margin-bottom: 14px;
}
.acct2-empty h2 { font: 700 18px/1 Inter, sans-serif; color: var(--nav); margin-bottom: 8px; }
.acct2-empty p { color: var(--ink-2); margin-bottom: 16px; font-size: 14px; }

/* Address cards (Visa-style) */
.acct2-addr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.acct2-addr-card {
    position: relative;
    background: linear-gradient(135deg, #1a2535 0%, #2a3950 100%);
    color: #fff;
    border-radius: 14px;
    padding: 18px 18px 56px;
    min-height: 180px;
    box-shadow: 0 4px 14px rgba(15,25,35,0.18);
    transition: transform 0.18s, box-shadow 0.18s;
    animation: a2-up 0.35s cubic-bezier(0.22,1,0.36,1) both;
    overflow: hidden;
}
.acct2-addr-card::after {
    content: '';
    position: absolute; right: -40px; top: -40px;
    width: 140px; height: 140px;
    background: radial-gradient(circle, rgba(232,123,36,0.30), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.acct2-addr-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(15,25,35,0.30);
}
.acct2-addr-card.is-default {
    background: linear-gradient(135deg, #e87b24 0%, #d96e1a 100%);
}
.acct2-addr-badge {
    /* Moved from top-right (collided with pencil edit button) to bottom-right.
       Primary card layout: pencil (TR) · badge (BR) · trash (BL).
       Non-primary:        pencil (TR) · star+trash (BL grouped). */
    position: absolute; bottom: 12px; right: 12px;
    background: rgba(255,255,255,0.20);
    color: #fff;
    padding: 3px 9px;
    border-radius: 10px;
    font: 700 10px/1 Inter, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex; align-items: center; gap: 4px;
}
.acct2-addr-badge .ti { font-size: 12px; }
.acct2-addr-card-label {
    font: 600 11px/1 Inter, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: rgba(255,255,255,0.65);
    margin-bottom: 10px;
}
.acct2-addr-card .acct2-addr-recipient { color: #fff; font: 700 16px/1.2 Inter, sans-serif; margin-bottom: 4px; }
.acct2-addr-card .acct2-addr-line { color: rgba(255,255,255,0.85); font-size: 13px; line-height: 1.45; }
.acct2-addr-card .acct2-addr-country { color: rgba(255,255,255,0.55); }
.acct2-addr-card .acct2-addr-phone { color: rgba(255,255,255,0.75); }
.acct2-addr-card .acct2-addr-phone .ti { color: rgba(255,255,255,0.85); }
.acct2-addr-actions {
    position: absolute;
    bottom: 12px;
    left: 16px;
    display: flex; gap: 6px;
    z-index: 1;
}
.acct2-addr-btn {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.20);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: background 0.15s;
}
.acct2-addr-btn:hover { background: rgba(255,255,255,0.20); }
.acct2-addr-btn-danger:hover { background: #d9534f; border-color: #d9534f; }

/* INSTRUMENTI.LV molecule watermark — right side of address card. */
.acct2-addr-card { overflow: hidden; }
.acct2-addr-card::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    width: 90px;
    height: 90px;
    background: url('/favicon.svg') center / contain no-repeat;
    opacity: 0.10;
    pointer-events: none;
    z-index: 0;
}
/* Primary card has orange gradient bg → original SVG (#e87b24 fill) becomes invisible.
   Switch to `mask` mode: SVG defines shape only, background-color is tinted-white.
   No `> *` rule, no isolation — children's position:absolute stays intact. */
.acct2-addr-card.is-default::before {
    background: rgba(255,255,255,0.30);
    -webkit-mask: url('/favicon.svg') center / contain no-repeat;
            mask: url('/favicon.svg') center / contain no-repeat;
    opacity: 1;
}

/* Compact outline button — replaces the legacy giant dashed-tile "add address" card */
.acct2-addr-add-btn {
    display: inline-flex; align-items: center; gap: 6px;
    height: 40px; padding: 0 18px;
    background: transparent;
    border: 1px dashed #e87b24;
    border-radius: 8px;
    color: #e87b24;
    font: 600 13px/1 Inter, sans-serif;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.acct2-addr-add-btn .ti { font-size: 16px; }
.acct2-addr-add-btn:hover { background: rgba(232,123,36,0.10); }

/* Pencil edit button — top-right of each address card */
.acct2-addr-card { position: relative; }
.acct2-addr-edit {
    position: absolute; top: 10px; right: 10px;
    width: 30px; height: 30px;
    background: rgba(255,255,255,0.06);
    border: 0; border-radius: 6px;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
}
.acct2-addr-edit:hover { background: rgba(232,123,36,0.20); color: #fff; }
.acct2-addr-edit .ti { font-size: 16px; }

/* Form card — closed by default; shown when "+" clicked or pencil clicked */
.acct2-addr-form-card { max-height: 0; opacity: 0; overflow: hidden; pointer-events: none; margin-top: 0; transition: max-height 0.7s cubic-bezier(0.4,0,0.2,1), opacity 0.5s cubic-bezier(0.4,0,0.2,1), margin-top 0.5s ease; }
.acct2-addr-form-card.open { max-height: 900px; opacity: 1; pointer-events: auto; margin-top: 16px; }
.acct2-addr-form-card.acct2-card-dark label {
    color: rgba(255,255,255,.5);
    font: 600 11px/1 Inter,sans-serif;
    text-transform: uppercase;
    letter-spacing: .5px;
    display: block;
    margin-bottom: 4px;
}
.acct2-addr-form-card.acct2-card-dark input[type="text"],
.acct2-addr-form-card.acct2-card-dark input[type="tel"] {
    background: #121d2e;
    border: 1px solid #2a3548;
    border-radius: 6px;
    padding: 8px 12px;
    color: #fff;
    font: 400 13px Inter,sans-serif;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}
.acct2-addr-form-card.acct2-card-dark input:focus { border-color: var(--orange); }
.acct2-addr-form-card .acct-row-2 { display: flex; gap: 12px; }
.acct2-addr-form-card .acct-row-2 > p { flex: 1; margin: 0 0 10px; }
.acct2-addr-form-card .acct-row-street { display: flex; gap: 12px; }
.acct2-addr-form-card .addr-col-street { flex: 1; margin: 0 0 10px; }
.acct2-addr-form-card .addr-col-apt { flex: 0 0 110px; margin: 0 0 10px; }
/* Save/Cancel buttons in this form — Grindesk style: 10×24 padding, 14px font.
   Scoped here to NOT change `.acct2-btn`/`.acct2-btn-ghost` in other places (profile cabinet). */
.acct2-addr-form-card .acct2-btn,
.acct2-addr-form-card .acct2-btn-ghost {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
}
.acct2-addr-form-card .acct2-btn .ti,
.acct2-addr-form-card .acct2-btn-ghost .ti { font-size: 15px; }
.acct2-addr-form-card .acct2-btn-ghost:hover { background: rgba(255,255,255,.05); color: #fff; }

/* form card animation — see rule above */

/* ============================================================
   ACCOUNT — profile / orders / order-detail / settings (legacy)
   ============================================================ */
.acct-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin: 6px 0 18px;
}
.acct-greeting { display: flex; align-items: center; gap: 14px; }
.acct-avatar {
    width: 56px; height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--orange);
    box-shadow: 0 4px 12px rgba(232,123,36,0.25);
    background: var(--bg);
}
.acct-avatar-fallback {
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-3);
    font-size: 28px;
}
.acct-hi {
    color: var(--ink-2);
    font-size: 13px;
    margin-top: 2px;
}
.acct-hi strong { color: var(--ink); }
.acct-header h1 {
    margin: 0;
    font: 700 22px/1.2 Inter, sans-serif;
    color: var(--nav);
    display: flex; align-items: baseline; gap: 10px;
}
.acct-h1-count {
    font: 500 13px/1 Inter, sans-serif;
    color: var(--ink-3);
    background: var(--bg);
    border-radius: 10px;
    padding: 4px 9px;
}
.acct-header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.acct-header-actions .btn-secondary {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
}
.acct-header-actions .btn-secondary .ti { font-size: 15px; }
.acct-logout {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px;
    color: #d9534f;
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    transition: background 0.15s ease;
}
.acct-logout:hover { background: #fdeded; color: #b04; }
.acct-logout .ti { font-size: 15px; }

.acct-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(15,25,35,0.06);
    padding: 20px 22px;
}
.acct-card-title {
    font: 700 14px/1 Inter, sans-serif;
    color: var(--nav);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--orange);
    padding-bottom: 8px;
    margin-bottom: 14px;
    display: flex; align-items: center; gap: 8px;
    white-space: nowrap; min-width: 120px;
}
.acct-card-title .ti { font-size: 17px; color: var(--orange); }

.profile-table th {
    text-align: center;
    font: 600 11px/1 Inter, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--ink-3);
    padding: 8px 12px 8px 0;
    background: transparent;
    border-bottom: 1px solid var(--line-2);
    width: 40%;
    white-space: nowrap;
}
.profile-table td {
    padding: 8px 0;
    border-bottom: 1px solid var(--line-2);
    color: var(--ink);
}
.profile-table tr:last-child th,
.profile-table tr:last-child td { border-bottom: 0; }

.kv-list { display: flex; flex-direction: column; gap: 10px; }
.kv-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line-2);
}
.kv-row:last-child { border-bottom: 0; }
.kv-label {
    font: 600 11px/1 Inter, sans-serif;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    min-width: 70px;
}
.kv-label .ti { font-size: 15px; color: var(--orange); }
.kv-value { color: var(--ink); }
.kv-notes {
    background: var(--bg);
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--ink-2);
    line-height: 1.5;
    margin-top: 10px;
}

.acct-empty {
    text-align: center;
    padding: 36px 16px;
    color: var(--ink-3);
}
.acct-empty .ti {
    font-size: 48px;
    color: var(--ink-3);
    display: block;
    margin-bottom: 12px;
}
.acct-empty p {
    font: 500 14px/1.4 Inter, sans-serif;
    color: var(--ink-2);
    margin-bottom: 16px;
}

.acct-row-2 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}
@media (max-width: 480px) {
    .acct-row-2 { grid-template-columns: 1fr; }
}
.acct-foot-link {
    margin-top: 14px;
    text-align: right;
    font-size: 13px;
}
.acct-foot-link a { color: var(--orange); font-weight: 500; }
.acct-foot-link a:hover { text-decoration: underline; }

/* Order summary chips above order detail */
.order-summary-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}
@media (max-width: 600px) {
    .order-summary-row { grid-template-columns: 1fr; }
}
.order-summary-cell {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(15,25,35,0.04);
    display: flex; flex-direction: column; gap: 4px;
}
.osc-label {
    font: 600 10px/1 Inter, sans-serif;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.osc-value { font: 600 15px/1.2 Inter, sans-serif; color: var(--ink); }
.osc-total { color: var(--orange); font-size: 18px; }

/* Orders table polishing */
.orders-table { background: transparent; }
.orders-table .ot-total { font-weight: 700; color: var(--orange); }
.orders-table .ot-actions { text-align: right; }
.orders-table .ot-view {
    font-weight: 500;
    color: var(--orange);
    font-size: 13px;
}
.orders-table .ot-view:hover { text-decoration: underline; }
.orders-table .ot-old { color: var(--ink-3); font-size: 11px; }

.status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font: 600 11px/1.4 Inter, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Order status timeline (5 steps) */
.order-timeline {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(15,25,35,0.06);
    padding: 18px 22px;
    margin: 8px 0 18px;
}
.ot-title {
    font: 600 11px/1 Inter, sans-serif;
    color: var(--ink-3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}
.ot-steps {
    list-style: none;
    margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    position: relative;
    counter-reset: ot;
}
.ot-step {
    text-align: center;
    position: relative;
    padding-top: 36px;
}
.ot-step::before {
    content: '';
    position: absolute;
    top: 17px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--line);
    z-index: 0;
}
.ot-step:last-child::before { display: none; }
.ot-dot {
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-3);
    z-index: 1;
    transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.18s;
}
.ot-dot .ti { font-size: 17px; }
.ot-label {
    font: 600 11px/1.3 Inter, sans-serif;
    color: var(--ink-3);
    display: block;
    padding: 0 4px;
}
.ot-step.ot-done .ot-dot {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}
.ot-step.ot-done::before { background: var(--green); }
.ot-step.ot-done .ot-label { color: var(--ink-2); }
.ot-step.ot-current .ot-dot {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
    transform: translateX(-50%) scale(1.15);
    box-shadow: 0 4px 14px rgba(232,123,36,0.4);
    animation: ot-pulse 2.2s ease-in-out infinite;
}
.ot-step.ot-current .ot-label { color: var(--orange); font-weight: 700; }
@keyframes ot-pulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(232,123,36,0.4); }
    50%      { box-shadow: 0 4px 22px rgba(232,123,36,0.7); }
}
@media (max-width: 600px) {
    .ot-steps { grid-template-columns: repeat(3, 1fr); }
    .ot-label { font-size: 10px; }
    .ot-dot { width: 28px; height: 28px; }
    .ot-dot .ti { font-size: 14px; }
    .ot-step { padding-top: 32px; }
}
.status-pill.status-0 { background: #fff4e6; color: var(--orange); }
.status-pill.status-1 { background: #e7f1fb; color: var(--blue); }
.status-pill.status-2 { background: #fff7c8; color: #8a7100; }
.status-pill.status-3 { background: #e6f6ec; color: var(--green); }
.status-pill.status-4 { background: #f0f1f3; color: var(--ink-3); }

/* ============================================================
   Buyer-type toggle (Person / Company) — segmented control
   ============================================================ */
.buyer-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 6px 0 14px;
}
.bt-opt {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 14px;
    border: 2px solid var(--line);
    background: var(--white);
    border-radius: 10px;
    font: 600 14px/1 Inter, sans-serif;
    color: var(--ink-2);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}
.bt-opt .ti { font-size: 18px; color: var(--ink-3); transition: color 0.15s; }
.bt-opt:hover { border-color: var(--orange); color: var(--orange); }
.bt-opt:hover .ti { color: var(--orange); }
.bt-opt.active {
    border-color: var(--orange);
    background: #fff4e6;
    color: var(--nav);
    box-shadow: 0 4px 12px rgba(232,123,36,0.18);
}
.bt-opt.active .ti { color: var(--orange); }
.bt-opt input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }

.company-block[hidden] { display: none; }
.cl-status {
    margin: 6px 0 0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}
.cl-status.cl-info { background: #eef3f8; color: var(--blue); border-left: 3px solid var(--blue); }
.cl-status.cl-ok   { background: #e6f6ec; color: var(--green); border-left: 3px solid var(--green); }
.cl-status.cl-err  { background: #fdeded; color: #a33;        border-left: 3px solid #d9534f; }

/* Per-field validation states (reg.Nr / VAT) */
.cl-input-wrap {
    position: relative;
    display: block;
}
.cl-input-wrap > input {
    width: 100%;
    padding-right: 36px !important;
    transition: border-color 0.18s, box-shadow 0.18s;
}
.cl-input-wrap > .cl-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    line-height: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
}
.cl-input-wrap.cl-checking > input {
    border-color: var(--orange) !important;
    box-shadow: 0 0 0 3px rgba(232,123,36,0.15);
}
.cl-input-wrap.cl-checking > .cl-icon {
    opacity: 1;
    color: var(--orange);
    width: 14px; height: 14px;
    border: 2px solid rgba(232,123,36,0.25);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: cl-spin 0.8s linear infinite;
}
.cl-input-wrap.cl-checking > .cl-icon::before { content: ''; }
@keyframes cl-spin { to { transform: translateY(-50%) rotate(360deg); } }

.cl-input-wrap.cl-valid > input {
    /* no border change — validation is shown by icon only */
}
.cl-input-wrap.cl-valid > .cl-icon {
    opacity: 1;
    color: #5dcaa5;
}
.cl-input-wrap.cl-valid > .cl-icon::before {
    content: '✓';
    font-size: 16px;
    font-weight: 600;
}

.cl-input-wrap.cl-invalid > input {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.15);
}
.cl-input-wrap.cl-invalid > .cl-icon {
    opacity: 1;
    color: #ef4444;
}
.cl-input-wrap.cl-invalid > .cl-icon::before {
    content: '✗';
    font-size: 18px;
    font-weight: 700;
}

/* ============================================================
   Google Places Autocomplete dropdown — match navy/orange theme
   ============================================================ */
.pac-container {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(15,25,35,0.15);
    margin-top: 4px;
    font-family: Inter, sans-serif;
    overflow: hidden;
    z-index: 10000;
}
.pac-item {
    padding: 9px 12px;
    cursor: pointer;
    border-top: 1px solid var(--line-2);
    font-size: 13px;
    color: var(--ink);
}
.pac-item:first-child { border-top: 0; }
.pac-item:hover, .pac-item-selected { background: #fff4e6; }
.pac-icon { display: none; }
.pac-item-query { color: var(--orange); font-weight: 600; padding-right: 4px; }
.pac-matched { font-weight: 700; color: var(--ink); }
.hdpi.pac-logo:after { display: none; }  /* hide Google branding strip (still attribution shown elsewhere) */

/* ============================================================
   PAYMENT
   ============================================================ */
.pay-method-card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 14px 16px;
    margin-top: 4px;
}
.pay-method-card strong {
    font-size: 15px;
    color: var(--nav);
}
.pay-method-desc {
    color: var(--ink-2);
    font-size: 13px;
    margin-top: 6px;
    line-height: 1.5;
}
.pay-stub {
    text-align: center;
    padding: 28px 14px;
    background: var(--bg);
    border-radius: 8px;
    margin-top: 16px;
    border: 1px dashed var(--orange);
}
.pay-stub .ti {
    font-size: 40px;
    color: var(--orange);
    display: block;
    margin-bottom: 10px;
}
.pay-stub h3 {
    font: 700 14px/1.2 Inter, sans-serif;
    color: var(--nav);
    margin-bottom: 6px;
}
.pay-stub p {
    color: var(--ink-2);
    font-size: 13px;
    line-height: 1.5;
}

/* ============================================================
   ORDER SUCCESS / DETAIL
   ============================================================ */
.order-success-page {
    max-width: 620px; margin: 36px auto; text-align: center;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(15,25,35,0.06);
    padding: 32px;
}
.order-success-box {
    border: 1px solid var(--green); border-radius: 6px;
    background: #f3fcf6;
    padding: 22px; margin: 18px 0;
}
.order-header {
    display: flex; gap: 18px; flex-wrap: wrap; padding: 14px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 6px;
    margin: 12px 0;
}
.order-section { margin: 18px 0; }
.status-0 { color: var(--orange); font-weight: 600; }
.status-3 { color: var(--green); font-weight: 600; }
.status-4 { color: var(--ink-3); font-weight: 600; }

/* ---- Product page — instrumenti.lv style: photos column + info on top, articles table full-width below ---- */
.product-top { display: flex; gap: 24px; margin: 12px 0 24px; align-items: stretch; }
.product-photos { flex: 0 0 260px; max-width: 260px; }
.product-info { flex: 1 1 auto; min-width: 0; text-align: justify; padding-right: 20px; }
.product-articles { margin-top: 16px; }
.product-photo-main {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 4px;
    background: #fff;
    margin-bottom: 4px;
    cursor: pointer;
}
.product-photo-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: none !important;
    padding: 0;
    background: none;
    border-radius: 0;
}
.product-photo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-top: 4px;
}
.product-photo-grid .photo-cell {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 4px;
    background: #fff;
    cursor: pointer;
}
.product-photo-grid img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: none !important;
    padding: 0;
    background: none;
    border-radius: 0;
}
.product-info h1 { color: #1a2535; font-size: 1.4rem; line-height: 1.3; margin-bottom: 16px; }
.product-title-row {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 16px;
    margin-bottom: 12px;
}
.product-title-row h1 {
    margin: 0;
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}
.product-brand-inline {
    min-height: 60px;
    max-height: 90px;
    max-width: 200px;
    width: auto;
    height: auto;
    object-fit: fill;
    flex: 0 0 auto;
    align-self: flex-start;
    margin-top: 4px;
}
.product-brand { color: var(--ink-3); font-size: 13px; margin: 4px 0 10px; }
.product-brand strong { color: var(--ink); }
.product-shortdesc {
    font-size: 13px;
    color: var(--ink-2);
    line-height: 1.6;
    margin-bottom: 14px;
}
.product-shortdesc p { margin: 8px 0; }
.product-shortdesc br + br { display: none; }   /* collapse double breaks */
.in-stock { color: var(--green); font-weight: 600; }
.on-order { color: var(--orange); font-weight: 600; }
.out-of-stock { color: #d9534f; font-weight: 600; }

/* articles table — Artikuls | Parametri | Noliktavā | Skaits | Cena | [btn] */
.product-articles-table {
    width: 100%;
    margin-left: 0;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 6px;
    border-radius: 8px 8px 0 0;
    overflow: hidden;                  /* clips header to the rounded top corners */
}
.product-articles-table thead th {
    border: none !important;
    background: #1a2535;
    color: #fff;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    padding: 10px;
}
.product-articles-table tbody tr { border-bottom: 1px solid #e0e0e0; background: #fafbfc; }
.product-articles-table tbody tr:nth-child(even) { background: #f4f5f7; }
.product-articles-table tbody td {
    padding: 8px 10px;
    text-align: center;
    vertical-align: middle;
}
/* fixed-layout columns: Артикул | Параметры | Склад | Кол-во | Цена | [btn] */
.product-articles-table th:first-child,
.product-articles-table td:first-child {
    width: 20%;
    padding-left: 0;
    text-align: center;
    white-space: nowrap;
}
.product-articles-table th:nth-child(2),
.product-articles-table td:nth-child(2) {
    width: 30%;
    padding-left: 16px;
    text-align: center;
}
.product-articles-table th:nth-child(3),
.product-articles-table td:nth-child(3) {
    width: 12%;
    text-align: center;
}
.product-articles-table th:nth-child(4),
.product-articles-table td:nth-child(4) {
    width: 10%;
    text-align: center;
}
.product-articles-table th:nth-child(5),
.product-articles-table td:nth-child(5) {
    width: 15%;
    text-align: center;
}
.product-articles-table th:last-child,
.product-articles-table td:last-child {
    width: 13%;
    text-align: right;
    padding-right: 0;
}
.product-articles-table td:first-child  { font-weight: 600; padding-left: 0; cursor: pointer; }
.product-articles-table td:nth-child(2) { color: var(--ink-2); }
.product-articles-table .price {
    font-size: 1rem;
    font-weight: 500;
    color: #e87b24;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.qty-input {
    width: 60px; padding: 4px 6px; border: 1px solid var(--line);
    font: inherit; font-size: 13px; text-align: center;
}
.btn-cart {
    background: #e87b24; color: #fff; border: 0;
    padding: 6px 14px; font: inherit; font-size: 12px; font-weight: 600;
    cursor: pointer; border-radius: 4px; white-space: nowrap;
}
.btn-cart:hover { background: var(--orange-d); }
.price-note { font-size: 0.85rem; color: #888; margin-top: 8px; text-align: right; }

/* under-table action buttons */
.product-actions { margin-top: 12px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.product-actions a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
}
.product-actions .btn-category { background: #1a2535; }
.product-actions .btn-category:hover { background: #233146; color: #fff; }
.product-actions .btn-inquiry { background: #e87b24; }
.product-actions .btn-inquiry:hover { background: #cf6a1a; color: #fff; }

.cms-content { line-height: 1.6; }
.cms-content p { margin: 8px 0; }

/* ---- CMS / info pages ---- */
.page-content {
    max-width: 800px;
    line-height: 1.7;
    color: #333;
    font-size: 0.95rem;
}
.page-content h1 {
    color: #1a2535;
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e87b24;
}
.page-content h2,
.page-content h3 {
    color: #1a2535;
    margin-top: 24px;
    margin-bottom: 12px;
}
.page-content h2 { font-size: 1.2rem; }
.page-content h3 { font-size: 1.05rem; }
.page-content p {
    margin-bottom: 12px;
    text-align: justify;
}
.page-content ul, .page-content ol {
    margin-bottom: 12px;
    padding-left: 24px;
}
.page-content li { margin-bottom: 6px; }
.page-content strong, .page-content b { color: #1a2535; }
.page-content a { color: #e87b24; text-decoration: none; }
.page-content a:hover { text-decoration: underline; }
.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}
.page-content table th {
    background: #1a2535;
    color: #fff;
    padding: 8px 12px;
    text-align: center;
}
.page-content table td {
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
}
.page-content table tr:nth-child(even) { background: #f9f9f9; }
.page-content .company-details {
    background: #f8f9fa;
    border-left: 3px solid #e87b24;
    padding: 16px 20px;
    margin: 20px 0;
    border-radius: 0 6px 6px 0;
}
.variant-selected { background: var(--bg); }

.brands-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.brand-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background: #fff;
    text-decoration: none;
    transition: border-color 0.2s;
}
.brand-card:hover {
    border-color: #e87b24;
}
.brand-card img {
    max-width: 120px;
    max-height: 50px;
    object-fit: contain;
    margin-bottom: 8px;
}
.brand-card .brand-name {
    font-size: 0.85rem;
    color: #1a2535;
}
.brand-card .brand-meta {
    font-size: 11px;
    color: var(--ink-3);
    margin-top: 2px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .brands-grid { grid-template-columns: repeat(4, 1fr); }
    .checkout-grid, .profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    #menu .hdr-inner { flex-wrap: wrap; }
    #menu a { flex: 1 1 auto; text-align: center; }
    #search-row .hdr-inner { flex-wrap: wrap; }
    #center { flex-direction: column; }
    #content { align-self: stretch; width: 100%; }
    #leftblock { flex-basis: auto; width: 100%; }
    .brands-grid { grid-template-columns: repeat(3, 1fr); }
    .product-top { flex-direction: column; }
    .product-photos { flex-basis: auto; width: 100%; }
}
@media (max-width: 480px) {
    .brands-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   ORDER DETAIL — dark redesign
   ============================================================ */
.acct2-order-page .ord-cancelled-banner {
    background: linear-gradient(90deg, #b91c1c, #7f1d1d);
    color: #fff;
    padding: 14px 20px;
    border-radius: 10px;
    font: 700 16px/1.2 Inter, sans-serif;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 10px;
    box-shadow: 0 6px 20px rgba(185,28,28,0.30);
    animation: a2-up 0.35s cubic-bezier(0.22,1,0.36,1) both;
}
.acct2-order-page .ord-cancelled-banner .ti { font-size: 20px; }

.ord-head-card {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    background: #1a2535;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.22);
    animation: a2-up 0.35s cubic-bezier(0.22,1,0.36,1) both;
    flex-wrap: wrap;
}
.ord-head-left { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ord-head-num {
    font: 700 32px/1 'JetBrains Mono', monospace;
    color: #fff;
    letter-spacing: -1px;
}
.ord-head-meta { display: flex; flex-direction: column; gap: 6px; }
.ord-date { font: 400 14px/1.3 Inter, sans-serif; color: rgba(255,255,255,0.6); }
.ord-date-abs { letter-spacing: 0; }
.ord-elapsed {
    display: inline-flex; align-items: baseline; gap: 4px;
    font: 500 12px/1 Inter, sans-serif;
    color: rgba(255,255,255,0.45);
}
.ord-tick {
    font: 500 13px/1 'JetBrains Mono', monospace;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.5px;
}
.ord-sec-colon { color: var(--orange); animation: ord-colon-pulse 1s ease-in-out infinite; }
@keyframes ord-colon-pulse { 0%,100% { opacity: 0.6; } 50% { opacity: 1; } }

.ord-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ord-btn-pay {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--orange);
    color: #fff;
    padding: 12px 32px;
    border-radius: 8px;
    font: 600 15px/1 Inter, sans-serif;
    letter-spacing: 0.5px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(232,122,30,0.30);
    transition: transform 0.15s, box-shadow 0.15s;
}
.ord-btn-pay:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(232,123,36,0.45); }
.ord-btn-pay .ti { font-size: 18px; }
.ord-btn-pay strong { font: 700 14px/1 'JetBrains Mono', monospace; letter-spacing: 0.5px; }

.ord-btn-icon {
    width: 46px; height: 46px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.80);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.15s, border-color 0.15s;
    text-decoration: none;
}
.ord-btn-icon:hover {
    background: rgba(232,123,36,0.15);
    color: var(--orange);
    border-color: var(--orange);
    transform: scale(1.05);
}
.ord-btn-icon .ti { font-size: 19px; }

/* 3-step timeline */
/* Combined status+address wrapper */
.ord-info-card {
    background: #1a2535;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.22);
    animation: a2-up 0.35s cubic-bezier(0.22,1,0.36,1) both;
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
}
.ord-tl {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: #1a2535;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 22px 24px 18px;
    margin-bottom: 14px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.22);
    animation: a2-up 0.35s cubic-bezier(0.22,1,0.36,1) both;
    position: relative;
}
/* Compact timeline inside ord-info-card — no own card chrome */
.ord-info-card .ord-tl {
    background: transparent;
    border: none !important;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin-bottom: 0;
    animation: none;
    flex: 1 1 auto;
    align-self: center;
}
.ord-tl-mini .ord-tl-step { padding-top: 30px; }
.ord-tl-mini .ord-tl-step::before { top: 13px; }
.ord-tl-mini .ord-tl-dot { width: 26px; height: 26px; }
.ord-tl-mini .ord-tl-dot .ti { font-size: 14px; }
.ord-tl-mini .ord-tl-label { font-size: 11px; }
.ord-tl-mini .ord-tl-current .ord-tl-dot { transform: translateX(-50%) scale(1.08); }
.ord-tl-step { text-align: center; padding-top: 44px; position: relative; }
.ord-tl-step::before {
    content: '';
    position: absolute; top: 21px; left: 50%; width: 100%; height: 2px;
    background: rgba(255,255,255,0.10);
}
.ord-tl-step:last-child::before { display: none; }
.ord-tl-dot {
    position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 42px; height: 42px;
    border-radius: 50%;
    background: #0f1923;
    border: 2px solid rgba(255,255,255,0.10);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.35);
    z-index: 1;
    transition: all 0.18s;
}
.ord-tl-dot .ti { font-size: 20px; }
.ord-tl-label {
    font: 600 12px/1 Inter, sans-serif;
    color: rgba(255,255,255,0.50);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.ord-tl-done .ord-tl-dot { background: #16a34a; border-color: #16a34a; color: #fff; }
.ord-tl-done::before     { background: #16a34a; }
.ord-tl-done .ord-tl-label { color: rgba(255,255,255,0.70); }
.ord-tl-current .ord-tl-dot {
    background: var(--orange); border-color: var(--orange);
    color: #fff;
    box-shadow: 0 0 0 6px rgba(232,123,36,0.18), 0 4px 16px rgba(232,123,36,0.5);
    transform: translateX(-50%) scale(1.10);
    animation: ord-tl-pulse 2.2s ease-in-out infinite;
}
.ord-tl-current .ord-tl-label { color: var(--orange); font-weight: 700; }
@keyframes ord-tl-pulse {
    0%, 100% { box-shadow: 0 0 0 6px rgba(232,123,36,0.18), 0 4px 16px rgba(232,123,36,0.5); }
    50%      { box-shadow: 0 0 0 12px rgba(232,123,36,0.10), 0 4px 22px rgba(232,123,36,0.75); }
}
.ord-tl-cancel .ord-tl-dot { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08); color: rgba(255,255,255,0.25); }
.ord-tl-cancel .ord-tl-label { color: rgba(255,255,255,0.30); }
.ord-tl-cancel::before { background: rgba(255,255,255,0.06); }

.ord-tl-tracking, .ord-tl-tracking-pending {
    display: inline-block;
    margin-top: 6px;
    font: 600 12px/1 'JetBrains Mono', monospace;
    letter-spacing: 0.5px;
}
.ord-tl-tracking { color: var(--orange); text-decoration: none; padding: 4px 8px; background: rgba(232,123,36,0.10); border-radius: 6px; }
.ord-tl-tracking:hover { background: rgba(232,123,36,0.25); text-decoration: underline; }
.ord-tl-tracking .ti { font-size: 11px; vertical-align: -1px; }
.ord-tl-tracking-pending { color: rgba(255,255,255,0.35); font-style: italic; }

/* Orange address card inside ord-info-card */
.ord-addr-orange {
    display: flex; gap: 16px; align-items: flex-start;
    flex: 0 0 320px;
    width: 320px;
    height: 190px;
    background: linear-gradient(135deg, #e87a1e 0%, #c5600f 100%);
    border-radius: 16px;
    padding: 20px;
    color: #fff;
    box-shadow: 0 4px 16px rgba(232,122,30,0.30);
    align-self: flex-start;
    overflow: hidden;
    position: relative;
}
.ord-addr-orange::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 90px;
    height: 90px;
    background: rgba(255,255,255,0.22);
    -webkit-mask: url('/favicon.svg') center / contain no-repeat;
            mask: url('/favicon.svg') center / contain no-repeat;
    opacity: 1;
    pointer-events: none;
    z-index: 0;
}
.ord-addr-body { flex: 1 1 auto; min-width: 0; }
.ord-addr-line { font-size: 13px; color: rgba(255,255,255,0.92); line-height: 1.5; }
.ord-addr-name { color: #fff; font-weight: 700; font-size: 16px; margin-bottom: 8px; }
.ord-addr-phone, .ord-addr-mail { margin-top: 5px; display: inline-flex; align-items: center; gap: 6px; color: rgba(255,255,255,0.80); }
.ord-addr-phone .ti, .ord-addr-mail .ti { color: #fff; font-size: 13px; }
.ord-addr-mail { margin-left: 10px; }

/* Order address map */
.ord-addr-map {
    flex: 0 0 110px;
    height: 110px;
    border-radius: 8px;
    overflow: hidden;
    background: #0f1923;
    align-self: stretch;
}
@media (max-width: 640px) { .ord-addr-map { display: none; } }

/* Items table */
.ord-items-card {
    background: #1a2535;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.22);
    animation: a2-up 0.35s cubic-bezier(0.22,1,0.36,1) both;
}
.ord-items { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ord-items thead th {
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.50);
    font: 600 11px/1 Inter, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    text-align: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ord-items thead .ord-c-art,
.ord-items thead .ord-c-qty { text-align: center; }
.ord-items thead .ord-c-price { text-align: right; }
.ord-items tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.85);
    font-size: 14px;
    vertical-align: middle;
}
.ord-items tbody tr:nth-child(even) td { background: rgba(255,255,255,0.015); }
.ord-items tbody tr:hover td { background: rgba(232,123,36,0.06); }
.ord-items tbody tr:last-child td { border-bottom: 0; }

.ord-c-img { width: 76px; }
/* Static product thumbnail — no zoom/lightbox, no hover scale, no cursor change. */
.ord-thumb {
    display: block;
    width: 60px; height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}
.ord-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }

.ord-c-name a { color: #fff; text-decoration: none; }
.ord-c-name a:hover { color: var(--orange); }
.ord-chip {
    display: inline-block;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.70);
    padding: 3px 8px;
    border-radius: 5px;
    font: 500 11px/1.4 'JetBrains Mono', monospace;
    letter-spacing: 0.4px;
}
.ord-c-art { width: 20%; text-align: center; }
.ord-c-qty { font: 600 14px/1 'JetBrains Mono', monospace; color: #fff; text-align: center; width: 15%; }
.ord-c-price {
    font: 600 14px/1 'JetBrains Mono', monospace;
    color: var(--orange);
    text-align: right;
    width: 15%;
}

.ord-total-row {
    display: flex; align-items: baseline; justify-content: flex-end; gap: 14px;
    padding: 22px 22px;
    border-top: 2px solid var(--orange);
    background: linear-gradient(180deg, transparent, rgba(232,123,36,0.06));
}
.ord-total-label {
    font: 600 13px/1 Inter, sans-serif;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.ord-total-value {
    font: 700 28px/1 'JetBrains Mono', monospace;
    color: var(--orange);
    letter-spacing: -0.5px;
    text-shadow: 0 4px 14px rgba(232,123,36,0.30);
}

/* Lightbox */
.ord-lb {
    position: fixed; inset: 0;
    background: rgba(15,25,35,0.92);
    display: flex; align-items: center; justify-content: center;
    z-index: 10001;
    animation: a2-fade 0.18s ease both;
}
.ord-lb[hidden] { display: none; }
.ord-lb-stage {
    max-width: 90vw; max-height: 90vh;
    text-align: center;
    position: relative;
}
.ord-lb-img {
    max-width: 90vw; max-height: 75vh;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.50);
}
.ord-lb-caption {
    margin-top: 14px;
    color: #fff;
    font: 500 14px/1.4 Inter, sans-serif;
    display: flex; align-items: center; justify-content: center; gap: 20px;
    flex-wrap: wrap;
}
.ord-lb-name { opacity: 0.85; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ord-lb-product-link {
    color: var(--orange);
    text-decoration: none;
    padding: 7px 14px;
    background: rgba(232,123,36,0.16);
    border-radius: 8px;
    transition: background 0.15s;
    display: inline-flex; align-items: center; gap: 6px;
}
.ord-lb-product-link:hover { background: rgba(232,123,36,0.30); }

.ord-lb-close, .ord-lb-prev, .ord-lb-next {
    position: absolute;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    color: #fff;
    width: 48px; height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, transform 0.15s;
}
.ord-lb-close:hover, .ord-lb-prev:hover, .ord-lb-next:hover { background: rgba(232,123,36,0.20); transform: scale(1.05); }
.ord-lb-close { top: 20px; right: 20px; }
.ord-lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.ord-lb-next { right: 24px; top: 50%; transform: translateY(-50%); }
.ord-lb-prev:hover, .ord-lb-next:hover { transform: translateY(-50%) scale(1.05); }
.ord-lb-close .ti { font-size: 22px; }
.ord-lb-prev .ti, .ord-lb-next .ti { font-size: 24px; }

@media (max-width: 600px) {
    .ord-tl { padding: 18px 14px 14px; }
    .ord-tl-step { padding-top: 38px; }
    .ord-tl-dot { width: 36px; height: 36px; }
    .ord-tl-dot .ti { font-size: 17px; }
    .ord-tl-label { font-size: 10px; }
    .ord-head-num { font-size: 24px; }
    .ord-total-value { font-size: 22px; }
    .ord-addr-mail { margin-left: 0; display: block; }
}


/* ================================================================
   CART PANEL — compact animated drop zone + floating cart button
   ================================================================ */
/* Cart icon — position + size specific (appearance from .orb-wrap/.orb-sphere on #cart-panel/.cp-orb) */
#cart-panel {
    position: fixed;
    top: 80px; right: 20px;
    z-index: 990;
    width: 60px; height: 60px;
    user-select: none;
    overflow: visible;
    transition: width 0.36s cubic-bezier(0.34,1.56,0.64,1),
                height 0.36s cubic-bezier(0.34,1.56,0.64,1),
                border-radius 0.3s ease,
                background 0.2s ease,
                box-shadow 0.2s ease,
                transform 0.25s ease;
}
.cp-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%; height: 100%;
    color: #fff;
    text-decoration: none;
    position: relative;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}
.cp-orb { width: 100%; height: 100%; }

.cp-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: #fff;
    color: var(--orange, #e87b24);
    font: 700 11px/20px Inter, sans-serif;
    text-align: center;
    padding: 0 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    pointer-events: none;
    z-index: 2;
}
.cp-badge[hidden] { display: none; }
.cp-badge-bounce { animation: cpBadgeBounce 0.5s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes cpBadgeBounce {
    0%  { transform: scale(1); }
    45% { transform: scale(1.75); }
    100%{ transform: scale(1); }
}

.cp-drop-label {
    position: absolute;
    bottom: -22px;
    left: 50%;
    transform: translateX(-50%);
    font: 700 10px/1 Inter, sans-serif;
    color: rgba(255,255,255,0.92);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.cp-added-label {
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font: 700 16px/1 Inter, sans-serif;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
    pointer-events: none;
    opacity: 0;
}
.cp-added-label.cp-added-anim {
    animation: cpAddedPop 0.7s ease forwards;
}
@keyframes cpAddedPop {
    0%  { opacity: 1; transform: translateX(-50%) translateY(0)    scale(1);   }
    60% { opacity: 1; transform: translateX(-50%) translateY(-22px) scale(1.2); }
    100%{ opacity: 0; transform: translateX(-50%) translateY(-32px) scale(0.7); }
}

/* Drag-active state */
#cart-panel.cp-drag-active {
    width: 80px;
    height: 80px;
    border-radius: 40px;
    animation: cpPanelPulse 1s ease-in-out infinite;
}
#cart-panel.cp-drag-active .cp-link {
    width: 80px;
    height: 80px;
    font-size: 30px;
}
#cart-panel.cp-drag-active .cp-drop-label { opacity: 1; }
@keyframes cpPanelPulse {
    0%,100%{ box-shadow: 0 6px 28px rgba(232,123,36,0.55), 0 0 0  8px rgba(232,123,36,0.15); }
    50%    { box-shadow: 0 8px 44px rgba(232,123,36,0.85), 0 0 0 20px rgba(232,123,36,0.12); }
}

/* Cursor over drop zone */
#cart-panel.cp-over {
    background: #ff8c2e !important;
    transform: scale(1.18);
    box-shadow: 0 10px 50px rgba(232,123,36,0.75), 0 0 0 22px rgba(232,123,36,0.16) !important;
    animation: none;
}
#cart-panel.cp-over .cp-orb { background: #ff8c2e !important; }

/* Success flash */
#cart-panel.cp-success {
    background: #27ae60 !important;
    animation: cpSuccessFlash 0.55s ease;
}
#cart-panel.cp-success .cp-orb { background: #27ae60 !important; }
@keyframes cpSuccessFlash {
    0%  { transform: scale(1); }
    35% { transform: scale(1.22); }
    70% { transform: scale(0.95); }
    100%{ transform: scale(1); }
}

@media (max-width: 768px) {
    #cart-panel { top: auto; bottom: 24px; right: 16px; }
}

/* Drag hint tooltip */
.drag-hint-tip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15,25,35,0.94);
    color: #fff;
    font: 500 12px/1 Inter, sans-serif;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 100;
    border: 1px solid rgba(232,123,36,0.4);
    animation: tipFadeIn 0.3s ease;
}
.drag-hint-tip::after {
    content: '';
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(15,25,35,0.94);
}
@keyframes tipFadeIn {
    from { opacity:0; transform: translateX(-50%) translateY(4px); }
    to   { opacity:1; transform: translateX(-50%) translateY(0); }
}

/* Ghost — dark theme */
.drag-ghost {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    width: 200px;
    background: rgba(12,20,32,0.96);
    border: 1px solid var(--orange, #e87b24);
    border-radius: 10px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.55), 0 0 0 1px rgba(232,123,36,0.18);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(4px);
}
.drag-ghost img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    flex: 0 0 60px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
}
.drag-ghost .dg-info { flex: 1 1 auto; overflow: hidden; }
.drag-ghost .dg-name {
    font: 500 12px/1.3 Inter, sans-serif;
    color: rgba(255,255,255,0.88);
    max-height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.drag-ghost .dg-price {
    font: 700 13px/1 Inter, sans-serif;
    color: var(--orange, #e87b24);
    margin-top: 5px;
}



/* ============================================================
   Legal pages (privacy / terms / cookies) — added 2026-05-19
   ============================================================ */
.legal-page {
    max-width: 860px;
    margin: 24px auto;
    padding: 32px 36px;
    background: rgba(255,255,255,0.04);
    border: none;
    border-radius: 8px;
    color: rgba(255,255,255,0.88);
    line-height: 1.62;
    font-size: 15px;
}
.legal-page h1 {
    font-size: 28px;
    margin: 0 0 6px;
    color: #fff;
    border-bottom: 2px solid rgba(123,163,200,0.4);
    padding-bottom: 14px;
}
.legal-page h2 {
    font-size: 19px;
    margin: 32px 0 12px;
    color: #9bbed9;
    font-weight: 600;
}
.legal-page h3 {
    font-size: 16px;
    margin: 22px 0 8px;
    color: #cfd8e3;
    font-weight: 600;
}
.legal-page p,
.legal-page ul,
.legal-page ol {
    margin: 10px 0;
}
.legal-page ul,
.legal-page ol {
    padding-left: 22px;
}
.legal-page li {
    margin: 4px 0;
}
.legal-page strong {
    color: rgba(255,255,255,0.96);
}
.legal-page em {
    color: rgba(255,255,255,0.72);
    font-style: italic;
}
.legal-page a {
    color: #7ba3c8;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.legal-page a:hover {
    color: #9bbed9;
}
.legal-updated {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
    margin: 0 0 24px;
    font-style: italic;
}
.legal-meta {
    list-style: none;
    padding: 12px 16px !important;
    background: rgba(0,0,0,0.18);
    border-left: 3px solid #7ba3c8;
    border-radius: 4px;
    margin: 12px 0 !important;
}
.legal-meta li {
    margin: 2px 0;
    font-size: 14px;
}
.legal-footer-note {
    margin-top: 36px;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    text-align: right;
    font-style: italic;
}

/* Required-consent checkbox in register / checkout forms */
.consent-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 12px;
    padding: 10px 12px;
    background: rgba(0,0,0,0.18);
    border: none;
    border-radius: 6px;
}
.checkout-form .consent-row {
    background: #1a2a3a;
    border: 1px solid rgba(123,163,200,0.2);
    border-radius: 8px;
    padding: 12px 16px;
}
.checkout-form .consent-row label {
    color: #7ba3c8;
}
.checkout-form .consent-row a {
    color: #e87a1e;
}
.checkout-form .consent-row a:hover {
    color: #f09040;
    text-decoration: none;
}
.consent-row input[type="checkbox"] {
    margin-top: 0;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #7ba3c8;
    align-self: center;
}
.consent-row label {
    flex: 1;
    font-size: 13px;
    line-height: 1.45;
    color: rgba(255,255,255,0.78);
    cursor: pointer;
}
.consent-row a {
    color: #7ba3c8;
    text-decoration: underline;
}
.consent-row a:hover {
    color: #9bbed9;
}

/* ========================================================
   Product page — prev/next nav triangles in the variants thead bar
   ======================================================== */
.product-articles-table thead .p-nav {
    color: rgba(255,255,255,.4);
    font-size: 11px;
    font-weight: 400;
    text-decoration: none;
    transition: color .2s ease;
    display: inline-block;
    cursor: pointer;
    line-height: 1;
    user-select: none;
    margin-right: 0;
    vertical-align: middle;
}
.product-articles-table thead .col-pnav-next .p-nav {
    margin-right: 0;
    margin-left: 8px;
}
/* Micro-nudge: ◀ — 5px left + 2px up; ▶ — зеркально 5px right + 2px up */
/* width:10px фиксирует layout-box стрелки → ARTIKULS стартует с 24+10=34px = TD padding-left */
.product-articles-table thead .p-nav-prev { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 10px; }
.product-articles-table th.col-art { border: none !important; }
.product-articles-table th.col-art .p-art-wrap { display: block; position: relative; }
.product-articles-table thead .p-nav-next { transform: translate(-11px, -2px); }
.product-articles-table thead .p-nav:hover { color: #e87b24; }
.product-articles-table thead .p-nav.p-nav-disabled {
    opacity: .22;
    cursor: not-allowed;
    pointer-events: none;
}
/* NOTE: parent table is table-layout:fixed — задавать width: 1% НЕЛЬЗЯ,
   иначе tbody col-cart (кнопка «Add to cart») схлопывается до 1%.
   Колонка делит ширину поровну с остальными; ▶ выравниваем по правому краю. */
.product-articles-table thead .col-pnav-next { text-align: right; white-space: nowrap; }

/* Slide animation for the swappable pane */
#productPane {
    transition: transform .3s ease, opacity .3s ease;
    will-change: transform;
}
#productPane.slide-out-left  { transform: translateX(-30%); opacity: 0; }
#productPane.slide-out-right { transform: translateX(30%);  opacity: 0; }
#productPane.slide-in-from-right { transform: translateX(30%);  opacity: 0; transition: none; }
#productPane.slide-in-from-left  { transform: translateX(-30%); opacity: 0; transition: none; }

/* Nudge cart button + VAT note 20px left without disturbing the variants table layout */
.product-articles-table .btn-cart { transform: translateX(-20px); }
.price-note { transform: translateX(-20px); }

/* Center the product name H1 inside .product-title-row (only that element) */
.product-title-row h1 { text-align: center; }

/* === Out-of-stock UX (stock=0, not on order) =================================
 * - Cell label "Nav noliktavā" in gray (override the old red .out-of-stock)
 * - "Pieprasīt" button replaces "Ielikt grozā", styled blue
 * - Brief pulse on the inquiry CTA after smooth-scroll
 * ========================================================================== */
.out-of-stock {
    color: #e87b24 !important;   /* orange — "0" remains visible, not greyed out */
    font-weight: 600 !important;
}
.btn-request {
    display: inline-block;
    background: #e87a2e;
    color: #ffffff !important;
    border: 0;
    padding: 8px 16px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .15s ease, transform .08s ease;
    line-height: 1.2;

}
.btn-request:hover { background: #d06928; }
.btn-request:active { transform: translateY(1px); }
.product-articles-table input.qty-input:disabled {
    background: rgba(255,255,255,.04);
    color: rgba(255,255,255,.3);
    cursor: not-allowed;
}
@keyframes inquiryPulse {
    0%   { box-shadow: 0 0 0 0 rgba(232,123,36,.55); }
    70%  { box-shadow: 0 0 0 14px rgba(232,123,36,0); }
    100% { box-shadow: 0 0 0 0 rgba(232,123,36,0); }
}
.inquiry-pulse { animation: inquiryPulse 0.9s ease-out; }
html { scroll-behavior: smooth; }

/* === Inline product-page request form (replaces the old orange CTA button) === */
.product-request-form {
    max-width: 600px;
    margin: 32px auto 48px;
    padding: 28px 28px 32px;
    background: #121d2e;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    color: rgba(255,255,255,.88);
}
.prq-title {
    font-size: 20px !important;
    color: #ffffff !important;
    margin: 0 0 18px !important;
    font-weight: 600;
    text-align: center;
}
.prq-form { display: flex; flex-direction: column; gap: 14px; }
.prq-row { display: flex; flex-direction: column; gap: 6px; }
.prq-row label {
    font-size: 13px;
    color: #ffffff !important;
    font-weight: 600;
}
.prq-req { color: #e87b24 !important; font-weight: 700; }
.product-request-form input[type="email"],
.product-request-form input[type="tel"],
.product-request-form textarea {
    width: 100%;
    background: #0e1825 !important;
    border: 1px solid rgba(123,163,200,.22) !important;
    border-radius: 6px;
    padding: 10px 12px;
    color: #ffffff !important;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color .15s, background .15s;
}
.product-request-form input::placeholder,
.product-request-form textarea::placeholder { color: rgba(255,255,255,.35) !important; }
.product-request-form input:focus,
.product-request-form textarea:focus {
    outline: none;
    border-color: #e87b24 !important;
    background: #131e30 !important;
}
.product-request-form textarea { resize: vertical; min-height: 100px; line-height: 1.5; }
.prq-submit {
    margin-top: 4px;
    background: #e87b24 !important;
    color: #ffffff !important;
    border: 0;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
}
.prq-submit:hover { background: #f08c3a !important; }
@media (max-width: 640px) {
    .product-request-form { margin: 20px 12px 36px; padding: 22px 18px 26px; }
}


/* ── checkout.html visual fixes ─────────────────────────────────────────────── */
/* Submit button — full width, centered */
.checkout-form #co-submit {
    display: inline-block;
    width: auto;
    padding: 10px 32px;
    font-size: 14px;
    font-weight: 700;
    border-radius: 8px;
}

/* Section headings — uniform size */
.checkout-form h2 { font-size: 15px !important; }

/* Radio option labels */
.checkout-form .radio-row label { font-size: 14px; }

/* Commission/price in orange bold */
.checkout-form .radio-row em { font-size: 14px; font-weight: 700; color: var(--orange); font-style: normal; }


/* ══ CHECKOUT dark-theme scoped overrides ══════════════════════════════════ */

/* Labels */
.checkout-form label { color: var(--blue); }

/* Inputs dark */
.checkout-form input:not([type="radio"]):not([type="checkbox"]),
.checkout-form select,
.checkout-form textarea {
    background: var(--header);
    border-color: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.90);
}
.checkout-form input:not([type="radio"]):not([type="checkbox"]):focus,
.checkout-form select:focus,
.checkout-form textarea:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(232,123,36,0.20);
}
.checkout-form input::placeholder,
.checkout-form textarea::placeholder { color: rgba(255,255,255,0.30); }

/* Buyer toggle dark */
.checkout-form .bt-opt {
    background: var(--header);
    border-color: rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.65);
}
.checkout-form .bt-opt .ti { color: rgba(255,255,255,0.40); }
.checkout-form .bt-opt:hover { border-color: var(--orange); color: var(--orange); }
.checkout-form .bt-opt.active {
    background: rgba(232,123,36,0.12);
    border-color: var(--orange);
    color: rgba(255,255,255,0.92);
    box-shadow: 0 0 0 2px rgba(232,123,36,0.25);
}
.checkout-form .bt-opt.active .ti { color: var(--orange); }

/* Payment radio-rows dark */
.checkout-form .radio-row {
    background: var(--header);
    border-color: rgba(255,255,255,0.06);
}
.checkout-form .radio-row:hover {
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.14);
}
.checkout-form .radio-row label { color: rgba(255,255,255,0.85); }
.checkout-form .radio-row strong { color: rgba(255,255,255,0.92); }
.checkout-form .radio-row small  { color: rgba(255,255,255,0.40); }
.checkout-form .radio-row:has(input:checked) {
    background: rgba(232,123,36,0.10);
    border-color: var(--orange);
}

/* ── Delivery block v2 ─────────────────────────────────────── */
.dlv-block {
    background: #1a2535;
    border-radius: 8px;
    overflow: visible;
}
.dlv-block-head {
    padding: 12px 21px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.dlv-block-title {
    font-weight: 500;
    font-size: 15px;
    color: rgba(255,255,255,0.85);
}
.dlv-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 21px 12px 18px;
    background: #1a2535;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: background 0.18s ease;
    box-sizing: border-box;
}
.dlv-row:last-child { border-bottom: none; }
.dlv-row input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.dlv-radio {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.30);
    background: transparent;
    position: relative;
    transition: border-color 0.18s ease, background 0.18s ease;
}
.dlv-row-selected .dlv-radio {
    border-color: #e67e22;
    background: #e67e22;
}
.dlv-row-selected .dlv-radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
}
.dlv-row-selected {
    background: #1e2d42;
    border-left: 3px solid #e67e22;
}
.dlv-row-name {
    flex: 1;
    font-size: 14px;
    color: rgba(255,255,255,0.85);
}
.dlv-row-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}
.dlv-price-range {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    white-space: nowrap;
}
.dlv-eta {
    font-size: 11px;
    color: rgba(255,255,255,0.40);
    white-space: nowrap;
}
.dlv-price-free {
    font-size: 13px;
    color: #2ecc71;
    font-weight: 500;
}
.dlv-summary {
    padding: 12px 21px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 14px;
    color: rgba(255,255,255,0.65);
}
.dlv-summary-price {
    color: #e67e22;
    font-weight: 600;
}

/* Notes paragraph text */
.checkout-form p { color: rgba(255,255,255,0.80); }

/* Pickup request button */
.pickup-request-btn {
    background: transparent;
    border: 1px solid var(--orange);
    color: var(--orange);
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    margin-top: 6px;
}
.pickup-request-btn:hover { background: var(--orange); color: #fff; }

/* Summary table — amount column never wraps */
.checkout-summary .summary-table td:last-child { white-space: nowrap; }
.checkout-summary #sum-grand-total { white-space: nowrap; }

/* Cart page — qty input in dark card */
.acct2-cartcard-table .acct2-qty-input {
    width: 64px;
    text-align: center;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.90);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 14px;
}
.acct2-cartcard-table .acct2-qty-input:focus {
    border-color: var(--orange);
    outline: none;
}

/* Cart weight refinements */
.acct2-cartcard-btn-primary { font-weight: 600; }  /* primary keeps bold */
/* delivery names light — handled above */

/* Ship option prices — uniform 14px, medium weight, orange */
.ship-quote-price {
    font: 600 14px/1 Inter, sans-serif !important;
    color: var(--orange) !important;
    white-space: nowrap;
    align-self: center;
    grid-row: 1 / span 2;
}

/* Cart page — dark background so cards sit on dark, not light-grey */
.cart-page {
    background: var(--header);
    border-radius: 10px;
    padding: 20px;
    margin: 0;
}

/* dlv-quote-cart — handled by .dlv-summary */

/* Drag-to-cart v2 — cursor and state overrides */
.product-card { cursor: pointer; }
.product-card.dragging { opacity: 0.35; transform: translateY(0) !important; transition: none !important; }
.product-card.drag-dimmed { opacity: 0.4; transition: opacity 0.25s ease !important; }

/* Cart panel — consolidated size + state */
#cart-panel.cp-drag-active { width: 80px; height: 80px; }
#cart-panel.cp-drag-active .cp-orb { font-size: 28px; }
/* SVG icons inside orb */
.cp-icon-cart,
.cp-icon-check {
    flex-shrink: 0;
    pointer-events: none;
}

/* ── Out-of-stock pulse + quote button ──────────────────── */
@keyframes pulse-stock {
    0%, 100% { background-color: #1a2535; }
    50%       { background-color: rgba(122,26,26,0.15); }
}
.cart-row-oos {
    animation: pulse-stock 3s ease-in-out infinite;
}
.oos-label {
    display: inline-block;
    font-size: 11px;
    color: rgba(255,255,255,0.38);
    margin-left: 6px;
    vertical-align: middle;
    white-space: nowrap;
    font-weight: 400;
}
.acct2-cartcard-btn-quote {
    background: #7ba3c8 !important;
    color: #fff !important;
    border-color: #7ba3c8 !important;
}
.acct2-cartcard-btn-quote:hover { background: #6a8fb0 !important; border-color: #6a8fb0 !important; }
/* Cart-panel repositioning — .cp-moving active while long-press drag */
#cart-panel.cp-moving {
    transform: scale(1.03) !important;
    box-shadow: 0 12px 30px rgba(0,0,0,0.35) !important;
    outline: none !important;
    transition: transform .15s, box-shadow .15s !important;
}
#cart-panel.cp-moving * {
    pointer-events: none;
}
.ai-btn-moving {
    transform: scale(1.03) !important;
    box-shadow: 0 12px 30px rgba(0,0,0,0.35) !important;
    outline: none !important;
    transition: transform .15s, box-shadow .15s !important;
}
.ai-btn-moving * {
    pointer-events: none;
}

/* Order delete button */
.acct2-order-wrap { display: flex; align-items: flex-start; gap: 6px; }
.acct2-order { flex: 1; min-width: 0; }
.acct2-order-del {
    position: absolute; top: 10px; right: 10px;
    background: none; border: none !important; cursor: pointer;
    color: #8a94a3; font-size: 16px; line-height: 1;
    padding: 4px 7px; border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    z-index: 2;
}
.acct2-order-del:hover { color: #e05252; background: rgba(224,82,82,0.12); }
.acct2-order-del:disabled { opacity: 0.4; cursor: default; }

/* Order delete — form-based button */
.acct2-order-del-form { flex: 0 0 auto; align-self: center; padding-right: 4px; margin: 0; }
.order-delete-btn {
    background: none;
    border: none !important;
    color: #8a94a3;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}
.order-delete-btn:hover { color: #e74c3c; background: rgba(231,76,60,0.1); }


/* Viewed products history page */
.viewed-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: 14px; }
.viewed-card {
    background: #1a2235; border: 1px solid var(--line); border-radius: 10px;
    text-decoration: none; color: inherit;
    display: flex; flex-direction: column; overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.viewed-card:hover { border-color: var(--orange); box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.viewed-card-img {
    width: 100%; aspect-ratio: 1/1;
    display: flex; align-items: center; justify-content: center;
    background: #131d2e; overflow: hidden;
}
.viewed-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.viewed-card-img .ti { font-size: 40px; color: var(--ink-3); }
.viewed-card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.viewed-card-name {
    font-size: 13px; color: var(--nav); line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.viewed-card-art { font-size: 11px; color: var(--ink-3); }
.viewed-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.viewed-card-price { font-weight: 700; color: var(--orange); font-size: 14px; }
.viewed-card-date { font-size: 11px; color: var(--ink-3); }

/* Fix: ensure h1 above checkout-grid is visible below sticky header */
.checkout-grid { margin-top: 0; }
#content > h1 { margin-top: 15px; margin-bottom: 15px; }

.consent-row { display:flex; align-items:center; gap:10px; }
.consent-row input[type=checkbox] { margin:0; flex-shrink:0; }
.consent-row label { margin:0; line-height:1.4; }

/* Profile: gap between stacked cards */
.acct2-main > .acct2-card + .acct2-card { margin-top: 14px; }

/* Addresses: equal size Save/Cancel buttons */
.acct2-addr-form-card .btn-buy,
.acct2-addr-form-card .btn-secondary { min-width: 120px; padding: 10px 24px; font-size: 14px; box-sizing: border-box; }

/* Addr form: kill a2-up override so opacity:0 initial state is respected */
.acct2-addr-form-card { animation: none !important; }


/* ---- БЛОК 4: "Ieteicam" recommendations ---- */
.recs-section {
    max-width: 1200px;
    margin: 32px auto 0;
    padding: 0 20px 32px;
}
.recs-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #e87a2e;
    margin: 0 0 16px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.recs-section-title .ti { color: #e87a2e; font-size: 20px; }
.recs-title-text { font-family: "Segoe UI", "Trebuchet MS", Arial, sans-serif; letter-spacing: 0.02em; }
/* 3-column grid override; product-grid breakpoints still apply below */
.recs-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}
@media (max-width: 860px) { .recs-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 480px) { .recs-grid { grid-template-columns: repeat(1, 1fr) !important; } }
/* Recs block: force same name alignment as main product grid (display:block wins over any inherited webkit-box) */
.recs-grid .product-card .product-name,
.recs-grid .product-card h3,
.recs-grid .product-card h4 {
    display: block !important;
    height: 2.6em !important;
    overflow: hidden !important;
    margin-top: -6px !important;
    margin-bottom: 6px !important;
}

/* ============================================================
   MOBILE AUDIT — comprehensive <768px polish (2026-06-12)
   ONLY visual: no logic, no layout changes on desktop.
   ============================================================ */
@media (max-width: 767px) {

    /* ── ZOOM RESET: body{zoom:0.75} is desktop-only — cancel on mobile so all vw/px values are literal ── */
    body { zoom: 1 !important; -moz-transform: none !important; -moz-transform-origin: initial !important; min-height: 100vh !important; }

    /* ── HEADER: logo 88vw (zoom=1 on mobile → CSS width == visual width) ── */
    #logo-link, #logo-link svg { width: 100% !important; max-width: none !important; height: auto !important; flex-shrink: 0 !important; }
    /* ── HEADER padding: align top block with search row (both 12px) ── */
    #top .hdr-inner { padding-left: 12px !important; padding-right: 12px !important; }

    /* ── NAV: пальцевые кнопки (min 44px высота) ── */
    #menu .hdr-inner { padding-left: 8px; padding-right: 8px; }
    #menu a {
        min-height: 44px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        max-width: none !important;
        padding: 10px 12px !important;
        font-size: 11px;
        flex: 1 1 auto;
    }
    /* «Мой аккаунт» не уходит вправо — остаётся в ряду */
    #hdr-user { margin-left: 0 !important; }

    /* ── SEARCH + LANG: одна строка, без переноса ── */
    #search-row .hdr-inner { flex-wrap: nowrap !important; padding-left: 12px !important; padding-right: 12px !important; }
    #header-search input { font-size: 16px !important; }
    #header-search { height: 40px; }

    /* ── КОНТЕЙНЕР ── */
    #container { padding: 0 8px; }
    #center { gap: 8px; padding: 10px 0; }

    /* ── КАРТОЧКА ТОВАРА: dark mobile-стиль ── */

    /* ПОРЯДОК: display:contents убирает .product-info из flex-потока,
       её дети (product-title-row, product-shortdesc) становятся прямыми
       flex-детьми .product-top — можно задать order независимо от photos */
    .product-info { display: contents !important; }
    /* flex-direction:column — стекинг, без него title сжимается в 0 в row-flex */
    /* gap:24px + margin:12px из desktop — обнуляем, иначе 24+100+12=136px пустоты */
    .product-top { flex-direction: column !important; align-items: stretch !important; gap: 4px !important; margin-top: 0 !important; }
    .product-title-row {
        order: 1 !important;
        width: 100% !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
        margin-bottom: 0 !important;
    }
    /* order: 1=название, 2=лого (JS/CSS), 3=фото, 4=описание */
    .product-photos { order: 3 !important; width: 100% !important; max-width: 100% !important; flex: none !important; }
    .product-shortdesc { order: 5 !important; width: 100% !important; padding-right: 0 !important; margin-top: 12px !important; }

    /* Заголовок: тёмно-серый на светлом фоне, 21px, по центру */
    .product-title-row h1,
    .product-top-header-title h1 {
        color: #2b3440 !important;
        font-size: 1.35rem !important;
        text-align: center !important;
        flex: 1 1 100% !important;
        margin: 0 !important;
        overflow-wrap: anywhere !important;
    }

    /* Лого бренда — НАД фото, по центру, ~200px */
    /* Normal layout: JS создаёт .product-brand-mobile-wrap → order:2 между title(1) и photos(3) */
    .product-brand-mobile-wrap {
        order: 2 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        margin: 10px 0 !important;
    }
    .product-brand-mobile-wrap img {
        width: 200px !important; max-width: 80% !important;
        height: auto !important; max-height: 80px !important;
        object-fit: contain !important;
        background: none !important; padding: 0 !important;
        border: none !important; box-shadow: none !important;
        display: block !important;
    }
    /* Brand-above layout: лого ниже title, по центру */
    /* gap:24px из desktop — перебиваем, иначе добавляет 24px между title и logo */
    .product-top-header {
        flex-direction: column !important;
        align-items: center !important;
        gap: 4px !important;
        margin: 0 !important;
    }
    .product-top-header-title {
        order: 1 !important; width: 100% !important; flex: none !important; max-width: none !important;
    }
    .product-top-header-logo {
        order: 2 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        /* flex:0 0 260px из desktop → в column-flex это ВЫСОТА = 260px → ВИНОВНИК пустоты */
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 10px 0 !important;
    }
    .product-top-header-logo img {
        width: 200px !important; max-width: 80% !important;
        height: auto !important; max-height: 80px !important;
        object-fit: contain !important;
        background: none !important; padding: 0 !important;
        border: none !important; box-shadow: none !important;
        display: block !important;
    }

    /* Фото: border-radius 12px, тень */
    .product-photo-main {
        height: auto !important; min-height: 200px !important;
        border-radius: 12px !important; box-shadow: 0 4px 16px rgba(0,0,0,.3) !important;
        border: none !important;
    }
    #product-main-photo { touch-action: pan-y; will-change: transform; }
    .product-photo-grid { margin-top: 9px; }
    .product-photo-grid .photo-cell { box-shadow: 0 2px 8px rgba(0,0,0,.15) !important; }

    /* Описание: тёмно-серый на светлом фоне, 15px */
    .product-shortdesc,
    .product-shortdesc p,
    .product-shortdesc li { color: #4a5560 !important; font-size: 15px !important; }
    .product-shortdesc,
    .product-shortdesc * { background: transparent !important; }
    .product-shortdesc a { color: #e87b24 !important; }
    .cms-content,
    .cms-content p,
    .cms-content li,
    .cms-content h2,
    .cms-content h3 { color: #4a5560 !important; }
    .cms-content,
    .cms-content * { background: transparent !important; }
    .cms-content a { color: #e87b24 !important; }

    /* Таблица: тёмная карточка, 3 колонки (арт | нол | цена), кнопка скрыта JS для single-article */
    .product-articles {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        border-radius: 12px !important;
    }
    .product-articles-table {
        table-layout: auto !important;
        width: 100% !important;
        min-width: 0 !important;
        border-radius: 0 !important;
    }
    /* Скрываем только пустую ячейку qty (col4); col-params (col2) возвращён */
    .product-articles-table th:nth-child(4),
    .product-articles-table td:nth-child(4) { display: none !important; }
    /* Параметры: перенос в ~2 строки, достаточная ширина колонки */
    .product-articles-table td.col-params { white-space: normal !important; min-width: 140px; }
    /* min-width таблицы > экрана → принудительный горизонтальный скролл */
    .product-articles-table { min-width: 500px !important; }
    /* Gradient-fade перенесён на art-scroll-outer (не scroll-container) */
    .product-articles { position: relative !important; }
    .art-scroll-outer::after {
        content: "";
        position: absolute;
        top: 0; right: 0; bottom: 0;
        width: 48px;
        background: linear-gradient(to right, transparent, rgba(15,25,40,0.75));
        pointer-events: none;
        z-index: 2;
        transition: opacity 0.35s;
    }
    .art-scroll-outer.pa-scrolled::after { opacity: 0 !important; }
    /* Scroll-hint — аналог .cart-mob-scroll-hint */
    .pa-scroll-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: rgba(232,123,36,0.75);
        font-size: 12px;
        padding: 4px 0 4px;
        user-select: none;
        transition: opacity 0.3s ease;
    }
    .pa-scroll-hint.pash-hidden { opacity: 0 !important; pointer-events: none !important; }
    .pa-arrow {
        display: inline-block;
        font-size: 16px;
        font-weight: 700;
        animation: pa-bounce 1.1s ease-in-out infinite;
    }
    .pa-arrow:last-child { animation-delay: 0.2s; }
    @keyframes pa-bounce {
        0%   { opacity: 1;   transform: translateX(0); }
        50%  { opacity: 0.25; transform: translateX(5px); }
        100% { opacity: 1;   transform: translateX(0); }
    }
    /* Все ячейки без переноса */
    .product-articles-table th,
    .product-articles-table td { white-space: nowrap !important; }
    /* Шапка */
    .product-articles-table thead th {
        background: #1a2535 !important; color: #e87b24 !important;
        font-size: 11px !important; padding: 10px 8px !important;
    }
    /* Строки */
    .product-articles-table tbody tr { background: #0f1923 !important; border-bottom: 1px solid rgba(255,255,255,.06) !important; }
    .product-articles-table tbody tr:nth-child(even) { background: #121d2e !important; }
    .product-articles-table tbody td { color: rgba(255,255,255,.85) !important; padding: 12px 8px !important; font-size: 12px !important; }
    /* Цена: оранжевая, крупная */
    .product-articles-table .price { color: #e87b24 !important; font-size: 1.1rem !important; font-weight: 700 !important; }
    /* Кнопки в таблице (multi-article): компактные — не растягиваются */
    .product-articles-table td .btn-cart,
    .product-articles-table td .btn-request {
        width: auto !important; padding: 6px 10px !important;
        font-size: 11px !important; border-radius: 4px !important;
        min-height: auto !important; line-height: 1.4 !important;
        display: inline-block !important; margin: 0 !important;
        letter-spacing: 0 !important; white-space: nowrap !important;
        text-decoration: none !important; transform: none !important;
        vertical-align: middle !important;
    }
    /* .btn-cart global: стиль для big-btn под таблицей (JS создаёт с этим классом) */
    .btn-cart {
        width: 100% !important; padding: 8px 6px !important; font-size: 13px !important;
        border-radius: 6px !important; box-sizing: border-box !important; white-space: nowrap !important;
    }
    /* Кнопка «Pieprasīt» (OOS): единый стиль с «Ielikt grozā» */
    .btn-request {
        display: block !important; width: 100% !important; text-align: center !important;
        min-height: 48px !important; background: #e87b24 !important; color: #fff !important;
        font-size: 15px !important; font-weight: 700 !important; font-family: inherit !important;
        border: none !important; border-radius: 8px !important;
        cursor: pointer !important; margin-top: 6px !important;
        box-sizing: border-box !important; letter-spacing: .02em !important;
        white-space: nowrap !important; transform: none !important;
        text-decoration: none !important; line-height: 48px !important;
        padding: 0 16px !important;
    }
    .btn-request:active { opacity: .85 !important; }
    /* param-lines: светлый текст (перебивает color:#444 из inline <style>) */
    .param-lines { color: rgba(255,255,255,.6) !important; }
    /* price-note: hidden on mobile — margin-top:8px + text = ~26px ghost gap between table and button */
    .price-note { display: none !important; }
    /* Scroll arrows: wrapper + absolute overlay (JS appends art-arrow-l/r to art-scroll-outer) */
    .art-scroll-outer { position: relative !important; }
    .art-arrow {
        position: absolute !important;
        transform: translateY(-50%) !important;
        color: #8b97a8 !important;
        font-size: 16px !important; line-height: 1 !important;
        visibility: hidden; /* JS controls */
        pointer-events: none !important; user-select: none !important;
        z-index: 3 !important;
    }
    .art-arrow-l { left: 4px !important; }
    .art-arrow-r { right: 4px !important; }
    /* Паддинг снизу — плавающие кнопки (чат, корзина) не перекрывают покупку */
    .product-pane { padding-bottom: 80px !important; }
    /* Большая кнопка «Ielikt grozā» под таблицей (JS создаёт при 1 артикуле) */
    .btn-cart-mobile-full {
        display: block !important;
        width: 100% !important; min-height: 48px !important; line-height: 48px !important;
        padding: 0 16px !important;
        background: #e87b24 !important; color: #fff !important;
        font-size: 15px !important; font-weight: 700 !important; font-family: inherit !important;
        border: none !important; border-radius: 8px !important;
        cursor: pointer !important; margin-top: 6px !important;
        box-sizing: border-box !important; letter-spacing: .02em !important;
        text-align: center !important;
    }
    .btn-cart-mobile-full:active { opacity: .85 !important; }

    /* ── КОРЗИНА ── */
    /* Дата заказа (absolute) перекрывает шапку на узких экранах */
    .acct2-cartcard-orderdate {
        position: static !important;
        transform: none !important;
        display: block;
        margin-top: 4px;
        font-size: 12px;
    }
    /* Подвал карточки: стопка вместо flex-row */
    .acct2-cartcard-foot { flex-direction: column; gap: 10px; }
    /* Кнопка «Оформить» на всю ширину */
    .cart-actions .btn-buy { width: 100%; text-align: center; margin-left: 0; }

    /* ── ОФОРМЛЕНИЕ ЗАКАЗА ── */
    /* Summary в 1-колоночной сетке — убрать sticky */
    .checkout-summary { position: static !important; }
    /* Кнопка «Отправить заказ» на всю ширину */
    .checkout-form #co-submit { width: 100%; padding: 12px 20px; }

    /* ── ФИЛЬТР-БАР (категория) ── */
    /* Поиск бренда — на всё доступное место */
    .filter-brand-wrap { min-width: 0; flex: 1 1 auto; }
    .filter-brand-wrap input { width: 100%; }
    /* Цены: чуть уже */
    .filter-price-range input { width: 58px; }

    /* ── ФУТЕР ── */
    .footer-links { line-height: 2.4; }
    #footer .hdr-inner { padding-top: 14px; padding-bottom: 14px; }

    /* ── ТАБЛИЦЫ В CMS-СТРАНИЦАХ ── */
    .page-content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .cms-content table  { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* ── AI-ЧАТ: поднять выше плавающей корзины ── */
    /* #cart-panel на mobile: bottom:24px right:16px — ai-btn там же */
    #ai-chat-btn { bottom: 90px; }

    /* ── ПАГИНАЦИЯ: крупнее для тапа ── */
    .pagination a, .pagination .pg-current { padding: 8px 12px; }

    /* ── LANG: дропдаун на мобайл ── */
    #lang { height: 40px; flex-shrink: 0; border: none; border-radius: 0; overflow: visible; position: relative; }
    #lang-mob-btn {
        display: flex; align-items: center; justify-content: center; gap: 3px;
        height: 40px; width: 64px;
        background: #1a2535; color: rgba(255,255,255,.88);
        border: 1px solid #2a3950; border-radius: 8px;
        font: 600 12px/1 Inter,sans-serif; cursor: pointer; flex-shrink: 0;
        white-space: nowrap;
    }
    #lang-mob-btn:active { background: #20304a; }
    #lang-links {
        display: none; flex-direction: column;
        position: absolute; top: calc(100% + 4px); left: 0; right: 0;
        background: #1a2535; border: 1px solid rgba(255,255,255,.12);
        border-radius: 8px; overflow: hidden; z-index: 1999;
        box-shadow: 0 4px 16px rgba(0,0,0,.45);
    }
    #lang-links.open { display: flex; }
    #lang-links a {
        padding: 10px 0 !important; font-size: 13px !important;
        height: auto !important; border-right: 0 !important;
        border-bottom: 1px solid rgba(255,255,255,.07) !important;
        justify-content: center !important; text-align: center !important;
    }
    #lang-links a:last-child { border-bottom: 0 !important; }
    /* arrow spacing */
    #lang-mob-btn span { margin-left: 5px; }

    /* ── КАТЕГОРИИ: 1 в ряд, фото слева + название справа ── */
    .category-grid {
        grid-template-columns: 1fr !important;
        gap: 3px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    .category-card {
        background: var(--nav, #1a2535) !important;
        border-color: rgba(255,255,255,.08) !important;
        min-height: 68px !important;
        padding: 6px 12px 6px 6px !important;
        gap: 12px !important;
    }
    .category-card .cat-name {
        color: rgba(255,255,255,.88) !important;
        font-size: 0.9rem !important;
    }
    .category-card img,
    .category-card .cat-card-noimg {
        width: 56px !important;
        height: 56px !important;
        flex-shrink: 0 !important;
        object-fit: contain !important;
        background: #fff !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
        padding: 4px !important;
    }
    .category-card:hover { border-color: #e87b24 !important; }

    /* ── КАТАЛОГ: 1 товар в ряд, единый ритм зазоров ── */
    .product-grid, #ai-suggest-grid {
        grid-template-columns: 1fr !important;
        max-width: 100% !important;
        gap: 6px !important;
    }
    /* Фото: aspect-ratio вместо фиксированной высоты */
    .product-card .product-image {
        height: auto !important;
        aspect-ratio: 4/3;
    }
    .product-card .product-image img {
        max-height: 100% !important;
        width: auto !important;
        height: 100% !important;
        object-fit: contain !important;
    }
    /* Название — display:block гарантирует top-выравнивание (высота фиксирована в глобальном правиле) */
    .product-card .product-name,
    .product-card h3,
    .product-card h4 { white-space: normal; display: block !important; margin-top: 5px !important; }

    /* ── ХЛЕБНЫЕ КРОШКИ: скрыть на мобильном ── */
    .breadcrumb { display: none !important; }

    /* ── САЙДБАР: скрыть на всех страницах ── */
    #leftblock { display: none !important; }

    /* ── OVERFLOW BACKSTOP ── */
    html, body { overflow-x: hidden; }
    #container, #center, #content { max-width: 100% !important; box-sizing: border-box; }

    /* ── ФИЛЬТР-БАР: перенос строк ── */
    .filter-controls { flex-wrap: wrap !important; gap: 6px; }
    .filter-bar .filter-brand-wrap {
        flex: 1 1 120px !important;
        width: auto !important;
        min-width: 0 !important;
    }
    /* Mobile: show only Zīmols + price range; hide stock-checkbox and sort-select */
    .filter-bar .filter-stock-label { display: none !important; }
    .filter-bar .filter-select, #sort-filter { display: none !important; }
    /* Swipe indicator under product photo */
    .pnav-swipe-hint {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 14px;
        padding: 4px 0 4px;
        color: #8b97a8;
        touch-action: pan-y;
        order: 4 !important;
        width: 100% !important;
        box-sizing: border-box;
    }
    .pnav-sha {
        color: #8b97a8;
        font-size: 22px;
        line-height: 1;
        text-decoration: none;
        padding: 4px 10px;
    }
    .pnav-sha-off { opacity: 0.22; pointer-events: none; }
    .pnav-sha-mid { font-size: 11px; letter-spacing: 0.05em; color: #a0aab5; }
}

/* Brand logo above gallery (test: old_id=341652) — riki: width 150px */
.product-brand-above {
    display: block;
    width: 150px;
    height: auto;
    object-fit: contain;
    margin: 0 auto 12px;
}

/* Product 2-row header (test: old_id=341652) */
.product-top-header {
    display: flex;
    gap: 24px;
    align-items: center;
    margin: 12px 0 8px;
}
.product-top-header-logo {
    flex: 0 0 260px;
    max-width: 260px;
    display: flex;
    justify-content: center;
}
.product-top-header-title {
    flex: 1 1 auto;
    min-width: 0;
}
.product-top-header-title h1 {
    margin: 0;
    color: #1a2535;
    font-size: 1.4rem;
    line-height: 1.3;
    text-align: center;
}

/* Scroll anchor — AJAX product nav lands here */
#productPane { scroll-margin-top: 8px; }

/* Scroll anchor — catalog pagination lands here */
#products-grid { scroll-margin-top: 8px; }

#products-grid { min-height: 80vh; }
.pagination a, .pg-prev, .pg-next, #pg-jump-btn { cursor: pointer; }

.product-card { align-self: start; }

/* Company dropdown keyboard highlight */
.cl-dd-row.cl-dd-active { background: rgba(232,123,36,0.18) !important; }

/* ── Custom tooltips — JS renders [data-tip] as position:fixed overlay ─────── */
/* CSS ::after approach removed: .product-articles-table has overflow:hidden    */
/* which clips any ::after child. JS gd-tip (footer.php) handles all [data-tip] */
.has-tip, .has-tip-right { position: relative; }

/* ── Universal form validation (form-validate.js) ──────────────────────────── */
.pi-field-error input,
.pi-field-error select,
.pi-field-error textarea {
    border-color: #d9534f !important;
    box-shadow: 0 0 0 2px rgba(217,83,79,0.25);
}
.pi-field-err {
    display: block;
    color: #ff9ea5;
    font: 500 11px/1.3 Inter,sans-serif;
    margin-top: 4px;
}
/* Swipe between products indicator — hidden on desktop, shown in @media(max-width:767px) below */
@media (min-width: 768px) { .pnav-swipe-hint { display: none; } }




/* ── Product page: align breadcrumb + photo left edge with .recs-grid cards ──
   .recs-section has padding-left:20px; breadcrumb + #productPane have 0.
   :has() targets breadcrumb only when #productPane is on the same page.
   -- product-breadcrumb-align -- */
#productPane { padding-left: 20px; padding-right: 20px; }
#content:has(#productPane) > .breadcrumb { padding-left: 20px; }

@media (max-width: 767px) {
    /* Hide p-nav arrows on mobile — table scrolls via touch swipe */
    .product-articles-table thead .p-nav-prev,
    .product-articles-table thead .p-nav-next {
        display: none !important;
    }
    /* col-art: center "Artikuls" text without arrow gap */
    .product-articles-table th.col-art .p-art-wrap {
        display: block !important;
        position: static !important;
        text-align: center !important;
        padding-left: 0 !important;
    }
    /* col-pnav-next header: collapse — arrow gone, only body button sets column width */
    .product-articles-table th.col-pnav-next {
        padding: 0 !important;
        overflow: hidden !important;
    }
}

@media (max-width: 767px) {
    /* art-arrow nudge +2px mobile */
    .art-arrow { display: none !important; }
}

@media (max-width: 767px) {
    /* auth-dark mobile overflow fix:
       desktop margin:-16px compensates #container padding:16px,
       but mobile has padding:8px → card bleeds 8px each side */
    /* auth-dark bg remove mobile */
    .auth-dark-bg { display: none !important; }
    .auth-dark {
        margin: 0 !important;
        padding: 16px 12px 32px !important;
        background: transparent !important;
        min-height: 0 !important;
    }
    .auth-dark-card {
        max-width: 100% !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 767px) {
    /* auth-dark page bg mobile — kill white container bg behind login card */
    body:has(.auth-dark) { background: #16202e !important; }
    body:has(.auth-dark) #container { background: transparent !important; }
}

@media (max-width: 767px) {
    /* footer mobile flex-wrap — три блока, ровные переносы, ничего за край */
    #footer .hdr-inner {
        padding: 16px 12px 18px !important;
        overflow: hidden !important;
    }
    .footer-links,
    .footer-legal {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        line-height: 1 !important;
        gap: 2px 0 !important;
        margin-bottom: 10px !important;
    }
    .footer-links a,
    .footer-legal a {
        white-space: nowrap !important;
        font-size: 14px !important;
        padding: 4px 4px !important;
    }
    .footer-links .footer-sep,
    .footer-legal .footer-sep {
        white-space: nowrap !important;
        padding: 4px 0 !important;
        margin: 0 3px !important;
    }
    .footer-copy {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        line-height: 1 !important;
        gap: 2px 0 !important;
        font-size: 12px !important;
        margin-top: 4px !important;
    }
    .footer-copy .footer-sep {
        white-space: nowrap !important;
    }
    #footer-mail { margin-top: 2px !important; }
}
