/* ==========================================================================
   Fahavi Computers - single product page
   ========================================================================== */

/* wide, calm container */
body.single-product .ct-container[data-vertical-spacing],
body.single-product .ct-container-full[data-vertical-spacing] {
  max-width: none;
  width: min(100% - clamp(32px, 4vw, 64px), 1560px);
  margin-inline: auto; padding-top: 8px;
}

.fh-crumbs--pp { margin: 4px 0 14px; }

/* ------------------------------------------------------------ top grid */
body.single-product div.product {
  display: grid !important;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  gap: clamp(20px, 2.6vw, 44px);
  align-items: start;
}
body.single-product div.product > * { grid-column: 1 / -1; }
body.single-product .woocommerce-product-gallery,
body.single-product .fh-ppgallery-slot { grid-column: 1; }
body.single-product div.product .summary.entry-summary {
  grid-column: 2; margin: 0 !important; width: 100% !important; float: none !important;
}
.fh-pp__cols {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px;
  gap: clamp(18px, 2vw, 30px); align-items: start;
}

/* Blocksy/Woo leftovers stay hidden */
body.single-product .onsale, body.single-product .product_meta { display: none !important; }

/* ------------------------------------------------------------- gallery */
.fh-pp__gallery { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; align-items: start; }
.fh-pp__thumbs { display: flex; flex-direction: column; gap: 8px; max-height: 520px; overflow-y: auto; scrollbar-width: thin; }
.fh-pp__thumb {
  width: 76px; height: 64px; border: 1.5px solid var(--fh-border); border-radius: 10px;
  background: #fff; padding: 4px; cursor: pointer; display: grid; place-items: center;
}
.fh-pp__thumb img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.fh-pp__thumb.is-active { border-color: var(--fh-navy); }
.fh-pp__thumb:focus-visible { outline: 2px solid var(--fh-navy); outline-offset: 2px; }
.fh-pp__main {
  background: #fff; border: 1px solid var(--fh-border); border-radius: 16px;
  display: flex; align-items: center; justify-content: center; min-height: 380px; padding: 18px;
}
.fh-pp__main img { max-width: 100%; max-height: 520px; width: auto; height: auto; object-fit: contain; }

