/* ============================================================
   GENSYS — PRODUCTS page styles
   Sections: Catalog header, Product gallery + specs accordion
   ============================================================ */

/* ---------- CATALOG HEADER ---------- */
.products-intro { padding-top: calc(var(--header-h) + 80px); background: var(--gray); }
.products-head { text-align: center; margin-bottom: 56px; }
.products-head .eyebrow {
  color: var(--primary); font-family: var(--font-head); font-weight: 700;
  font-size: 0.78rem; letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 12px;
}
.products-head h1 { font-size: clamp(2rem, 4vw, 3rem); text-transform: uppercase; }
.products-head h1 span { color: var(--primary); }
.products-head p { max-width: 620px; margin: 14px auto 0; }

/* ---------- PRODUCT LAYOUT ---------- */
.product-wrap {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start;
  padding-bottom: 20px;
}
.product-gallery {
  position: sticky;
  top: calc(var(--header-h) + 30px);
  background: var(--white);
  padding: 16px;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.06);
}

.gallery-main {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.gallery-main .ph-img {
  aspect-ratio: 4 / 3;
  display: block;
  width: 100%;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-main .ph-img img,
.gallery-main .main-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s ease;
}

.gallery-main:hover .main-gallery-img {
  transform: scale(1.025);
}

.gallery-main .ph-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  background: rgba(17, 17, 17, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--gold);
  padding: 7px 14px;
  border-radius: 8px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.thumb {
  position: relative;
  border: 2px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: #f8fafc;
  width: 100%;
  display: flex;
  flex-direction: column;
  transition: all var(--transition);
  outline: none;
}

.thumb-img-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
  background: #edf2f7;
}

.thumb-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease, opacity 0.3s ease;
  opacity: 0.78;
}

.thumb-label {
  display: block;
  padding: 6px 4px;
  background: #ffffff;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 0.68rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-top: 1px solid var(--border);
  transition: background var(--transition), color var(--transition);
}

.thumb:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.thumb:hover .thumb-img-wrap img {
  opacity: 1;
  transform: scale(1.06);
}

.thumb.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(32, 84, 131, 0.18), var(--shadow-sm);
}

.thumb.active .thumb-img-wrap img {
  opacity: 1;
}

.thumb.active .thumb-label {
  background: var(--primary);
  color: var(--white);
  border-top-color: var(--primary);
}

.gallery-main .ph-img::after,
.thumb .ph-img::after { display: none; }

.product-info h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); text-transform: uppercase; }
.product-info h2 span { color: var(--primary); }
.product-sub { display: inline-block; margin: 12px 0 16px; color: var(--primary); font-family: var(--font-head); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; }
.product-info .desc { margin-bottom: 24px; font-size: 1.02rem; }
.value-note {
  display: flex; align-items: center; gap: 14px; background: var(--primary-soft);
  border-left: 4px solid var(--primary); padding: 16px 20px; border-radius: 0 10px 10px 0;
  font-family: var(--font-head); font-weight: 800; color: var(--primary); font-size: 1.05rem; margin-bottom: 26px;
}
.value-note em { font-style: normal; color: var(--brand-blue); margin: 0 8px; }
.product-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 34px; }

/* ---------- SPECS ACCORDION ---------- */
.specs-acc { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--white); }
.acc-item { border-bottom: 1px solid var(--border); }
.acc-item:last-child { border-bottom: none; }
.acc-head {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 24px; background: var(--gray); text-align: left;
  font-family: var(--font-head); font-weight: 700; color: var(--dark); font-size: 0.95rem;
  transition: background var(--transition);
}
.acc-head:hover { background: var(--primary-soft); }
.acc-head .acc-ic svg { width: 20px; height: 20px; color: var(--primary); }
.acc-icon { color: var(--primary); flex: none; transition: transform var(--transition); }
.acc-icon svg { width: 18px; height: 18px; display: block; }
.acc-item.open .acc-icon { transform: rotate(180deg); }
.acc-panel { max-height: 0; overflow: hidden; transition: max-height 0.5s var(--transition); }
.acc-body { padding: 4px 24px 24px; }
.spec-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
.spec-list li {
  display: flex; justify-content: space-between; gap: 12px; padding: 10px 0;
  border-bottom: 1px dashed var(--border); font-size: 0.9rem;
}
.spec-list li span:first-child { color: var(--text); }
.spec-list li span:last-child { font-family: var(--font-head); font-weight: 600; color: var(--dark); text-align: right; }
.acc-body p { font-size: 0.95rem; margin-bottom: 12px; }

