/* =============================================
   صفحه جزئیات محصول - دُرج سلطنتی 👑
   SEO-friendly, Schema.org, Responsive
   ============================================= */

/* ===== بنر بالای صفحه ===== */
.detail-hero {
  padding:  0;
  
}



/* ===== لودینگ تمام صفحه ===== */
.loading-fullpage {
  text-align: center;
  padding: 100px 20px;
}

.loading-fullpage .loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--border-gold);
  border-top-color: var(--gold-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

.loading-fullpage p {
  color: var(--text-secondary);
  font-size: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== محتوای اصلی ===== */
.detail-main {
  padding: 40px 0 60px;
}

.detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

/* ===== گالری ===== */
.detail-gallery-col {
  position: sticky;
  top: 120px;
}

.main-image-wrapper {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--bg-subtle);
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,0.35);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  opacity: 0;
  backdrop-filter: blur(4px);
}

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

.gallery-nav:hover { background: rgba(0,0,0,0.55); transform: translateY(-50%) scale(1.1); }

.gallery-nav--prev { right: 10px; }
.gallery-nav--next { left: 10px; }

.gallery-counter {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  background: rgba(0,0,0,0.4);
  color: white;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 10px;
  backdrop-filter: blur(4px);
}

.main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.no-image-big {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.2rem;
  background: linear-gradient(135deg, var(--bg-subtle), var(--border-card));
}

.no-image-big span {
  font-size: 4rem;
  margin-bottom: 10px;
}

.stock-badge-inline {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  z-index: 2;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.badge-available {
  background: var(--btn-bg);
  color: white;
}

.badge-unavailable {
  background: linear-gradient(135deg, #ff6b6b, #ee5a52);
  color: white;
}

.thumbnail-strip {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.thumb-item {
  width: 70px;
  height: 70px;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.thumb-item:hover,
.thumb-item.active {
  border-color: var(--gold-500);
  transform: translateY(-2px);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== اطلاعات محصول ===== */
.detail-info-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.product-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 15px;
  flex-wrap: wrap;
}

.product-name {
  font-size: 2rem;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.5;
  flex: 1;
  min-width: 250px;
}

.product-karat-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(207,164,52,0.06);
  padding: 8px 16px;
  border-radius: 25px;
  font-weight: 600;
  color: var(--gold-500);
  white-space: nowrap;
}

/* ===== مشخصات ===== */
.specs-box {
  background: var(--bg-inset);
  border: 1px solid var(--border-gold-light);
  border-radius: 16px;
  padding: 20px;
}

.specs-title {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-gold);
}

.specs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.spec-row-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border-light);
}

.spec-label {
  color: var(--text-caption);
  font-size: 0.85rem;
}

.spec-value {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9rem;
}

.spec-value--price {
  color: var(--gold-600);
  font-size: 1.1rem;
}

.spec-value.out-of-stock {
  color: #c0392b;
}

/* ===== انتخاب سایز ===== */
.size-title {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.size-option {
  position: relative;
  cursor: pointer;
}

.size-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.size-label {
  display: block;
  padding: 10px 18px;
  border: 2px solid var(--border-gold);
  border-radius: 25px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.3s ease;
  background: var(--bg-card);
}

.size-option input:checked + .size-label {
  border-color: var(--gold-500);
  background: var(--gold-glow);
  color: var(--gold-500);
}

.size-option.disabled .size-label {
  opacity: 0.4;
  cursor: not-allowed;
  text-decoration: line-through;
}

.size-out {
  display: block;
  font-size: 0.7rem;
  color: #c0392b;
  text-align: center;
  margin-top: 4px;
}

/* ===== عملیات ===== */
.action-section {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-add-to-cart {
  flex: 1;
  min-width: 180px;
  padding: 15px 24px;
  background: var(--btn-bg);
  color: var(--btn-color);
  border: none;
  border-radius: 30px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
}

.btn-add-to-cart:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(207, 164, 52, 0.3);
}

.btn-add-to-cart:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-favorite {
  width: 52px;
  height: 52px;
  border: 1px solid var(--border-gold-light);
  background: var(--bg-white);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
  color: var(--text-muted);
}

.btn-favorite:hover {
  border-color: #dc2626;
  color: #dc2626;
  transform: scale(1.05);
}

.btn-favorite.liked {
  background: var(--bg-inset);
  border-color: #dc2626;
  color: #dc2626;
}

.btn-favorite:disabled {
  opacity: 0.6;
}

/* ===== ضمانت‌ها ===== */
.trust-badges {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  padding: 15px 0;
  border-top: 1px solid var(--border-light);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.trust-icon {
  font-size: 1.1rem;
}

/* ===== اشتراک‌گذاری ===== */
.share-section {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--bg-inset);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-gold-light);
}

