/* ============================================
   ARTISAN SHOP - Blue & White Theme
   Default: Dark Mode
   ============================================ */

/* CSS Variables */
:root {
  /* Blue & White Palette */
  --primary: #3b82f6;
  --primary-dark: #1d4ed8;
  --primary-light: #60a5fa;
  --secondary: #0ea5e9;
  --accent: #06b6d4;

  /* Dark Mode (Default) */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-elevated: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #334155;
  --shadow: rgba(0, 0, 0, 0.4);
  --gradient-start: #1e3a5f;
  --gradient-end: #0f172a;
}

/* Light Mode */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-elevated: #f1f5f9;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --shadow: rgba(0, 0, 0, 0.08);
  --gradient-start: #dbeafe;
  --gradient-end: #eff6ff;
}

/* Reset & Base */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  direction: rtl;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

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

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
}

ul {
  list-style: none;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   HEADER
   ============================================ */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.header-top {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 0.5rem 0;
  font-size: 0.85rem;
}

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

.header-top a {
  color: rgba(255,255,255,0.9);
  margin: 0 0.75rem;
}

.header-top a:hover {
  color: #fff;
}

.header-main {
  padding: 1rem 0;
}

.header-main-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
}

.logo-icon {
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.search-box {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 0.85rem 3rem 0.85rem 1rem;
  border: 2px solid var(--border);
  border-radius: 50px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.search-box button {
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.search-box button:hover {
  background: var(--primary-dark);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  position: relative;
  transition: all 0.3s ease;
}

.header-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.header-btn .badge {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 20px;
  height: 20px;
  background: #ef4444;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Navigation */
.nav {
  background: var(--bg-elevated);
  padding: 0.75rem 0;
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 5px;
}

.mobile-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: all 0.3s ease;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  padding: 3rem 0;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59,130,246,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-slider {
  display: flex;
  gap: 2rem;
  align-items: stretch;
}

.hero-slide {
  flex: 1;
  background: var(--bg-card);
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px var(--shadow);
  transition: transform 0.3s ease;
}

.hero-slide:hover {
  transform: translateY(-5px);
}

.hero-slide-img {
  width: 50%;
  height: 350px;
  object-fit: cover;
}

.hero-slide-content {
  padding: 2.5rem;
  flex: 1;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(59, 130, 246, 0.15);
  color: var(--primary);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.hero-desc {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.hero-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(59, 130, 246, 0.4);
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}

.section-title .icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
}

.view-all {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.3s ease;
}

.view-all:hover {
  gap: 0.6rem;
}

/* ============================================
   CATEGORIES
   ============================================ */
.categories {
  padding: 3rem 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1.5rem;
}

.category-card {
  text-align: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.category-card:hover {
  transform: translateY(-8px);
}

.category-img-wrapper {
  width: 110px;
  height: 110px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--border);
  padding: 4px;
  transition: border-color 0.3s ease;
}

.category-card:hover .category-img-wrapper {
  border-color: var(--primary);
}

.category-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

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

/* ============================================
   PRODUCTS
   ============================================ */
.products-section {
  padding: 3rem 0;
  background: linear-gradient(180deg, var(--bg-primary), var(--bg-secondary));
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px var(--shadow);
  border-color: var(--primary);
}

.product-img-wrapper {
  position: relative;
  height: 220px;
  overflow: hidden;
}

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

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

.product-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0.35rem 0.85rem;
  background: #ef4444;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50px;
}

.product-badge.new {
  background: var(--primary);
}

.product-wishlist {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.product-wishlist:hover {
  background: #ef4444;
  color: white;
  border-color: #ef4444;
}

.product-info {
  padding: 1.25rem;
}

.product-category {
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.product-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.product-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}

.product-old-price {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-btn {
  width: 100%;
  padding: 0.75rem;
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.product-btn:hover {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border-color: transparent;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  position: relative;
  overflow: hidden;
}

.about-section::before {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.about-images {
  display: grid;
  grid-template-columns: 1fr 0fr;
  gap: 1rem;
}

.about-images img {
  border-radius: 50px;
  box-shadow: 0 15px 40px var(--shadow);
  transition: transform 0.3s ease;
}

.about-images img:hover {
  transform: scale(1.03);
}

.about-text h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.about-text p {
  color: var(--text-secondary);
  line-height: 2;
  margin-bottom: 1.5rem;
}

.about-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2rem;
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: 50px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.about-btn:hover {
  background: var(--primary);
  color: white;
}



/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand .logo {
  margin-bottom: 1rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.footer-social a:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-3px);
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links a:hover {
  color: var(--primary);
  padding-right: 5px;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-contact i {
  color: var(--primary);
  margin-top: 3px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-payments {
  display: flex;
  gap: 0.75rem;
}

.footer-payments img {
  height: 35px;
  border-radius: 8px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.footer-payments img:hover {
  opacity: 1;
}

/* ============================================
   THEME TOGGLE
   ============================================ */
.theme-toggle {
  position: fixed;
  bottom: 25px;
  left: 25px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 5px 20px rgba(59, 130, 246, 0.4);
  z-index: 9999;
  transition: all 0.3s ease;
  border: 2px solid rgba(255,255,255,0.2);
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero-slider {
    flex-direction: column;
  }

  .hero-slide {
    flex-direction: column;
  }

  .hero-slide-img {
    width: 100%;
    height: 220px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .about-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: flex;
  }

  .nav-content {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--bg-secondary);
    padding: 1.5rem;
    gap: 1rem;
    border-top: 1px solid var(--border);
    box-shadow: 0 10px 30px var(--shadow);
  }

  .nav-content.active {
    display: flex;
  }

  .header-main-content {
    flex-wrap: wrap;
  }

  .search-box {
    order: 3;
    max-width: 100%;
    width: 100%;
    margin-top: 1rem;
  }

  .products-grid,
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .banners-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .about-images {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .products-grid,
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-title {
    font-size: 1.3rem;
  }

  .section-title {
    font-size: 1.1rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}