/* ---------- MODEL RANGE ---------- */
.range { padding-top: 20px; }
.range-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (min-width: 769px) and (max-width: 1024px) {
  .range-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
.range-card {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--white); transition: transform var(--transition), box-shadow var(--transition);
}
.range-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.range-card .ph-img { aspect-ratio: 16 / 10; }
.range-body { padding: 22px 24px 26px; }
.range-body h3 { font-size: 0.95rem; text-transform: uppercase; margin-bottom: 4px; }
.range-body .cap { color: var(--primary); font-family: var(--font-head); font-weight: 800; font-size: 0.9rem; margin-bottom: 8px; }
.range-body p { font-size: 0.85rem; }

/* ---------- CARD BUTTON ---------- */
.btn-card-filter {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px; padding: 10px 20px;
  background: var(--primary); color: var(--white);
  border: none; border-radius: 8px;
  font-family: var(--font-head); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  cursor: pointer; transition: var(--transition);
}
.btn-card-filter:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-card-filter span { transition: transform var(--transition); }
.btn-card-filter:hover span { transform: translateX(3px); }

/* ---------- SPEC TABLE WRAPPER ---------- */
.spec-table-wrapper { margin-top: 56px; }
.table-controls {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.filter-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill-btn {
  padding: 10px 20px; border-radius: 50px;
  background: var(--white); color: var(--text);
  border: 1px solid var(--border);
  font-family: var(--font-head); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer; transition: var(--transition);
}
.pill-btn:hover { border-color: var(--primary); color: var(--primary); }
.pill-btn.active { background: var(--primary); color: var(--white); border-color: var(--primary); }

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1 1 280px;
  max-width: 380px;
  width: 100%;
  box-sizing: border-box;
}
.search-box .search-ic {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: var(--primary);
  opacity: 0.75;
  pointer-events: none;
  z-index: 5;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-box input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 46px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  background: var(--white);
  color: var(--text);
  outline: none;
  font-size: 0.9rem;
  line-height: 44px;
  transition: border-color var(--transition), box-shadow var(--transition);
  box-sizing: border-box;
}
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 0 3.5px rgba(32, 84, 131, 0.12); }
.search-box:focus-within .search-ic { color: var(--primary); opacity: 1; }

.global-specs-bar {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 20px; border-radius: 50px;
  background: var(--primary-soft); color: var(--primary);
  font-family: var(--font-head); font-weight: 700; font-size: 0.82rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 24px;
}
.global-specs-bar .divider { color: var(--gold); }

.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--border); }
.spec-table { width: 100%; border-collapse: collapse; background: var(--white); min-width: 960px; }
.spec-table thead { background: var(--gray); }
.spec-table th {
  padding: 16px 18px; text-align: left;
  font-family: var(--font-head); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--text);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.spec-table td {
  padding: 14px 18px; font-size: 0.88rem; color: var(--text);
  border-bottom: 1px solid var(--border); white-space: nowrap;
}
.spec-table tbody tr:last-child td { border-bottom: none; }
.spec-table tbody tr { transition: background var(--transition); }
.spec-table tbody tr:hover { background: var(--primary-soft); }
.spec-table tbody tr[data-category="light"] td:first-child { color: var(--primary); font-weight: 600; }
.spec-table tbody tr[data-category="medium"] td:first-child { color: var(--dark); font-weight: 600; }
.spec-table tbody tr[data-category="heavy"] td:first-child { color: var(--gold); font-weight: 600; }
.spec-table tbody tr[data-category="ultra"] td:first-child { color: #2c3e50; font-weight: 600; }

/* ---------- BUTTON SMALL ---------- */
.btn-sm {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 16px; border-radius: 6px;
  font-family: var(--font-head); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.08em; text-transform: uppercase;
  transition: var(--transition); white-space: nowrap; border: 2px solid transparent;
}
.btn-sm:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-sm.btn-primary { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-sm.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1023px) {
  .products-intro { padding-top: 130px; }
  .product-wrap { grid-template-columns: 1fr; gap: 40px; }
  .product-gallery { position: static; }
  .range-grid { grid-template-columns: 1fr; }
  .table-controls { flex-direction: column; align-items: stretch; }
  .filter-pills { justify-content: center; }
  .search-box {
    max-width: 100%;
    width: 100%;
    margin-top: 8px;
  }
  .search-box input {
    height: 46px;
    line-height: 46px;
    font-size: 0.88rem;
  }
}
@media (max-width: 600px) {
  .spec-list { grid-template-columns: 1fr; }
  .global-specs-bar { flex-direction: column; gap: 6px; text-align: center; }
  .global-specs-bar .divider { display: none; }
  .filter-pills { gap: 8px; }
  .pill-btn { padding: 8px 16px; font-size: 0.72rem; }
}