/* ============================================================================
   ENSIMAX — modern-v01.css (v2: real-site selectors)
   Modern visual polish layer. Loaded AFTER styles.css and public-fixes-v*.css.
   Targets the ACTUAL class names on ensimax.com (.hero-clean, .trust-bar,
   .services-band, .services-grid, .product-card, .stock-in_stock, etc.).
   To roll back: remove the <link> from partials/head.php.
   ============================================================================ */

/* ---------- 0. Tokens & smooth transitions ---------- */
*, *::before, *::after {
  transition-property: color, background-color, border-color, box-shadow, transform, opacity;
  transition-duration: .25s;
  transition-timing-function: cubic-bezier(.2,.7,.2,1);
}
html { scroll-behavior: smooth; }
::selection { background: rgba(196,48,43,.20); color: #071421; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #c4302b;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- 1. Header — glassmorphism on scroll ---------- */
.site-header {
  transition: background .35s ease, box-shadow .35s ease, backdrop-filter .35s ease, padding .25s ease;
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
}
.site-header.is-scrolled {
  background: rgba(7, 20, 33, 0.78) !important;
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 8px 28px rgba(0,0,0,.22);
}

/* ---------- 2. Hero (.hero-clean) — depth, accent glow, grid pattern ---------- */
.hero-clean, .page-hero, .hero {
  position: relative;
  overflow: hidden;
}
.hero-clean::before, .page-hero::before, .hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -15%;
  width: 70%;
  height: 160%;
  background: radial-gradient(closest-side, rgba(196,48,43,.18), transparent 70%);
  pointer-events: none;
  z-index: 1;
}
.hero-clean::after, .page-hero::after, .hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: -1px -1px;
  pointer-events: none;
  z-index: 1;
  -webkit-mask-image: radial-gradient(ellipse at 30% 50%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at 30% 50%, #000 30%, transparent 75%);
}
.hero-clean > .hero-bg { z-index: 0; }
.hero-clean > .container, .hero-clean .hero-clean-inner,
.page-hero > .container, .hero > .container { position: relative; z-index: 2; }

.hero-clean h1, .page-hero h1, .hero h1 {
  background: linear-gradient(135deg, #ffffff 0%, #b9c5d8 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: -.025em;
}

/* Hero CTA buttons get a soft red glow */
.hero-clean .hero-actions .btn,
.hero-clean .hero-actions a {
  position: relative;
  z-index: 3;
}

/* ---------- 3. Trust bar (stats) — animated gradient numbers ---------- */
.trust-bar { position: relative; }
.trust-bar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(196,48,43,.45), transparent);
}
.trust-grid { gap: 24px; }
.trust-item {
  position: relative;
  padding: 16px 8px;
  text-align: center;
  transition: transform .35s ease;
}
.trust-item:hover { transform: translateY(-3px); }
.trust-item strong {
  display: block;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, #c4302b 0%, #e04540 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
  margin-bottom: 8px;
}
.trust-item span {
  font-size: 14px;
  color: #667085;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 500;
}

/* ---------- 4. Product cards — lift, glow, image zoom ---------- */
.product-card {
  position: relative;
  border-radius: 14px;
  border: 1px solid #dfe4eb;
  background: #fff;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s cubic-bezier(.2,.7,.2,1), border-color .25s ease;
  will-change: transform;
}
.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(196,48,43,0);
  transition: box-shadow .35s ease;
  z-index: 1;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -12px rgba(7,20,33,.22), 0 8px 16px -8px rgba(7,20,33,.12);
  border-color: rgba(196,48,43,.40);
}
.product-card:hover::before {
  box-shadow: inset 0 0 0 1px rgba(196,48,43,.22);
}
.product-card .product-image {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f6f8fb 0%, #eef2f7 100%);
}
.product-card .product-image img {
  transition: transform .55s cubic-bezier(.2,.7,.2,1);
}
.product-card:hover .product-image img { transform: scale(1.06); }
.product-card .product-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.30) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform .8s ease;
  pointer-events: none;
}
.product-card:hover .product-image::after { transform: translateX(100%); }

/* Stock pills (real classes: stock-in_stock, stock-low_stock, stock-out_of_stock) */
.product-card .stock-status,
.stock-status {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f6f8fb;
  border: 1px solid #dfe4eb;
  font-weight: 500;
}
.stock-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #667085;
  display: inline-block;
}
.stock-in_stock span, .stock-in span, .stock-available span {
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}
.stock-low_stock span, .stock-low span {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245,158,11,.18);
}
.stock-out_of_stock span, .stock-out span, .stock-unavailable span {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,.18);
}

/* ---------- 5. Buttons — modern, with hover lift + shimmer ---------- */
.btn {
  position: relative;
  overflow: hidden;
  font-weight: 600;
  letter-spacing: .01em;
  border-radius: 8px;
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-dark, .btn-primary {
  background: linear-gradient(135deg, #071421 0%, #0b2545 100%);
  color: #fff;
  border: 1px solid #0b2545;
  box-shadow: 0 4px 12px rgba(7,20,33,.18);
}
.btn-dark:hover, .btn-primary:hover {
  box-shadow: 0 12px 28px rgba(7,20,33,.30);
  background: linear-gradient(135deg, #0b2545 0%, #143064 100%);
}

.btn-accent, .btn-cta, .btn-red {
  background: linear-gradient(135deg, #c4302b 0%, #e04540 100%);
  color: #fff;
  border: 1px solid #c4302b;
  box-shadow: 0 4px 12px rgba(196,48,43,.25);
}
.btn-accent:hover, .btn-cta:hover, .btn-red:hover {
  box-shadow: 0 12px 28px rgba(196,48,43,.42);
}

.btn-ghost, .btn-outline {
  background: transparent;
  border: 1px solid #dfe4eb;
  color: #101828;
}
.btn-ghost:hover, .btn-outline:hover {
  background: #f6f8fb;
  border-color: #071421;
}

.btn-dark::after, .btn-primary::after, .btn-accent::after, .btn-cta::after, .btn-red::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  transition: left .7s ease;
}
.btn-dark:hover::after, .btn-primary:hover::after,
.btn-accent:hover::after, .btn-cta:hover::after, .btn-red:hover::after { left: 100%; }

/* ---------- 6. Section reveal on scroll (toggled by modern.js) ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1);
}
[data-reveal].is-revealed { opacity: 1; transform: translateY(0); }
[data-reveal-delay="1"].is-revealed { transition-delay: .08s; }
[data-reveal-delay="2"].is-revealed { transition-delay: .16s; }
[data-reveal-delay="3"].is-revealed { transition-delay: .24s; }
[data-reveal-delay="4"].is-revealed { transition-delay: .32s; }

/* ---------- 7. Services band (.services-band .services-grid > article) ---------- */
.services-band { position: relative; overflow: hidden; }
.services-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
  opacity: .6;
}
.services-band > .container { position: relative; z-index: 1; }

.services-grid article,
.service-card, .uslugi-card {
  position: relative;
  border-radius: 14px;
  padding: 28px 24px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: #e5edf7;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease, background .3s ease;
  overflow: hidden;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.services-grid article::before,
.service-card::before, .uslugi-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(closest-side, rgba(196,48,43,.12), transparent 70%);
  opacity: 0;
  transition: opacity .4s ease;
  pointer-events: none;
}
.services-grid article:hover,
.service-card:hover, .uslugi-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px -12px rgba(0,0,0,.45);
  border-color: rgba(196,48,43,.35);
  background: rgba(255,255,255,0.06);
}
.services-grid article:hover::before,
.service-card:hover::before, .uslugi-card:hover::before { opacity: 1; }

.services-grid article h3,
.services-grid article h2,
.service-card h3, .uslugi-card h3 {
  color: #fff;
  margin: 0 0 10px;
}
.services-grid article .icon,
.service-card .icon, .uslugi-card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(196,48,43,.20), rgba(196,48,43,.06));
  color: #ff8a85;
  margin-bottom: 16px;
  transition: transform .35s ease;
}
.services-grid article:hover .icon,
.service-card:hover .icon, .uslugi-card:hover .icon {
  transform: scale(1.08) rotate(-4deg);
}

