/* ========== ROOT & RESET ========== */
:root {
  --color-bg: #f5f5f5;
  --color-bg-alt: #ffffff;
  --color-text: #1a1a2e;
  --color-muted: #777;
  --color-border: #e0e0e0;
  --color-gold: #ffcc00;
  --color-gold-hover: #ffd633;
  --color-accent: #4c5cff;
  --color-success: #27ae60;
  --color-danger: #e74c3c;
  --color-whatsapp: #25D366;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.07);
  --shadow-medium: 0 15px 35px rgba(0, 0, 0, 0.12);
  --shadow-strong: 0 20px 45px rgba(0, 0, 0, 0.16);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Vazirmatn", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  direction: rtl;
}

/* ========== CONTAINER ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ========== HEADER ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
  color: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.28);
}

.header-top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

/* LOGO */
.logo-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.logo-typography {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-en {
  font-family: "Bebas Neue", system-ui, sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.16em;
  color: var(--color-gold);
}

.logo-fa {
  font-size: 0.85rem;
  font-weight: 500;
  color: #f2f2f2;
}

/* SEARCH BOX */
.header-search {
  display: flex;
  justify-content: center;
}

.search-box {
  width: 100%;
  max-width: 520px;
  display: flex;
  align-items: center;
  background-color: rgba(15, 15, 15, 0.92);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 14px 10px 0;
  color: #f5f5f5;
  font-size: 0.85rem;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.search-btn {
  width: 46px;
  height: 38px;
  margin: 4px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0, #ffdd66, #b8860b);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 204, 0, 0.55);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(255, 204, 0, 0.75);
}

/* HEADER ACTIONS */
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0, #222, #050505);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.5);
  transition: transform 0.1s ease, box-shadow 0.15s ease,
    border-color 0.2s ease, background 0.2s ease;
}

.icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 204, 0, 0.9);
  background: radial-gradient(circle at 30% 0, #2a2a2a, #101010);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.8);
}

/* SVG ICONS */
.icon {
  width: 20px;
  height: 20px;
  stroke: var(--color-gold);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: stroke 0.18s ease, stroke-width 0.18s ease, transform 0.18s ease;
}

.icon-btn:hover .icon {
  stroke-width: 2;
  transform: translateY(-0.5px);
}

/* ========== PRODUCT CARDS - FIXED ========== */
.product-card {
  position: relative;
  background: #1a1a1a;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-image {
  width: 100%;
  height: 220px; /* ارتفاع ثابت */
  overflow: hidden;
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* یا cover */
  object-position: center;
  transition: transform 0.4s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.1);
}

.product-info {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.product-brand {
  font-size: 0.85rem;
  color: var(--color-gold);
  font-weight: 600;
}

.product-title {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-specs {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--color-muted);
}

.product-specs span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.product-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-gold);
  margin-top: auto;
}

.product-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn-view {
  flex: 1;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--color-gold), var(--color-gold-hover));
  color: #000;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  transition: all 0.3s ease;
}

.btn-view:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 204, 0, 0.4);
}

/* GRID */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .product-image {
    height: 180px;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .product-image {
    height: 160px;
  }
}

/* ========== MAIN PRODUCT SECTION ========== */
.product-main {
  padding: 60px 0;
}

.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  margin-bottom: 4rem;
}

.product-images {
  position: relative;
}

.main-image {
  width: 100%;
  height: 450px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-medium);
  margin-bottom: 1.5rem;
}

.main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.main-image:hover img {
  transform: scale(1.05);
}

.thumbnails {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.thumb {
  width: 90px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-soft);
}

.thumb:hover,
.thumb.active {
  border-color: var(--color-accent);
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-strong);
}

.product-info {
  padding-right: 2rem;
}

.product-title {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.product-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  padding: 10px 16px;
  background: rgba(76, 92, 255, 0.08);
  border-radius: var(--radius-md);
  border: 1px solid rgba(76, 92, 255, 0.2);
}

.product-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.spec-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spec-label {
  font-size: 0.95rem;
  color: var(--color-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.spec-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-text);
}

.stock-in {
  color: var(--color-success) !important;
}

.stock-out {
  color: var(--color-danger) !important;
}

.product-price {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  color: var(--color-gold);
  margin-bottom: 2.5rem;
  text-shadow: 0 2px 4px rgba(255, 204, 0, 0.3);
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 18px 30px;
  background: linear-gradient(135deg, var(--color-whatsapp), #128C7E);
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 50px;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
  border: none;
}

.contact-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(37, 211, 102, 0.5);
}

