/* ===== MA Asset Classic Product Page (same layout as Matrack ELD) ===== */
:root {
  --brand: #0a5cff;
  --brand-dark: #0741b8;
  --accent: #ff7a00;
  --ink: #1a1f2b;
  --muted: #5b6472;
  --line: #e4e8ef;
  --bg: #f5f7fb;
  --good: #1aa34a;
  --star: #ffb400;
  --radius: 12px;
  --shadow: 0 4px 18px rgba(20, 30, 60, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  /* font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; */
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-family: 'Inter', sans-serif;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Breadcrumb ===== */
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  padding: 18px 0 6px;
}
.breadcrumb a { color: var(--muted); }
.breadcrumb span { color: var(--ink); font-weight: 600; }
.breadcrumb .sep { margin: 0 8px; opacity: .6; }

/* ===== Product top layout ===== */
.product-top {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-top: 8px;
}

/* ===== Gallery ===== */
.gallery { position: sticky; top: 16px; align-self: start; }
@media (max-width: 880px) {
  .gallery { position: static; top: auto; }
}
.gallery .main-image {
  background: linear-gradient(135deg, #fafbfe, #eef1f7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  padding: 24px;
  font-size: 14px;
}
.gallery .main-image .ph-emoji { font-size: 54px; display: block; margin-bottom: 10px; }
.thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.thumbs .thumb {
  background: #f0f3f9;
  border: 1px solid var(--line);
  border-radius: 8px;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 10.5px;
  color: var(--muted);
  padding: 8px;
  cursor: pointer;
  transition: border-color .15s, transform .15s;
}
.thumbs .thumb:hover { border-color: var(--brand); transform: translateY(-2px); }

/* ===== Buy box ===== */
.cat-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--brand);
  background: #eaf1ff;
  padding: 4px 10px;
  border-radius: 999px;
}
.product-title {
  font-size: 34px;
  margin: 12px 0 8px;
  font-weight: 800;
  letter-spacing: -.01em;
}
.rating { font-size: 14px; color: var(--muted); margin-bottom: 14px; }
.rating .stars { color: var(--star); letter-spacing: 1px; }
.rating .score { color: var(--ink); font-weight: 700; margin: 0 4px; }

.price-box {
  background: #f8fafd;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 18px 0;
}
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
}
.price-row .label { color: var(--muted); font-size: 14px; }
.price-row .val { font-weight: 700; }
.price-row .val.big { font-size: 22px; color: var(--ink); }
.price-row .val.big small { font-size: 13px; color: var(--muted); font-weight: 500; }

