
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f7f7f7;
  --white: #ffffff;
  --text: #1f2937;
  --muted: #ffefae;
  --primary: #75071f;
  --primary-dark: #f20f0f;
  --dark: #111827;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --radius: 18px;
}

html {
  direction: rtl;
  scroll-behavior: smooth;
}

body {
  font-family: "Vazirmatn", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}


.hamburger-menu-toggle {
  display: none; 
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  margin-left: auto; 
}

.hamburger-icon {
  display: block;
  width: 24px;
  height: 3px;
  background-color: var(--text);
  margin-bottom: 5px;
  transition: all 0.3s ease-in-out;
}


@media (max-width: 768px) {
  .hamburger-menu-toggle {
    display: block; 
  }


  .header__inner nav {
    display: none;
  }

  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -300px; 
    width: 280px; 
    height: 100%;
    background-color: var(--bg); 
    box-shadow: -2px 0 5px rgba(0,0,0,0.2);
    padding-top: 60px; 
    z-index: 1000;
    transition: right 0.3s ease-in-out;
    overflow-y: auto; 
    direction: rtl; 
  }

  .nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .nav-menu ul li {
    margin-bottom: 15px;
    padding: 0 20px;
  }

  .nav-menu ul li a {
    text-decoration: none;
    color: var(--text);
    font-size: 1.1em;
    display: block; 
    padding: 10px 0;
    border-bottom: 1px solid var(--border); 
  }

  
  .nav-menu.active {
    right: 0; 
  }

  
  .hamburger-menu-toggle.active .hamburger-icon {
    background-color: transparent; 
  }
  .hamburger-menu-toggle.active .hamburger-icon:nth-child(1) {
    transform: translateY(8px) rotate(45deg); 
  }
  .hamburger-menu-toggle.active .hamburger-icon:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg); 
  }

  
  .hamburger-menu-toggle {
    position: relative;
    z-index: 1001; 
  }
}



a {
  text-decoration: none;
  color: inherit;
}

img {
  width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}


.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}


.header {
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 80px;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.1rem;
}

.logo__icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a {
  color: var(--text);
  font-weight: 500;
  transition: 0.3s;
}

.nav a:hover {
  color: var(--primary);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn,
.cart-btn {
  background: #f3f4f6;
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  transition: 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.icon-btn:hover,
.cart-btn:hover {
  background: #e5e7eb;
}

.cart-btn {
  position: relative;
}

.cart-btn__count {
  background: var(--primary);
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  position: absolute;
  top: -8px;
  left: -8px;
}


.hero {
  min-height: 520px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(rgb(176, 237, 248), rgb(114, 201, 204)),
    url("https://images.unsplash.com/photo-1483985988355-763728e1935b?auto=format&fit=crop&w=1600&q=80")
    center/cover no-repeat;
  color: #f7f2f2;
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
}

.hero__content {
  max-width: 700px;
  padding: 80px 0;
}

.hero__badge,
.banner__badge {
  display: inline-block;
  background: rgb(240, 251, 199);
  border: 1px solid rgba(217, 249, 157, 0.18);
  color: rgb(8, 8, 8);
  padding: 8px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
  backdrop-filter: blur(10px);
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero__text {
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin-bottom: 28px;
}

.hero__buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}


.btn {
  padding: 12px 20px;
  border-radius: 14px;
  font-weight: 700;
  transition: 0.3s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


@keyframes fadeAnimation {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.btn--primary {
  animation-name: fadeAnimation;
  animation-duration: 1s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  animation-fill-mode: both;
     
  background: var(--primary);
  color: #fbfafa;


}

.btn--primary:hover {
  background: var(--primary-dark);
}

.btn--secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn--dark {
  background: var(--dark);
  color: #fff;
  width: 100%;
}

.btn--dark:hover {
  background: #000;
}


.section {
  padding: 80px 0;
}

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section__head h2 {
  font-size: 1.7rem;
}

.section__head a {
  color: var(--primary);
  font-weight: 600;
}


.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px;
}

.category-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 18px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid transparent;
  transition: 0.3s;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(254, 251, 252, 0.925);
}

.category-card span {
  font-size: 2rem;
  display: inline-block;
  margin-bottom: 12px;
}

.category-card h3 {
  font-size: 1rem;
}


.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: 0.3s;
}

.product-card:hover {
  transform: translateY(-6px);
}

.product-card__image {
  position: relative;
  aspect-ratio: 1 / 1.1;
  overflow: hidden;
}

.product-card__image img {
  height: 100%;
  object-fit: cover;
  transition: 0.4s;
}

.product-card:hover .product-card__image img {
  transform: scale(1.05);
}

.product-card__badge {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--primary);
  color: #0b0606;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.product-card__body {
  padding: 18px;
}

