/* ==========================================================================
   עמוד מוצר בודד - WooCommerce (single-product.php)
   נבנה 1:1 לפי עיצוב "אור גנוז" בפיגמה (נבדק ישירות מול קובץ הפיגמה: צבעים,
   מיקומים וגדלי גופן מדויקים) - ומופעל אוטומטית על כל מוצר שנוסף בוורקומרס.
   ========================================================================== */

:root {
  --product-gold: #a46629;
  --product-dark-blue: #151c2a;
  --product-panel-bg: #eae6dd;
}

.single-product-wrap {
  background: var(--page-bg);
}

.product-section-title {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 32px;
  color: var(--product-gold);
  margin: 0 0 24px;
}

.product-section-title--md {
  font-size: 36px;
}

.product-section-title--lg {
  font-size: 40px;
}

.product-section-title--center {
  text-align: center;
}

/* ---------- HERO ---------- */
.product-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 60px;
  padding: 80px 8% 60px;
  max-width: 1600px;
  margin: 0 auto;
}

.product-hero-info {
  flex: 1 1 480px;
  min-width: 300px;
  text-align: right;
}

.product-hero-image {
  flex: 180 0 400px;
}

.product-cover-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.product-title {
  font-family: var(--font-title);
  font-weight: 900;
  font-size: 72px;
  color: var(--product-gold);
  margin: 0 0 16px;
  line-height: 1.15;
  text-align: center;
}

.product-subtitle {
  font-family: var(--font-title);
  font-size: 30px;
  color: var(--product-gold);
  margin: 0 0 16px;
}

.product-tagline {
  font-family: var(--font-title);
  font-size: 26px;
  color: var(--product-gold);
  margin: 0 0 24px;
}

.product-description {
  font-size: 20px;
  line-height: 1.5;
  color: var(--product-dark-blue);
  text-align: center;
  margin-bottom: 28px;
}

.product-description p {
  margin: 0 0 8px;
}

.product-price {
  font-size: 44px;
  font-weight: 700;
  color: var(--product-dark-blue);
  margin: 0 0 24px;
  position: relative;
  left:-34%;
}

.product-price del {
  opacity: 0.5;
  font-size: 0.55em;
  margin-inline-start: 10px;
}

.product-price ins {
  text-decoration: none;
}

.product-hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.product-donate-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-dark);
  color: #fff;
  border-radius: 4px;
  padding: 16px 40px;
  font-size: 22px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s ease;
}

.product-donate-cta:hover {
  opacity: 0.85;
}

.product-add-to-cart form.cart {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.product-add-to-cart .quantity {
  display: none;
}

.product-add-to-cart .variations {
  width: 100%;
  margin-bottom: 12px;
  font-size: 18px;
  color: var(--product-dark-blue);
}

.product-add-to-cart .variations select {
  font-family: var(--font-body);
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid var(--brand-dark);
}

.product-add-to-cart button.single_add_to_cart_button {
  border: 2px solid var(--brand-dark);
  border-radius: 4px;
  background: transparent;
  padding: 16px 40px;
  font-size: 22px;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--brand-dark);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.product-add-to-cart button.single_add_to_cart_button:hover {
  background: var(--brand-dark);
  color: #fff;
}

.product-add-to-cart button.single_add_to_cart_button.disabled,
.product-add-to-cart button.single_add_to_cart_button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.product-add-to-cart button.single_add_to_cart_button:hover:disabled {
  background: transparent;
  color: var(--brand-dark);
}

.product-sample-link {
  display: inline-block;
  font-size: 18px;
  color: var(--brand-dark);
  text-decoration: underline;
  margin-bottom: 20px;
}

.product-features-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: flex-end;
}

.product-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 90px;
}

.product-feature-icon {
  width: 34px;
  height: 34px;
  color: var(--product-dark-blue);
}

.product-feature-icon svg {
  width: 100%;
  height: 100%;
}

.product-feature-label {
  font-size: 16px;
  color: var(--product-dark-blue);
  text-align: center;
}

/* ---------- CAMPAIGN (אודות הספר + היו שותפים) ---------- */
.product-campaign {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 40px 8% 80px;
}

