/* ===== PRODUCT PAGE — shared layout for all product pages ===== */

/* BREADCRUMB */
.breadcrumb {
  max-width: 960px;
  margin: 0 auto;
  padding: 14px 20px 0;
  font-size: 13px;
  color: var(--t3);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap
}

.breadcrumb a {
  color: var(--g);
  text-decoration: none;
  transition: color .2s
}

.breadcrumb a:hover {
  color: var(--gd);
  text-decoration: underline
}

.breadcrumb .sep {
  opacity: .5
}

/* PRODUCT HERO — gallery + info side by side */
.prod-hero {
  max-width: 960px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start
}

@media(max-width:768px) {
  .prod-hero {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 14px
  }
}

/* GALLERY */
.gallery {
  position: relative
}

.gallery-main {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--bd);
  background: var(--sf);
  cursor: zoom-in;
  position: relative
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .4s ease
}

.gallery-main:hover img {
  transform: scale(1.05)
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 4px
}

.gallery-thumbs img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--rs);
  border: 2px solid var(--bd);
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0
}

.gallery-thumbs img:hover,
.gallery-thumbs img.active {
  border-color: var(--g);
  box-shadow: 0 0 0 2px var(--gg)
}

/* PRODUCT INFO */
.prod-info {
  display: flex;
  flex-direction: column;
  gap: 14px
}

.prod-tag {
  display: inline-block;
  background: var(--g);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: .5px;
  width: fit-content
}

.prod-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--t1);
  line-height: 1.3
}

.prod-subtitle {
  font-size: 14px;
  color: var(--t2);
  line-height: 1.6
}

.prod-price {
  font-size: 28px;
  font-weight: 800;
  color: var(--g);
  display: flex;
  align-items: baseline;
  gap: 8px
}

.prod-price .unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--t3)
}

.prod-price .old {
  font-size: 16px;
  font-weight: 400;
  color: var(--t3);
  text-decoration: line-through
}

/* SPEC QUICK — short specs in info area */
.spec-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px
}

.spec-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--gl2);
  color: var(--gd);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--gg)
}

.spec-chip .ico {
  font-size: 14px
}

/* ACTION BUTTONS */
.prod-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px
}

.btn-order {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--hbg);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--r);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all .3s;
  box-shadow: var(--s2)
}

.btn-order:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(22, 163, 74, .35)
}

.btn-tel {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--sf);
  color: var(--t1);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--r);
  border: 1px solid var(--bd);
  cursor: pointer;
  text-decoration: none;
  transition: all .3s
}

.btn-tel:hover {
  border-color: var(--g);
  background: var(--gl2)
}

/* WARRANTY/TRUST BADGES */
.trust-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 6px
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--t2)
}

.trust-badge .ico {
  font-size: 16px
}

/* ===== CONTENT SECTIONS ===== */
.prod-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px 28px
}

.prod-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--t1);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gg);
  display: flex;
  align-items: center;
  gap: 8px
}

/* VIDEO */
.prod-video {
  width: 100%;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--bd);
  background: #000;
  aspect-ratio: 16/9
}

.prod-video video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block
}

.prod-video-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--r);
  border: 2px dashed var(--bd);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--t3);
  font-size: 14px;
  gap: 8px;
  background: var(--sf2)
}

.prod-video-placeholder .ico {
  font-size: 40px;
  opacity: .5
}

/* DESCRIPTION */
.prod-desc {
  color: var(--t2);
  font-size: 15px;
  line-height: 1.8
}

.prod-desc p {
  margin-bottom: 12px
}

.prod-desc ul {
  margin: 0 0 12px 20px
}

.prod-desc li {
  margin-bottom: 6px
}

/* SPEC TABLE */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--bd)
}

.spec-table tr:nth-child(even) {
  background: var(--sf2)
}

.spec-table tr:nth-child(odd) {
  background: var(--sf)
}

.spec-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--bds)
}

.spec-table td:first-child {
  font-weight: 600;
  color: var(--t1);
  width: 40%;
  white-space: nowrap
}

.spec-table td:last-child {
  color: var(--t2)
}

.spec-table tr:last-child td {
  border-bottom: none
}

/* ===== RELATED PRODUCTS ===== */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px
}

.related-card {
  border-radius: var(--r);
  border: 1px solid var(--bd);
  background: var(--cd);
  overflow: hidden;
  text-decoration: none;
  transition: all .3s;
  display: block
}

.related-card:hover {
  border-color: var(--g);
  box-shadow: var(--s2);
  transform: translateY(-3px)
}

.related-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--sf);
  display: block
}

.related-card .rc-info {
  padding: 10px 12px
}

.related-card .rc-model {
  font-size: 14px;
  font-weight: 700;
  color: var(--t1)
}

.related-card .rc-name {
  font-size: 12px;
  color: var(--t3);
  margin-top: 2px
}

/* ===== BACK TO TOP (product page) ===== */
.back-top {
  text-align: center;
  padding: 20px 0 0
}

.back-top a {
  color: var(--g);
  text-decoration: none;
  font-size: 13px
}

.back-top a:hover {
  text-decoration: underline
}

/* ===== SWIPE GALLERY — สไลด์เลื่อนซ้ายขวา ===== */
.gallery-slider{position:relative;width:100%;aspect-ratio:1;border-radius:var(--r);overflow:hidden;border:1px solid var(--bd);background:var(--sf);cursor:grab;touch-action:pan-y}
.gallery-slider.grabbing{cursor:grabbing}
.gallery-track{display:flex;height:100%;transition:transform .35s ease}
.gallery-track.no-transition{transition:none}
.gallery-slide{min-width:100%;height:100%;display:flex;align-items:center;justify-content:center}
.gallery-slide img{max-width:100%;max-height:100%;object-fit:contain}
.gal-arrow{position:absolute;top:50%;transform:translateY(-50%);background:rgba(0,0,0,.35);color:#fff;border:none;width:36px;height:36px;border-radius:50%;font-size:18px;cursor:pointer;z-index:3;display:flex;align-items:center;justify-content:center;transition:background .2s}
.gal-arrow:hover{background:rgba(0,0,0,.6)}
.gal-arrow.prev{left:8px}
.gal-arrow.next{right:8px}
.gal-dots{display:flex;justify-content:center;gap:6px;margin-top:10px}
.gal-dot{width:10px;height:10px;border-radius:50%;background:var(--bd);border:none;cursor:pointer;transition:all .2s;padding:0}
.gal-dot.active{background:var(--g);transform:scale(1.2)}
.gal-counter{position:absolute;bottom:10px;right:10px;background:rgba(0,0,0,.5);color:#fff;font-size:12px;padding:3px 10px;border-radius:20px;z-index:3;pointer-events:none}

/* ===== SELLING POINTS GRID ===== */
.sell-points{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px;margin-top:12px}
.sell-point{display:flex;align-items:flex-start;gap:8px;background:var(--sf2);border:1px solid var(--bd);border-radius:var(--r);padding:12px 14px;font-size:13px;color:var(--t2);line-height:1.5}
.sell-point .sp-ico{font-size:20px;flex-shrink:0;margin-top:1px}

/* ===== RESPONSIVE FINE TUNE ===== */
@media(max-width:480px) {
  .prod-title {
    font-size: 22px
  }

  .prod-price {
    font-size: 24px
  }

  .prod-actions {
    flex-direction: column
  }

  .btn-order,
  .btn-tel {
    width: 100%;
    justify-content: center
  }

  .gallery-thumbs img {
    width: 52px;
    height: 52px
  }

  .spec-table td:first-child {
    width: auto;
    white-space: normal
  }
}