:root {
  --clr-primary: #c01f2f;
  --clr-primary-dark: #9a1825;
  --clr-primary-light: #f9e8ea;
  --clr-accent: #013567;
  --clr-accent-light: #e6edf5;
  --clr-text: #1a1a2e;
  --clr-text-muted: #6b7280;
  --clr-border: #e8e8f0;
  --clr-surface: #ffffff;
  --clr-bg: #f8f8fc;
  --clr-success: #16a34a;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-sm: 0 1px 4px rgba(1, 53, 103, 0.07);
  --shadow-md: 0 4px 20px rgba(1, 53, 103, 0.1);
  --shadow-lg: 0 12px 40px rgba(1, 53, 103, 0.14);
  --shadow-card: 0 2px 12px rgba(192, 31, 47, 0.08);

  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);

  --font: var(--main-font-family, "IRANYekan"), system-ui, sans-serif;
  --container: min(1280px, 100%);
}

/* ── Reset helpers ── */
.product-page *,
.product-page *::before,
.product-page *::after {
  box-sizing: border-box;
}

.product-page {
  font-family: var(--font);
  color: var(--clr-text);
  direction: rtl;
  background: var(--clr-bg);
  padding-bottom: 3rem;
}

/* ════════════════════════════════
 BREADCRUMB
════════════════════════════════ */
.product-breadcrumb {
  padding: 0.75rem 1rem;
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
}

.product-breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--clr-text-muted);
}

.product-breadcrumb a {
  color: var(--clr-accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

.bc-sep {
  margin: 0 0.15rem;
  opacity: 0.4;
}

.product-breadcrumb [aria-current="page"] span {
  color: var(--clr-primary);
  font-weight: 600;
}

/* ════════════════════════════════
 PRODUCT TOP LAYOUT
════════════════════════════════ */
.product-top {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--clr-surface);
  margin: 1rem;
  overflow: hidden;
}

/* ════════════════════════════════
 GALLERY
════════════════════════════════ */
.product-gallery-col {
  background: var(--clr-bg);
}

.custom-product-gallery {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
}

.gallery-main-image-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.gallery-main-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
  display: block;
}

.gallery-main-image-wrapper:hover .gallery-main-image {
  transform: scale(1.04);
}

.gallery-zoom-icon {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-accent);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.gallery-main-image-wrapper:hover .gallery-zoom-icon {
  opacity: 1;
}

/* Badges */
.gallery-badge-wrapper {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gallery-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sale-badge {
  background: var(--clr-primary);
  color: #fff;
}

.oos-badge {
  background: #6b7280;
  color: #fff;
}

/* Thumbnails */
.gallery-thumbnails-wrapper {
  display: flex;
  flex-direction: row;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
  scrollbar-color: var(--clr-border) transparent;
}

.gallery-thumbnails-wrapper::-webkit-scrollbar {
  height: 4px;
}

.gallery-thumbnails-wrapper::-webkit-scrollbar-thumb {
  background: var(--clr-border);
  border-radius: 4px;
}

.gallery-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition:
    border-color var(--transition),
    transform var(--transition);
  background: #fff;
}

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

.gallery-thumb:hover {
  border-color: var(--clr-primary-light);
  transform: translateY(-2px);
}

.gallery-thumb.active {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px var(--clr-primary-light);
}

/* ════════════════════════════════
   PRODUCT SUMMARY
════════════════════════════════ */
.product-summary-col {
  padding: 1.5rem 1rem;
}

.product-category-tag a {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  color: var(--main-color);
  border-radius: 3px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 5px;
  transition: background var(--transition);
}

.product-category-tag a:hover {
  color: #a70011;
}

.product-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.5;
  color: var(--clr-text);
  margin: 0 0 0.75rem;
}

/* Rating */
.product-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.stars-visual {
  display: flex;
  gap: 2px;
}

.star {
  font-size: 1rem;
  color: var(--clr-border);
}

.star.filled {
  color: #f59e0b;
}

.star.half {
  color: #f59e0b;
  opacity: 0.5;
}

.rating-text {
  font-size: 0.8rem;
  color: var(--clr-text-muted);
}

/* Price */
.product-price-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.product-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: #181818;
}

.product-price del {
  font-size: 1rem;
  color: var(--clr-text-muted);
  font-weight: 400;
  margin-left: 0.5rem;
}

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

.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
}

.stock-badge.in-stock {
  color: #777;
}

.stock-badge.out-of-stock {
  background: #f3f4f6;
  color: var(--clr-text-muted);
}