/* ---------- 8. Products-home section polish ---------- */
.products-home { position: relative; }
.products-home h2 { letter-spacing: -.01em; }

/* ---------- 9. Filter sidebar — sticky ---------- */
.catalog-layout aside,
.catalog-sidebar,
.filter-sidebar,
.catalog-filters {
  position: sticky;
  top: 96px;
  align-self: start;
  max-height: calc(100vh - 116px);
  overflow-y: auto;
}

/* ---------- 10. Skeleton ---------- */
@keyframes skel-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.skeleton {
  background: linear-gradient(90deg, #eef2f7 25%, #f6f8fb 50%, #eef2f7 75%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.4s infinite linear;
  border-radius: 8px;
  color: transparent !important;
}

/* ---------- 11. Footer ---------- */
.site-footer, footer.site-footer {
  position: relative;
  overflow: hidden;
}
.site-footer::before, footer.site-footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #c4302b, transparent);
}

/* ---------- 12. Quick view modal ---------- */
.qv-backdrop {
  position: fixed; inset: 0;
  background: rgba(7,20,33,.68);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.qv-backdrop.is-open { opacity: 1; pointer-events: auto; }
.qv-dialog {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 760px;
  width: calc(100% - 32px);
  max-height: 86vh;
  overflow-y: auto;
  padding: 32px;
  transform: translateY(20px) scale(.98);
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
  box-shadow: 0 30px 80px rgba(7,20,33,.42);
}
.qv-backdrop.is-open .qv-dialog { transform: translateY(0) scale(1); }
.qv-close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #f6f8fb;
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.qv-close:hover { background: #e6ebf2; transform: rotate(90deg); }

/* ---------- 13. Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: #071421;
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(7,20,33,.30);
  display: flex; align-items: center; gap: 12px;
  z-index: 1100;
  transform: translateY(140%);
  transition: transform .4s cubic-bezier(.2,.7,.2,1);
}
.toast.is-visible { transform: translateY(0); }

/* ---------- 14. Breadcrumbs ---------- */
.breadcrumbs {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: 13px;
  color: #667085;
  padding: 12px 0;
}
.breadcrumbs a {
  color: #667085;
  border-bottom: 1px dashed transparent;
}
.breadcrumbs a:hover {
  color: #c4302b;
  border-bottom-color: #c4302b;
}
.breadcrumbs .sep { opacity: .5; }
.breadcrumbs .current { color: #071421; font-weight: 500; }

/* ---------- 15. Mobile niceties ---------- */
@media (max-width: 720px) {
  .hero-clean h1, .page-hero h1, .hero h1 { font-size: clamp(1.6rem, 7vw, 2.4rem); }
  .product-card:hover { transform: translateY(-2px); }
  .catalog-layout aside, .catalog-sidebar, .filter-sidebar, .catalog-filters {
    position: static; max-height: none;
  }
  .trust-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* ---------- 16. Reduced-motion respect ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---------- 17. Print ---------- */
@media print {
  .site-header, .site-footer, .btn, .filter-sidebar, .catalog-sidebar { display: none !important; }
  body { background: #fff; color: #000; }
}


/* ============================================================================
   Phase B/C additions — single product page, breadcrumbs, filter chips
   ============================================================================ */

/* ---------- B1. Breadcrumbs ---------- */
.breadcrumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 13px;
  color: #667085;
  padding: 12px 0;
  margin: 0;
}
.breadcrumbs a {
  color: inherit;
  border-bottom: 1px dashed transparent;
  transition: color .2s ease, border-color .2s ease;
}
.breadcrumbs a:hover { color: #c4302b; border-bottom-color: #c4302b; }
.breadcrumbs .sep { opacity: .5; }
.breadcrumbs .current { color: #fff; font-weight: 500; }
/* Breadcrumbs ON dark hero — make them light */
.page-hero .breadcrumbs, .hero-clean .breadcrumbs, .hero .breadcrumbs,
.breadcrumbs-on-hero {
  color: rgba(255,255,255,.65);
  position: relative;
  z-index: 2;
  margin-bottom: 12px;
}
.page-hero .breadcrumbs a, .hero-clean .breadcrumbs a, .hero .breadcrumbs a,
.breadcrumbs-on-hero a {
  color: rgba(255,255,255,.75);
}
.page-hero .breadcrumbs a:hover, .hero-clean .breadcrumbs a:hover,
.breadcrumbs-on-hero a:hover {
  color: #ffb6b3;
  border-bottom-color: #ffb6b3;
}
.breadcrumbs-on-hero .current { color: #fff; }

/* ---------- B2. Filter chips ---------- */
.filter-chips {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 8px 0 18px;
  padding: 10px 12px;
  background: rgba(196,48,43,.04);
  border: 1px solid rgba(196,48,43,.18);
  border-radius: 10px;
}
.filter-chips-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #667085;
  margin-right: 4px;
}
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px 5px 12px;
  border-radius: 999px;
  background: #fff;
  color: #c4302b;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid rgba(196,48,43,.25);
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.filter-chip:hover {
  background: #c4302b;
  color: #fff;
  border-color: #c4302b;
  transform: translateY(-1px);
}
.filter-chip .chip-x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: rgba(196,48,43,.12);
  color: #c4302b;
  font-size: 12px;
  line-height: 1;
  margin-left: 2px;
}
.filter-chip:hover .chip-x { background: rgba(255,255,255,.25); color: #fff; }
.filter-chips-clear {
  margin-left: auto;
  font-size: 13px;
  color: #667085;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: text-decoration-color .2s ease, color .2s ease;
}
.filter-chips-clear:hover {
  color: #c4302b;
  text-decoration-color: #c4302b;
}

/* ---------- C1. Single product page — layout ---------- */
.product-detail-v2 {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  margin: 24px 0 56px;
  align-items: start;
}
@media (max-width: 900px) {
  .product-detail-v2 { grid-template-columns: 1fr; gap: 28px; }
}

/* ---------- C2. Gallery ---------- */
.pd-gallery { position: sticky; top: 96px; }
@media (max-width: 900px) { .pd-gallery { position: static; } }
.pd-main {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(135deg, #f6f8fb 0%, #eef2f7 100%);
  border: 1px solid #dfe4eb;
  aspect-ratio: 4 / 3;
}
.pd-main-img {
  width: 100%; height: 100%;
  object-fit: contain;
  padding: 24px;
  transition: transform .35s ease;
  cursor: zoom-in;
}
.pd-main:hover .pd-main-img { transform: scale(1.04); }
.pd-zoom-btn {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  border: 1px solid #dfe4eb;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(7,20,33,.08);
}
.pd-zoom-btn:hover {
  background: #071421;
  color: #fff;
  border-color: #071421;
  transform: rotate(45deg);
}
.pd-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.pd-thumb {
  background: #fff;
  border: 2px solid #dfe4eb;
  border-radius: 8px;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 1;
  transition: border-color .2s ease, transform .2s ease;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb:hover { border-color: #0b2545; transform: translateY(-2px); }
.pd-thumb.is-active { border-color: #c4302b; }

/* Gallery lightbox / zoom view */
.pd-lightbox {
  position: fixed; inset: 0;
  background: rgba(7,20,33,.92);
  z-index: 1100;
  display: none;
  align-items: center; justify-content: center;
  padding: 32px;
  cursor: zoom-out;
}
.pd-lightbox.is-open { display: flex; }
.pd-lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5);
}

/* ---------- C3. Product meta ---------- */
.pd-meta .badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #c4302b;
  background: rgba(196,48,43,.10);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.pd-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 12px;
  letter-spacing: -.01em;
  line-height: 1.15;
}
.sku-line {
  font-size: 13px;
  color: #667085;
  margin: 0 0 14px;
}
.sku-line code {
  background: #f6f8fb;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  color: #101828;
  border: 1px solid #dfe4eb;
}
.pd-summary {
  color: #475467;
  line-height: 1.6;
  margin: 0 0 20px;
}
.pd-price-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
  padding: 16px 0;
  border-top: 1px solid #dfe4eb;
  border-bottom: 1px solid #dfe4eb;
  margin: 0 0 20px;
}

/* ---------- C4. Actions: qty + buttons ---------- */
.pd-actions {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin-bottom: 28px;
  position: sticky;
  bottom: 0;
  background: linear-gradient(180deg, transparent, #fff 30%);
  padding-top: 16px;
  z-index: 5;
}
@media (max-width: 900px) {
  .pd-actions {
    position: fixed; left: 0; right: 0; bottom: 0;
    background: #fff;
    border-top: 1px solid #dfe4eb;
    padding: 12px 16px;
    box-shadow: 0 -8px 24px rgba(7,20,33,.10);
    margin: 0;
    z-index: 50;
  }
  .pd-add-form { flex: 1; }
  .btn-inquire { display: none !important; }
  /* Add some space at bottom so content doesn't get hidden under sticky bar */
  .product-detail-v2 { padding-bottom: 80px; }
}
.pd-add-form {
  display: flex; gap: 8px; align-items: stretch;
}
.qty-control {
  display: inline-flex; align-items: stretch;
  border: 1px solid #dfe4eb;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.qty-btn {
  width: 38px;
  border: none;
  background: #f6f8fb;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  color: #475467;
  transition: background .2s ease, color .2s ease;
}
.qty-btn:hover { background: #c4302b; color: #fff; }
.qty-input {
  width: 60px;
  border: none;
  border-left: 1px solid #dfe4eb;
  border-right: 1px solid #dfe4eb;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none; margin: 0;
}
.btn-add {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding-left: 20px; padding-right: 20px;
  min-height: 44px;
}
.btn-inquire {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px;
  padding-left: 18px; padding-right: 18px;
}

/* ---------- C5. Tabs ---------- */
.pd-tabs { margin-top: 24px; }
.pd-tab-nav {
  display: flex; gap: 4px;
  border-bottom: 1px solid #dfe4eb;
  margin-bottom: 16px;
}
.pd-tab {
  background: none;
  border: none;
  padding: 10px 16px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #667085;
  cursor: pointer;
  position: relative;
  letter-spacing: .01em;
  transition: color .2s ease;
}
.pd-tab:hover { color: #101828; }
.pd-tab.is-active { color: #c4302b; }
.pd-tab.is-active::after {
  content: '';
  position: absolute;
  left: 12px; right: 12px;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(90deg, #c4302b, #e04540);
  border-radius: 2px 2px 0 0;
}
.pd-tab-pane { display: none; line-height: 1.65; color: #344054; }
.pd-tab-pane.is-active { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.pd-specs { width: 100%; border-collapse: collapse; }
.pd-specs th, .pd-specs td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid #eef2f7;
  font-size: 14px;
}
.pd-specs th {
  color: #667085;
  font-weight: 500;
  width: 35%;
  background: #fafbfc;
}
.pd-specs td { color: #101828; font-weight: 500; }

/* ---------- C6. Related products ---------- */
.pd-related { margin-top: 56px; }
.pd-related-head {
  display: flex; align-items: end; justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid #dfe4eb;
  padding-bottom: 12px;
}
.pd-related-head h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  letter-spacing: -.01em;
}
.pd-related-all {
  color: #667085;
  font-size: 14px;
  font-weight: 500;
  transition: color .2s ease;
}
.pd-related-all:hover { color: #c4302b; }
.pd-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* ---------- Page-hero compact variant for produkt.php ---------- */
.page-hero.compact {
  padding-top: 18px;
  padding-bottom: 18px;
}
.page-hero.compact h1 { display: none; }


/* ============================================================================
   ROOT_v04 — feedback fixes (hero CTA, card alignment, services contrast, category tiles)
   ============================================================================ */

/* ---------- 14. Hero outline button visibility on dark hero ---------- */
.hero-clean .btn,
.page-hero .btn {
  font-weight: 600;
}
.hero-clean .btn-outline,
.hero-clean a.btn-outline,
.page-hero .btn-outline,
.page-hero a.btn-outline {
  color: #ffffff !important;
  background: rgba(255,255,255,0.06) !important;
  border: 2px solid rgba(255,255,255,0.55) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero-clean .btn-outline:hover,
.page-hero .btn-outline:hover {
  background: #c4302b !important;
  border-color: #c4302b !important;
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(196,48,43,.55);
}
.hero-clean .btn-primary,
.page-hero .btn-primary {
  border: 2px solid transparent;
}

/* ---------- 15. Product card — equal-height columns, aligned buttons ---------- */
.products-grid,
.products-grid-catalog,
.products-grid-related {
  align-items: stretch;
}
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.product-card .product-image {
  flex: 0 0 auto;
}
.product-card .product-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 8px;
  padding: 16px 18px 18px;
}
.product-card .product-meta-row { order: 1; }
.product-card .product-title    { order: 2; min-height: 2.6em; }
.product-card .product-summary  { order: 3; min-height: 2.4em; color: #475569; font-size: 14px; line-height: 1.4; }
.product-card .price            { order: 4; margin-top: auto; }
.product-card .stock-status     { order: 5; }
.product-card .card-actions     { order: 6; display: flex; flex-direction: column; gap: 8px; }
.product-card .card-actions .btn,
.product-card .card-actions form { width: 100%; }
.product-card .card-actions .btn { display: inline-flex; align-items: center; justify-content: center; }
.product-card .card-actions form button { width: 100%; }

/* Two-column action layout on wider cards */
@media (min-width: 520px) {
  .product-card .card-actions {
    flex-direction: row;
    align-items: stretch;
  }
  .product-card .card-actions .btn,
  .product-card .card-actions form { flex: 1 1 0; min-width: 0; }
}

/* ---------- 16. Services cards — improved contrast on dark band ---------- */
.services-band {
  background: linear-gradient(180deg, #071421 0%, #0b2545 100%);
}
.services-grid article,
.service-card,
.uslugi-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0.04) 100%) !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  color: #f1f5f9 !important;
}
.services-grid article h3,
.services-grid article h2,
.service-card h3,
.service-card h2,
.uslugi-card h3 {
  color: #ffffff !important;
  font-weight: 700;
}
.services-grid article p,
.service-card p,
.uslugi-card p {
  color: #cbd5e1 !important;
  line-height: 1.55;
}
.services-grid article:hover,
.service-card:hover,
.uslugi-card:hover {
  background: linear-gradient(180deg, rgba(196,48,43,0.18) 0%, rgba(255,255,255,0.06) 100%) !important;
  border-color: rgba(196,48,43,0.55) !important;
}

/* ---------- 17. Catalog category landing tiles ---------- */
.category-landing {
  margin: 0 0 32px;
}
.category-landing-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.category-landing-head h2 {
  margin: 0;
  font-size: 22px;
  color: #071421;
}
.category-landing-head .all-link {
  font-size: 14px;
  color: #c4302b;
  text-decoration: none;
  font-weight: 600;
}
.category-landing-head .all-link:hover { text-decoration: underline; }
.category-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.category-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 20px;
  min-height: 140px;
  border-radius: 14px;
  background: linear-gradient(140deg, #ffffff 0%, #f6f8fb 100%);
  border: 1px solid #dfe4eb;
  color: #071421;
  text-decoration: none;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease, border-color .25s ease;
}
.category-tile::before {
  content: '';
  position: absolute;
  inset: auto -40px -40px auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(196,48,43,0.10) 0%, rgba(196,48,43,0) 70%);
  transition: transform .4s ease;
}
.category-tile:hover {
  transform: translateY(-4px);
  border-color: rgba(196,48,43,0.40);
  box-shadow: 0 18px 36px -16px rgba(7,20,33,0.20);
}
.category-tile:hover::before { transform: scale(1.4); }
.category-tile-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 0 0 6px;
}
.category-tile-count {
  font-size: 13px;
  color: #64748b;
  margin: 0;
}
.category-tile-arrow {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #c4302b;
}
.category-tile:hover .category-tile-arrow { gap: 10px; }


/* ---------- 18. About page list styling ---------- */
.about-list {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.about-list li {
  position: relative;
  padding-left: 26px;
  line-height: 1.5;
  color: #334155;
}
.about-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #c4302b, #7a1d1a);
  box-shadow: 0 2px 4px -1px rgba(196,48,43,.4);
}
.panel .about-list { margin-top: 16px; }


/* ============================================================================
   ROOT_v05 — fix project card alignment, services on light page, blue category tiles
   ============================================================================ */

/* ---------- 19. Project card (proekti.php) — aligned buttons ---------- */
.projects-grid {
  align-items: stretch;
}
.project-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #ffffff;
  border: 1px solid #dfe4eb;
  border-radius: 14px;
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease, border-color .25s ease;
}
.project-card:hover {
  transform: translateY(-6px);
  border-color: rgba(11,37,69,0.30);
  box-shadow: 0 20px 40px -12px rgba(7,20,33,.18);
}
.project-card .ph {
  flex: 0 0 auto;
  background: linear-gradient(135deg, #f6f8fb 0%, #eef2f7 100%);
}
.project-card .body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  gap: 10px;
  padding: 18px 20px 20px;
}
.project-card .body .badge       { order: 1; align-self: flex-start; }
.project-card .body h3           { order: 2; margin: 4px 0 0; color: #071421; }
.project-card .body p            { order: 3; color: #475569; line-height: 1.5; margin: 0; }
.project-card-actions            { order: 4; margin-top: auto; display: flex; gap: 10px; }
.project-card-actions .btn       { flex: 1 1 0; min-width: 0; justify-content: center; }

/* ---------- 20. Services / uslugi on LIGHT background — opaque cards ---------- */
/* The services-grid is reused on BOTH the dark home band AND the light /uslugi.php page.
   The earlier section 16 styles assume a dark background. For the light page we override. */

/* Only apply glass-dark styles INSIDE the dark services-band on the home page */
.services-band .services-grid article,
.services-band .service-card,
.services-band .uslugi-card {
  /* keep dark glass look from section 16 */
}

/* When .services-grid is NOT inside a dark band (uslugi.php), use solid light cards */
.content-wrap .services-grid article,
.content-wrap .services-grid .panel,
.content-wrap .service-card,
.content-wrap .uslugi-card,
section:not(.services-band) > .container > .services-grid article,
section:not(.services-band) > .container > .services-grid .panel {
  background: #ffffff !important;
  border: 1px solid #dfe4eb !important;
  color: #0f172a !important;
  box-shadow: 0 6px 18px -10px rgba(7,20,33,0.18);
}
.content-wrap .services-grid article h2,
.content-wrap .services-grid article h3,
.content-wrap .services-grid .panel h2,
.content-wrap .services-grid .panel h3,
.content-wrap .service-card h3,
.content-wrap .uslugi-card h3 {
  color: #071421 !important;
  font-weight: 700;
}
.content-wrap .services-grid article p,
.content-wrap .services-grid .panel p,
.content-wrap .service-card p,
.content-wrap .uslugi-card p {
  color: #475569 !important;
  line-height: 1.55;
}
.content-wrap .services-grid article:hover,
.content-wrap .services-grid .panel:hover,
.content-wrap .service-card:hover,
.content-wrap .uslugi-card:hover {
  background: #ffffff !important;
  border-color: rgba(196,48,43,0.40) !important;
  box-shadow: 0 18px 36px -14px rgba(7,20,33,.22);
  transform: translateY(-5px);
}

/* ---------- 21. Category tiles — switch hover/glow from red to blue/navy ---------- */
.category-tile::before {
  background: radial-gradient(circle at center, rgba(11,37,69,0.12) 0%, rgba(11,37,69,0) 70%) !important;
}
.category-tile:hover {
  border-color: rgba(11,37,69,0.40) !important;
  box-shadow: 0 18px 36px -14px rgba(11,37,69,0.30) !important;
}
.category-tile-arrow {
  color: #0b2545 !important;
}
.category-tile-name {
  color: #071421;
}


/* ============================================================================
   ROOT_v06 — out-of-stock guard, home product carousel
   ============================================================================ */

/* ---------- 22. Home product carousel ---------- */
.products-carousel {
  position: relative;
  margin: 8px 0 4px;
}
.pc-viewport {
  overflow: hidden;
  margin: 0 56px;
  position: relative;
}
.pc-track {
  display: flex;
  gap: 18px;
  transition: transform .55s cubic-bezier(.22,.7,.18,1);
  will-change: transform;
}
.pc-slide {
  flex: 0 0 calc((100% - 3*18px) / 4);
  min-width: 0;
  display: flex;
}
.pc-slide > .product-card { width: 100%; }

@media (max-width: 1100px) {
  .pc-slide { flex-basis: calc((100% - 2*18px) / 3); }
}
@media (max-width: 800px) {
  .pc-slide { flex-basis: calc((100% - 18px) / 2); }
  .pc-viewport { margin: 0 44px; }
}
@media (max-width: 520px) {
  .pc-slide { flex-basis: 100%; }
  .pc-viewport { margin: 0 40px; }
}

.pc-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #dfe4eb;
  background: #ffffff;
  color: #0b2545;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px -8px rgba(7,20,33,.30);
  transition: transform .25s ease, background .25s ease, border-color .25s ease, color .25s ease;
}
.pc-arrow:hover {
  background: #0b2545;
  color: #ffffff;
  border-color: #0b2545;
  transform: translateY(-50%) scale(1.06);
}
.pc-arrow:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: translateY(-50%);
}
.pc-prev { left: 0; }
.pc-next { right: 0; }


/* ============================================================================
   ROOT_v07 — mobile menu safety, cart total, carousel arrow z-index
   ============================================================================ */

.products-carousel .pc-arrow {
  z-index: 5;
  pointer-events: auto;
}
.products-carousel .pc-viewport { z-index: 1; }

.cart-total strong {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 768px) {
  .main-nav.open {
    animation: navSlide .25s ease-out;
  }
}
@keyframes navSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ===== Section 27: Catalog sidebar mobile fix (ROOT_v09) ===== */
@media (max-width:980px){
  .catalog-sidebar{position:static !important;top:auto !important;width:100% !important;margin-bottom:18px;box-shadow:0 2px 8px rgba(7,20,33,.08);z-index:1}
}
@media (min-width:981px){
  .catalog-sidebar{z-index:2;background:#fff}
}

/* ===== Section 28: Theme toggle button (ROOT_v11) ===== */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.14);color:#fff;cursor:pointer;transition:background .2s,transform .2s;padding:0;margin-right:6px}
.theme-toggle:hover{background:rgba(255,255,255,.12);transform:translateY(-1px)}
.theme-toggle .icon-sun,.theme-toggle .icon-moon{display:none}
html[data-theme="light"] .theme-toggle .icon-moon{display:block}
html[data-theme="dark"] .theme-toggle .icon-sun{display:block}
html:not([data-theme]) .theme-toggle .icon-moon{display:block}

/* ===== Section 29: Theme variables (ROOT_v11) ===== */
html[data-theme="light"]{--page-bg:#f5f7fa;--page-fg:#0b1a2b;--card-bg:#ffffff;--card-fg:#0b1a2b;--muted:#5a6577;--border:#dde3ec;--accent:#c4302b;--link:#0b4a8f;--input-bg:#ffffff;--input-fg:#0b1a2b;--input-border:#cdd5e0;--footer-bg:#071421;--footer-fg:#c5cfdb}
html[data-theme="dark"]{--page-bg:#0a141e;--page-fg:#e8eef6;--card-bg:#0f1d2c;--card-fg:#e8eef6;--muted:#9aa6b8;--border:#1c2c40;--accent:#e54d47;--link:#7ab0ff;--input-bg:#152535;--input-fg:#e8eef6;--input-border:#23364d;--footer-bg:#06101a;--footer-fg:#c5cfdb}

/* ===== Section 30: Dark theme — page surfaces (ROOT_v11) ===== */
html[data-theme="dark"] body,html[data-theme="dark"] main,html[data-theme="dark"] .content-wrap{background:var(--page-bg) !important;color:var(--page-fg) !important}
html[data-theme="dark"] .stats-band,html[data-theme="dark"] .stats-band *{background:var(--page-bg) !important;color:var(--page-fg) !important}

/* ===== Section 31: Dark theme — cards & panels (ROOT_v11) ===== */
html[data-theme="dark"] .panel,
html[data-theme="dark"] .product-card,
html[data-theme="dark"] .project-card,
html[data-theme="dark"] .category-tile,
html[data-theme="dark"] .service-card,
html[data-theme="dark"] .catalog-sidebar,
html[data-theme="dark"] .cart-table,
html[data-theme="dark"] .cart-total,
html[data-theme="dark"] .info-card,
html[data-theme="dark"] .contact-card,
html[data-theme="dark"] .empty-state,
html[data-theme="dark"] .empty-cart,
html[data-theme="dark"] .about-card,
html[data-theme="dark"] .services-grid article,
html[data-theme="dark"] aside,
html[data-theme="dark"] section .card{background:var(--card-bg) !important;color:var(--card-fg) !important;border-color:var(--border) !important}

/* Force readable text inside cards (overrides hard-coded dark-blue colors) */
html[data-theme="dark"] .panel h1,html[data-theme="dark"] .panel h2,html[data-theme="dark"] .panel h3,html[data-theme="dark"] .panel h4,html[data-theme="dark"] .panel h5,
html[data-theme="dark"] .product-card h1,html[data-theme="dark"] .product-card h2,html[data-theme="dark"] .product-card h3,html[data-theme="dark"] .product-card h4,
html[data-theme="dark"] .project-card h1,html[data-theme="dark"] .project-card h2,html[data-theme="dark"] .project-card h3,html[data-theme="dark"] .project-card h4,
html[data-theme="dark"] .category-tile h1,html[data-theme="dark"] .category-tile h2,html[data-theme="dark"] .category-tile h3,html[data-theme="dark"] .category-tile h4,
html[data-theme="dark"] .contact-card h1,html[data-theme="dark"] .contact-card h2,html[data-theme="dark"] .contact-card h3,html[data-theme="dark"] .contact-card h4,
html[data-theme="dark"] .about-card h1,html[data-theme="dark"] .about-card h2,html[data-theme="dark"] .about-card h3,html[data-theme="dark"] .about-card h4,
html[data-theme="dark"] .empty-state h1,html[data-theme="dark"] .empty-state h2,html[data-theme="dark"] .empty-state h3,html[data-theme="dark"] .empty-state h4,
html[data-theme="dark"] .empty-cart h1,html[data-theme="dark"] .empty-cart h2,html[data-theme="dark"] .empty-cart h3,html[data-theme="dark"] .empty-cart h4,
html[data-theme="dark"] aside h1,html[data-theme="dark"] aside h2,html[data-theme="dark"] aside h3,html[data-theme="dark"] aside h4{color:var(--card-fg) !important}

html[data-theme="dark"] .panel p,html[data-theme="dark"] .product-card p,html[data-theme="dark"] .project-card p,html[data-theme="dark"] .category-tile p,html[data-theme="dark"] .contact-card p,html[data-theme="dark"] .about-card p,html[data-theme="dark"] .empty-state p,html[data-theme="dark"] .empty-cart p,html[data-theme="dark"] aside p,html[data-theme="dark"] aside label{color:var(--muted) !important}

/* Sub-info (SKU, badges, prices) */
html[data-theme="dark"] .badge,html[data-theme="dark"] .product-cat,html[data-theme="dark"] .sku,html[data-theme="dark"] .chip,html[data-theme="dark"] .tag{background:rgba(122,176,255,.12) !important;color:#9ec3ff !important;border-color:rgba(122,176,255,.24) !important}
html[data-theme="dark"] .price,html[data-theme="dark"] .product-price{color:#ff8e83 !important}

/* Card links */
html[data-theme="dark"] .panel a,html[data-theme="dark"] .product-card a,html[data-theme="dark"] .project-card a,html[data-theme="dark"] .category-tile a,html[data-theme="dark"] .about-card a{color:#9ec3ff !important}
html[data-theme="dark"] .panel a:hover,html[data-theme="dark"] .product-card a:hover,html[data-theme="dark"] .project-card a:hover,html[data-theme="dark"] .category-tile a:hover{color:#c4dcff !important}

/* ===== Section 32: Dark theme — page text (headings, paragraphs, lists) (ROOT_v11) ===== */
html[data-theme="dark"] h1,html[data-theme="dark"] h2,html[data-theme="dark"] h3,html[data-theme="dark"] h4{color:var(--page-fg)}
/* Hero gradient text — ensure visible on dark by using lighter gradient */
html[data-theme="dark"] .hero-title,html[data-theme="dark"] .hero h1{background-image:linear-gradient(135deg,#ffffff 0%,#cfd8e6 70%) !important;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent}
html[data-theme="dark"] section h1,html[data-theme="dark"] section h2{background-image:none !important;-webkit-text-fill-color:var(--page-fg) !important;color:var(--page-fg) !important}
html[data-theme="dark"] p,html[data-theme="dark"] li{color:var(--page-fg)}
html[data-theme="dark"] .muted,html[data-theme="dark"] small,html[data-theme="dark"] .text-muted,html[data-theme="dark"] .lead{color:var(--muted) !important}

/* ===== Section 33: Dark theme — forms (ROOT_v11) ===== */
html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:var(--input-bg) !important;color:var(--input-fg) !important;border:1px solid var(--input-border) !important}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:#6b7a8e !important}
html[data-theme="dark"] label{color:var(--page-fg) !important}

/* ===== Section 34: Dark theme — tables, footer, breadcrumbs, misc (ROOT_v11) ===== */
html[data-theme="dark"] table{color:var(--page-fg)}
html[data-theme="dark"] table th,html[data-theme="dark"] table td{border-color:var(--border) !important;color:var(--page-fg)}
html[data-theme="dark"] footer{background:var(--footer-bg) !important;color:var(--footer-fg) !important}
html[data-theme="dark"] footer a,html[data-theme="dark"] footer p,html[data-theme="dark"] footer li{color:var(--footer-fg) !important}
html[data-theme="dark"] .breadcrumb,html[data-theme="dark"] .breadcrumb *{color:var(--muted) !important}
html[data-theme="dark"] .breadcrumb a{color:#9ec3ff !important}

/* ===== Section 35: Light theme — footer text legibility (ROOT_v11) ===== */
html[data-theme="light"] footer,html:not([data-theme]) footer{background:#071421;color:#e6edf5}
html[data-theme="light"] footer p,html[data-theme="light"] footer li,html[data-theme="light"] footer a,html[data-theme="light"] footer small,html:not([data-theme]) footer p,html:not([data-theme]) footer li,html:not([data-theme]) footer a,html:not([data-theme]) footer small{color:#e6edf5 !important;opacity:.95}
html[data-theme="light"] footer h1,html[data-theme="light"] footer h2,html[data-theme="light"] footer h3,html[data-theme="light"] footer h4,html:not([data-theme]) footer h3,html:not([data-theme]) footer h4{color:#fff !important}

/* ===== Section 36: Hero always-dark (ROOT_v11) ===== */
/* Hero stays dark in both modes (it has an overlay image) */
.hero,.hero-clean,.hero-section{color:#fff}
.hero h1,.hero-clean h1{color:#fff}

/* ===== Section 37: Carousel product card button fix (ROOT_v11) ===== */
.pc-slide .product-card .product-actions{display:flex;gap:8px;align-items:stretch;flex-wrap:wrap}
.pc-slide .product-card .product-actions .btn,.pc-slide .product-card .product-actions button{white-space:nowrap;font-size:13px;padding:8px 12px;flex:1 1 auto;min-width:0}


/* ===== Section 38: Search toggle input (ROOT_v12) ===== */
.header-search{position:relative;display:inline-block;margin-right:6px}
.header-search .search-toggle{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.14);color:#fff;cursor:pointer;padding:0}
.header-search .search-toggle:hover{background:rgba(255,255,255,.12)}
.header-search .search-fields{position:absolute;top:48px;right:0;display:none;background:#0b1a2b;border:1px solid #1c2c40;border-radius:10px;padding:8px;box-shadow:0 8px 24px rgba(0,0,0,.3);z-index:60}
.header-search.open .search-fields{display:flex;gap:6px;align-items:center;min-width:280px}
.header-search input[type=search],.header-search input[name=q]{background:#152535;color:#fff;border:1px solid #23364d;border-radius:8px;padding:8px 12px;outline:none;flex:1;min-width:0;font-size:14px}
.header-search input[type=search]::placeholder{color:#8b97a8}
.header-search button[type=submit]{background:#c4302b;color:#fff;border:0;border-radius:8px;padding:8px 12px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.header-search button[type=submit]:hover{background:#a82723}

/* ===== Section 39: Carousel product card actions (ROOT_v12 — correct selectors) ===== */
.pc-slide .product-card .card-actions,.products-grid .product-card .card-actions{display:flex !important;gap:8px;align-items:stretch;flex-wrap:nowrap}
.pc-slide .product-card .card-actions .btn,
.pc-slide .product-card .card-actions button,
.pc-slide .product-card form button,
.pc-slide .product-card form.add-to-cart-form button{white-space:nowrap !important;font-size:13px !important;padding:10px 14px !important;flex:1 1 auto;min-width:0;line-height:1.1}
.pc-slide .product-card .card-actions form{flex:1 1 auto;display:flex;margin:0}
.pc-slide .product-card .card-actions form button{width:100%}

/* ===== Section 40: Catalog "Clear filters" button readability (ROOT_v12) ===== */
.catalog-sidebar .btn-secondary,.catalog-sidebar a.clear-filters,.catalog-sidebar .btn-clear,.catalog-sidebar .btn-ghost,.catalog-sidebar button.clear{color:#0b1a2b !important;background:#f1f4f9 !important;border:1px solid #c4cdda !important}
html[data-theme="dark"] .catalog-sidebar .btn-secondary,html[data-theme="dark"] .catalog-sidebar a.clear-filters,html[data-theme="dark"] .catalog-sidebar .btn-clear,html[data-theme="dark"] .catalog-sidebar .btn-ghost,html[data-theme="dark"] .catalog-sidebar button.clear{color:#e8eef6 !important;background:#1a2a3e !important;border:1px solid #2a3d56 !important}

/* Generic .btn-ghost legibility */
.btn-ghost{color:#0b1a2b;background:#f1f4f9;border:1px solid #c4cdda}
.btn-ghost:hover{background:#e6ecf3}
html[data-theme="dark"] .btn-ghost{color:#e8eef6 !important;background:#1a2a3e !important;border-color:#2a3d56 !important}
html[data-theme="dark"] .btn-ghost:hover{background:#243551 !important}

/* ===== Section 41: Dark theme — prices, links, category tile CTA (ROOT_v12) ===== */
html[data-theme="dark"] .product-card .price,html[data-theme="dark"] .price-eur,html[data-theme="dark"] .price{color:#ff8e83 !important;-webkit-text-fill-color:#ff8e83 !important;opacity:1 !important;background:none !important}
html[data-theme="dark"] .category-tile a,html[data-theme="dark"] .category-tile .tile-cta,html[data-theme="dark"] a.view-more{color:#9ec3ff !important;-webkit-text-fill-color:#9ec3ff !important;opacity:1 !important}
html[data-theme="dark"] a[href*="category_id=all"],html[data-theme="dark"] a.see-all{color:#ff8e83 !important;-webkit-text-fill-color:#ff8e83 !important;opacity:1 !important}
html[data-theme="dark"] .clear-filters,html[data-theme="dark"] a.clear-all,html[data-theme="dark"] .active-filters .clear{color:#9ec3ff !important;opacity:1 !important}

/* ===== Section 42: Dark theme — form input placeholders & file button (ROOT_v12) ===== */
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder,html[data-theme="dark"] select{color:#8b97a8 !important;-webkit-text-fill-color:#8b97a8 !important}
html[data-theme="dark"] input[type="file"]::file-selector-button{background:#243551;color:#e8eef6;border:1px solid #2a3d56;border-radius:8px;padding:8px 14px;cursor:pointer}
html[data-theme="dark"] input[type="file"]::file-selector-button:hover{background:#2e3f5e}
html[data-theme="dark"] input[type="file"]{color:#e8eef6}
/* Light mode file button — ensure visible */
input[type="file"]::file-selector-button{background:#f1f4f9;color:#0b1a2b;border:1px solid #c4cdda;border-radius:8px;padding:8px 14px;cursor:pointer;margin-right:10px}
input[type="file"]::file-selector-button:hover{background:#e6ecf3}

/* ===== Section 43: Services grid — 4-column on home & uslugi pages (ROOT_v12) ===== */
.services-grid,.uslugi-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}
@media (max-width:1100px){.services-grid,.uslugi-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:600px){.services-grid,.uslugi-grid{grid-template-columns:1fr}}

/* ===== Section 44: Footer social icons placeholder hint + style (ROOT_v12) ===== */
.footer-social{display:flex;gap:10px;align-items:center;margin-top:8px}
.footer-social a{display:inline-flex;width:34px;height:34px;border-radius:50%;background:rgba(255,255,255,.08);color:#e6edf5;align-items:center;justify-content:center;transition:background .2s,transform .2s}
.footer-social a:hover{background:rgba(255,255,255,.18);transform:translateY(-1px)}
.footer-social svg{width:18px;height:18px}


/* ============================================================
   §45 ROOT_v13 — Home page background unification (dark mode)
   Make .trust-bar and .section.products-home inherit body bg
   in dark theme so home matches /produkti.php look.
   ============================================================ */

html[data-theme="dark"] .trust-bar,
html[data-theme="dark"] .section.products-home,
html[data-theme="dark"] section.products-home,
html[data-theme="dark"] .products-home,
html[data-theme="dark"] main > section.section {
  background: var(--bg, #0a141e) !important;
  background-color: var(--bg, #0a141e) !important;
}

/* Ensure inner panels/cards within trust-bar look correct on dark */
html[data-theme="dark"] .trust-bar .trust-item {
  background: transparent !important;
  color: #e6edf5 !important;
}
html[data-theme="dark"] .trust-bar .trust-item span,
html[data-theme="dark"] .trust-bar .trust-item small,
html[data-theme="dark"] .trust-bar .trust-item p {
  color: #b8c5d4 !important;
}

/* products-home heading + subtitle readable on dark */
html[data-theme="dark"] .products-home h2,
html[data-theme="dark"] .products-home .section-title,
html[data-theme="dark"] .products-home h3 {
  color: #ffffff !important;
}
html[data-theme="dark"] .products-home p,
html[data-theme="dark"] .products-home .section-subtitle,
html[data-theme="dark"] .products-home .lead {
  color: #b8c5d4 !important;
}

/* Light theme: keep original look untouched (no override needed) */


/* ============================================================
   §46 ROOT_v14 - Home carousel 'Add to cart' button wrap fix
   Issue: button text was clipped because §39 forced nowrap.
   In narrow carousel slides the button width is insufficient.
   Solution: allow wrap, reduce font, ensure button has min-width.
   ============================================================ */

/* Override §39 nowrap so text can wrap or shrink */
.products-carousel .card-actions form,
.products-carousel .card-actions button,
.products-home .card-actions form,
.products-home .card-actions button,
.products-carousel .product-card .card-actions button[type="submit"],
.products-home .product-card .card-actions button[type="submit"] {
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

/* Tighten action row layout for narrow slides */
.products-carousel .card-actions,
.products-home .card-actions {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  align-items: stretch !important;
}

.products-carousel .card-actions .btn,
.products-home .card-actions .btn {
  padding: 8px 12px !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  text-align: center !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  white-space: normal !important;
}

/* Section title and subtitle on dark home (was barely visible) */
html[data-theme="dark"] .products-home .section-title,
html[data-theme="dark"] .products-home h2,
html[data-theme="dark"] .products-home .h2,
html[data-theme="dark"] .products-home .display-title {
  color: #ffffff !important;
  opacity: 1 !important;
}
html[data-theme="dark"] .products-home .section-subtitle,
html[data-theme="dark"] .products-home .lead,
html[data-theme="dark"] .products-home p {
  color: #c4d0de !important;
  opacity: 1 !important;
}


/* §47 ROOT_v15 — Услуги от админа: снимка, иконка, тяло */
.service-card{display:flex;flex-direction:column;overflow:hidden;border-radius:14px;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.06);border:1px solid #e2e8f0;transition:transform .2s, box-shadow .2s;}
.service-card:hover{transform:translateY(-2px);box-shadow:0 8px 24px rgba(15,23,42,.10);}
.service-card .service-image{width:100%;aspect-ratio:16/9;overflow:hidden;background:#f1f5f9;}
.service-card .service-image img{width:100%;height:100%;object-fit:cover;display:block;}
.service-card .service-icon{font-size:36px;line-height:1;padding:20px 20px 0;color:#c4302b;}
.service-card .service-body{padding:18px 20px 22px;display:flex;flex-direction:column;gap:8px;}
.service-card .service-body h3{margin:0;font-size:18px;color:#071421;}
.service-card .service-body p.service-summary,
.service-card .service-body p{margin:0;color:#475569;font-size:14.5px;line-height:1.55;}
.service-card .service-body .service-desc{color:#334155;font-size:14px;line-height:1.55;margin-top:4px;}

/* Dark theme */
html[data-theme="dark"] .service-card{background:#0b2545;border-color:rgba(255,255,255,.08);}
html[data-theme="dark"] .service-card .service-image{background:#071421;}
html[data-theme="dark"] .service-card .service-body h3{color:#e6f0ff;}
html[data-theme="dark"] .service-card .service-body p,
html[data-theme="dark"] .service-card .service-body p.service-summary{color:#94a3b8;}
html[data-theme="dark"] .service-card .service-body .service-desc{color:#cbd5e1;}

/* Услуги на началната - grid вече има services-grid с правила в styles.css. Картите се вмъкват директно като article. Защитен override: */
.services-band .services-grid{display:grid;gap:18px;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));}
.services-band .services-grid article.service-card{background:#fff;color:#071421;padding:0;}
html[data-theme="dark"] .services-band .services-grid article.service-card{background:#0b2545;color:#e6f0ff;}

/* /uslugi.php — старите .panel + service-card */
.content-wrap .services-grid{display:grid;gap:20px;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));}
.content-wrap .services-grid article.panel.service-card{padding:0;background:#fff;}
html[data-theme="dark"] .content-wrap .services-grid article.panel.service-card{background:#0b2545;}
/* §47 end */


/* §48 ROOT_v16 — Полиране на галерията на продукта (pd-gallery, pd-thumbs) */
.pd-gallery{display:flex;flex-direction:column;gap:14px;}
.pd-gallery .pd-main{position:relative;background:#f1f5f9;border-radius:14px;overflow:hidden;border:1px solid #e2e8f0;}
.pd-gallery .pd-main img.pd-main-img{width:100%;height:auto;display:block;object-fit:contain;aspect-ratio:4/3;background:#f8fafc;transition:opacity .15s ease;}
.pd-gallery .pd-zoom-btn{position:absolute;top:10px;right:10px;background:rgba(7,20,33,.78);color:#fff;border:0;border-radius:6px;padding:6px 10px;font-size:16px;cursor:pointer;z-index:2;}
.pd-gallery .pd-zoom-btn:hover{background:rgba(196,48,43,.92);}

.pd-gallery .pd-thumbs{display:grid;gap:8px;grid-template-columns:repeat(auto-fill,minmax(72px,1fr));}
.pd-gallery .pd-thumb{padding:0;border:2px solid #e2e8f0;background:#fff;border-radius:8px;overflow:hidden;cursor:pointer;aspect-ratio:1;transition:border-color .15s, transform .15s;}
.pd-gallery .pd-thumb:hover{border-color:#94a3b8;transform:translateY(-1px);}
.pd-gallery .pd-thumb.is-active{border-color:#c4302b;box-shadow:0 0 0 2px rgba(196,48,43,.15);}
.pd-gallery .pd-thumb img{width:100%;height:100%;object-fit:cover;display:block;}

/* Dark theme */
html[data-theme="dark"] .pd-gallery .pd-main{background:#0b2545;border-color:rgba(255,255,255,.08);}
html[data-theme="dark"] .pd-gallery .pd-main img.pd-main-img{background:#071421;}
html[data-theme="dark"] .pd-gallery .pd-thumb{background:#0b2545;border-color:rgba(255,255,255,.10);}
html[data-theme="dark"] .pd-gallery .pd-thumb:hover{border-color:#475569;}
html[data-theme="dark"] .pd-gallery .pd-thumb.is-active{border-color:#c4302b;}
/* §48 end */


/* §49 ROOT_v17.3 — LinkedIn badge in contact-mini + admin form-grid headers */
.contact-mini-social { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.contact-mini-social > strong { font-weight: 600; }
.contact-mini-social .social-badge {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 8px;
    background: #0a66c2; color: #fff;
    text-decoration: none; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.contact-mini-social .social-badge svg { width: 22px; height: 22px; display: block; }
.contact-mini-social .social-badge:hover { background: #084d92; transform: translateY(-2px); box-shadow: 0 6px 14px rgba(10,102,194,.30); }
.contact-mini-social .social-badge:focus-visible { outline: 2px solid #c4302b; outline-offset: 3px; }
[data-theme="dark"] .contact-mini-social .social-badge { background: #1a78d8; }
[data-theme="dark"] .contact-mini-social .social-badge:hover { background: #0a66c2; }

/* Admin form-grid: section headers via .full > h2 */
.panel.form-grid .full h2 { margin: 14px 0 4px; font-size: 16px; padding-bottom: 6px; border-bottom: 1px solid #e4eaf2; color: #0b2545; }
.panel.form-grid .field-hint { color: #6b7280; font-size: 13px; margin: 4px 0 0; }
.panel.form-grid .form-actions { margin-top: 8px; }
