/* ============================================================
   Haisser Smoke Design — dark-only theme
   Прозорі фони за docs/Design.md (варіант A: лише темна тема)
   ============================================================ */

/* ---------- 1. Змінні теми ---------- */
:root {
  --smoke-bg: #0a0a0a;
  --smoke-surface: #141414;
  --smoke-text: #e8eaed;
  --smoke-muted: #9aa0aa;
  --smoke-heading: #ffffff;
  --smoke-accent: #ff8533;
  --smoke-accent-deep: #ff6b00;
  --smoke-accent-soft: rgba(255, 107, 0, 0.15);
  --smoke-border: rgba(255, 255, 255, 0.12);
  --smoke-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

/* ---------- 2. База та дим ---------- */
html, body {
  background: var(--smoke-bg);
  color: var(--smoke-text);
  min-height: 100vh;
}

body {
  background-image: linear-gradient(rgba(10, 10, 10, 0.78), rgba(10, 10, 10, 0.85)), url("../image/bg.webp");
  background-size: cover;
  background-attachment: fixed;
  background-position: center center;
  background-repeat: no-repeat;
  position: relative;
  overflow-x: hidden;
}

.smoke-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.smoke-puff {
  position: absolute;
  bottom: -20%;
  width: 40vw;
  height: 40vw;
  max-width: 600px;
  max-height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 40%, transparent 70%);
  filter: blur(40px);
  opacity: 0;
  animation: smoke-rise 18s ease-in-out infinite;
}

.smoke-puff:nth-child(1) { left: 5%;  animation-delay: 0s;  animation-duration: 20s; }
.smoke-puff:nth-child(2) { left: 30%; animation-delay: 4s;  animation-duration: 24s; width: 50vw; height: 50vw; }
.smoke-puff:nth-child(3) { left: 55%; animation-delay: 8s;  animation-duration: 19s; }
.smoke-puff:nth-child(4) { left: 75%; animation-delay: 12s; animation-duration: 22s; width: 45vw; height: 45vw; }
.smoke-puff:nth-child(5) { left: 15%; animation-delay: 16s; animation-duration: 26s; }

@keyframes smoke-rise {
  0%   { transform: translateY(20vh) scale(0.6);  opacity: 0; }
  15%  { opacity: 0.35; }
  50%  { transform: translateY(-30vh) scale(1.2); opacity: 0.25; }
  85%  { opacity: 0.1; }
  100% { transform: translateY(-60vh) scale(1.6); opacity: 0; }
}

#container { position: relative; z-index: 1; }
#top { position: relative; z-index: 1030; }
header { position: relative; z-index: 1020; }
#menu { position: relative; z-index: 1010; }

a { color: var(--smoke-accent); }
a:hover { color: var(--smoke-accent-deep); }

/* ---------- 3. Прозорі контейнери ---------- */
main.container,
#product-info.container,
#content {
  background: transparent;
}

.breadcrumb {
  background: transparent;
}

/* ---------- 4. Списки / бокові меню ---------- */
.list-group-item,
a.list-group-item,
.list-group-item.active,
a.list-group-item.active {
  background: transparent !important;
  background-color: transparent !important;
  border-color: var(--smoke-border);
  color: var(--smoke-text);
}

.list-group-item:hover,
a.list-group-item:hover {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--smoke-accent);
}

.list-group-item.active,
a.list-group-item.active {
  color: var(--smoke-accent-deep);
  font-weight: 700;
}

/* ---------- 5. Таблиці ---------- */
table.table.table-bordered {
  --bs-table-bg: transparent;
  --bs-table-accent-bg: transparent;
  --bs-table-striped-bg: transparent;
  --bs-table-active-bg: transparent;
  --bs-table-hover-bg: transparent;
  --bs-table-color: var(--smoke-text);
  --bs-table-border-color: var(--smoke-border);
  background: transparent !important;
  background-color: transparent !important;
  color: var(--smoke-text);
  border-color: var(--smoke-border);
}

table.table.table-bordered > :not(caption) > *,
table.table.table-bordered > :not(caption) > * > * {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  color: var(--smoke-text);
  border-color: var(--smoke-border);
}

.table thead td,
.table thead th {
  background: var(--smoke-accent-soft) !important;
  color: var(--smoke-heading);
}

/* ---------- 6. Вкладки ---------- */
.nav-tabs {
  border-bottom-color: var(--smoke-border);
}

.nav-tabs .nav-link {
  background: transparent;
  border-color: transparent;
  color: var(--smoke-muted);
}

.nav-tabs .nav-link:hover {
  background: transparent;
  border-color: transparent;
  color: var(--smoke-accent);
}

