/*
Theme Name: Zarikala Store
Theme URI: https://php.rest
Author: Zarikala Team
Author URI: https://php.rest
Description: قالب فروشگاهی اختصاصی زرکالا برای فروش موبایل و لپ‌تاپ با طراحی مدرن و کاربرپسند
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zarikala
Tags: e-commerce, rtl-language-support, custom-menu, featured-images, threaded-comments
*/

/* ==========================================================================
   متغیرهای CSS
   ========================================================================== */
:root {
  --primary-blue: #0066cc;
  --primary-orange: #ff6b35;
  --dark-gray: #2c3e50;
  --light-gray: #f8f9fa;
  --white: #ffffff;
  --text-dark: #333333;
  --text-light: #666666;
  --border-color: #e0e0e0;
  --success-green: #28a745;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.15);
  --shadow-lg: 0 8px 16px rgba(0,0,0,0.2);
}

/* ==========================================================================
   تنظیمات پایه
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Vazir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  direction: rtl;
  text-align: right;
  color: var(--text-dark);
  background-color: var(--light-gray);
  line-height: 1.6;
}

a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-orange);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   صفحه اصلی
   ========================================================================== */
.homepage-wrapper {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* ==========================================================================
   هدر و منو
   ========================================================================== */
.site-header {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background-color: var(--primary-blue);
  color: var(--white);
  padding: 8px 0;
  font-size: 14px;
}

.header-main {
  padding: 15px 0;
}

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

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.site-logo {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-blue);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo span {
  color: var(--primary-orange);
}

.search-box {
  flex: 1;
  max-width: 600px;
}

.search-form {
  display: flex;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.search-form input[type="search"] {
  flex: 1;
  border: none;
  padding: 12px 15px;
  font-size: 14px;
  font-family: inherit;
}

.search-form button {
  background-color: var(--primary-blue);
  color: var(--white);
  border: none;
  padding: 0 20px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.search-form button:hover {
  background-color: var(--primary-orange);
}

.main-navigation {
  background-color: var(--dark-gray);
  padding: 0;
  position: relative;
}

.main-navigation .container {
  position: relative;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 15px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--white);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.main-navigation ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 40px;
  padding: 0;
  margin: 0;
}

.main-navigation li {
  position: relative;
}

.main-navigation a {
  color: var(--white);
  padding: 15px 0;
  display: block;
  font-weight: 500;
  transition: color 0.3s ease;
}

.main-navigation a:hover {
  color: var(--primary-orange);
}

/* ==========================================================================
   اسلایدر صفحه اصلی
   ========================================================================== */
.hero-slider {
  background: linear-gradient(135deg, var(--primary-blue) 0%, #004999 100%);
  padding: 60px 0;
  margin-bottom: 40px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero-slider::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><path d="M0,300 Q300,100 600,300 T1200,300 L1200,600 L0,600 Z" fill="rgba(255,255,255,0.05)"/></svg>') no-repeat center bottom;
  background-size: cover;
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-content h1 {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 20px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-content p {
  font-size: 20px;
  margin-bottom: 30px;
  opacity: 0.95;
}

.btn-hero {
  display: inline-block;
  background-color: var(--primary-orange);
  color: var(--white);
  padding: 15px 40px;
  border-radius: 50px;
  font-size: 18px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.btn-hero:hover {
  background-color: #ff8c61;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* استایل‌های اسلایدر محصولات */
.product-slider-section {
  margin-bottom: 40px;
}

.product-slider-wrapper {
  position: relative;
  overflow: hidden;
}

.slide-content {
  min-height: 400px;
  display: flex;
  align-items: center;
}

.slide-content .container {
  display: flex;
  align-items: center;
  gap: 60px;
}

.slide-text {
  flex: 1;
}

.slide-media {
  flex: 1;
  text-align: center;
}

.slider-prev,
.slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
}

.slider-prev:hover,
.slider-next:hover {
  background: white;
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.slider-prev {
  left: 20px;
}

.slider-next {
  right: 20px;
}

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.3s ease;
}

.dot.active {
  opacity: 1;
}

/* ==========================================================================
   بخش محصولات
   ========================================================================== */
.products-section {
  padding: 60px 0;
  background-color: var(--white);
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 36px;
  color: var(--dark-gray);
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 50%;
  transform: translateX(50%);
  width: 60px;
  height: 3px;
  background-color: var(--primary-orange);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-bottom: 40px;
}

.product-card {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-blue);
}

.product-image {
  width: 100%;
  height: 250px;
  object-fit: contain;
  margin-bottom: 15px;
  padding: 10px;
  background-color: var(--light-gray);
  border-radius: 8px;
}

.product-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: var(--primary-orange);
  color: var(--white);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.product-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: 10px;
  line-height: 1.4;
}

.product-specs {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 15px;
  line-height: 1.8;
}

.product-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--border-color);
}

.price {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark-gray);
}

.price-unit {
  font-size: 14px;
  color: var(--text-light);
  margin-right: 5px;
}

.btn-view {
  background-color: var(--primary-blue);
  color: var(--white);
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.btn-view:hover {
  background-color: var(--primary-orange);
}

/* ==========================================================================
   بخش ویژگی‌ها
   ========================================================================== */
.features-section {
  padding: 60px 0;
  background-color: var(--light-gray);
}

.features-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.features-image img {
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.features-text h2 {
  font-size: 32px;
  color: var(--dark-gray);
  margin-bottom: 20px;
}

.features-text p {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 30px;
  line-height: 1.8;
}

.features-list {
  list-style: none;
}

.features-list li {
  padding: 15px 0;
  padding-right: 30px;
  position: relative;
  font-size: 16px;
  color: var(--text-dark);
}

.features-list li::before {
  content: '✓';
  position: absolute;
  right: 0;
  color: var(--success-green);
  font-weight: 700;
  font-size: 20px;
}

/* ==========================================================================
   مقایسه محصولات
   ========================================================================== */
.compare-section {
  padding: 60px 0;
  background-color: var(--white);
}

.compare-btn {
  background-color: var(--primary-orange);
  color: var(--white);
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  display: inline-block;
  margin: 20px auto;
  transition: all 0.3s ease;
}

.compare-btn:hover {
  background-color: #ff8c61;
  transform: scale(1.05);
}

/* ==========================================================================
   فوتر
   ========================================================================== */
.site-footer {
  background-color: var(--dark-gray);
  color: var(--white);
  padding: 60px 0 20px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3 {
  font-size: 20px;
  margin-bottom: 20px;
  color: var(--primary-orange);
}

.footer-section p,
.footer-section ul {
  font-size: 14px;
  line-height: 1.8;
  color: rgba(255,255,255,0.8);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section a {
  color: rgba(255,255,255,0.8);
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--primary-orange);
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}

/* ==========================================================================
   صفحه محصول
   ========================================================================== */
.single-product {
  padding: 40px 0;
  background-color: var(--white);
}

.product-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.product-gallery {
  position: sticky;
  top: 100px;
}

.main-image {
  width: 100%;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
}

.thumbnail-images {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.thumbnail {
  cursor: pointer;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.thumbnail:hover,
.thumbnail.active {
  border-color: var(--primary-blue);
}

.product-info h1 {
  font-size: 28px;
  color: var(--dark-gray);
  margin-bottom: 20px;
}

.product-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.meta-item {
  font-size: 14px;
  color: var(--text-light);
}

.product-description {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-dark);
  margin-bottom: 30px;
}

.product-price-box {
  background-color: var(--light-gray);
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 30px;
}

.price-label {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 10px;
}

.price-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--dark-gray);
}

.product-attributes {
  margin-top: 40px;
}

.product-attributes h3 {
  font-size: 22px;
  color: var(--dark-gray);
  margin-bottom: 20px;
}

.attributes-table {
  width: 100%;
  border-collapse: collapse;
}

.attributes-table tr {
  border-bottom: 1px solid var(--border-color);
}

.attributes-table td {
  padding: 15px 10px;
  font-size: 15px;
}

.attributes-table td:first-child {
  color: var(--text-light);
  width: 40%;
}

.attributes-table td:last-child {
  color: var(--text-dark);
  font-weight: 500;
}

/* ==========================================================================
   ریسپانسیو
   ========================================================================== */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 15px;
  }
  
  .search-box {
    width: 100%;
    max-width: 100%;
  }
  
  /* منوی همبرگری */
  .mobile-menu-toggle {
    display: flex !important;
  }
  
  .main-navigation ul {
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--dark-gray);
    padding-top: 80px;
    transition: right 0.3s ease;
    box-shadow: -4px 0 12px rgba(0,0,0,0.2);
    z-index: 1000;
  }
  
  .main-navigation ul.active {
    right: 0;
  }
  
  .main-navigation li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
  .main-navigation a {
    padding: 18px 30px;
    display: block;
  }
  
  /* اسلایدر در موبایل */
  .slide-content {
    min-height: auto;
    padding: 40px 0 !important;
  }
  
  .slide-content .container {
    flex-direction: column;
    gap: 30px;
  }
  
  .slide-text h2 {
    font-size: 28px !important;
    margin-bottom: 15px !important;
  }
  
  .slide-text p {
    font-size: 16px !important;
    margin-bottom: 20px !important;
  }
  
  .slide-media {
    width: 100%;
  }
  
  .slide-media div[style*="font-size: 120px"] {
    font-size: 80px !important;
  }
  
  .slider-prev,
  .slider-next {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
  
  .slider-prev {
    left: 10px;
  }
  
  .slider-next {
    right: 10px;
  }
  
  .slider-dots {
    bottom: 10px;
  }
  
  .btn-slider {
    padding: 12px 30px !important;
    font-size: 14px !important;
  }
  
  /* محتوای عمومی */
  .hero-content h1 {
    font-size: 32px;
  }
  
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .features-content,
  .product-details {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* Overlay برای بستن منو */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
}

.mobile-menu-overlay.active {
  display: block;
}
