@font-face {
  font-family: 'Vazirmatn';
  src: url('../assests/fonts/Vazirmatn-Light.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../assests/fonts/Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../assests/fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('../assests/fonts/Vazirmatn-Black.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}
:root {
  --bg-base: #0a77ca;  
  --glass-bg: rgba(15, 23, 42, 0.4);
  --glass-border: rgba(255, 255, 255, 0.08);
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.5);
  --accent: #e11d48;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --success: #10b981;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body {
  width: 100%;
  overflow-x: hidden;  
}

body {
  font-family: 'Vazirmatn', sans-serif;
  background-color: var(--bg-base);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.bg-pattern {
  position: fixed;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background-image: url('../assests/cat.png'); /* آدرس عکس گربه */
  background-size: 150px;
  opacity: 0.04;
  animation: panPattern 100s linear infinite;
  z-index: -2;
  pointer-events: none;
}

.bg-glow {
  position: fixed;
  top: 20%; left: 50%; width: 80vw; height: 80vw;
  background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, rgba(2,6,23,0) 70%);
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
}

@keyframes panPattern {
  0% { transform: rotate(-10deg) translate3d(0, 0, 0); }
  100% { transform: rotate(-10deg) translate3d(200px, 200px, 0); }
}
.prodet-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 100px auto 60px;
  padding: 0 20px;
  flex: 1;  
  z-index: 1;
}

.alert-box { padding: 15px 20px; border-radius: 16px; margin-bottom: 30px; font-weight: bold; display: flex; align-items: center; gap: 10px; }
.alert-box.error { background: rgba(239, 68, 68, 0.1); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.alert-box.success { background: rgba(16, 185, 129, 0.1); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.3); }

.product-showcase {
  background: var(--glass-bg); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border); border-radius: 32px; padding: 40px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-bottom: 40px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}


.gallery-section { 
  display: flex; 
  flex-direction: column; 
  gap: 15px; 
  width: 100%;
  min-width: 0; 
}

.main-image-frame {
  width: 100%; aspect-ratio: 1 / 1;
  background: rgba(0,0,0,0.2); border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.05);
  display: flex; align-items: center; justify-content: center;
  position: relative; cursor: zoom-in; overflow: hidden;
}

.main-image-frame img { width: 100%; height: 100%; object-fit: cover; transition: 0.4s; }
.main-image-frame:hover img { transform: scale(1.05); }

.discount-badge-lg {
  position: absolute; top: 20px; right: 20px;
  background: var(--accent); color: #fff; font-size: 1.1rem; font-weight: 900;
  padding: 8px 15px; border-radius: 14px; box-shadow: 0 5px 15px rgba(225, 29, 72, 0.4);
}

.thumbnails-track { 
  display: flex; 
  gap: 15px; 
  overflow-x: auto; 
  padding-bottom: 10px; 
  width: 100%;
  -webkit-overflow-scrolling: touch; 
  scroll-behavior: smooth;
}

.thumbnails-track::-webkit-scrollbar { height: 6px; }
.thumbnails-track::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }

.thumb-img {
  width: 80px; height: 80px; border-radius: 16px; object-fit: cover; cursor: pointer;
  border: 2px solid transparent; opacity: 0.6; transition: 0.3s; background: rgba(0,0,0,0.2); 
  flex-shrink: 0; 
}

.thumb-img:hover { opacity: 1; }
.thumb-img.active { border-color: var(--primary); opacity: 1; box-shadow: 0 4px 10px var(--primary-glow); }
.info-section { display: flex; flex-direction: column; }
.breadcrumb { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--primary); text-decoration: none; font-weight: bold; }