.nav-tabs .nav-link.active {
  background: var(--smoke-surface);
  border-color: var(--smoke-border) var(--smoke-border) var(--smoke-surface);
  color: var(--smoke-heading);
}

/* ---------- 7. Форми, кнопки, мініатюри ---------- */
.btn-primary {
  background: var(--smoke-accent-deep);
  border-color: var(--smoke-accent-deep);
  color: var(--smoke-bg);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--smoke-accent);
  border-color: var(--smoke-accent);
  color: var(--smoke-bg);
}

.form-control,
.form-select {
  background-color: var(--smoke-surface);
  border-color: var(--smoke-border);
  color: var(--smoke-text);
}

.form-control:focus,
.form-select:focus {
  background-color: var(--smoke-surface);
  border-color: var(--smoke-accent-deep);
  color: var(--smoke-text);
  box-shadow: 0 0 0 0.2rem var(--smoke-accent-soft);
}

.form-control::placeholder {
  color: var(--smoke-muted);
}

.img-thumbnail {
  background-color: var(--smoke-surface);
  border-color: var(--smoke-border);
}

.card {
  background-color: var(--smoke-surface);
  border-color: var(--smoke-border);
  color: var(--smoke-text);
}

.card-header,
.card-footer {
  background-color: rgba(255, 255, 255, 0.04);
  border-color: var(--smoke-border);
  color: var(--smoke-heading);
}

.pagination {
  --bs-pagination-bg: var(--smoke-surface);
  --bs-pagination-color: var(--smoke-text);
  --bs-pagination-border-color: var(--smoke-border);
  --bs-pagination-hover-bg: var(--smoke-accent-soft);
  --bs-pagination-hover-color: var(--smoke-heading);
  --bs-pagination-hover-border-color: var(--smoke-border);
  --bs-pagination-active-bg: var(--smoke-accent-deep);
  --bs-pagination-active-border-color: var(--smoke-accent-deep);
  --bs-pagination-active-color: var(--smoke-bg);
  --bs-pagination-disabled-bg: var(--smoke-surface);
  --bs-pagination-disabled-color: var(--smoke-muted);
  --bs-pagination-disabled-border-color: var(--smoke-border);
}

/* ---------- 8. Хедер, меню, футер (Mega Menu як на pradaata-toolselectric) ---------- */
.navbar,
#menu {
  background: rgba(20, 20, 20, 0.88) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--smoke-border);
  border-top: 1px solid rgba(255, 133, 51, 0.25);
  border-radius: 8px;
}

#menu .navbar-toggler {
  color: var(--smoke-heading);
  border-color: var(--smoke-border);
  margin: 6px 10px;
}

#menu #category {
  color: var(--smoke-heading);
  font-weight: 600;
  padding: 10px 14px;
}

.ks-mega-nav {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: space-between;
  width: 100%;
  gap: 2px;
  list-style: none;
  margin: 0;
  padding: 4px 6px;
}

.ks-mega-item {
  position: static;
  display: flex;
  align-items: stretch;
}

.ks-mega-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 6px;
  border-bottom: 2px solid transparent;
  color: var(--smoke-heading) !important;
  font-weight: 500;
  font-size: 0.92rem;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ks-mega-link .ks-caret {
  font-size: 0.72em;
  opacity: 0.75;
  transition: transform 0.15s ease;
}

.ks-mega-item:hover > .ks-mega-link,
.ks-mega-item:focus-within > .ks-mega-link {
  background: var(--smoke-accent-soft);
  color: var(--smoke-accent) !important;
  border-bottom-color: var(--smoke-accent-deep);
}

.ks-mega-item:hover > .ks-mega-link .ks-caret,
.ks-mega-item:focus-within > .ks-mega-link .ks-caret {
  transform: rotate(180deg);
  opacity: 1;
}

@media (min-width: 992px) {
  .ks-mega-nav {
    flex-wrap: nowrap;
  }
  .ks-mega-item > .ks-mega-panel {
    display: none !important;
  }
  .ks-mega-item:hover > .ks-mega-panel,
  .ks-mega-item:focus-within > .ks-mega-panel {
    display: block !important;
  }
  .ks-mega-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0 !important;
    padding: 20px 24px;
    background: rgba(16, 16, 16, 0.88) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--smoke-border);
    border-top: 2px solid var(--smoke-accent-deep);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.75);
    border-radius: 0 0 12px 12px;
    z-index: 1050;
  }
  /* Невидимий місток над панеллю, щоб курсор не втрачав hover */
  .ks-mega-panel::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .ks-mega-link {
    font-size: 0.8rem;
    padding: 9px 7px;
    gap: 4px;
  }
}

