/* ===== رنگ‌های اصلی فروشگاه ===== */
:root {
  --pink: #ff72b6;
  --pink-light: #ffe4f1;
  --pink-neon: #ff8dce;
  --blue: #a9dfff;
  --blue-light: #e8f7ff;
  --white: #ffffff;
  --text: #44354a;
  --muted: #8b7b91;
  --shadow: 0 8px 25px rgba(255, 114, 182, 0.12);
}

/* ===== تنظیمات عمومی ===== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Tahoma, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(ellipse at top left, #fff0f8 0%, transparent 40%),
    radial-gradient(ellipse at top right, #eef9ff 0%, transparent 38%),
    #ffffff;
  line-height: 1.8;
}

/* ===== سربرگ ===== */
header {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 38px 16px;
  color: #ffffff;
  background: linear-gradient(
    125deg,
    #ff91ca,
    #eeb9ff 50%,
    #a9dfff
  );
  border-bottom: 3px solid #ffe2f1;
}

header h1 {
  margin: 0 0 8px;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  text-shadow: 0 2px 12px #b94e9580;
}

header p {
  margin: 0;
  color: #ffffff;
  font-size: 14px;
}

/* ===== منوی بالای سایت ===== */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  padding: 13px 10px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #ffe2f0;
  box-shadow: 0 5px 20px #f5b9dc20;
}

nav button,
.catbtn {
  position: relative;
  border: 1px solid #f6c6e0;
  border-radius: 25px;
  padding: 10px 17px;
  background: linear-gradient(135deg, #ffffff, #fff4fa);
  color: #a83d7b;
  font-size: 13px;
  font-weight: bold;
  transition: all 0.25s ease;
}

nav button:hover,
.catbtn:hover,
.catbtn.active {
  color: #ffffff;
  background: linear-gradient(120deg, #ff78ba, #b6dcff);
  border-color: transparent;
  box-shadow: 0 4px 17px #ff83c866;
  transform: translateY(-2px);
}

/* ===== بخش معرفی فروشگاه ===== */
.hero {
  margin: 24px auto;
  padding: 32px 18px;
  max-width: 1200px;
  text-align: center;
  background: linear-gradient(
    120deg,
    #fff0f8,
    #ffffff 50%,
    #edf8ff
  );
  border: 1px solid #f8d6e9;
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero h2 {
  color: #d94e9b;
  font-size: clamp(21px, 3vw, 30px);
  margin-top: 0;
}

.hero p {
  color: var(--muted);
}

/* ===== فضای اصلی ===== */
main {
  max-width: 1250px;
  margin: auto;
  padding: 12px 18px 45px;
}

h2 {
  color: #c94c91;
}

#title {
  position: relative;
  padding-right: 13px;
}

#title::before {
  content: "";
  position: absolute;
  right: 0;
  top: 7px;
  bottom: 7px;
  width: 4px;
  border-radius: 10px;
  background: linear-gradient(#ff79ba, #a9dfff);
}

/* ===== کادر جست‌وجو ===== */
.search,
input[type="search"] {
  width: 100%;
  padding: 14px 17px;
  margin: 10px 0 20px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid #f0cce1;
  border-radius: 16px;
  outline: none;
  font-family: inherit;
  font-size: 14px;
  box-shadow: 0 5px 18px #f5c2df20;
  transition: 0.25s;
}

.search:focus,
input[type="search"]:focus {
  border-color: #ff83c5;
  box-shadow: 0 0 0 4px #ffb5dc35, 0 5px 18px #f5c2df30;
}

/* ===== دسته‌بندی‌ها ===== */
.categories {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 24px;
}

.catbtn {
  background: #ffffff;
  border-color: #e0d2ff;
  color: #7760a7;
}

.catbtn.active,
.catbtn:hover {
  background: linear-gradient(120deg, #ff8cc9, #a9dfff);
  color: #ffffff;
  border-color: transparent;
}

/* ===== شبکه محصولات ===== */
.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

/* ===== کارت هر محصول ===== */
.card,
.product {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #f5dbea;
  border-radius: 20px;
  box-shadow: 0 7px 24px #d98db51a;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.card:hover,
.product:hover {
  transform: translateY(-6px);
  border-color: #f5b5d8;
  box-shadow:
    0 12px 30px #ff9bc833,
    0 0 0 1px #fce5f1;
}

/* ===== تصویر محصول ===== */
.card img,
.product img {
  display: block;
  width: 100%;
  height: 225px;
  object-fit: contain;
  padding: 10px;
  background: linear-gradient(145deg, #fffafd, #f0f9ff);
  transition: transform 0.35s ease;
}

.card:hover img,
.product:hover img {
  transform: scale(1.035);
}

/* ===== اطلاعات محصول ===== */
.info,
.product-info {
  padding: 15px;
}

.info h3,
.product-info h3 {
  margin: 0 0 7px;
  color: #59405c;
  font-size: 14px;
  line-height: 1.9;
}

.cat,
.category-name {
  color: #9b8ba4;
  font-size: 12px;
}

/* ===== قیمت محصول ===== */
.price {
  margin: 12px 0;
  color: #db479b;
  font-size: 16px;
  font-weight: 800;
}

/* ===== دکمه‌های داخل کارت ===== */
.card button,
.product button,
.favorite {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 11px 9px;
  color: #ffffff;
  background: linear-gradient(110deg, #ff83c3, #a6dfff);
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 4px 12px #e89acb30;
  transition: all 0.25s ease;
}

.card button:hover,
.product button:hover,
.favorite:hover {
  background: linear-gradient(110deg, #ec65ab, #81c8f5);
  box-shadow: 0 6px 17px #e89acb55;
  transform: translateY(-2px);
}

/* ===== پیام نبودن محصول ===== */
.empty {
  grid-column: 1 / -1;
  padding: 30px 15px;
  text-align: center;
  color: #9b8ba4;
  background: #fff7fb;
  border: 1px dashed #f0b9d6;
  border-radius: 18px;
}

/* ===== پایین سایت ===== */
footer {
  padding: 30px 15px;
  text-align: center;
  color: #ffffff;
  background: linear-gradient(120deg, #dc79b2, #9acff2);
  border-top: 4px solid #ffe0f0;
}

footer h3 {
  margin-top: 0;
  font-size: 20px;
}

footer p {
  margin-bottom: 0;
  font-size: 13px;
}

/* ===== نوار پیمایش ===== */
::-webkit-scrollbar {
  width: 9px;
}

::-webkit-scrollbar-track {
  background: #fff2f8;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(#ff91ca, #a9dfff);
  border-radius: 10px;
}

/* ===== نمایش در موبایل ===== */
@media (max-width: 900px) {
  .products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (max-width: 600px) {
  header {
    padding: 27px 12px;
  }

  nav {
    gap: 6px;
    padding: 10px 6px;
  }

  nav button,
  .catbtn {
    padding: 9px 11px;
    font-size: 12px;
  }

  main {
    padding-right: 10px;
    padding-left: 10px;
  }

  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .card img,
  .product img {
    height: 165px;
  }

  .info,
  .product-info {
    padding: 10px;
  }

  .price {
    font-size: 14px;
  }
}
