/* ============================================================
 * NYRIX — single product page styles (product.css)
 * Loaded ONLY on single products, on top of style.css. Reuses the
 * theme CSS variables (--accent, --bg-*, --text-*, --border) so colours
 * stay identical to the homepage. Mobile-first; two-column layouts kick
 * in at >=900px. RTL handled at the bottom.
 * ============================================================ */

/* The site navbar is fixed; push content clear of it. */
.breadcrumb {
  max-width: 1400px;
  margin: 0 auto;
  padding: 100px 1.5rem 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.breadcrumb a { color: var(--text-secondary); transition: color 0.3s ease; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { opacity: 0.5; }
.breadcrumb .current { color: var(--text-primary); opacity: 0.9; }

/* ============ PRODUCT HERO ============ */
.product-hero {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

/* ---- Gallery ---- */
.gallery-main {
  position: relative;
  aspect-ratio: 1;
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2.5rem;
  transition: transform 0.4s ease, opacity 0.3s ease;
  -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 60%, transparent 88%);
          mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 60%, transparent 88%);
}
.gallery-main:hover img { transform: scale(1.04); }
.gallery-placeholder {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  letter-spacing: 0.3em;
  font-size: clamp(1.5rem, 6vw, 2.5rem);
  color: rgba(201, 204, 209, 0.25);
}
.gallery-badge { position: absolute; top: 1.25rem; left: 1.25rem; }

.gallery-thumbs {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}
.thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s ease, transform 0.3s ease;
  flex: 0 0 auto;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; padding: 0.4rem; }
.thumb:hover { transform: translateY(-2px); }
.thumb.active { border-color: var(--accent); }

/* ---- Info column ---- */
.product-info { display: flex; flex-direction: column; gap: 1.25rem; }
.product-info .eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
.product-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -1px;
}
.rating-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.rating-row .stars { color: var(--accent); letter-spacing: 2px; font-size: 1rem; }
.rating-count { color: var(--text-secondary); font-size: 0.9rem; }
a.rating-count:hover { color: var(--accent); }

.price-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.price-now { font-family: 'Unbounded', sans-serif; font-weight: 700; font-size: 1.9rem; color: var(--accent); }
.price-was { color: var(--text-secondary); text-decoration: line-through; opacity: 0.7; font-size: 1rem; }
.price-badge {
  background: var(--accent);
  color: var(--bg-dark);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
  letter-spacing: 0.04em;
}
.product-desc { color: var(--text-secondary); line-height: 1.8; }
.product-desc p { margin-bottom: 0.75rem; }

/* ---- Quantity stepper ---- */
.qty-row { display: flex; align-items: center; gap: 1rem; }
.qty-label { font-size: 0.9rem; color: var(--text-secondary); }
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 50px;
  overflow: hidden;
  background: var(--bg-surface);
}
.qty-stepper button {
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.3rem;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.qty-stepper button:hover { color: var(--accent); background: rgba(232, 99, 44, 0.08); }
.qty-stepper input {
  width: 48px;
  height: 44px;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---- CTAs ---- */
.cta-stack { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.5rem; }
.btn-block { width: 100%; }
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--text-secondary);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn.loading { opacity: 0.7; pointer-events: none; }

/* ---- Inline trust signals ---- */
.trust-inline {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.trust-inline > div { display: flex; align-items: center; gap: 0.6rem; font-size: 0.88rem; color: var(--text-secondary); }
.trust-inline svg { color: var(--accent); flex: 0 0 auto; }

/* ============ TRUST BAR ============ */
.trust-bar { border-block: 1px solid var(--border); background: var(--bg-surface); }
.trust-bar-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.5rem;
}
.trust-item .ic {
  width: 44px; height: 44px; flex: 0 0 auto;
  border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(232, 99, 44, 0.1);
  color: var(--accent);
}
.trust-item .tx { display: flex; flex-direction: column; }
.trust-item strong { font-size: 0.95rem; }
.trust-item span { font-size: 0.8rem; color: var(--text-secondary); }

/* ============ GENERIC SECTION ============ */
.section { max-width: 1400px; margin: 0 auto; padding: 4rem 1.5rem; }
.section-head { margin-bottom: 2.5rem; }
.section-head .eyebrow {
  font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; display: block; margin-bottom: 0.75rem;
}
.section-head h2 { font-family: 'Unbounded', sans-serif; font-weight: 800; letter-spacing: -0.5px; }

/* Scroll reveal (JS adds .in) — never hides if JS fails, see single-product.js */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============ SPEC SHOWCASE ============ */
.spec { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; }
.spec-visual {
  aspect-ratio: 1;
  border-radius: 16px;
  border: 1px solid rgba(232, 99, 44, 0.12);
  display: grid; place-items: center;
  overflow: hidden;
}
.spec-visual img {
  width: 100%; height: 100%; object-fit: contain; padding: 2.5rem;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 58%, transparent 86%);
          mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 58%, transparent 86%);
}
.spec-title { font-family: 'Unbounded', sans-serif; font-size: 1.6rem; margin-bottom: 1.25rem; font-weight: 800; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table td { padding: 0.9rem 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.spec-table td:first-child { color: var(--text-secondary); width: 45%; }
.spec-table td:last-child { color: var(--text-primary); font-weight: 600; }

/* ============ PROSE (long description) ============ */
.prose { max-width: 760px; }
.prose h2, .prose h3 { font-family: 'Unbounded', sans-serif; margin: 1.5rem 0 0.75rem; font-weight: 800; letter-spacing: -0.5px; }
.prose h2 { font-size: 1.6rem; }
.prose h3 { font-size: 1.25rem; }
.prose p { color: var(--text-secondary); line-height: 1.85; margin-bottom: 1rem; }
.prose ul, .prose ol { color: var(--text-secondary); margin: 0 0 1rem 1.25rem; line-height: 1.85; }
.prose a { color: var(--accent); }

/* ============ REVIEWS ============ */
.reviews-summary { display: flex; align-items: center; gap: 1.25rem; margin-top: 0.5rem; }
.reviews-summary .big { font-family: 'Unbounded', sans-serif; font-weight: 800; font-size: 3rem; color: var(--accent); line-height: 1; }
.reviews-summary .stars { color: var(--accent); letter-spacing: 3px; font-size: 1.1rem; }
.reviews-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.review-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: 14px; padding: 1.75rem; }
.review-card .stars { color: var(--accent); letter-spacing: 2px; margin-bottom: 0.75rem; }
.review-card p { color: var(--text-primary); line-height: 1.7; margin-bottom: 1.25rem; }
.review-author { display: flex; align-items: center; gap: 0.75rem; }
.review-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(232, 99, 44, 0.15); color: var(--accent);
  font-weight: 700; font-size: 0.85rem;
}
.review-author .who { display: flex; flex-direction: column; }
.review-author strong { font-size: 0.9rem; }
.review-author .verified { font-size: 0.78rem; color: var(--accent); }
.reviews-empty {
  background: var(--bg-surface); border: 1px dashed var(--border);
  border-radius: 14px; padding: 2.5rem; text-align: center; color: var(--text-secondary);
}

