/* ==========================================================================
   Fahavi Computers - single product page v2 (mockup rebuild)
   ========================================================================== */

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), 1240px);
  margin-inline: auto; padding-top: 8px;
}

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

/* ------------------------------------------------------------ top grid */
body.single-product .product-entry-wrapper {
  display: grid !important;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(18px, 2.4vw, 32px);
  align-items: start;
  max-width: none !important;
}
body.single-product .product-entry-wrapper > .fh-pp__gallery { grid-column: 1; }
body.single-product .product-entry-wrapper > .summary.entry-summary {
  grid-column: 2; margin: 0 !important; width: 100% !important; float: none !important;
}
body.single-product .onsale, body.single-product .product_meta { display: none !important; }

/* ------------------------------------------------------------- gallery */
.fh-pp__gallery { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: start; }
.fh-pp__gallery--single { grid-template-columns: 1fr; }
.fh-pp__thumbs { display: flex; flex-direction: column; gap: 8px; max-height: 540px; overflow-y: auto; scrollbar-width: thin; }
.fh-pp__thumb {
  width: 72px; height: 62px; border: 2px solid var(--fh-border); border-radius: 10px;
  background: #fff; padding: 0; cursor: pointer; overflow: hidden;
}
.fh-pp__thumb img { width: 100%; height: 100%; object-fit: cover; 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 {
  position: relative; background: #fff; border: 1px solid var(--fh-border);
  border-radius: 16px; overflow: hidden;
}
.fh-pp__main > img { width: 100%; height: clamp(360px, 42vw, 540px); object-fit: cover; display: block; }

.fh-pp__badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-size: 12px; font-weight: 800; color: #fff; padding: 6px 12px;
  border-radius: 14px; background: var(--fh-tag-new);
}
.fh-pp__badge--gaming { background: var(--fh-tag-gaming); }

.fh-pp__arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(21, 26, 40, .55); color: #fff; font-size: 22px; line-height: 1;
  display: grid; place-items: center; transition: background .15s;
}
.fh-pp__arrow:hover { background: rgba(21, 26, 40, .8); }
.fh-pp__arrow--prev { left: 12px; }
.fh-pp__arrow--next { right: 12px; }

.fh-pp__zoom {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: 16px; padding: 7px 14px; cursor: pointer;
  background: rgba(21, 26, 40, .6); color: #fff; font-size: 12px; font-weight: 700; font-family: inherit;
}
.fh-pp__zoom svg { width: 13px; height: 13px; }
.fh-pp__zoom:hover { background: rgba(21, 26, 40, .82); }

.fh-pp__lightbox {
  position: fixed; inset: 0; z-index: 1300; background: rgba(4, 9, 26, .9);
  display: flex; align-items: center; justify-content: center; padding: 4vh 4vw;
}
.fh-pp__lightbox[hidden] { display: none; }
.fh-pp__lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 12px; }
.fh-pp__lbclose {
  position: absolute; top: 18px; right: 22px; width: 42px; height: 42px;
  border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff;
  font-size: 24px; cursor: pointer;
}

/* ----------------------------------------------------------- info card */
.fh-pp__card {
  background: #fff; border: 1px solid var(--fh-border); border-radius: 16px;
  padding: clamp(16px, 2vw, 24px); display: flex; flex-direction: column; gap: 10px;
}
.fh-pp__brand { font-size: 12.5px; font-weight: 800; color: var(--fh-navy); text-decoration: none; letter-spacing: .06em; text-transform: uppercase; }
.fh-pp__title { font-size: clamp(1.1rem, 1.5vw, 1.35rem); font-weight: 800; line-height: 1.35; color: var(--fh-ink); margin: 0; letter-spacing: -.01em; }
.fh-pp__price { display: flex; align-items: baseline; gap: 10px; }
.fh-pp__price b { font-size: clamp(1.5rem, 2vw, 1.8rem); font-weight: 800; color: var(--fh-ink); letter-spacing: -.015em; }
.fh-pp__price b.is-sale { color: var(--fh-red); }
.fh-pp__price del { font-size: .95rem; color: #9AA1B4; }
.fh-pp__stock { font-size: 12px; margin: -4px 0 0; font-weight: 600; color: var(--fh-muted); }
.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); }

