/* ============================================================
   PLAY CONCEPT — PRODUCT PAGE STYLES
   Loaded only on single product pages (is_singular 'product').
   ============================================================ */

:root {
  --color-primary:       #3AAA35;
  --color-secondary:     #2255A4;
  --color-accent-red:    #E03030;
  --color-accent-yellow: #F5C400;
  --color-dark:          #1a1a1a;
  --color-text:          #555555;
  --color-bg-light:      #f7fdf4;
  --color-border:        #e8e8e8;
  --font-main:           'Heebo', sans-serif;
  --font-title:          'Heebo', sans-serif;
}

/* ============================================================
   SHARED
   ============================================================ */
.product-main {
  direction: rtl;
  font-family: var(--font-main);
}

.product-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.breadcrumb-bar {
  background: #fafafa;
  border-bottom: 1px solid var(--color-border);
  padding: 12px 0;
}

.breadcrumb,
.product-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: #aaa;
  padding: 1rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.breadcrumb a,
.product-breadcrumb a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover,
.product-breadcrumb a:hover {
  color: var(--color-primary);
}

.breadcrumb-sep,
.product-breadcrumb .separator {
  color: #ddd;
}

.breadcrumb-current,
.product-breadcrumb .current {
  color: #555;
  font-weight: 600;
}

/* ============================================================
   MAIN PRODUCT SECTION
   ============================================================ */
.product-section {
  padding: 48px 0 64px;
  background: #fff;
}

.product-columns {
  display: grid !important;
  grid-template-columns: 1.1fr 0.9fr !important;
  gap: 3rem !important;
  direction: rtl !important;
  align-items: start !important;
}

/* ============================================================
   GALLERY (right column in RTL)
   ============================================================ */
.product-gallery {
  order: 1 !important;
  width: 100% !important;
  position: sticky;
  top: 100px;
}

.product-main-image-wrap,
.gallery-main,
.product-gallery .main-image {
  position: relative;
  border-radius: 14px !important;
  overflow: hidden;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

.product-main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  display: block;
  padding: 8px;
  transition: opacity 0.25s ease;
}

/* ---- Zoom hint ---- */
.zoom-hint {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
  z-index: 2;
  pointer-events: none;
}

.zoom-hint i { font-size: 18px; color: #333; transform: none !important; }

.product-main-image-wrap:hover .zoom-hint { opacity: 1; }

/* ---- Lightbox ---- */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay.active { display: flex; }

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  left: 24px;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox-close:hover { background: rgba(255,255,255,0.3); }

.lightbox-close i { font-size: 20px; color: #fff; transform: none !important; }

.product-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(58, 170, 53, 0.45);
}

.product-image-placeholder svg {
  width: 72px;
  height: 72px;
}

.product-image-placeholder span {
  font-size: 13px;
  color: rgba(58, 170, 53, 0.5);
}

/* Badge */
.product-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--color-accent-yellow);
  color: #1a1a1a;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 50px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

/* Thumbnails */
.product-thumbnails,
.gallery-thumbs {
  display: flex !important;
  flex-direction: row !important;
  gap: 10px !important;
  margin-top: 12px !important;
  justify-content: flex-start !important;
  flex-wrap: wrap;
}

.product-thumb,
.gallery-thumb {
  width: 80px !important;
  height: 80px !important;
  border-radius: 10px !important;
  border: 2px solid #e8e8e8 !important;
  overflow: hidden !important;
  cursor: pointer !important;
  padding: 0;
  background: #f5f5f5;
  transition: border-color 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.product-thumb img,
.gallery-thumb img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}

.product-thumb:hover,
.gallery-thumb:hover,
.product-thumb.active,
.gallery-thumb.active {
  border-color: #3AAA35 !important;
}

.product-thumb.active,
.gallery-thumb.active {
  box-shadow: 0 0 0 3px rgba(58, 170, 53, 0.18);
}

/* ============================================================
   PRODUCT INFO (left column in RTL)
   ============================================================ */
.product-info {
  order: 2 !important;
  width: 100% !important;
  min-width: 0;
}

