/* FIXED VERSION — cleaned overrides, safe hierarchy */

:root {
  --bg: #0a0a0a;
  --card: #111;
  --border: #222;
  --text: #ffffff;
  --muted: #b0b0b0;
  --gold: #d6b36a;
  --accent: #4cff8f;
}

/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
}

body {
  font-family: Inter, sans-serif;
  background: radial-gradient(circle at top, #151515, #000 70%);
  color: var(--text);
  line-height: 1.55;
}

a {
  text-decoration: none;
  color: inherit;
}

/* LAYOUT */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* HEADER */
header {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: rgba(76, 255, 143, 0.2);
  border-color: rgba(76, 255, 143, 0.5);
  color: var(--accent);
  transform: translateY(-2px);
}

.social-link svg {
  width: 20px;
  height: 20px;
}

/* BUTTONS */
.btn-main {
  background: var(--accent);
  color: #000;
  font-size: 15px;
  font-weight: 600;
  padding: 14px 20px;
  border-radius: 999px;
  width: 100%;
  text-align: center;
}

.btn-secondary {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 12px;
  background: rgba(76, 255, 143, .15);
  color: #6fffaa;
  border: 1px solid rgba(76, 255, 143, .35);
}

.btn-tertiary {
  padding: 7px 14px;
  font-size: 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, .25);
  opacity: .85;
}

.btn-secondary:hover {
  background: rgba(76, 255, 143, .25);
}

.btn-tertiary:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, .45);
}

.card-note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* HERO */
.hero {
  padding: 120px 0 140px;
  position: relative;
  text-align: center;
}

.hero-content {
  max-width: 820px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 56px;
  line-height: 1.1;
  margin-bottom: 16px;
}

.hero h1 span {
  color: var(--gold);
}

.hero p {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 26px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
}

.hero .btn-main {
  min-width: 240px;
}

.hero .btn-secondary {
  opacity: .9;
}

.hero-points {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 36px;
  font-size: 14px;
  color: #dcdcdc;
}

.hero-points strong {
  color: #fff;
}

/* SECTIONS */
section {
  padding: 120px 0;
}

.section-title {
  text-align: center;
  font-size: 34px;
  margin-bottom: 48px;
}


/* CATALOG */
.catalog {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

/* PRODUCT CARD */
.product {
  position: relative;
  background: linear-gradient(180deg, #141414, #0b0b0b);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 92px 28px 28px;
  min-height: 560px;
  display: flex;
  flex-direction: column;
  transition: .35s ease;
}

.product:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 40px 90px rgba(0, 0, 0, .75);
}

/* BADGES */
.badges {
  position: absolute;
  top: 18px;
  left: 20px;
  right: 20px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  z-index: 2;
}

.badge {
  font-size: 10.5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-weight: 600;
  background: rgba(0, 0, 0, .6);
  border: 1px solid rgba(214, 179, 106, .5);
  color: var(--gold);
}

.badge.travel {
  color: #7aa7ff;
  border-color: rgba(120, 160, 255, .5);
}

.badge.top {
  color: #ffd36f;
  border-color: rgba(255, 210, 120, .5);
}

.badge.sale {
  color: #ff8a8a;
  border-color: rgba(255, 120, 120, .5);
}

/* CONTENT */
.product h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}

.product p {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  max-width: 95%;
}

.spec {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 14px;
}