/* ============ RELATED ============ */
.related-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.related-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; transition: transform 0.3s ease, border-color 0.3s ease;
}
.related-card:hover { transform: translateY(-6px); border-color: rgba(232, 99, 44, 0.5); }
.related-img { position: relative; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.related-img img {
  width: 100%; height: 100%; object-fit: contain; padding: 1.5rem;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 60%, transparent 88%);
          mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 60%, transparent 88%);
}
.related-badge {
  position: absolute; top: 1rem; right: 1rem;
  background: var(--accent); color: var(--bg-dark);
  font-size: 0.75rem; font-weight: 700; padding: 0.3rem 0.7rem; border-radius: 50px;
}
.related-info { padding: 1.25rem 1.5rem; }
.related-info h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.5rem; }
.related-price { display: flex; align-items: center; gap: 0.75rem; }
.related-price .now { color: var(--accent); font-weight: 700; }
.related-price .was { color: var(--text-secondary); text-decoration: line-through; opacity: 0.7; font-size: 0.85rem; }

/* ============ CARBON-FIBER SURFACE (design uses .carbon-bg) ============ */
.carbon-bg {
  background-color: #0A0A0C;
  background-image:
    radial-gradient(120% 100% at 50% 0%, rgba(22,22,26,0.85) 0%, rgba(10,10,12,1) 65%),
    linear-gradient(27deg,  rgba(22,22,26,0.55) 5px, transparent 5px),
    linear-gradient(207deg, rgba(22,22,26,0.55) 5px, transparent 5px),
    linear-gradient(27deg,  rgba(10,10,12,0.85) 5px, transparent 5px),
    linear-gradient(207deg, rgba(10,10,12,0.85) 5px, transparent 5px);
  background-size: 100% 100%, 20px 20px, 20px 20px, 20px 20px, 20px 20px;
  background-position: 0 0, 0 5px, 10px 0, 0 10px, 10px 5px;
}

/* ============ STICKY MOBILE ADD-TO-CART ============ */
.sticky-cart {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  transform: translateY(120%);
  transition: transform 0.4s ease;
}
.sticky-cart.show { transform: translateY(0); }
.sticky-cart .sc-info { display: flex; flex-direction: column; line-height: 1.3; }
.sticky-cart .sc-info strong { font-size: 0.9rem; }
.sticky-cart .sc-info span { color: var(--accent); font-weight: 700; font-size: 0.95rem; }
.sticky-cart .btn { padding: 0.75rem 1.75rem; }

/* ============ RESPONSIVE (tablet / desktop) ============ */
@media (min-width: 700px) {
  .breadcrumb, .product-hero, .section { padding-left: 2rem; padding-right: 2rem; }
  .trust-bar-inner { grid-template-columns: repeat(4, 1fr); }
  .reviews-grid { grid-template-columns: repeat(3, 1fr); }
  .related-grid { grid-template-columns: repeat(3, 1fr); }
  .cta-stack { flex-direction: row; }
}
@media (min-width: 900px) {
  .product-hero { grid-template-columns: 1fr 1fr; gap: 3.5rem; padding-top: 3rem; }
  .gallery-main { position: sticky; top: 100px; }
  .spec { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
  /* The sticky bar is a mobile convenience only. */
  .sticky-cart { display: none; }
}

/* ============ RTL (Arabic) ============ */
body.rtl .breadcrumb,
body.rtl .trust-inline > div,
body.rtl .trust-item,
body.rtl .review-author { direction: rtl; }
body.rtl .gallery-badge { left: auto; right: 1.25rem; }
body.rtl .related-badge { right: auto; left: 1rem; }
body.rtl .spec-table td:first-child { text-align: right; }

/* FR/AR long-description toggle — both blocks are rendered; only one shows.
   The AR block (RTL, formatting preserved) replaces the FR block when the
   Arabic language is active (body.rtl is set by the FR/EN/AR switcher). */
.nyrix-i18n-ar { display: none; }
body.rtl .nyrix-i18n-ar { display: block; }
body.rtl .nyrix-i18n-fr { display: none; }