/* ========== PRODUCT DETAILS ========== */
.product-details {
  background: var(--color-bg-alt);
  border-radius: var(--radius-xl);
  padding: 4rem 0;
  box-shadow: var(--shadow-medium);
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 2rem;
  padding-bottom: 12px;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-gold));
  border-radius: 2px;
}

.product-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-border);
  transition: all 0.2s ease;
}

.product-features li:hover {
  padding-right: 1rem;
  background: rgba(76, 92, 255, 0.03);
  border-radius: var(--radius-md);
}

.product-features li:last-child {
  border-bottom: none;
}

.product-features i {
  color: var(--color-success);
  font-size: 1.2rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.spec-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.spec-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.spec-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
  border-color: rgba(76, 92, 255, 0.3);
}

.spec-card i {
  font-size: 2.5rem;
  color: var(--color-accent);
  display: block;
  margin-bottom: 1rem;
}

.spec-card p {
  margin: 0;
  font-weight: 600;
  color: var(--color-text);
  font-size: 1rem;
}

/* ========== REVIEWS SECTION ========== */
.reviews-section {
  margin: 6rem 0;
  padding: 3rem;
  background: linear-gradient(135deg, var(--color-bg-alt), #f8f9fa);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-medium);
}

.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.reviews-header h3 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-text);
}

.overall-rating {
  font-size: 1.8rem;
  color: #ffd700;
}

.reviews-container {
  min-height: 250px;
  margin-bottom: 3rem;
}

.review-item {
  background: var(--color-bg-alt);
  margin-bottom: 1.5rem;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border-right: 4px solid var(--color-accent);
  transition: all 0.3s ease;
}

.review-item:hover {
  transform: translateX(-8px);
  box-shadow: var(--shadow-medium);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}

.review-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.review-author {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-text);
}

.review-rating {
  color: #ffd700;
  font-size: 1.2rem;
  margin: 0.3rem 0;
}

.review-date {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.review-text {
  color: #444;
  line-height: 1.7;
  font-size: 1rem;
}

.no-reviews {
  text-align: center;
  color: var(--color-muted);
  padding: 3rem 2rem;
  font-style: italic;
  font-size: 1.1rem;
}

/* ========== REVIEW FORM ========== */
.review-form {
  background: var(--color-bg-alt);
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.stars-input {
  display: flex;
  gap: 8px;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.stars-input i {
  font-size: 2rem;
  color: #ddd;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stars-input i.active,
.stars-input i.hover {
  color: #ffd700;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

.form-group {
  margin-bottom: 1.5rem;
}

.review-form input,
.review-form textarea {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.8);
}

.review-form input:focus,
.review-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(76, 92, 255, 0.1);
  background: white;
}

.review-form textarea {
  resize: vertical;
  min-height: 120px;
}

.review-form button {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, var(--color-accent), #3b4cc8);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.review-form button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-strong);
}

/* ========== FOOTER ========== */
.site-footer {
  background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
  color: #eee;
  padding: 4rem 0 2rem;
  margin-top: 6rem;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  margin: 0 0 1.5rem;
  font-size: 1.2rem;
  color: white;
}

.newsletter-form {
  display: flex;
  gap: 1rem;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-family: inherit;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.newsletter-form button {
  padding: 14px 24px;
  background: var(--color-gold);
  color: #000;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
}

.newsletter-form button:hover {
  background: var(--color-gold-hover);
  transform: translateY(-2px);
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: #ccc;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: white;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: var(--color-gold);
  transform: translateY(-3px);
}

.social-links img {
  width: 24px;
  height: 24px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: #999;
  font-size: 0.9rem;
}

/* ========== TOAST NOTIFICATION ========== */
.toast {
  position: fixed;
  top: 24px;
  left: 24px;
  background: var(--color-success);
  color: white;
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-family: "Vazirmatn", sans-serif;
  z-index: 10000;
  box-shadow: var(--shadow-strong);
  transform: translateX(-100%);
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.error {
  background: var(--color-danger);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
  .header-top {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .nav-links {
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .product-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .product-info {
    padding-right: 0;
  }

  .details-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .product-main {
    padding: 40px 0;
  }

  .reviews-section {
    padding: 2rem;
    margin: 4rem 0;
  }

  .product-specs {
    grid-template-columns: 1fr;
  }

  .spec-cards {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .thumbnails {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .main-image {
    height: 350px;
  }

  .thumb {
    width: 70px;
    height: 70px;
  }

  .reviews-header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-hero,
.product-details,
.reviews-section {
  animation: fadeInUp 0.6s ease-out;
}

/* ========== UTILITIES ========== */
.text-center { text-align: center; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }

/* ========== LOADING ========== */
.loading {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--color-accent);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