.price {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold);
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.price::after {
  content: "≈ ціна з доставкою";
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

.prepayment-info {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
  margin-bottom: 20px;
}

.delivery {
  font-size: 13px;
  margin: 20px 0;
  border-top: 1px dashed rgba(255, 255, 255, .08);
  padding-top: 12px;
}

/* ACTIONS */
.product-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product .btn {
  width: 100%;
  padding: 10px 18px;
  font-size: 13px;
  border-radius: 14px;
  background: var(--accent);
  color: #0b0b0b;
  font-weight: 600;
}

.btn-photo {
  width: 100%;
  font-size: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(76, 255, 143, .35);
  background: rgba(76, 255, 143, .12);
  color: #6fffaa;
}

/* MORE ACTIONS */
.more-actions {
  margin-top: 10px;
}

.more-actions summary {
  cursor: pointer;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.more-actions summary::-webkit-details-marker {
  display: none;
}

.more-actions summary::after {
  content: " ▾";
  font-size: 11px;
}

.more-actions[open] summary::after {
  content: " ▴";
}

.more-actions-inner {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* FEATURED */
.product.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(76, 255, 143, .35), 0 40px 90px rgba(0, 0, 0, .8);
}

.product.featured::after {
  content: "Рекомендуємо";
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(76, 255, 143, .15);
  color: var(--accent);
  font-weight: 600;
}

/* FOOTER */
footer {
  padding: 56px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
}

/* ACCESSIBILITY */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* WHY */
.why {
  padding-top: 80px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.why-item {
  background: #111;
  border: 1px solid #222;
  border-radius: 24px;
  padding: 36px;
  text-align: left;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.why-item:hover {
  border-color: rgba(76, 255, 143, 0.3);
  transform: translateY(-5px);
  background: #141414;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.why-item h3 {
  margin-bottom: 12px;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
}

.why-item p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.why-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  background: rgba(76, 255, 143, .1);
  color: var(--accent);
  font-size: 24px;
  border: 1px solid rgba(76, 255, 143, 0.1);
  box-shadow: 0 0 20px rgba(76, 255, 143, 0.05);
  transition: 0.3s ease;
}

.why-item:hover .why-icon {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 20px rgba(76, 255, 143, 0.4);
  transform: scale(1.05);
}


/* MOBILE */
@media(max-width:768px) {
  .header-inner {
    flex-direction: column;
    gap: 16px;
  }

  .header-actions {
    width: 100%;
    justify-content: center;
  }

  .hero {
    padding: 88px 0 104px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero p {
    font-size: 15px;
  }

  section {
    padding: 60px 0;
  }

  .product {
    min-height: auto;
  }

  .why {
    padding-top: 60px;
  }

  .why-item {
    padding: 24px;
  }

  .why-icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .why-item h3 {
    font-size: 18px;
  }

  /* Modals on Mobile */
  .compare-modal-content {
    padding: 20px;
    max-height: 85vh;
  }

  .compare-header h3 {
    font-size: 18px;
  }

  #lightbox img {
    max-width: 95%;
    max-height: 80%;
  }

  .lightbox-close {
    top: 15px;
    right: 20px;
    font-size: 32px;
  }

  /* Mobile Table Fixes */
  /* Mobile Table Fixes */
  .table-wrapper {
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    width: 100%;
    margin-bottom: 20px;
  }

  table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
  }

  th,
  td {
    padding: 12px 10px;
    font-size: 13px;
    min-width: 120px;
    white-space: nowrap;
    background: #111;
    border-bottom: 1px solid #222;
  }

  /* Sticky First Column */
  th:first-child,
  td:first-child {
    position: sticky;
    left: 0;
    background: #111;
    z-index: 20;
    border-right: 1px solid #333;
    box-shadow: 4px 0 8px -2px rgba(0, 0, 0, 0.5);
  }

  /* Reset other cells z-index */
  th:not(:first-child),
  td:not(:first-child) {
    z-index: 1;
  }

  .compare-modal-content {
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
    max-height: 85vh;
  }

  .compare-header {
    padding: 20px 20px 10px;
  }

  .table-wrapper {
    padding-left: 0;
  }
}

/* PICK MODEL BUTTON */

.btn-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  font-size: 14px;
  font-weight: 500;
  color: #eaeaea;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .04);
  backdrop-filter: blur(6px);
  transition: .25s ease;
}

.btn-pick::after {
  content: "→";
  font-size: 14px;
  opacity: .7;
  transition: .25s ease;
}

.btn-pick:hover {
  background: rgba(255, 255, 255, .08);
  border-color: rgba(214, 179, 106, .6);
  color: #fff;
}

.btn-pick:hover::after {
  transform: translateX(4px);
  opacity: 1;
}

/* SOCIAL BUTTONS */

.social-actions {
  display: flex;
  gap: 10px;
  margin-top: 0px;
}

.btn-social {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  text-decoration: none;
  transition: .25s ease;
}

/* Telegram — главный */
.btn-social.telegram {
  background: rgba(76, 255, 143, .18);
  color: #6fffaa;
  border: 1px solid rgba(76, 255, 143, .45);
}

.btn-social.telegram:hover {
  background: rgba(76, 255, 143, .3);
}

/* Instagram — вторичный */
.btn-social.instagram {
  background: rgba(255, 255, 255, .05);
  color: #d0d0d0;
  border: 1px solid rgba(255, 255, 255, .2);
}

.btn-social.instagram:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.btn-social .icon {
  font-size: 14px;
}

/* hide empty sections */
section:has(.gallery:empty),
section:has(.compare-table:empty) {
  display: none;
}

/* LIGHTBOX */
#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#lightbox.active {
  opacity: 1;
  pointer-events: all;
}

#lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  cursor: pointer;
  transition: 0.2s;
}


/* COMPARE MODAL */
#compareModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

#compareModal.active {
  opacity: 1;
  pointer-events: all;
}

.compare-modal-content {
  background: #111;
  border: 1px solid #333;
  border-radius: 20px;
  padding: 30px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.compare-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.compare-header h3 {
  font-size: 24px;
  color: #fff;
}

.compare-close {
  font-size: 32px;
  cursor: pointer;
  color: #888;
  line-height: 1;
}

.compare-close:hover {
  color: #fff;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th,
td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid #222;
  font-size: 14px;
}

th {
  color: #888;
  font-weight: 500;
}

td {
  color: #eee;
}

td strong {
  color: #fff;
  font-weight: 600;
}

tbody tr:last-child td {
  border-bottom: none;
}