/* Short Desc */
.product-short-desc {
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--clr-text-muted);
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--clr-border);
}

/* Meta row */
.product-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--clr-text-muted);
  margin-bottom: 1rem;
}

.meta-label {
  font-weight: 600;
  color: var(--clr-text);
}

/* ════════════════════════════════
   ADD TO CART (WooCommerce override)
════════════════════════════════ */
.product-atc-wrapper {
  margin-bottom: 1.25rem;
}

.product-atc-wrapper form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.product-atc-wrapper .quantity {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-atc-wrapper .qty {
  width: 100% !important;
  height: 54px;
  border: 1px solid #ccc;
  text-align: center !important;
  font-size: 1rem;
  transition: border-color var(--transition);
}

.product-atc-wrapper .qty:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px var(--clr-primary-light);
}

.product-atc-wrapper .single_add_to_cart_button,
.product-atc-wrapper button[type="submit"] {
  width: 100%;
  height: 52px;
  background: var(--clr-primary) !important;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  transition:
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.product-atc-wrapper .single_add_to_cart_button:hover {
  background: var(--clr-primary-dark);
  transform: translateY(-2px);
}

.product-atc-wrapper .single_add_to_cart_button:active {
  transform: translateY(0);
}

/* Variable product swatches area */
.product-atc-wrapper .variations {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.75rem;
}

.product-atc-wrapper .variations td,
.product-atc-wrapper .variations th {
  padding: 0.4rem 0;
  vertical-align: middle;
}

.product-atc-wrapper .variations label {
  font-weight: 600;
  font-size: 0.85rem;
}

.product-atc-wrapper .variations select {
  width: 100%;
  height: 42px;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  padding: 0 0.75rem;
  font-family: var(--font);
  font-size: 0.9rem;
  color: var(--clr-text);
  background: var(--clr-surface);
  cursor: pointer;
  transition: border-color var(--transition);
}

.product-atc-wrapper .variations select:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px var(--clr-primary-light);
}

/* ════════════════════════════════
   TRUST BADGES
════════════════════════════════ */
.trust-badges {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.trust-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 0.5rem;
  background: var(--clr-accent-light);
  border-radius: var(--radius-md);
  color: var(--clr-accent);
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  transition:
    background var(--transition),
    transform var(--transition);
}

.trust-badge:hover {
  background: var(--clr-accent);
  color: #fff;
  transform: translateY(-2px);
}

.trust-badge svg {
  flex-shrink: 0;
}

/* ════════════════════════════════
   TABS
════════════════════════════════ */
.product-tabs {
  margin: 1rem;
  background: var(--clr-surface);
  overflow: hidden;
}

.tabs-nav-wrapper {
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 2px solid var(--clr-border);
}

.tabs-nav-wrapper::-webkit-scrollbar {
  display: none;
}

.tabs-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  min-width: max-content;
}

.tab-item {
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--clr-text-muted);
  cursor: pointer;
  position: relative;
  transition: color var(--transition);
  white-space: nowrap;
  user-select: none;
}

.tab-item::after {
  content: "";
  position: absolute;
  bottom: -2px;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--clr-primary);
  transform: scaleX(0);
  transition: transform var(--transition);
  border-radius: 2px 2px 0 0;
}

.tab-item:hover {
  color: var(--clr-primary);
}

.tab-item.active {
  color: var(--clr-primary);
}

.tab-item.active::after {
  transform: scaleX(1);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: var(--clr-primary-light);
  color: var(--clr-primary);
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  margin-right: 0.35rem;
}

.tab-content {
  display: block;
}

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

.tab-inner {
  padding: 1.5rem 1rem;
}

/* Attributes table */
.attributes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.attributes-table tr:nth-child(even) td,
.attributes-table tr:nth-child(even) th {
  background: var(--clr-bg);
}

.attributes-table th,
.attributes-table td {
  padding: 0.7rem 0.9rem;
  text-align: right;
  border-bottom: 1px solid var(--clr-border);
}

.attributes-table th {
  font-weight: 700;
  color: var(--clr-accent);
  width: 35%;
  background: var(--clr-accent-light);
}

/* Prose (description) */
.prose {
  font-size: 0.9rem;
  line-height: 1.9;
  color: var(--clr-text);
}

.prose h2,
.prose h3 {
  color: var(--clr-accent);
  margin-top: 1.5rem;
}