@media (max-width: 991.98px) {
  .ks-mega-nav {
    flex-direction: column;
    padding: 8px 12px;
  }
  .ks-mega-item {
    flex-direction: column;
  }
  .ks-mega-link {
    white-space: normal;
    justify-content: space-between;
  }
  .ks-mega-panel {
    position: static;
    width: 100%;
    padding: 8px 12px 12px 16px;
    background: rgba(15, 15, 15, 0.65);
    border-left: 3px solid var(--smoke-accent-deep);
    margin-bottom: 8px;
  }
}

.ks-mega-panel-inner {
  width: 100%;
}

.ks-mega-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
  justify-content: flex-start;
}

.ks-mega-col {
  flex: 1 1 180px;
  min-width: 170px;
}

.ks-mega-col:has(.ks-mega-sublist) {
  flex: 2.5 1 360px;
}

.ks-mega-block {
  margin-bottom: 14px;
}

.ks-mega-block-title {
  display: inline-block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--smoke-heading) !important;
  border-left: 3px solid var(--smoke-accent-deep);
  padding: 2px 10px;
  margin-bottom: 8px;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}

.ks-mega-block-title:hover {
  color: var(--smoke-accent) !important;
  background: var(--smoke-accent-soft);
}

.ks-mega-sublist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 2px 12px;
}

.ks-mega-sublist li {
  margin: 0;
}

.ks-mega-sublist li a {
  display: block;
  color: #ffffff !important;
  font-size: 0.85rem;
  line-height: 1.3;
  padding: 4px 8px;
  border-radius: 5px;
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease, padding-left 0.15s ease;
}

.ks-mega-sublist li a:hover {
  color: var(--smoke-accent) !important;
  background: var(--smoke-accent-soft);
  padding-left: 12px;
}

.ks-mega-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--smoke-border);
}

.ks-mega-footer a {
  color: var(--smoke-accent) !important;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.ks-mega-footer a:hover {
  color: var(--smoke-accent-deep) !important;
  text-decoration: underline;
}

footer {
  background: rgba(15, 15, 15, 0.9);
  border-top: 2px solid var(--smoke-accent-deep);
}

/* ---------- 9. Картки товарів / панелі (непрозорі поверхні) ---------- */
.product-thumb {
  background: var(--smoke-surface);
  border: 1px solid var(--smoke-border);
}

.well,
.panel {
  background: var(--smoke-surface);
  border-color: var(--smoke-border);
  color: var(--smoke-text);
}

/* ---------- 10. Міст до змінних Bootstrap ---------- */
/* stylesheet.css бере ці кольори зі змінних Bootstrap — переводимо їх на темну тему */
:root {
  --bs-tertiary-bg: #141414;
  --bs-secondary-bg: #1a1a1a;
  --bs-body-color: var(--smoke-text);
  --bs-border-color: var(--smoke-border);
  --bs-emphasis-color: #ffffff;
  --bs-secondary-color: var(--smoke-muted);
}

#top {
  background-color: rgba(15, 15, 15, 0.85);
  border-bottom-color: var(--smoke-border);
}

#top .list-inline-item > a,
#top .list-inline-item .dropdown > a,
#top .list-inline-item .dropdown > span {
  color: var(--smoke-text);
}

#top .list-inline-item > a:hover {
  color: var(--smoke-accent);
}

.breadcrumb > li.breadcrumb-item {
  text-shadow: none;
}

.breadcrumb a {
  color: var(--smoke-muted);
}

#cart .dropdown-menu {
  background: var(--smoke-surface);
}

.product-thumb .button button {
  color: var(--smoke-text);
}

.product-thumb .button button:hover {
  background-color: var(--smoke-accent-soft);
  color: var(--smoke-accent);
}

.btn-light {
  background-color: var(--smoke-surface);
  border-color: var(--smoke-border);
  color: var(--smoke-text);
}

.btn-light:hover,
.btn-light:focus {
  background-color: var(--smoke-accent-soft);
  border-color: var(--smoke-border);
  color: var(--smoke-heading);
}

.input-group-text {
  background-color: var(--smoke-surface);
  border-color: var(--smoke-border);
  color: var(--smoke-text);
}

/* Заголовки та ціни: stylesheet.css задає #444 — на темному фоні не читається */
h1, h2, h3, h4, h5, h6 {
  color: var(--smoke-heading);
}

.price,
.price-new {
  color: var(--smoke-accent);
}

.price-old {
  color: var(--smoke-muted);
}

.price-tax {
  color: var(--smoke-muted);
}

