/* ==========================================================
   Negin Shahr brand palette
   Layout, spacing, typography and page order are intentionally untouched.
   ========================================================== */
:root {
  --ng-primary: #27205F;
  --ng-secondary: #DB176C;
  --ng-purple: #5A216D;
  --ng-cyan: #169FC4;
  --ng-yellow: #F2B51D;
  --ng-background: #FAF9F6;
  --ng-text: #252329;

  /* Indigo / Blue => Primary */
  --color-indigo-50: #F4F3F8;
  --color-indigo-100: #E9E8EF;
  --color-indigo-200: #D0CDD9;
  --color-indigo-300: #AAA6BF;
  --color-indigo-400: #7C779F;
  --color-indigo-500: #4D4778;
  --color-indigo-600: #27205F;
  --color-indigo-700: #211B51;
  --color-indigo-800: #1B1643;
  --color-indigo-900: #151134;
  --color-indigo-950: #0D0A21;

  --color-blue-50: #F4F3F8;
  --color-blue-100: #E9E8EF;
  --color-blue-200: #D0CDD9;
  --color-blue-300: #AAA6BF;
  --color-blue-400: #7C779F;
  --color-blue-500: #4D4778;
  --color-blue-600: #27205F;
  --color-blue-700: #211B51;
  --color-blue-800: #1B1643;
  --color-blue-900: #151134;
  --color-blue-950: #0D0A21;

  /* Violet / Purple => Complementary purple */
  --color-violet-50: #F7F3F8;
  --color-violet-100: #EEE6F0;
  --color-violet-200: #DDCDE1;
  --color-violet-300: #C0A4C7;
  --color-violet-400: #93709D;
  --color-violet-500: #724681;
  --color-violet-600: #5A216D;
  --color-violet-700: #4B1B5B;
  --color-violet-800: #3F174C;
  --color-violet-900: #32123D;
  --color-violet-950: #210C29;

  --color-purple-50: #F7F3F8;
  --color-purple-100: #EEE6F0;
  --color-purple-200: #DDCDE1;
  --color-purple-300: #C0A4C7;
  --color-purple-400: #93709D;
  --color-purple-500: #724681;
  --color-purple-600: #5A216D;
  --color-purple-700: #4B1B5B;
  --color-purple-800: #3F174C;
  --color-purple-900: #32123D;
  --color-purple-950: #210C29;

  /* Pink / Rose / Red => Negin magenta */
  --color-pink-50: #FFF2F8;
  --color-pink-100: #FCE5EF;
  --color-pink-200: #F8C5DC;
  --color-pink-300: #F3A5C8;
  --color-pink-400: #EB6FA4;
  --color-pink-500: #E53A82;
  --color-pink-600: #DB176C;
  --color-pink-700: #C91462;
  --color-pink-800: #A81052;
  --color-pink-900: #880D43;
  --color-pink-950: #59092C;

  --color-rose-50: #FFF2F8;
  --color-rose-100: #FCE5EF;
  --color-rose-200: #F8C5DC;
  --color-rose-300: #F3A5C8;
  --color-rose-400: #EB6FA4;
  --color-rose-500: #E53A82;
  --color-rose-600: #DB176C;
  --color-rose-700: #C91462;
  --color-rose-800: #A81052;
  --color-rose-900: #880D43;
  --color-rose-950: #59092C;

  --color-red-50: #FFF2F8;
  --color-red-100: #FCE5EF;
  --color-red-200: #F8C5DC;
  --color-red-300: #F3A5C8;
  --color-red-400: #EB6FA4;
  --color-red-500: #E53A82;
  --color-red-600: #DB176C;
  --color-red-700: #C91462;
  --color-red-800: #A81052;
  --color-red-900: #880D43;
  --color-red-950: #59092C;

  /* Cyan / Sky => Cyan accent */
  --color-cyan-50: #F0FAFC;
  --color-cyan-100: #DDF4F8;
  --color-cyan-200: #BAE8F0;
  --color-cyan-300: #88D5E4;
  --color-cyan-400: #62BDD6;
  --color-cyan-500: #169FC4;
  --color-cyan-600: #1283A2;
  --color-cyan-700: #0F6B84;
  --color-cyan-800: #0C566A;
  --color-cyan-900: #094452;
  --color-cyan-950: #062C35;

  --color-sky-50: #F0FAFC;
  --color-sky-100: #DDF4F8;
  --color-sky-200: #BAE8F0;
  --color-sky-300: #88D5E4;
  --color-sky-400: #62BDD6;
  --color-sky-500: #169FC4;
  --color-sky-600: #1283A2;
  --color-sky-700: #0F6B84;
  --color-sky-800: #0C566A;
  --color-sky-900: #094452;
  --color-sky-950: #062C35;

  /* Yellow / Amber => Limited yellow accent */
  --color-yellow-50: #FFFBEC;
  --color-yellow-100: #FFF6D1;
  --color-yellow-200: #FBE8A3;
  --color-yellow-300: #F7D568;
  --color-yellow-400: #F4C13C;
  --color-yellow-500: #F2B51D;
  --color-yellow-600: #D49B12;
  --color-yellow-700: #AD7A0E;
  --color-yellow-800: #895F0C;
  --color-yellow-900: #6C4B0A;
  --color-yellow-950: #422D06;

  --color-amber-50: #FFFBEC;
  --color-amber-100: #FFF6D1;
  --color-amber-200: #FBE8A3;
  --color-amber-300: #F7D568;
  --color-amber-400: #F4C13C;
  --color-amber-500: #F2B51D;
  --color-amber-600: #D49B12;
  --color-amber-700: #AD7A0E;
  --color-amber-800: #895F0C;
  --color-amber-900: #6C4B0A;
  --color-amber-950: #422D06;
}