.product-category-tag,
.product-cat-tag {
  display: inline-block;
  background: #f0faea;
  color: #3AAA35;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 16px;
  border-radius: 20px;
  border: 1px solid #c8ecc0;
  margin-bottom: 1rem;
  letter-spacing: 0.3px;
}

.product-title,
.product-info h1,
h1.product-title {
  font-family: 'Heebo', sans-serif !important;
  font-size: 48px !important;
  font-weight: 900 !important;
  color: #1a1a1a !important;
  margin-bottom: 0.75rem !important;
  line-height: 1.15 !important;
}

.product-short-desc {
  font-size: 16px;
  color: var(--color-text);
  line-height: 1.75;
  margin: 0 0 24px;
}

.product-short-desc p {
  margin: 0;
}

/* Specs pills */
.product-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.spec-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-bg-light);
  border: 1px solid #d8eed0;
  border-radius: 50px;
  padding: 7px 14px;
  font-size: 13px;
  color: var(--color-dark);
}

.spec-icon {
  display: flex;
  align-items: center;
  color: var(--color-primary);
  flex-shrink: 0;
}

.spec-icon svg {
  width: 16px;
  height: 16px;
}

.spec-label {
  color: var(--color-text);
  font-weight: 500;
}

.spec-value {
  font-weight: 700;
  color: var(--color-dark);
}

/* CTA Box */
.product-cta-box {
  background: var(--color-bg-light);
  border: 1.5px solid #c4e8bc;
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cta-box-heading {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 800;
  color: var(--color-dark);
  margin: 0;
}

.btn-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 10px;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s, color 0.2s;
  border: 2px solid transparent;
}

.btn-cta-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn-cta-primary:hover {
  background: #2d8a29;
  border-color: #2d8a29;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(58, 170, 53, 0.3);
}

.btn-cta-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-cta-outline:hover {
  background: rgba(58, 170, 53, 0.06);
  transform: translateY(-1px);
}

.cta-box-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text);
  margin: 0;
  justify-content: center;
}

.cta-box-note svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

/* ============================================================
   TABS SECTION
   ============================================================ */
.product-tabs-section {
  background: #fafafa;
  border-top: 1px solid var(--color-border);
  padding: 56px 0;
}

.tabs-nav {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 36px;
}

.tab-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-main);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  padding: 10px 20px;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  border-radius: 6px 6px 0 0;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--color-primary);
  background: rgba(58, 170, 53, 0.04);
}

.tab-btn.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  background: rgba(58, 170, 53, 0.06);
}

.tab-panel {
  animation: fadeIn 0.25s ease;
}

.tab-panel[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* Specs table */
.specs-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.specs-table tr {
  background: #f7fdf4;
  border-radius: 8px;
}

.specs-table td {
  padding: 12px 16px;
  font-size: 14px;
}

.specs-table td:first-child {
  color: #888;
  font-weight: 500;
  border-radius: 0 8px 8px 0;
  width: 30%;
}

.specs-table td:last-child {
  font-weight: 700;
  color: #1a1a1a;
  border-radius: 8px 0 0 8px;
}

.specs-table tr:nth-child(even) {
  background: #fff;
  border: 1px solid #f0f0f0;
}

.tab-empty {
  color: var(--color-text);
  font-size: 15px;
  padding: 16px 0;
}

/* Compliance cards */
.compliance-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.compliance-card {
  background: #fff;
  border: 1px solid #d8eed0;
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
}

.compliance-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(58, 170, 53, 0.1);
}

.compliance-icon {
  width: 64px;
  height: 64px;
  background: var(--color-bg-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--color-primary);
}

.compliance-icon svg {
  width: 32px;
  height: 32px;
}

.compliance-card h3 {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 800;
  color: var(--color-dark);
  margin: 0 0 8px;
}

.compliance-card p {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.6;
  margin: 0;
}

/* Related products grid (inside tab) */
.related-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 700px) {
  .related-products-grid {
    grid-template-columns: 1fr;
  }
}

/* Empty state (projects tab) */
.tab-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 0;
  text-align: center;
}