.prose ul,
.prose ol {
  padding-right: 1.5rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose img {
  max-width: 100%;
  border-radius: var(--radius-md);
}

/* ════════════════════════════════
   REVIEWS (WooCommerce override)
════════════════════════════════ */
#reviews {
  font-family: var(--font);
}

#reviews #comments {
  margin-bottom: 2rem;
}

#reviews .commentlist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#reviews .comment_container {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--clr-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--clr-border);
  transition: box-shadow var(--transition);
}

#reviews .comment_container:hover {
  box-shadow: var(--shadow-sm);
}

#reviews .comment-text {
  flex: 1;
}

#reviews .star-rating {
  color: #f59e0b;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

#reviews .woocommerce-review__author {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--clr-accent);
}

#reviews .woocommerce-review__dash,
#reviews .woocommerce-review__published-date {
  font-size: 0.78rem;
  color: var(--clr-text-muted);
}

#reviews .description p {
  font-size: 0.88rem;
  line-height: 1.8;
  color: var(--clr-text);
  margin: 0.5rem 0 0;
}

/* Review form */
#review_form_wrapper {
  background: #eeeeee40;
  padding: 1.5rem 1rem;
  border: 1px solid rgba(1, 53, 103, 0.1);
}

#review_form_wrapper h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--clr-accent);
  margin: 0 0 1rem;
}

#review_form .comment-form-rating {
  margin-bottom: 1rem;
}

#review_form .comment-form-rating label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

#review_form .stars a {
  font-size: 1.4rem;
  color: goldenrod;
  text-decoration: none;
  transition: color var(--transition);
}

#review_form .stars a:hover,
#review_form .stars a.active {
  color: #f59e0b;
}

#review_form p {
  margin-bottom: 0.75rem;
}

#review_form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  color: var(--clr-text);
}

#review_form input[type="text"],
#review_form input[type="email"],
#review_form textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.88rem;
  color: var(--clr-text);
  background: var(--clr-surface);
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
  resize: vertical;
}

#review_form input:focus,
#review_form textarea:focus {
  outline: none;
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px var(--clr-primary-light);
}

#review_form .form-submit input[type="submit"] {
  background: var(--clr-primary);
  color: #fff;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition:
    background var(--transition),
    transform var(--transition);
  box-shadow: 0 4px 14px rgba(192, 31, 47, 0.28);
}

#review_form .form-submit input[type="submit"]:hover {
  background: var(--clr-primary-dark);
  transform: translateY(-1px);
}

/* ════════════════════════════════
   RELATED PRODUCTS
════════════════════════════════ */
.related-products {
  margin: 1rem;
  padding: 1.5rem 1rem;
  background: var(--clr-surface);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.related-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--clr-accent);
  white-space: nowrap;
  margin: 0;
}

.section-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(to left, transparent, var(--clr-accent-light));
  border-radius: 2px;
}

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

.related-item {
  background: var(--clr-bg);
  overflow: hidden;
  border: 1px solid var(--clr-border);
  transition:
    box-shadow var(--transition),
    transform var(--transition);
  display: flex;
  flex-direction: column;
}

.related-item:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}

.related-item-img-wrapper {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #fff;
}

.related-item-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}

.related-item:hover .related-item-img-wrapper img {
  transform: scale(1.06);
}

.related-item-body {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 10px;
  flex: 1;
}

.related-item-title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-item-title a {
  color: var(--clr-text);
  text-decoration: none;
  transition: color var(--transition);
}

.related-item-title a:hover {
  color: var(--clr-primary);
}

.related-item-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--clr-primary);
}

.related-item-price del {
  color: var(--clr-text-muted);
  font-weight: 400;
  font-size: 0.78rem;
  margin-left: 5px;
}

.related-item-action {
  margin-top: auto;
}

/* ════════════════════════════════
   BUTTONS
════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  text-align: center;
}

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

.btn--primary:hover {
  background: var(--clr-primary-dark);
  border-color: var(--clr-primary-dark);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--clr-accent);
  border-color: var(--clr-accent);
}

.btn--outline:hover {
  background: var(--clr-accent);
  color: #fff;
}

.btn--ghost {
  background: var(--clr-accent-light);
  color: var(--clr-accent);
  border-color: transparent;
}

.btn--ghost:hover {
  background: var(--clr-accent);
  color: #fff;
}

.btn:hover {
  color: #fff;
}

/* ════════════════════════════════
   RESPONSIVE — Tablet+  (≥ 640px)
════════════════════════════════ */
@media (min-width: 640px) {
  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .trust-badges {
    grid-template-columns: repeat(4, 1fr);
  }

  .tab-inner {
    padding: 2rem 1.5rem;
  }
}