/* Total preview */
.total-preview {
  background: #f1f9f3;
  border: 1px solid #cdebd6;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 18px 0;
}
.total-preview .price-row .val { color: #226b3a; }
.total-preview .price-row .val.pay { font-size: 20px; }

/* ===== Selectors ===== */
.field { margin: 18px 0; }
.field > label.field-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--muted);
  margin-bottom: 8px;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.qty button {
  width: 42px; height: 42px;
  border: 0;
  background: #f4f6fb;
  font-size: 20px;
  cursor: pointer;
  color: var(--ink);
}
.qty button:hover { background: #e8ecf5; }
.qty input {
  width: 54px; height: 42px;
  border: 0;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  --moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ===== CTAs ===== */
.cta-btn {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  padding: 15px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  margin-bottom: 12px;
}
.cta-btn.primary { background: var(--accent); color: #fff; }
.cta-btn.primary:hover { background: #e66e00; text-decoration: none; }
.cta-btn.secondary { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.cta-btn.secondary:hover { background: #f3f4f7; text-decoration: none; }

/* ===== Trust badges ===== */
.trust-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 18px 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.trust-row div { background: #f6f8fc; border-radius: 8px; padding: 10px 6px; }
.trust-row .ic { font-size: 18px; display: block; margin-bottom: 4px; }

/* ===== Quick specs ===== */
.quick-specs {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0;
  font-size: 13px;
}
.quick-specs th, .quick-specs td {
  border: 1px solid var(--line);
  padding: 10px;
  text-align: center;
}
.quick-specs th { background: #f4f6fb; color: var(--muted); font-weight: 700; }
.quick-specs td { font-weight: 600; }

/* Upsell note */
.upsell-note {
  background: #fff6e9;
  border: 1px solid #ffd9a3;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13.5px;
  color: #7a4a00;
}
.upsell-note a { color: var(--accent); font-weight: 700; }

/* ===== Tabs ===== */
.tabs-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 28px 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.tab-nav {
  display: flex;
  border-bottom: 1px solid var(--line);
  background: #fafbfe;
  overflow-x: auto;
}
.tab-nav button {
  flex: 0 0 auto;
  padding: 16px 24px;
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
}
.tab-nav button.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-panel { display: none; padding: 28px 32px; }
.tab-panel.active { display: block; }
.tab-panel h3 { margin-top: 0; font-size: 18px; }
.tab-panel h4 { margin: 22px 0 8px; font-size: 15px; }

.feature-list, .box-list { list-style: none; padding: 0; margin: 0; }
.feature-list li, .box-list li {
  padding: 8px 0 8px 28px;
  position: relative;
  border-bottom: 1px solid #f0f2f6;
  font-size: 14px;
}
.feature-list li::before, .box-list li::before {
  content: "✓";
  position: absolute; left: 0;
  color: var(--good); font-weight: 700;
}
.feature-list li strong { color: var(--ink); }

.spec-block { margin-bottom: 26px; }
.spec-block h4 {
  border-bottom: 2px solid var(--brand);
  display: inline-block;
  padding-bottom: 4px;
}
.spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.spec-table td { padding: 9px 4px; border-bottom: 1px solid #f0f2f6; }
.spec-table td:first-child { color: var(--muted); width: 45%; }
.spec-table td:last-child { font-weight: 600; }

/* ===== Reviews ===== */
.review-summary { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.review-summary .big-score { font-size: 48px; font-weight: 800; line-height: 1; }
.review-summary .stars { color: var(--star); font-size: 20px; }
.review-bars { flex: 1; min-width: 240px; }
.review-bars .bar-row { display: flex; align-items: center; gap: 8px; font-size: 12px; margin: 3px 0; }
.review-bars .bar-track { flex: 1; height: 8px; background: #eef1f6; border-radius: 4px; overflow: hidden; }
.review-bars .bar-fill { height: 100%; background: var(--star); }

.review-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: #fafbfe;
}
.review-card .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.review-card .who { font-weight: 700; font-size: 14px; }
.review-card .who span { font-weight: 400; color: var(--muted); }
.review-card .stars { color: var(--star); }
.review-card blockquote { margin: 0 0 8px; font-style: italic; color: #2c3340; font-size: 14px; }
.review-card .verified { font-size: 12px; color: var(--good); font-weight: 600; }

/* ===== FAQ ===== */
.faq-item { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq-item summary {
  font-weight: 700; cursor: pointer; font-size: 15px; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--brand); font-size: 22px; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

/* ===== Related products ===== */
.related { margin: 28px 0 50px; }
.related h2 { font-size: 22px; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.related-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  text-align: center;
}
.related-card .r-img {
  background: linear-gradient(135deg, #fafbfe, #eef1f7);
  border-radius: 8px; /*height: 110px;*/
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; margin-bottom: 12px;
}
.related-card .r-img img { width: 100%; height: 100%; object-fit: contain; padding: 7px;    aspect-ratio: 4 / 3; }
.related-card .r-name { font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.related-card .r-price { color: var(--brand); font-weight: 700; font-size: 14px; }

/* ===== Responsive ===== */
@media (max-width: 880px) {
  .product-top { grid-template-columns: 1fr; gap: 28px; padding: 22px; }
  .related-grid { grid-template-columns: 1fr; }
  .product-title { font-size: 28px; }
  .trust-row { grid-template-columns: repeat(2, 1fr); }
}


/* gallery-thumb-select — clickable thumbnails swap the main image */
.thumb { cursor: pointer; }
.thumb.active { border-color: #0a5cff; box-shadow: 0 0 0 2px rgba(10, 92, 255, .25); }
.main-image img, .showcase img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; margin: 0 auto; }


/* gallery-carousel-uniform — hero-as-thumb + 4-up carousel on every page */
.thumbs-carousel { position: relative; margin-top: 14px; }
.thumbs.carousel-on {
  display: flex; gap: 12px; margin-top: 0;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -ms-overflow-style: none; scrollbar-width: none;
}
.thumbs.carousel-on::-webkit-scrollbar { display: none; }
.thumbs.carousel-on .thumb { flex: 0 0 calc((100% - 36px) / 4); scroll-snap-align: start; }
.thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.thumb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 1px solid #e4e8ef; background: #fff;
  border-radius: 50%; font-size: 20px; line-height: 1; color: #1a1f2b; cursor: pointer;
  box-shadow: 0 2px 8px rgba(20, 30, 60, .12);
  display: flex; align-items: center; justify-content: center; z-index: 2;
}
.thumb-nav:hover { border-color: #0a5cff; color: #0a5cff; }
.thumb-nav.prev { left: -6px; }
.thumb-nav.next { right: -6px; }
.thumb-nav[hidden] { display: none; }