/* Keep the neutral majority requested by the brand direction */
body {
  background-color: var(--ng-background);
  color: var(--ng-text);
}

/* Make the brand palette more visible without changing layout */
[class~="bg-[#252329]"] {
  background-color: var(--ng-primary) !important;
}

[class~="bg-[#343130]"] {
  background-color: var(--ng-purple) !important;
}

[class~="hover:bg-[#252329]"]:hover {
  background-color: var(--ng-secondary) !important;
}

/* Uploaded shop sign used as the project logo, constrained to existing header/footer space */
img.neginshahr-brand-logo {
  width: auto !important;
  max-width: 92px !important;
  height: 56px !important;
  object-fit: contain !important;
  flex-shrink: 0;
}

@media (max-width: 1023px) {
  img.neginshahr-brand-logo {
    max-width: 72px !important;
    height: 46px !important;
  }
}

/* ==================================
   Category Section
================================== */

.category-section {
  width: 100%;
  max-width: 1240px;
  margin: 56px auto;
  padding: 0 16px;
  position: relative;
  overflow: hidden;
}


/* Swiper Wrapper */

.category-section .swiper-wrapper {
  align-items: stretch;
}


/* Slide */

.category-slide {
  width: 270px !important;
  text-decoration: none;
  display: block;
}


/* Card */

.category-card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;

  padding: 20px 12px;

  cursor: pointer;
}


/* Image */

.category-image {
  width: 175px;
  height: 175px;

  object-fit: cover;

  border-radius: 50%;

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}


.category-card:hover .category-image {
  transform: scale(1.05);

  box-shadow:
    0 10px 30px rgba(39, 32, 95, 0.12);
}


/* Title */

.category-title {
  margin: 0;

  font-size: 16px;
  font-weight: 600;

  line-height: 1.8;

  text-align: center;

  color: #334155;

  transition: color 0.25s ease;
}


.category-card:hover .category-title {
  color: #DB176C;
}


/* ==================================
   Swiper Navigation
================================== */

.category-next,
.category-prev {
  width: 38px !important;
  height: 38px !important;

  border-radius: 50%;

  background: #ffffff;

  border: 1px solid #e2e8f0;

  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.08);

  display: flex;
  align-items: center;
  justify-content: center;

  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}


.category-next:hover,
.category-prev:hover {
  background: #27205F;
  border-color: #27205F;

  transform: scale(1.05);
}


/* remove swiper default arrow */

.category-next::after,
.category-prev::after {
  display: none;
}


/* SVG */

.category-next svg,
.category-prev svg {
  width: 17px;
  height: 17px;

  color: #475569;

  transition: color 0.25s ease;
}