/* ════════════════════════════════
   RESPONSIVE — Desktop  (≥ 960px)
════════════════════════════════ */
@media (min-width: 960px) {
  .product-page {
    padding-bottom: 4rem;
  }

  .product-breadcrumb {
    padding: 0.75rem 2rem;
  }

  .product-top {
    flex-direction: row;
    align-items: flex-start;
    max-width: 85%;
    margin: 50px auto;
  }

  .product-gallery-col {
    width: 48%;
    flex-shrink: 0;
    top: 1.5rem;
    align-self: flex-start;
  }

  .product-summary-col {
    flex: 1;
    padding: 2rem;
  }

  .product-title {
    font-size: 1.65rem;
  }

  .custom-product-gallery {
    padding: 1.5rem;
  }

  .gallery-thumb {
    width: 72px;
    height: 72px;
  }

  .related-products,
  .product-tabs {
    max-width: 85%;
    margin: auto;
  }

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

/* ══════════════════════════════════
   SINGLE PRODUCT GALLERY  (spg)
══════════════════════════════════ */
.spg {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--clr-surface);
}

/* Badges */
.spg__badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  z-index: 2;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  pointer-events: none;
}

.spg__badge--sale {
  background: var(--clr-primary);
  color: #fff;
}

.spg__badge--oos {
  background: #6b7280;
  color: #fff;
  top: 3.25rem;
}

/* Main image wrapper */
.spg__main-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #f8f8f8;
  cursor: zoom-in;
}

.spg__main-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: opacity 0.25s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.spg__main-img.is-loading {
  opacity: 0;
}

/* Zoom lens overlay */
.spg__zoom-lens {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: var(--radius-lg);
}

.spg__main-wrap:hover .spg__zoom-lens {
  opacity: 1;
}

/* Zoom icon button */
.spg__zoom-btn {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  z-index: 4;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--clr-accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition:
    background var(--transition),
    transform var(--transition);
  backdrop-filter: blur(4px);
}

.spg__zoom-btn:hover {
  background: var(--clr-accent);
  color: #fff;
  transform: scale(1.1);
}

/* Thumbnails */
.spg__thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 0.25rem;
}

.spg__thumbs::-webkit-scrollbar {
  display: none;
}

.spg__thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--clr-border);
  background: #f8f8f8;
  cursor: pointer;
  padding: 0;
  transition:
    border-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

.spg__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.spg__thumb:hover {
  border-color: var(--clr-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(192, 31, 47, 0.2);
}

.spg__thumb--active {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px var(--clr-primary-light);
}

/* ══════════════════════════════════
 LIGHTBOX  (spg-lb)
══════════════════════════════════ */
.spg-lb {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spg-lb[hidden] {
  display: none;
}

.spg-lb__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}

.spg-lb__box {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: min(92vw, 860px);
  max-height: 95vh;
  animation: lb-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes lb-in {
  from {
    opacity: 0;
    transform: scale(0.88);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.spg-lb__img-wrap {
  width: 100%;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5);
}

.spg-lb__img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  border-radius: var(--radius-xl);
  transition: opacity 0.2s ease;
  user-select: none;
}

.spg-lb__img.is-loading {
  opacity: 0;
}

/* Nav buttons */
.spg-lb__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--transition),
    transform var(--transition);
  backdrop-filter: blur(6px);
  z-index: 2;
}

.spg-lb__nav:hover {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  transform: translateY(-50%) scale(1.1);
}

.spg-lb__nav--prev {
  right: -60px;
}

.spg-lb__nav--next {
  left: -60px;
}

/* Close button */
.spg-lb__close {
  position: absolute;
  top: -52px;
  left: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background var(--transition),
    transform var(--transition);
  backdrop-filter: blur(6px);
}

.spg-lb__close:hover {
  background: var(--clr-primary);
  border-color: var(--clr-primary);
  transform: rotate(90deg) scale(1.1);
}

/* Counter */
.spg-lb__counter {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Lightbox thumbnails */
.spg-lb__thumbs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
  padding: 0.25rem;
}

.spg-lb__thumbs::-webkit-scrollbar {
  display: none;
}

