:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --line: #e4e8f0;
  --ink: #182033;
  --muted: #687086;
  --primary: #ef4b23;
  --accent: #143d8f;
  --brown: #8b3f1f;
  --shadow: 0 20px 45px rgba(24, 32, 51, 0.09);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 16px;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.product-page-main { padding: 26px 0 44px; }
.product-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 250px;
  gap: 16px;
  align-items: start;
}

.side-column, .related-column, .main-product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(24,32,51,.05);
}
.side-column, .related-column { padding: 14px; position: sticky; top: 154px; }
.side-column h2, .related-column h2 {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.ad-card {
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #111827);
}
.ad-card--light { background: linear-gradient(135deg, #fff4ec, #eef4ff); color: var(--ink); border: 1px solid var(--line); }
.ad-card strong { display: block; font-size: 16px; line-height: 1.25; margin-bottom: 8px; font-weight: 800; }
.ad-card p { margin: 0 0 12px; color: inherit; opacity: .9; line-height: 1.55; font-size: 14px; }
.ad-card a { display: inline-flex; padding: 8px 11px; border-radius: 999px; background: #fff; color: var(--primary); font-weight: 800; font-size: 14px; }
.ad-card--light a { background: var(--primary); color: #fff; }

.main-product-card { padding: 16px; }
.breadcrumb { color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.product-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .82fr);
  gap: 18px;
  align-items: start;
}
.gallery-box { border: 1px solid var(--line); border-radius: 20px; background: #f8fafc; padding: 12px; }
.main-image-wrap {
  min-height: 380px;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}
.main-image-wrap img { width: 100%; height: 380px; object-fit: contain; display: block; }
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: rgba(15,23,42,.72);
  font-size: 25px;
  cursor: pointer;
}
.gallery-arrow--prev { left: 12px; }
.gallery-arrow--next { right: 12px; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; padding-top: 12px; }
.thumbs button { flex: 0 0 68px; height: 58px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 3px; cursor: pointer; }
.thumbs button.active { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(239,75,35,.14); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }

.product-info .category-label { color: var(--accent); font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.product-info h1 {
  font-size: clamp(24px, 2.1vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 8px 0 10px;
  font-weight: 800;
}
.product-description { color: var(--muted); line-height: 1.6; font-size: 15px; }
.stats-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.stats-row span { border: 1px solid var(--line); background: #f8fafc; color: var(--accent); border-radius: 999px; padding: 6px 9px; font-weight: 800; font-size: 12px; }
.price-panel { background: #fff7f4; color: var(--primary); border-radius: 16px; padding: 14px; font-size: 24px; font-weight: 900; margin: 14px 0; }
.price-panel small { display: block; color: var(--muted); font-size: 12px; font-weight: 700; margin-top: 4px; }
.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.action-row button { min-height: 46px; border: 0; border-radius: 999px; color: #fff; font-weight: 800; cursor: pointer; }
.add-cart { background: var(--accent); }
.order-now { background: var(--primary); }

.section-box { border-top: 1px solid var(--line); margin-top: 20px; padding-top: 18px; }
.section-box h2 { margin: 0 0 12px; font-size: 22px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
.detail-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.detail-list li { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.55; }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.review-card { background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.review-card strong { display: block; font-size: 20px; color: var(--primary); font-weight: 900; }
.review-card span { font-size: 14px; color: var(--muted); }

.related-list { display: grid; gap: 10px; }
.related-item { display: grid; grid-template-columns: 64px 1fr; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 8px; background: #fff; cursor: pointer; }
.related-item img, .related-icon { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; background: #f8fafc; display: grid; place-items: center; font-size: 24px; }
.related-item h3 { font-size: 14px; line-height: 1.25; margin: 2px 0 4px; font-weight: 800; }
.related-item p { margin: 0; color: var(--primary); font-weight: 900; font-size: 14px; }
.empty { padding: 24px; color: var(--muted); }

@media (max-width: 1060px) {
  .product-layout { grid-template-columns: 1fr; }
  .side-column, .related-column { position: static; }
  .product-hero { grid-template-columns: 1fr; }
  .side-column { order: 3; }
  .related-column { order: 2; }
}

@media (max-width: 640px) {
  .main-product-card { padding: 12px; border-radius: 18px; }
  .main-image-wrap { min-height: 280px; }
  .main-image-wrap img { height: 280px; }
  .action-row, .review-grid { grid-template-columns: 1fr; }
  .product-info h1 { font-size: 24px; }
  .side-column h2, .related-column h2, .section-box h2 { font-size: 20px; }
}
/* UX revision: product tabs, support action, cart consistency */
.ad-card button[data-contact-panel] {display:inline-flex;cursor:pointer;border:0;padding:9px 13px;border-radius:99px;background:var(--primary);color:#fff;font-weight:800}
.hb-product-tabs {display:flex;gap:10px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:12px;margin-bottom:18px}
.hb-product-tabs button {border:1px solid #cbd7e9;background:#f4f7fb;color:#214474;border-radius:12px;padding:12px 16px;cursor:pointer;font-weight:800}
.hb-product-tabs button[aria-selected="true"] {background:var(--accent);border-color:var(--accent);color:#fff}
.hb-review-section {margin:18px 0;border-top:1px solid var(--line);padding-top:16px}
.hb-review-section h3 {margin:0 0 12px;color:#17263f;font-size:17px}
.hb-review-empty {background:#f8fafc;border:1px dashed #d7e0ef;padding:16px;border-radius:12px;color:#60718c}
.hb-review-entry {background:#f8fafc;border:1px solid #e0e7f1;padding:14px;border-radius:12px;margin-bottom:10px}
.hb-review-entry span {margin-left:10px;color:#d97706}
.hb-review-entry p {margin:8px 0 0}
.hb-review-video {display:inline-flex;gap:8px;margin:4px 8px 4px 0;border-radius:10px;padding:11px 14px;background:#fef1ee;color:#ba361f;font-weight:800}
.hb-review-support {border:0;background:#e8f0ff;color:#174b9e;border-radius:10px;padding:7px 12px;font-weight:800;cursor:pointer}
#cartPanel .cart-item h3{font-size:14px}
#cartPanel .cart-summary{margin-top:auto}
#cartPanel {z-index:90}
#overlay {z-index:80}
#hbProductReviewsPanel[hidden],#hbProductDetailsPanel[hidden] {display:none}

/* Tutorials tab only: no repeated rating/review/sales cards or unnecessary separator. */
.hb-tutorials-section { margin-top: 0; padding-top: 0; border-top: 0; }