.tab-empty-state svg {
  width: 56px;
  height: 56px;
  color: #c8e0c4;
}

.tab-empty-state p {
  font-size: 15px;
  color: var(--color-text);
  line-height: 1.7;
  margin: 0;
}

.btn-tab-cta {
  display: inline-flex;
  padding: 11px 28px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.25s, transform 0.2s;
}

.btn-tab-cta:hover {
  background: #2d8a29;
  color: #fff;
  transform: translateY(-1px);
}

/* ============================================================
   RELATED PRODUCTS
   ============================================================ */
.related-products-section {
  background: var(--color-bg-light);
  padding: 64px 0;
  border-top: 1px solid var(--color-border);
}

.related-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
}

.section-label {
  display: block;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.related-title {
  font-family: var(--font-title);
  font-size: 26px;
  font-weight: 800;
  color: var(--color-dark);
  margin: 0;
}

.see-all-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  transition: gap 0.2s;
}

.see-all-link:hover {
  gap: 10px;
  color: var(--color-primary);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Product card (shared with homepage) */
.product-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--color-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.09);
  border-color: transparent;
}

.product-card-image {
  height: 200px;
  background: #ffffff;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  transition: transform 0.4s ease;
}

.product-card:hover .product-card-image img {
  transform: scale(1.04);
}

.product-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-image-placeholder svg {
  width: 48px;
  height: 48px;
  color: rgba(58, 170, 53, 0.4);
}

.product-card .product-category-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 11px;
  padding: 3px 10px;
}

.product-card-body {
  padding: 18px 18px 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-title {
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 800;
  color: var(--color-dark);
  margin: 0 0 7px;
  line-height: 1.3;
}

.product-card-description {
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.6;
  margin: 0 0 10px;
  flex: 1;
}

.product-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--color-text);
}

.product-card-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #555;
  white-space: nowrap;
}

.product-card-meta span i {
  color: #3AAA35;
  font-size: 13px;
}

.product-card-meta svg {
  width: 13px;
  height: 13px;
  color: var(--color-primary);
  flex-shrink: 0;
}

.product-card-footer {
  padding: 12px 18px 18px;
  margin-top: auto;
}

.related-products-section .product-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.related-products-section .product-card {
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-products-section .product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.btn-product {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 16px;
  background: var(--color-bg-light);
  color: var(--color-primary);
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  border: 1.5px solid var(--color-primary);
  transition: background 0.25s, color 0.25s;
  width: 100%;
}

.btn-product:hover {
  background: var(--color-primary);
  color: #fff;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .product-columns {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .product-gallery {
    position: static;
  }

  .product-main-image-wrap {
    height: 280px;
  }

  .compliance-cards {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .product-section {
    padding: 28px 0 40px;
  }

  .product-title {
    font-size: 24px;
  }

  .tabs-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }

  .tab-btn {
    padding: 10px 14px;
    font-size: 14px;
  }

  .specs-table th,
  .specs-table td {
    padding: 10px 8px;
    font-size: 13px;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .related-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ============================================================
   GALLERY ARROWS
   ============================================================ */
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s, opacity 0.2s;
  color: #fff;
  padding: 0;
}
.gallery-arrow:hover { background: rgba(0, 0, 0, 0.72); }
.gallery-arrow i { font-size: 20px; line-height: 1; transform: none !important; }
.gallery-arrow-right { right: 12px; }
.gallery-arrow-left  { left: 12px; }

@media (max-width: 640px) {
  .gallery-arrow { width: 32px; height: 32px; }
  .gallery-arrow i { font-size: 16px; }
}

/* ---- Global product card badge position ---- */
.pc-cat-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

/* ---- Global cover / contain image classes (set per-card in product-card.php) ---- */
.card-image-cover {
  background: none !important;
}
.card-image-cover img {
  object-fit: cover !important;
  object-position: center !important;
  padding: 0 !important;
  background: none !important;
}
.card-image-contain {
  background: #ffffff;
}
.card-image-contain img {
  object-fit: contain;
}