.spg-lb__thumb {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  opacity: 0.55;
  transition:
    opacity var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

.spg-lb__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.spg-lb__thumb:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

.spg-lb__thumb--active {
  border-color: var(--clr-primary);
  opacity: 1;
  box-shadow: 0 0 0 2px var(--clr-primary-light);
}

/* Mobile adjustments */
@media (max-width: 639px) {
  .spg-lb__nav--prev {
    right: -44px;
    width: 38px;
    height: 38px;
  }

  .spg-lb__nav--next {
    left: -44px;
    width: 38px;
    height: 38px;
  }

  .spg-lb__box {
    width: 88vw;
  }
}

/* ── ATC Notice ── */
#xiii-atc-notice {
  background: #2e7d32;
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  padding: 0.85rem 1.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  z-index: 99999;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.18);
  opacity: 1;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease;
  white-space: nowrap;
  pointer-events: none;
}

.xiii-atc-notice {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  color: #fff;
  opacity: 1;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.xiii-atc-notice--success {
  background: #2e7d32;
}

.xiii-atc-notice--error {
  background: #c62828;
}

.xiii-atc-notice--fade {
  opacity: 0;
}

@media only screen and (max-width: 500px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}

.reset_variations {
  display: none !important;
}
.single_variation_wrap {
  width: 100%;
}

.single_variation_wrap .woocommerce-variation-add-to-cart {
  display: flex !important;
  gap: 10px !important;
}
.sps-swatches > .swatchColor {
  border-radius: 0 !important;
  border: none !important;
  padding: 0 !important;
}
.sps-swatches > .swatchColor,
.sps-swatches > .swatchColor > div {
  width: 50px !important;
  height: 50px !important;
  opacity: 0.7;
}
.selected {
  opacity: 1 !important;
}
.sps-swatches > .swatchColor:hover,
.sps-swatches .swatch:hover,
.sps-swatches .swatch-label-circle:hover,
.sps-swatches .swatch-label-square:hover {
  border: none !important;
}
.product-atc-wrapper .variations label {
  font-size: 1rem !important;
  color: var(--main-color) !important;
  margin-bottom: 0 !important;
}
.single_variation_wrap .woocommerce-variation {
  background: #cccccc33 !important;
  padding: 10px !important;
  justify-content: space-between !important;
  margin-bottom: 10px !important;
  border-radius: 10px !important;
  font-size: 14px !important;
  color: #333 !important;
}
.single_variation_wrap .woocommerce-variation .price {
  font-size: 17px;
  display: flex;
  gap: 10px;
}
.single_variation_wrap .woocommerce-variation .price del {
  font-size: 15px;
  color: #777;
}
.product-variation-row {
}
.product-variation-row .variation-label {
  display: none;
}
.product-variation-row .variation-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.product-variation-row .variation-options span {
  color: #333;
  border: 1px solid;
  font-size: 13px;
  display: inline-block;
  padding: 5px 15px;
  border-radius: 5px;
}

@media only screen and (max-width: 570px) {
  .product-summary-col {
    padding: 0;
  }
}

.product-short-desc-wrapper {
  --desc-collapsed-height: 270px;
  position: relative;
}

.product-short-desc {
  overflow: hidden;
  max-height: var(--desc-collapsed-height);
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

/* گرادیانت محو روی متن قبل از باز شدن */
.product-short-desc-wrapper.is-collapsible .product-short-desc::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 60px;
  background: linear-gradient(
    to top,
    var(--desc-fade-color, #fff),
    transparent
  );
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.product-short-desc-wrapper.is-expanded .product-short-desc::after {
  opacity: 0;
}

.short-desc-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 14px auto 0;
  padding: 4px 11px;
  background: transparent;
  border: none;
  color: #666;
  font-size: 13px;
  font-weight: bold;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
}

.product-short-desc-wrapper.is-collapsible .short-desc-toggle-btn {
  display: table;
  margin: 0 auto 20px;
}

.short-desc-toggle-btn:hover {
  color: var(--main-color);
}

.toggle-icon {
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-short-desc-wrapper.is-expanded .toggle-icon {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .product-short-desc,
  .toggle-icon,
  .product-short-desc-wrapper .product-short-desc::after {
    transition: none;
  }
}

.sps-swatches .swatch-label-square {
  font-size: 13px;
}
.xiii-product-related-links {
  display: flex;
  gap: 15px;
  padding: 30px 0;
}
.xiii-product-related-links a {
  background: #181818;
  color: #fff;
  font-size: 13px;
  padding: 7px 20px;
  transition: all 0.3s;
}
.xiii-product-related-links a:hover {
  background: var(--main-color);
}
.product-variation-row,
.variation-options {
  display: none;
}