.product-title { font-size: 2.2rem; font-weight: 900; color: #fff; margin-bottom: 10px; line-height: 1.3; }

.product-cats { margin-bottom: 15px; display: flex; gap: 8px; flex-wrap: wrap; }
.cat-tag { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); padding: 4px 12px; border-radius: 50px; font-size: 0.85rem; color: #cbd5e1; }

.rating-box { display: flex; align-items: center; gap: 10px; margin-bottom: 25px; font-size: 0.95rem; }
.rating-box .stars { color: #f59e0b; }
.rating-box span { color: var(--text-muted); }

.price-box { margin-bottom: 30px; padding-bottom: 25px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.price-old { text-decoration: line-through; color: var(--text-muted); font-size: 1.2rem; margin-left: 10px; }
.price-new { color: var(--primary); font-size: 2.5rem; font-weight: 900; }

.option-group { margin-bottom: 25px; }
.option-group label { display: block; font-weight: bold; color: #cbd5e1; margin-bottom: 10px; }

.color-selector { display: flex; gap: 12px; flex-wrap: wrap; }
.color-radio { display: none; }
.color-swatch { width: 40px; height: 40px; border-radius: 50%; cursor: pointer; border: 2px solid rgba(255,255,255,0.1); transition: 0.3s; }
.color-radio:checked + .color-swatch { border: 3px solid #fff; transform: scale(1.15); box-shadow: 0 0 15px rgba(255,255,255,0.5); }

.quantity-wrapper { display: inline-flex; align-items: center; background: rgba(0,0,0,0.3); border-radius: 16px; border: 1px solid rgba(255,255,255,0.1); }
.qty-btn { background: none; border: none; color: #fff; font-size: 1.5rem; width: 45px; height: 45px; cursor: pointer; transition: 0.3s; }
.qty-btn:hover { background: rgba(255,255,255,0.1); color: var(--primary); }
.qty-input { width: 50px; text-align: center; background: none; border: none; color: #fff; font-size: 1.2rem; font-weight: bold; outline: none; pointer-events: none; }

.stock-status { font-weight: bold; font-size: 0.95rem; }
.stock-status.in-stock { color: var(--success); }
.stock-status.out-of-stock { color: #fca5a5; }

.btn-add-cart {
  width: 100%; padding: 18px; border-radius: 16px; border: none; background: var(--primary); color: #fff;
  font-size: 1.2rem; font-weight: 800; cursor: pointer; transition: 0.3s; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-family: inherit; box-shadow: 0 10px 25px var(--primary-glow);
}
.btn-add-cart:hover:not(:disabled) { background: #2563eb; transform: translateY(-3px); }
.btn-add-cart:disabled { background: rgba(255,255,255,0.1); color: #94a3b8; cursor: not-allowed; box-shadow: none; }

.tabs-container { background: var(--glass-bg); backdrop-filter: blur(16px); border: 1px solid var(--glass-border); border-radius: 32px; padding: 40px; margin-bottom: 50px; }
.tab-headers { display: flex; gap: 15px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 20px; margin-bottom: 30px; overflow-x: auto; }
.tab-btn { background: none; border: none; color: var(--text-muted); font-size: 1.1rem; font-weight: bold; cursor: pointer; padding: 10px 20px; border-radius: 12px; transition: 0.3s; font-family: inherit; white-space: nowrap; }
.tab-btn.active { background: rgba(59, 130, 246, 0.1); color: var(--primary); }
.tab-content { display: none; animation: fadeIn 0.4s; line-height: 1.8; color: #cbd5e1; }
.tab-content.active { display: block; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.fullscreen-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.9); backdrop-filter: blur(10px); z-index: 9999; display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: 0.3s; }
.fullscreen-modal.active { opacity: 1; visibility: visible; }
.fs-close { 
  position: absolute; 
  top: 15px; 
  right: 20px; 
  background: none; 
  border: none; 
  color: #fff; 
  font-size: 3rem; 
  cursor: pointer; 
  z-index: 10050;
  padding: 10px; 
  line-height: 1;
}

@media (max-width: 768px) {
  .fs-close {
    top: 5px;
    right: 10px;
    font-size: 2.8rem;
  }
}
.fs-main-wrapper { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 75vh; }
.fs-img { max-width: 90%; max-height: 100%; object-fit: contain; border-radius: 10px; }

.fs-nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); border: none;
  color: #fff; width: 60px; height: 60px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; transition: 0.3s;
  display: flex; align-items: center; justify-content: center; z-index: 10;
}
.fs-nav-btn:hover { background: var(--primary); }
.fs-next { left: 30px; right: auto; } 
.fs-prev { right: 30px; left: auto; } 

.fs-thumbnails { display: flex; gap: 10px; padding: 20px; max-width: 90vw; overflow-x: auto; }
.fs-thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 10px; cursor: pointer; opacity: 0.5; transition: 0.3s; }
.fs-thumb.active { opacity: 1; border: 2px solid var(--primary); }

.section-title { font-size: 1.8rem; font-weight: 900; margin-bottom: 25px; color: #fff; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 25px; margin-bottom: 50px; }
.product-card { background: var(--glass-bg); backdrop-filter: blur(12px); border: 1px solid var(--glass-border); border-radius: 24px; overflow: hidden; transition: 0.3s; text-decoration: none; color: inherit; display: block; }
.product-card:hover { transform: translateY(-5px); border-color: rgba(59, 130, 246, 0.3); }
.pc-img-box { width: 100%; aspect-ratio: 1/1; position: relative; background: rgba(0,0,0,0.2); }
.pc-img-box img { width: 100%; height: 100%; object-fit: cover; }
.pc-badge { position: absolute; top: 15px; right: 15px; background: var(--accent); color: #fff; font-weight: bold; padding: 4px 10px; border-radius: 10px; font-size: 0.8rem; }
.pc-info { padding: 20px; }
.pc-title { font-size: 1.1rem; font-weight: bold; color: #fff; margin-bottom: 10px; }
.pc-price del { font-size: 0.9rem; color: #94a3b8; text-decoration: line-through; margin-left: 8px; }
.pc-price ins { font-size: 1.2rem; font-weight: 900; color: var(--primary); text-decoration: none; }

.pc-badge.out-badge { background: #475569; box-shadow: 0 4px 15px rgba(71, 85, 105, 0.4); }
.product-card.out-of-stock { opacity: 0.7; }
.product-card.out-of-stock .pc-img-box img { filter: grayscale(100%) opacity(0.8); }
.unavailable-text {
  color: #94a3b8; font-weight: 800; font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.05); padding: 5px 12px; border-radius: 10px;
  display: inline-block; border: 1px dashed rgba(255, 255, 255, 0.1);
}

.review-cta {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  color: #cbd5e1;
  margin-bottom: 25px;
}
.review-cta a { color: var(--primary); font-weight: bold; text-decoration: none; }
.review-cta.success {
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
}

.review-form { margin-bottom: 35px; padding-bottom: 30px; border-bottom: 1px dashed rgba(255,255,255,0.1); }
.review-form label { display: block; font-weight: bold; color: #cbd5e1; margin-bottom: 10px; }
.review-form textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 14px;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
}

.star-rating-input {
  direction: ltr;
  unicode-bidi: bidi-override;
  display: inline-flex;
  flex-direction: row-reverse;
  gap: 4px;
  font-size: 1.8rem;
  margin-bottom: 20px;
}
.star-rating-input input { display: none; }
.star-rating-input label { color: rgba(255, 255, 255, 0.15); cursor: pointer; transition: 0.2s; }
.star-rating-input input:checked ~ label,
.star-rating-input label:hover,
.star-rating-input label:hover ~ label { color: #f59e0b; }

@media (max-width: 900px) {
  .product-showcase { grid-template-columns: 1fr; gap: 30px; padding: 25px; }
  .price-new { font-size: 2rem; }
}
.stock-warning-centered {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  text-align: center;
  padding: 10px;
  border-radius: 12px;
  font-weight: bold;
  margin-bottom: 15px;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 15px;
  font-size: 0.85rem;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #f59e0b;
  font-weight: bold;
}

.stock-low {
  color: #f59e0b;
}