legend {
  border-bottom-color: var(--smoke-border);
  color: var(--smoke-heading);
}

/* ---------- 11. Sticky footer ---------- */
/* ---------- 12. Адаптивний логотип ---------- */
#logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

#logo a {
  display: inline-block;
  max-width: 100%;
}

#logo img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

@media (max-width: 575.98px) {
  #logo img {
    max-width: 150px;
    max-height: 50px;
  }
  #logo {
    justify-content: flex-start;
    margin: 5px 0;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  #logo img {
    max-width: 170px;
    max-height: 55px;
  }
}

@media (min-width: 768px) {
  #logo img {
    max-width: 200px;
    max-height: 60px;
  }
  #logo {
    justify-content: flex-start;
  }
}

@media (min-width: 1200px) {
  #logo img {
    max-width: 240px;
    max-height: 70px;
  }
}

/* ---------- 13. Sticky footer ---------- */
#container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

footer {
  margin-top: auto;
}


/* ============================================================
   Haisser Hero Banner — 1920x600 adaptive (dark theme)
   ============================================================ */
.haisser-hero {
  position: relative;
  width: 100%;
  min-height: 260px;
  aspect-ratio: 16 / 5;
  max-height: 600px;
  overflow: hidden;
  border-radius: 12px;
  margin: 0 0 24px;
  background:
    radial-gradient(1200px 400px at 85% 40%, rgba(255, 107, 0, 0.16), transparent 60%),
    radial-gradient(900px 300px at 10% 90%, rgba(255, 133, 51, 0.07), transparent 60%),
    linear-gradient(135deg, #0a0a0a 0%, #141414 55%, #1a1a1a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}

.haisser-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 40px 60px;
  gap: 32px;
}

.haisser-hero__text {
  max-width: 52%;
  color: #e8eaed;
}

.haisser-hero__logo {
  height: 40px;
  width: auto;
  margin-bottom: 14px;
  filter: brightness(1.1);
}

.haisser-hero__title {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3.2vw, 2.8rem);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.5);
}

.haisser-hero__title span {
  color: #ff6b00;
  text-shadow: 0 0 18px rgba(255, 107, 0, 0.45);
}

.haisser-hero__subtitle {
  margin: 0 0 24px;
  font-size: clamp(0.95rem, 1.4vw, 1.25rem);
  color: #9aa0aa;
  font-weight: 500;
}

.haisser-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff6b00, #ff8533);
  color: #0a0a0a;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(255, 107, 0, 0.35);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.haisser-hero__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(255, 107, 0, 0.5);
  color: #0a0a0a;
}

.haisser-hero__collage {
  position: relative;
  flex: 0 0 46%;
  height: 100%;
  min-height: 200px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 10px;
  align-content: center;
}

.haisser-hero__tile {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

.haisser-hero__tile img {
  max-width: 88%;
  max-height: 88%;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
}

.haisser-hero__tile:hover {
  transform: scale(1.05);
  border-color: rgba(255, 107, 0, 0.4);
}

.haisser-hero__tile--1 { grid-column: 1; grid-row: 1; }
.haisser-hero__tile--2 { grid-column: 2; grid-row: 1; }
.haisser-hero__tile--3 { grid-column: 3; grid-row: 1; }
.haisser-hero__tile--4 { grid-column: 1; grid-row: 2; }
.haisser-hero__tile--5 { grid-column: 2; grid-row: 2; }
.haisser-hero__tile--6 { grid-column: 3; grid-row: 2; }

.haisser-hero__glow {
  position: absolute;
  inset: 15% 0 0 15%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 107, 0, 0.18), transparent 60%);
  filter: blur(24px);
  pointer-events: none;
  z-index: -1;
}

.haisser-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 200px at 30% 80%, rgba(255, 255, 255, 0.04), transparent 70%),
    radial-gradient(400px 150px at 70% 20%, rgba(255, 107, 0, 0.06), transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* Responsive */
@media (max-width: 991.98px) {
  .haisser-hero {
    aspect-ratio: 16 / 7;
    min-height: 220px;
  }
  .haisser-hero__inner {
    padding: 28px 24px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
  }
  .haisser-hero__text { max-width: 100%; }
  .haisser-hero__collage { display: none; }
  .haisser-hero__logo { height: 32px; }
}

@media (max-width: 575.98px) {
  .haisser-hero {
    aspect-ratio: 4 / 3;
    min-height: 180px;
    border-radius: 8px;
  }
  .haisser-hero__inner { padding: 20px 16px; }
  .haisser-hero__btn { padding: 10px 20px; font-size: 0.9rem; }
  .haisser-hero__title { font-size: 1.4rem; }
}