.share-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.share-buttons {
  display: flex;
  gap: 8px;
  margin-right: auto;
}

.share-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-gold);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.3s;
  text-decoration: none;
  color: var(--text-secondary);
}

.share-btn:hover {
  background: var(--btn-bg);
  color: var(--btn-color);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: 0 6px 16px var(--gold-glow);
}

.share-btn::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  background: var(--bg-dark);
  color: var(--text-light);
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s;
}

.share-btn:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* ===== توضیحات ===== */
.detail-description-section {
  padding: 40px 0 60px;
  background: var(--bg-inset);
}

.description-box {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.03);
  border: 1px solid var(--border-gold-light);
}

.description-title {
  font-size: 1.4rem;
  color: var(--text-primary);
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--gold-500);
  display: inline-block;
}

.description-content {
  color: var(--text-primary);
  line-height: 2;
  font-size: 1rem;
}

/* ===== محصولات مشابه ===== */
.similar-section {
  padding: 50px 0 60px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.section-title {
  font-size: 1.4rem;
  color: var(--text-primary);
}

.section-link {
  color: var(--gold-500);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.section-link:hover {
  color: var(--gold-600);
}

.similar-grid-scroll {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.similar-card {
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  text-decoration: none;
  border: 1px solid transparent;
}

.similar-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  border-color: var(--gold-500);
}

.similar-card-img {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-subtle);
}

.similar-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.similar-card:hover .similar-card-img img {
  transform: scale(1.08);
}

.similar-card-body {
  padding: 12px 15px;
}

.similar-card-body h4 {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.similar-karat {
  font-size: 0.75rem;
  color: var(--gold-500);
}

/* ===== اسپینر دکمه ===== */
.btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ===== نوتیفیکیشن ===== */
.notification-container {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
}

.notification {
  background: var(--bg-card);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.4s ease;
  border-right: 5px solid;
  cursor: pointer;
}

.notification.success { border-right-color: var(--gold-500); }
.notification.error { border-right-color: #c0392b; }
.notification.warning { border-right-color: #f39c12; }
.notification.info { border-right-color: var(--gold-500); }

.notification-icon { font-size: 1.5rem; flex-shrink: 0; }
.notification-content { flex: 1; }
.notification-message { font-size: 0.9rem; color: var(--text-dark); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(-40px); }
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(1.1); }
  75% { transform: scale(1.2); }
}

/* ===== ریسپانسیو ===== */
@media (max-width: 992px) {
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .detail-gallery-col {
    position: static;
  }
  
  .product-name {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  .detail-main {
    padding: 20px 0 40px;
  }
  
  .gallery-nav { opacity: 1; }
  
  .product-name {
    font-size: 1.4rem;
  }
  
  .specs-grid {
    grid-template-columns: 1fr;
  }
  
  .action-section {
    flex-direction: row;
  }
  
  .btn-favorite {
    width: 50px;
    height: 50px;
  }
  
  .similar-grid-scroll {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .description-box {
    padding: 20px;
  }
  
  .trust-badges {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .main-image-wrapper {
    aspect-ratio: 3/4;
  }
  
  .gallery-nav { opacity: 1; }
  
  .thumb-item {
    width: 55px;
    height: 55px;
  }
  
  .similar-grid-scroll {
    grid-template-columns: 1fr 1fr;
  }
  
  .product-header {
    flex-direction: column;
  }
  
  .notification-container {
    left: 10px;
    right: 10px;
    max-width: none;
  }
}
.size-stock {
    display: block;
    font-size: 0.7rem;
  color: var(--text-secondary);
    text-align: center;
    margin-top: 4px;
}

.size-label small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 2px;
}