.product-card__body h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.product-card__desc {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 14px;
  color: #0b0606;
}

.product-card__price {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.price-old {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 0.9rem;
  color: #0b0606;
}

.price-new {
  font-weight: 800;
  color: var(--primary);
}


.banner {
  padding: 0 0 80px;
}

.banner__content {
  background: linear-gradient(135deg, #f37b7b, #db3535);
  color: #fff;
  border-radius: 34px;
  padding: 35px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  
}

.banner h2 {
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
}


.footer {
  background: #111827;
  color: #e5e7eb;
  padding: 60px 0;
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.footer h3,
.footer h4 {
  margin-bottom: 16px;
  color: #fff;
}

.footer p,
.footer li {
  color: #cbd5e1;
}

.footer ul {
  list-style: none;
  display: grid;
  gap: 10px;
}


@media (max-width: 992px) {
  .header__inner {
    flex-wrap: wrap;
    padding: 14px 0;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: 460px;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
  }

  .section {
    padding: 60px 0;
  }

  .section__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .banner__content {
    padding: 24px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .header__inner {
    justify-content: center;
  }

  .logo {
    width: 100%;
    justify-content: center;
  }

  .header__actions {
    width: 100%;
    justify-content: center;
  }

  .hero__buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}



.menu-toggle {
  position: fixed; 
  top: 20px;
  right: 20px; 
  width: 50px;
  height: 50px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1000; 
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.menu-toggle .hamburger-icon {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--text); 
  margin: 4px 0;
  transition: all 0.3s ease-in-out;
}

.side-menu {
  position: fixed;
  top: 0;
  right: -300px; 
  width: 300px;
  height: 100%;
  background-color: #ffffff; 
  box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  z-index: 1010; 
  transition: right 0.3s ease-in-out;
  padding: 20px;
  overflow-y: auto; 
}

.side-menu.active {
  right: 0; 
}

.side-menu__close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 2em;
  cursor: pointer;
  color: var(--text);
}

.side-menu nav ul {
  list-style: none;
  padding: 0;
  margin-top: 50px; 
}

.side-menu nav ul li {
  margin-bottom: 15px;
}

.side-menu nav ul li a {
  text-decoration: none;
  color: var(--text);
  font-size: 1.1em;
  display: block;
  padding: 10px 0;
  transition: color 0.3s ease;
}

.side-menu nav ul li a:hover {
  color: var(--primary); 
}


.side-menu .dropdown-menu {
  display: none; 
  list-style: none;
  padding-left: 20px; 
  margin-top: 10px;
  border-left: 2px solid #eee; 
}

.side-menu .dropdown-menu.show {
  display: block; 
}

.side-menu .dropdown-menu li {
  margin-bottom: 10px;
}

.side-menu .dropdown-menu a {
  font-size: 1em; 
  padding: 8px 0;
}


.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1005; 
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}


@media (max-width: 768px) {
  .side-menu {
    width: 80%; 
  }
}


:root {
  --primary: #dc1010; 
  --text: #333; 
}


.side-menu {
  position: fixed;
  top: 0;
  right: -300px; 
  width: 280px;
  height: 100%;
  background-color: #ffffff;
  transition: all 0.4s ease; 
  box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  z-index: 9999;
  overflow-y: auto;
}


.side-menu.active {
  right: 0;
}


.side-menu__close {
  background: none;
  border: none;
  font-size: 2rem;
  padding: 15px;
  cursor: pointer;
  width: 100%;
  text-align: right;
  color: #333;
}


.side-menu nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-menu nav ul li a {
  display: block;
  padding: 18px 25px;
  text-decoration: none;
  color: #444;
  border-bottom: 1px solid #f0f0f0;
  font-size: 16px;
  font-weight: 500;
  transition: 0.2s;
}

.side-menu nav ul li a:hover {
  background-color: #f8f8f8;
  color: #000;
}


.dropdown-menu {
  display: none; 
  background-color: #fafafa;
  padding-right: 15px; 
}


.side-menu nav ul li.show-submenu .dropdown-menu {
  display: block;
}


.dropdown-menu li a {
  padding: 12px 20px !important;
  font-size: 14px !important;
  color: #666 !important;
}


.has-submenu > a::after {
  content: '▼';
  font-size: 10px;
  margin-right: 10px;
  float: left;
  transition: transform 0.3s;
}

.show-submenu > a::after {
  transform: rotate(180deg);
}