.category-next:hover svg,
.category-prev:hover svg {
  color: #ffffff;
}


/* ==================================
   Desktop
================================== */

@media (min-width: 1024px) {

  .category-section .swiper-wrapper {
    justify-content: center;
  }

}


/* ==================================
   Tablet
================================== */

@media (max-width: 1023px) {

  .category-section {
    margin: 44px auto;
  }

  .category-slide {
    width: 180px !important;
  }

  .category-image {
    width: 120px;
    height: 120px;
  }

  .category-title {
    font-size: 14px;
  }

}


/* ==================================
   Mobile
================================== */

@media (max-width: 639px) {

  .category-section {
    margin: 32px auto;
    padding: 0 14px;
  }

  .category-slide {
    width: 145px !important;
  }

  .category-card {
    padding: 12px 6px;
    gap: 10px;
  }

  .category-image {
    width: 92px;
    height: 92px;
  }

  .category-title {
    font-size: 12px;
    line-height: 1.7;
  }

  .category-next,
  .category-prev {
    display: none !important;
  }

}


.category-section .category-card .category-image {
  display: block !important;

  width: 200px !important;
  height: 200px !important;

  object-fit: contain !important;

  border-radius: 0 !important;

  box-shadow: none !important;

  transform: none !important;

  filter: none !important;

  transition: transform 0.3s ease !important;
}


/* خنثی کردن hoverهای قبلی */
.category-section .category-card:hover img,
.category-section .category-card:hover .category-image {
  transform: none !important;
  box-shadow: none !important;
  filter: none !important;
}


/* hover جدید خودمون */
.category-section .category-card:hover .category-image {
  transform: scale(1.06) !important;
}

/* Mobile category slider: keep the existing design, only force RTL swipe start */
@media (max-width: 639px) {
  .category-section.swiper-category {
    direction: rtl !important;
  }

  .category-section.swiper-category .swiper-wrapper {
    justify-content: flex-start !important;
  }

  .category-section.swiper-category .category-slide {
    flex-shrink: 0 !important;
  }
}


/* NEGIN SHAHR QUICK PRODUCT CATEGORIES */
.home-subcategory-section {
  width: 100%;
  max-width: 1472px;
  margin: 34px auto 48px;
  padding: 0 16px;
}

.home-subcategory-list {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
  direction: rtl;
}

.home-subcategory-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #334155;
}

.home-subcategory-circle {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fbf8f5;
  box-shadow: 0 4px 14px rgba(39, 32, 95, 0.06);
  transition: transform .25s ease, box-shadow .25s ease;
}

.home-subcategory-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-subcategory-title {
  max-width: 150px;
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 700;
  color: #334155;
  transition: color .25s ease;
}

.home-subcategory-item:hover .home-subcategory-circle {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 22px rgba(39, 32, 95, 0.09);
}

.home-subcategory-item:hover .home-subcategory-title {
  color: #27205F;
}

@media (max-width: 1199px) {
  .home-subcategory-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 24px;
  }
}