/* ---------------------------------------------------------------- info */
.fh-pp__brand { font-size: 13px; font-weight: 800; color: var(--fh-navy); text-decoration: none; letter-spacing: .04em; text-transform: uppercase; }
.fh-pp__title { font-size: clamp(1.25rem, 1.8vw, 1.65rem); font-weight: 800; line-height: 1.3; color: var(--fh-ink); margin: 6px 0 12px; letter-spacing: -.01em; }
.fh-pp__price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.fh-pp__price b { font-size: clamp(1.4rem, 2vw, 1.7rem); font-weight: 800; color: var(--fh-navy); }
.fh-pp__price b.is-sale { color: var(--fh-red); }
.fh-pp__price del { font-size: .95rem; color: #9AA1B4; }
.fh-pp__save { font-size: .85rem; font-weight: 700; color: var(--fh-red); }
.fh-pp__stock { font-size: 13px; margin: 0 0 12px; font-weight: 600; }
.fh-pp__stock.is-in { color: var(--fh-green-deep); }
.fh-pp__stock.is-in::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--fh-green-deep); margin-right: 7px; vertical-align: 1px; }
.fh-pp__stock.is-out { color: var(--fh-red); }
.fh-pp__stock.is-in b, .fh-pp__stock i { font-style: normal; color: var(--fh-muted); font-weight: 500; }
.fh-pp__lede { font-size: 14px; line-height: 1.62; color: #4B5265; margin: 0 0 16px; }

.fh-pp__specs { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; }
.fh-pp__specrow { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.fh-pp__specrow dt { font-size: 12px; font-weight: 700; color: var(--fh-muted); }
.fh-pp__specrow dd { margin: 0; font-size: 12.5px; color: var(--fh-ink); line-height: 1.4; }

/* --------------------------------------------------------------- panel */
.fh-pp__panel {
  background: #fff; border: 1px solid var(--fh-border); border-radius: 16px;
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
  position: sticky; top: calc(var(--fh-header-offset, 114px) + 12px);
}
.fh-pp__buyrow { display: flex; gap: 9px; }
.fh-pp__qty { display: flex; align-items: center; border: 1px solid var(--fh-border); border-radius: 11px; overflow: hidden; flex: none; }
.fh-pp__qbtn { width: 34px; height: 46px; border: 0; background: #F4F6FA; font-size: 17px; cursor: pointer; color: var(--fh-ink); }
.fh-pp__qbtn:hover { background: #E8ECF5; }
.fh-pp__qty input { width: 42px; height: 46px; border: 0; text-align: center; font-size: 14px; font-weight: 700; font-family: inherit; -moz-appearance: textfield; }
.fh-pp__qty input::-webkit-outer-spin-button, .fh-pp__qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.fh-pp__cart {
  flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; border: 0; border-radius: 11px; background: #2563EB; color: #fff;
  font-size: 14.5px; font-weight: 800; text-decoration: none; cursor: pointer; text-align: center;
}
.fh-pp__cart:hover { filter: brightness(1.08); color: #fff; }
.fh-pp__cart.is-added { background: var(--fh-green-deep); }
.fh-pp__cart[disabled] { background: #9AA1B4; cursor: not-allowed; }
.fh-pp__wa {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; border-radius: 11px; background: #22C55E; color: #fff;
  font-size: 14.5px; font-weight: 800; text-decoration: none;
}
.fh-pp__wa:hover { filter: brightness(1.06); color: #fff; }
.fh-pp__wa svg { width: 18px; height: 18px; }

.fh-pp__trust { display: flex; flex-direction: column; gap: 11px; margin-top: 4px; padding-top: 13px; border-top: 1px solid #EFF1F6; }
.fh-pp__trust > div { display: flex; gap: 10px; align-items: flex-start; }
.fh-pp__tico { width: 34px; height: 34px; border-radius: 9px; background: #EDF1FC; display: grid; place-items: center; color: var(--fh-navy); flex: none; }
.fh-pp__tico svg { width: 17px; height: 17px; }
.fh-pp__trust b { display: block; font-size: 12.5px; font-weight: 800; color: var(--fh-ink); line-height: 1.3; }
.fh-pp__trust i { display: block; font-style: normal; font-size: 11.5px; color: var(--fh-muted); margin-top: 1px; }

/* ---------------------------------------------------------------- tabs */
.fh-pp__body { margin-top: clamp(22px, 3vw, 38px); }
.fh-pp__tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--fh-border); overflow-x: auto; scrollbar-width: none; }
.fh-pp__tabs::-webkit-scrollbar { display: none; }
.fh-pp__tabs [role=tab] {
  border: 0; background: none; padding: 12px 16px; font-size: 13.5px; font-weight: 700;
  color: var(--fh-muted); cursor: pointer; font-family: inherit; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.fh-pp__tabs [role=tab]:hover { color: var(--fh-navy); }
.fh-pp__tabs [role=tab].is-active { color: var(--fh-navy); border-bottom-color: var(--fh-navy); }
.fh-pp__tabs [role=tab]:focus-visible { outline: 2px solid var(--fh-navy); outline-offset: -2px; border-radius: 6px; }
.fh-pp__tabpanel { padding: clamp(18px, 2.4vw, 28px) 0 6px; }

/* ------------------------------------------------------------ overview */
.fh-pp__overview { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .8fr) minmax(0, 1.1fr); gap: clamp(16px, 2vw, 28px); align-items: start; }
.fh-pp__desc { font-size: 13.5px; line-height: 1.7; color: #4B5265; }
.fh-pp__desc p { margin: 0 0 10px; }
.fh-pp__who { background: #F6F8FC; border-radius: 14px; padding: 16px 18px; }
.fh-pp__who b { display: block; font-size: 13.5px; font-weight: 800; color: var(--fh-ink); margin-bottom: 7px; }
.fh-pp__who p { margin: 0; font-size: 13px; line-height: 1.6; color: #4B5265; }
.fh-pp__qa b { display: block; font-size: 13.5px; font-weight: 800; color: var(--fh-ink); margin-bottom: 9px; }
.fh-pp__qa dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 20px; }
.fh-pp__qa dl > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; align-items: baseline; }
.fh-pp__qa dt { font-size: 12px; font-weight: 700; color: var(--fh-muted); }
.fh-pp__qa dd { margin: 0; font-size: 12.5px; color: var(--fh-ink); line-height: 1.45; }

/* --------------------------------------------------------------- specs */
.fh-pp__spectable { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(24px, 4vw, 60px); }
.fh-pp__spectable > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid #EFF1F6; }
.fh-pp__spectable dt { font-size: 12.5px; font-weight: 700; color: var(--fh-muted); }
.fh-pp__spectable dd { margin: 0; font-size: 13px; color: var(--fh-ink); line-height: 1.5; }

.fh-pp__delivery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: clamp(16px, 2vw, 28px); }
.fh-pp__delivery b { display: block; font-size: 13.5px; font-weight: 800; color: var(--fh-ink); margin-bottom: 6px; }
.fh-pp__delivery p { margin: 0; font-size: 13px; line-height: 1.6; color: #4B5265; }
.fh-pp__delivery a { color: var(--fh-navy); font-weight: 700; text-decoration: none; }
.fh-pp__empty { font-size: 13.5px; color: var(--fh-muted); }

/* ----------------------------------------------------------------- FAQ */
.fh-pp__faq { margin-top: clamp(20px, 2.6vw, 32px); }
.fh-pp__faq h2 { font-size: clamp(1.05rem, 1.4vw, 1.25rem); font-weight: 800; color: var(--fh-ink); margin: 0 0 14px; }
.fh-pp__faqgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; align-items: start; }
.fh-pp__faqitem { border: 1px solid #EBEEF4; border-radius: 11px; background: #fff; }
.fh-pp__faqitem summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px; font-size: 13px; font-weight: 700; color: var(--fh-ink); cursor: pointer;
}
.fh-pp__faqitem summary::-webkit-details-marker { display: none; }
.fh-pp__faqitem summary span { color: var(--fh-muted); font-weight: 600; transition: transform .18s; }
.fh-pp__faqitem[open] summary span { transform: rotate(45deg); }
.fh-pp__faqitem p { margin: 0; padding: 0 14px 12px; font-size: 12.5px; line-height: 1.6; color: #4B5265; }
.fh-pp__faqitem summary:focus-visible { outline: 2px solid var(--fh-navy); outline-offset: 2px; border-radius: 10px; }

/* ------------------------------------------------------------- related */
.fh-pp__related { margin-top: clamp(24px, 3vw, 40px); }
.fh-pp__related h2 { font-size: clamp(1.05rem, 1.4vw, 1.25rem); font-weight: 800; color: var(--fh-ink); margin: 0 0 14px; }
.fh-pp__relgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.fh-pp__rel {
  display: flex; gap: 12px; align-items: center; text-decoration: none;
  background: #fff; border: 1px solid var(--fh-border); border-radius: 13px; padding: 10px;
  transition: box-shadow .16s, transform .16s;
}
.fh-pp__rel:hover { box-shadow: var(--fh-shadow-lg); transform: translateY(-2px); }
.fh-pp__relimg { width: 74px; height: 64px; flex: none; display: grid; place-items: center; }
.fh-pp__relimg img { max-width: 100%; max-height: 100%; object-fit: contain; }
.fh-pp__relinfo { min-width: 0; }
.fh-pp__relinfo b { display: block; font-size: 12.5px; font-weight: 700; color: var(--fh-ink); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fh-pp__relinfo i { display: block; font-style: normal; font-size: 11px; color: var(--fh-muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fh-pp__relinfo em { display: block; font-style: normal; font-size: 13px; font-weight: 800; color: var(--fh-navy); margin-top: 4px; }

/* ---------------------------------------------------------- responsive */
@media (max-width: 1150px) {
  .fh-pp__cols { grid-template-columns: 1fr; }
  .fh-pp__panel { position: static; }
  .fh-pp__overview { grid-template-columns: 1fr 1fr; }
  .fh-pp__relgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  body.single-product div.product { grid-template-columns: 1fr; }
  body.single-product .woocommerce-product-gallery, body.single-product div.product .summary.entry-summary { grid-column: 1; }
  .fh-pp__overview { grid-template-columns: 1fr; }
  .fh-pp__spectable { grid-template-columns: 1fr; }
  .fh-pp__faqgrid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .fh-pp__gallery { grid-template-columns: 1fr; }
  .fh-pp__thumbs { flex-direction: row; order: 2; max-height: none; overflow-x: auto; overflow-y: hidden; }
  .fh-pp__main { min-height: 0; }
  .fh-pp__main img { max-height: 340px; }
  .fh-pp__specs { grid-template-columns: 1fr; }
  .fh-pp__relgrid { grid-template-columns: 1fr; }
  .fh-pp__buyrow { flex-wrap: wrap; }
  .fh-pp__cart { min-width: 100%; order: 2; }
  .fh-pp__qty { width: 100%; justify-content: space-between; }
  .fh-pp__qty input { flex: 1 1 auto; }
}