.product-campaign-col {
  flex: 1 1 480px;
  min-width: 300px;
  border: 2px solid var(--brand-dark);
  border-radius: 14px;
  padding: 40px;
}

.product-campaign-col--about {
  flex: 1.1 1 500px;
}

.product-campaign-progress-label {
  font-size: 18px;
  color: var(--product-dark-blue);
  margin: 0 0 10px;
}

.product-campaign-progress-track {
  width: 100%;
  height: 15px;
  border-radius: 103px;
  background: #eee8dc;
  overflow: hidden;
  margin-bottom: 28px;
}

.product-campaign-progress-fill {
  height: 100%;
  background: #9d6215;
  border-radius: 103px;
}

.product-pricing-tiers-wrap {
  margin-bottom: 28px;
}

.product-pricing-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0;
}

.product-pricing-tier {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--brand-dark);
  border-radius: 6px;
  padding: 16px 8px;
  cursor: pointer;
  font-size: 20px;
  font-weight: 600;
  color: #000;
}

.product-pricing-tier input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.product-pricing-tier:has(input:checked) {
  background: var(--brand-dark);
  color: #fff;
}

/* "סכום אחר" - נפתח אוטומטית שדה להזנת סכום חופשי כשהריבוע הזה נבחר (ללא JS, דרך :has). */
.product-custom-amount {
  display: none;
  margin-top: 16px;
}

.product-pricing-tiers-wrap:has(#product-pricing-tier-custom:checked) .product-custom-amount {
  display: block;
}

.product-custom-amount label {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--product-dark-blue);
}

.product-custom-amount input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--brand-dark);
  border-radius: 6px;
  font-size: 20px;
  font-family: var(--font-body);
  background: #fff;
  color: #000;
}

.product-dedication-button {
  display: block;
  width: 100%;
  max-width: 384px;
  margin: 0 auto;
  padding: 20px;
  background: var(--brand-dark);
  color: #fff;
  border: none;
  border-radius: 13px;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.product-about-excerpt {
  font-size: 18px;
  line-height: 1.6;
  color: var(--product-dark-blue);
  margin-bottom: 24px;
}

.product-details-table {
  margin: 0;
}

.product-details-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(64, 42, 21, 0.15);
  font-size: 18px;
  color: var(--product-dark-blue);
}

.product-details-row dt {
  font-weight: 700;
}

.product-details-row dd {
  margin: 0;
}

/* ---------- PREVIEW GALLERY ---------- */
.product-preview {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 8%;
  text-align: center;
}

.product-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.product-preview-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
}

/* ---------- WHY IMPORTANT + DEDICATIONS ---------- */
.product-why-section {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 60px 8%;
}

.product-why-col {
  background: var(--product-panel-bg);
  border-radius: 14px;
  padding: 40px;
}

.product-why-col--dedications {
  flex: 1 1 340px;
}

.product-why-col--important {
  flex: 2.2 1 600px;
}

.product-why-text {
  font-size: 18px;
  line-height: 1.6;
  color: var(--product-dark-blue);
  text-align: center;
}

/* ---------- RELATED PRODUCTS ---------- */
.product-related {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 8% 100px;
}

.product-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
}

.product-related-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--product-gold);
  border: 1px solid #000;
  border-radius: 14px;
  padding: 24px;
}

.product-related-cover img {
  width: 140px;
  height: 200px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 16px;
}

.product-related-title {
  font-family: var(--font-title);
  font-size: 28px;
  margin: 0 0 8px;
}

.product-related-price {
  font-size: 22px;
  color: #000;
  margin: 0 0 8px;
}

.product-related-link {
  font-size: 18px;
  color: var(--brand-dark);
  text-decoration: underline;
}

@media (max-width: 640px) {
  .product-title {
    font-size: 40px;
  }

  .product-hero-info {
    text-align: center;
  }

  .product-hero-actions,
  .product-features-row {
    justify-content: center;
  }

  .product-pricing-tiers {
    grid-template-columns: repeat(2, 1fr);
  }
}