@media (max-width: 639px) {
  .home-subcategory-section {
    margin: 26px auto 36px;
    padding: 0 14px;
    overflow: hidden;
  }

  .home-subcategory-list {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 110px;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 0 8px;
    direction: rtl;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .home-subcategory-list::-webkit-scrollbar {
    display: none;
  }

  .home-subcategory-item {
    scroll-snap-align: start;
    gap: 8px;
  }

  .home-subcategory-circle {
    width: 96px;
    height: 96px;
  }

  .home-subcategory-title {
    max-width: 108px;
    font-size: 11.5px;
    line-height: 1.6;
  }
}



/* ==========================================================
   Negin Shahr — requested mobile-only category arrangement
   Desktop/tablet design is untouched.
   The existing 4 first category cards become 2 × 2 on phones.
   ========================================================== */
@media (max-width: 639px) {
  .category-section.swiper-category {
    overflow: visible !important;
  }

  .category-section.swiper-category .swiper-wrapper {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    gap: 12px !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    transition: none !important;
  }

  .category-section.swiper-category .category-slide {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  .category-section.swiper-category .category-card {
    width: 100% !important;
  }

  .category-section.swiper-category .category-card .category-image {
    width: 150px !important;
    height: 150px !important;
    max-width: 100% !important;
    object-fit: contain !important;
  }

  .category-section.swiper-category .category-next,
  .category-section.swiper-category .category-prev {
    display: none !important;
  }
}


/* Negin Shahr — product filter icon set */
.feature-filter-card {
  text-decoration: none;
}

.feature-filter-card .feature-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(39,32,95,0.06), rgba(219,23,108,0.06));
  border: 1px solid rgba(39,32,95,0.10);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.feature-filter-card .feature-icon-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.feature-filter-card:hover .feature-icon-wrap {
  transform: translateY(-2px);
  border-color: rgba(219,23,108,0.25);
  box-shadow: 0 10px 20px rgba(39,32,95,0.08);
}

.inline-promo-banner {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid #ece8f7;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(39, 32, 95, 0.06);
}

.inline-promo-banner img {
  width: 100%;
  display: block;
}


/* Product category cards — use the user's reference imagery */
.product-image-card {
  padding: 10px !important;
  gap: 10px !important;
  justify-content: flex-start;
  min-height: 0;
  text-decoration: none;
}

.product-category-image-wrap {
  width: 100%;
  aspect-ratio: 1.35 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: #FAF9F6;
}

.product-category-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform .3s ease;
}

.product-image-card:hover .product-category-image {
  transform: scale(1.035);
}

.product-image-card p {
  width: 100%;
  text-align: center;
  line-height: 1.7;
}

@media (max-width: 639px) {
  .product-image-card {
    padding: 8px !important;
  }

  .product-image-card p {
    font-size: 11px !important;
  }
}


/* ==========================================================
   Requested responsive corrections — no desktop redesign
   ========================================================== */

/* First four main category cards: 2 × 2 only on mobile */
@media (max-width: 639px) {
  .category-section.swiper-category {
    overflow: visible !important;
    direction: rtl !important;
  }

  .category-section.swiper-category .swiper-wrapper {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
  }

  .category-section.swiper-category .category-slide {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
  }

  .category-section.swiper-category .category-card {
    width: 100% !important;
    padding: 10px 5px !important;
  }

  .category-section.swiper-category .category-card .category-image {
    width: min(150px, 100%) !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: contain !important;
  }

  .category-section.swiper-category .category-next,
  .category-section.swiper-category .category-prev {
    display: none !important;
  }

  /* Product-detail safety: prevent fixed desktop widths creating horizontal overflow */
  body {
    overflow-x: hidden;
  }

  #product-gallery-swiper,
  #product-gallery-swiper .swiper-slide {
    max-width: 100% !important;
  }
}

/* Hero images keep their original supplied artwork visible */
.swiper-banner img {
  object-fit: cover;
}

/* General responsive image safety without changing card/layout language */
img {
  max-width: 100%;
}


/* Additional responsive safety for existing pages */
@media (max-width: 639px) {
  .max-w-screen-3xl,
  .max-w-\[1472px\],
  .max-w-\[1400px\],
  .max-w-\[1280px\] {
    max-width: 100% !important;
  }

  .dir-ltr {
    direction: ltr;
  }
}

/* Accessible visually-hidden utility */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Mobile hero readability */
@media (max-width: 639px) {
  .swiper-banner {
    border-radius: 14px;
    overflow: hidden;
  }
  .swiper-banner .swiper-slide {
    background: #FAF9F6;
  }
  .swiper-banner .swiper-slide img.block.lg\:hidden {
    width: 100% !important;
    height: auto !important;
    max-height: 72vw !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #FAF9F6;
  }
}


/* Product sliders: Persian RTL swipe starts from the right */
.swiper-card {
  direction: rtl !important;
}

.swiper-card .swiper-wrapper {
  direction: rtl !important;
}

@media (max-width: 639px) {
  .swiper-card {
    overflow: hidden !important;
    touch-action: pan-y;
  }

  .swiper-card .swiper-slide {
    flex-shrink: 0 !important;
  }
}


/* Standard product detail: related products swipe from right on mobile */
.product-related-scroll {
  direction: rtl;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.product-related-scroll > a {
  scroll-snap-align: start;
}
