@import url("https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;600;700;800&display=swap");

:root {
  --primary: #e63946;
  --dark: #1d3557;
  --light: #f1faee;
  --muted: #a8dadc;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Vazirmatn", "IRANSans", "Segoe UI", sans-serif;
}

body {
  background-color: var(--light);
  color: var(--dark);
  direction: rtl;
}

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(8px);
}

.nav {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

.logo {
  font-weight: 800;
  font-size: 1.25rem;
  color: #1d3557;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.logo-icon {
  width: 56px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  background: transparent;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  font-size: 0.95rem;
}

nav a {
  text-decoration: none;
  color: inherit;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition: background 0.2s ease;
}

nav a:hover {
  background: var(--muted);
  color: var(--dark);
}

.cart-icon {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--muted);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.cart-icon:hover {
  border-color: var(--primary);
}

.cart-icon span {
  font-size: 0.85rem;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.slider {
  position: relative;
  width: 100%;
  margin-top: 2rem;
  border-radius: 24px;
  overflow: hidden;
  background: #fff;
  height: clamp(260px, 50vw, 460px);
}

.slides {
  display: flex;
  width: 100%;
  height: 100%;
  animation: slide 18s infinite;
  border-radius: inherit;
}

.slide {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: #fff;
  overflow: hidden;
  border-radius: inherit;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}

@keyframes slide {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(0);
  }
  33% {
    transform: translateX(100%);
  }
  58% {
    transform: translateX(100%);
  }
  66% {
    transform: translateX(200%);
  }
  92% {
    transform: translateX(200%);
  }
  100% {
    transform: translateX(0);
  }
}

.products-section {
  margin-top: 3rem;
}

.products-section h2 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
}

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

.product-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.product-image {
  background: linear-gradient(180deg, #dff6ff 0%, #f8fbff 60%, #dbdee3 60%, #d1d5db 100%);
  height: 200px;
  border-bottom: 4px solid rgba(0, 0, 0, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
}

.product-image svg {
  width: 100%;
  height: 100%;
  max-width: 320px;
  max-height: 180px;
}

.product-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.product-name {
  font-size: 1rem;
  font-weight: 700;
}

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

.product-btn {
  padding: 0.7rem;
  border-radius: 10px;
  border: none;
  background: var(--dark);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}

.product-btn:hover {
  background: var(--primary);
}

.product-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  width: 100%;
}

.cart-btn {
  padding: 0.55rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--muted);
  background: #fff;
  color: var(--dark);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.cart-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.cart-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

footer {
  background: var(--dark);
  color: white;
  padding: 1.5rem;
  text-align: center;
}

@media (max-width: 640px) {
  .nav {
    flex-direction: column;
    gap: 1rem;
  }
  .slider {
    height: 240px;
  }
}