/* spec quick chips */
.fh-pp__chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.fh-pp__chip {
  background: #F6F8FC; border: 1px solid #EBEEF4; border-radius: 12px;
  padding: 11px 10px; text-align: center; min-width: 0;
}
.fh-pp__chipico { display: inline-grid; place-items: center; color: var(--fh-navy); margin-bottom: 4px; }
.fh-pp__chipico svg { width: 18px; height: 18px; }
.fh-pp__chip small { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--fh-muted); margin-bottom: 3px; }
.fh-pp__chip b { display: block; font-size: 11.5px; font-weight: 700; color: var(--fh-ink); line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* qty + actions */
.fh-pp__qtyrow { display: flex; align-items: center; gap: 12px; }
.fh-pp__qtylabel { font-size: 13px; font-weight: 700; color: var(--fh-ink); }
.fh-pp__qty { display: flex; align-items: center; gap: 6px; }
.fh-pp__qbtn {
  width: 32px; height: 32px; border: 1px solid var(--fh-border); border-radius: 50%;
  background: #fff; font-size: 15px; cursor: pointer; color: var(--fh-ink);
  display: grid; place-items: center;
}
.fh-pp__qbtn:hover { border-color: var(--fh-navy); color: var(--fh-navy); }
.fh-pp__qty input {
  width: 44px; height: 32px; border: 1px solid var(--fh-border); border-radius: 9px;
  text-align: center; font-size: 13.5px; 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 {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 48px; border: 0; border-radius: 12px; background: var(--fh-navy); color: #fff;
  font-size: 14px; font-weight: 800; text-decoration: none; cursor: pointer; text-align: center;
}
.fh-pp__cart svg { width: 16px; height: 16px; }
.fh-pp__cart:hover { filter: brightness(1.12); 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: 46px; border-radius: 12px; background: #22C55E; color: #fff;
  font-size: 14px; font-weight: 800; text-decoration: none;
}
.fh-pp__wa:hover { filter: brightness(1.06); color: #fff; }
.fh-pp__wa svg { width: 17px; height: 17px; }

/* trust rows - plain, quiet */
.fh-pp__trust { list-style: none; margin: 4px 0 0; padding: 12px 0 0; border-top: 1px solid #EFF1F6; display: flex; flex-direction: column; gap: 9px; }
.fh-pp__trust li { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #4B5265; }
.fh-pp__trust svg { width: 16px; height: 16px; color: var(--fh-navy); flex: none; }

/* ----------------------------------------------------- sections + tabs */
.fh-pp__body { margin-top: clamp(20px, 2.6vw, 32px); }
.fh-pp__tabs {
  display: flex; gap: 2px; background: #fff; border: 1px solid var(--fh-border);
  border-radius: 14px 14px 0 0; border-bottom: 0; padding: 0 10px;
  overflow-x: auto; scrollbar-width: none;
}
.fh-pp__tabs::-webkit-scrollbar { display: none; }
.fh-pp__tabs a {
  padding: 13px 16px; font-size: 13.5px; font-weight: 700; color: var(--fh-muted);
  text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent;
}
.fh-pp__tabs a:hover { color: var(--fh-navy); }
.fh-pp__tabs a.is-active { color: var(--fh-navy); border-bottom-color: var(--fh-navy); }

.fh-pp__panelcard {
  background: #fff; border: 1px solid var(--fh-border); border-radius: 0 0 14px 14px;
  padding: clamp(16px, 2.2vw, 26px);
}
.fh-pp__desc { font-size: 14px; line-height: 1.75; color: #4B5265; max-width: 900px; }
.fh-pp__desc p { margin: 0 0 12px; }
.fh-pp__facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 9px 24px;
  border-top: 1px solid #EFF1F6; padding-top: 14px; margin-top: 6px;
}
.fh-pp__facts span { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #4B5265; }
.fh-pp__facts b { color: var(--fh-ink); font-weight: 700; }
.fh-pp__facts svg { width: 14px; height: 14px; color: var(--fh-green-deep); flex: none; }

.fh-pp__section { margin-top: clamp(18px, 2.4vw, 30px); }
.fh-pp__section h2 { font-size: 15.5px; font-weight: 800; color: var(--fh-ink); margin: 0 0 10px; }

/* specifications table */
.fh-pp__spectable {
  margin: 0; background: #fff; border: 1px solid var(--fh-border); border-radius: 14px;
  display: grid; grid-template-columns: 1fr 1fr; overflow: hidden;
}
.fh-pp__spectable > div {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 18px; border-bottom: 1px solid #EFF1F6;
}
.fh-pp__spectable > div:nth-child(odd) { border-right: 1px solid #EFF1F6; }
.fh-pp__spectable > div:nth-last-child(1), .fh-pp__spectable > div:nth-last-child(2) { border-bottom: 0; }
.fh-pp__specico { display: inline-grid; place-items: center; color: var(--fh-navy); flex: none; }
.fh-pp__specico svg { width: 17px; height: 17px; }
.fh-pp__spectable dt { font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--fh-muted); }
.fh-pp__spectable dd { margin: 2px 0 0; font-size: 13px; font-weight: 700; color: var(--fh-navy); line-height: 1.4; }

/* FAQ */
.fh-pp__faqlist { display: flex; flex-direction: column; gap: 9px; }
.fh-pp__faqitem { border: 1px solid var(--fh-border); border-radius: 12px; background: #fff; }
.fh-pp__faqitem summary {
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; 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); transition: transform .18s; }
.fh-pp__faqitem[open] summary span { transform: rotate(180deg); }
.fh-pp__faqitem p { margin: 0; padding: 0 16px 13px; 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; }

/* ---------------------------------------------------------- responsive */
@media (max-width: 1000px) {
  body.single-product .product-entry-wrapper { grid-template-columns: 1fr; }
  body.single-product .product-entry-wrapper > .fh-pp__gallery,
  body.single-product .product-entry-wrapper > .summary.entry-summary { grid-column: 1; }
}
@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 > img { height: clamp(280px, 80vw, 380px); }
  .fh-pp__chips { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fh-pp__facts { grid-template-columns: 1fr; }
  .fh-pp__spectable { grid-template-columns: 1fr; }
  .fh-pp__spectable > div:nth-child(odd) { border-right: 0; }
  .fh-pp__spectable > div:nth-last-child(2) { border-bottom: 1px solid #EFF1F6; }
}

/* Woo's add-to-cart.js injects a View-cart link after the button; JS removes it, this hides any paint in between */
.fh-pp__card .added_to_cart { display: none !important; }

.fh-pp__stock.is-backorder { color: #B45309; }
.fh-pp__stock.is-backorder::before { background: #F59E0B; }
