@tailwind base;
@tailwind components;
@tailwind utilities;

/* ============================================================
   TABLE OF CONTENTS
   1. CSS Variables (Design Tokens)
   2. Base / Body
   3. Tailwind Component Layer
   4. Reusable Components
      4.1 Section Headers
      4.2 Category Cards
      4.3 Product Cards
      4.4 Flash Sale Section
      4.5 Countdown
      4.6 Ads Grid
      4.7 Collection Grid
      4.8 Best Sellers
      4.9 View More Card
      4.10 Scroll & Animation Utilities
      4.11 Badges
   5. Page-Specific Styles
      5.1 Home / Hero Slider
      5.2 Product Detail Page
      5.3 Product List Page
      5.4 Best Sellers Page
      5.5 About Us Page
      5.6 Contact Us Page
      5.7 Order / Cart Page
      5.8 User Panel
   6. Third-Party Overrides
      6.1 Swiper
      6.2 noUiSlider
      6.3 Persian Datepicker
      6.4 SweetAlert
============================================================ */


/* ============================================================
   1. CSS VARIABLES
============================================================ */
:root {
  /* Brand */
  --red: #e63946;
  --primary: #e11d48;
  --primary-soft: #fff1f2;
  --red-soft: #fff1f2;
  --red-border: #fecdd3;
  --accent: #7c3aed;
  --accent-soft: #ede9fe;
  --gold: #f59e0b;
  --green: #16a34a;
  --green-soft: #dcfce7;

  /* Surfaces */
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --bg: #f1f5f9;

  /* Borders & Shadows */
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
  --shadow: 0 4px 16px rgba(0, 0, 0, .08), 0 2px 6px rgba(0, 0, 0, .04);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .12), 0 8px 24px rgba(0, 0, 0, .06);

  /* Typography */
  --text-1: #0f172a;
  --text-2: #475569;
  --text-3: #94a3b8;

  /* Layout */
  --radius: 16px;
  --radius-sm: 10px;
}


/* ============================================================
   2. BASE / BODY
============================================================ */
body {
  background: var(--bg);
  direction: rtl;
  font-family: IRANSansXFaNum;
}

.main-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 8px;
}

@media (min-width: 768px) {
  .main-wrap {
    padding: 0 16px;
  }
}


/* ============================================================
   3. TAILWIND COMPONENT LAYER
============================================================ */
@layer components {
  .my-btn {
    @apply bg-rose-600 text-white border border-rose-600 hover:bg-white hover:text-rose-600 px-5 py-2 m-24 rounded transition-all duration-200 ease-in-out font-bold;
  }
}

/* Form helpers generated by Django / Jinja */
.form-register label {
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: rgb(31 41 55);
}

.errorlist li {
  color: rgb(220 38 38);
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1rem;
  margin-top: 8px;
}
.message-box {
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    animation: slideUp 0.3s ease;
    z-index: 9999;
}
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}
.message-box-warning {
    background: #fff7e6;
    color: #92400e;
    border-left: 5px solid #f59e0b;
}
.message-box-success{
    background: #e8f7ee;
    color: #1b7f3a;
    border-left: 5px solid #22c55e;
}
.message-box-error{
    background: #fdecec;
    color: #b91c1c;
    border-left: 5px solid #ef4444;
}

.label-form label {
  color: #334155;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

/* Shared section card used across multiple pages */
.section-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}


/* ============================================================
   4. REUSABLE COMPONENTS
============================================================ */

/* ── 4.1 Section Headers ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  margin-bottom: 5px;
}

.section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-1);
  position: relative;
  padding-right: 14px;
}

.section-title::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: linear-gradient(to bottom, var(--primary), #f97316);
}

.section-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 20px;
  background: white;
  border: 1px solid var(--border);
  transition: all .2s;
  text-decoration: none;
}

.section-link:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Shared section heading with underline accent (list / best-seller / about / order pages) */
.section-heading {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.section-heading::after {
  content: '';
  display: block;
  width: 28px;
  height: 3px;
  background: var(--red);
  border-radius: 99px;
}


/* ── 4.2 Category Cards ── */
.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent;
  transition: all .25s;
  cursor: pointer;
  text-decoration: none;
  min-width: 80px;
}

.cat-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.cat-card img {
  width: 80px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface-2);
}

.cat-card p {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
}


/* ── 4.3 Product Cards ── */
.product-card {
  background: white;
  border-radius: var(--radius);
  padding: 12px;
  width: 148px;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent;
  transition: all .25s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .product-card {
    width: 192px;
    padding: 14px;
  }
}

.product-card:hover {
  border-color: #e2e8f0;
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

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

.product-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  transition: transform .35s ease;
  border-radius: 10px;
  background: var(--surface-2);
}

.product-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  line-height: 1.6;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.price-final {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-1);
  direction: ltr;
}

.price-original {
  font-size: 11px;
  color: var(--text-3);
  text-decoration: line-through;
  direction: ltr;
}

.discount-pill {
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
}

.add-to-cart-btn {
  margin-top: 10px;
  width: 100%;
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 8px 0;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px);
  transition: all .25s;
}

.product-card:hover .add-to-cart-btn {
  opacity: 1;
  transform: translateY(0);
}

.add-to-cart-btn:hover {
  filter: brightness(1.1);
}

/* Amazing product card variant */
.amazing-card {
  background: white;
  border-radius: var(--radius);
  padding: 12px;
  width: 140px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: all .25s;
  overflow: hidden;
}

@media (min-width: 768px) {
  .amazing-card {
    width: 184px;
  }
}

.amazing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

@media (min-width: 200px) {
  .amazing {
    width: 30px !important;
    height: 30px !important;
  }

  .amazing-price {
    width: 105px !important;
    height: 24px !important;
  }

  .discount-price {
    width: 100px;
  }
}


/* ── 4.4 Flash Sale Section ── */
.flash-section {
  border-radius: 20px;
  overflow: hidden;
  margin: 21px 8px;
  position: relative;
}

.flash-section.red-theme {
  background: linear-gradient(135deg, #be123c 0%, #e11d48 40%, #f43f5e 100%);
}

.flash-section.green-theme {
  background: linear-gradient(135deg, #15803d 0%, #16a34a 40%, #22c55e 100%);
}

.flash-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.flash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
}

.flash-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flash-label {
  background: white;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.flash-label-green {
  color: var(--green);
}

.flash-all-link {
  color: white;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, .18);
  padding: 6px 12px;
  border-radius: 20px;
  text-decoration: none;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, .25);
  transition: all .2s;
}

.flash-all-link:hover {
  background: rgba(255, 255, 255, .3);
}

/* Flash side panel (desktop) */
.flash-side-panel {
  padding: 16px 10px;
  flex-shrink: 0;
  width: 120px;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  display: none;
}

@media (min-width: 768px) {
  .flash-side-panel {
    display: flex;
  }
}


/* ── 4.5 Countdown ── */
.countdown-wrap {
  display: flex;
  align-items: center;
  gap: 5px;
}

.countdown-block {
  background: white;
  border-radius: 8px;
  min-width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.countdown-block span {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: 1px;
}

.countdown-sep {
  color: rgba(255, 255, 255, .7);
  font-size: 18px;
  font-weight: 700;
}


/* ── 4.6 Ads Grid ── */
.ads-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 0 8px;
}

@media (min-width: 768px) {
  .ads-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
  }
}

.ad-card {
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all .3s;
  display: block;
}

.ad-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: var(--shadow);
}

.ad-card img {
  width: 100%;
  display: block;
}


/* ── 4.7 Collection Grid ── */
.collection-grid {
  display: none;
  gap: 0;
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

@media (min-width: 1024px) {
  .collection-grid {
    display: flex;
  }
}

.collection-col {
  flex: 1;
  padding: 20px 18px;
  border-left: 1px solid var(--border);
}

.collection-col:last-child {
  border-left: none;
}

.collection-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-1);
}

.collection-sub {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}

.collection-products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 14px;
}

.collection-products a img {
  width: 100%;
  border-radius: 10px;
  transition: transform .3s;
}

.collection-products a:hover img {
  transform: scale(1.05);
}

.collection-link {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: #0ea5e9;
  text-decoration: none;
}


/* ── 4.8 Best Seller Cards (horizontal) ── */
.bestseller-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-sm);
  border: 1.5px solid transparent;
  transition: all .25s;
  flex-shrink: 0;
  width: 200px;
}

.bestseller-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.bestseller-card img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: contain;
}


/* ── 4.9 View More Card ── */
.view-more-card {
  background: white;
  flex-shrink: 0;
  width: 140px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all .25s;
  text-decoration: none;
}

@media (min-width: 768px) {
  .view-more-card {
    width: 184px;
    height: 288px;
  }
}

.view-more-card:hover {
  box-shadow: var(--shadow-lg);
}

.view-more-card .circle-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2.5px solid #0ea5e9;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s;
}

.view-more-card:hover .circle-btn {
  background: #0ea5e9;
}

.view-more-card:hover .circle-btn i {
  color: white !important;
}

.view-more-card i {
  font-size: 22px;
  color: #0ea5e9;
  transition: color .25s;
}


/* ── 4.10 Scroll & Animation Utilities ── */
.scroll-x::-webkit-scrollbar {
  height: 4px;
}

.scroll-x::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-x::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}


.animate-fade-up {
  animation: fadeUp .5s ease both;
}

.animate-fade-up {
  animation: fadeUp .5s ease both;
}

.delay-1 {
  animation-delay: .1s;
}

.delay-2 {
  animation-delay: .2s;
}

.delay-3 {
  animation-delay: .3s;
}


/* ── 4.11 Badges ── */
.new-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #7c3aed;
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  z-index: 1;
}

.hot-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--gold);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  z-index: 1;
}

/* Shared pagination buttons (product-list & best-seller pages) */
.page-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  color: #374151;
  font-size: .8rem;
  font-weight: 600;
  transition: all .15s;
  text-decoration: none;
}

.page-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

.page-btn.active {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 2px 8px rgba(230, 57, 70, .3);
}

.page-btn-label {
  padding: 0 .85rem;
  height: 34px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
  color: #374151;
  font-size: .8rem;
  font-weight: 600;
  transition: all .15s;
  text-decoration: none;
}

.page-btn-label:hover {
  border-color: var(--red);
  color: var(--red);
}

/* Shared filter chips (best-seller page) */
.filter-chip {
  padding: .35rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  color: #6b7280;
  white-space: nowrap;
  cursor: pointer;
  background: #fff;
  transition: all .18s;
  text-decoration: none;
}

.filter-chip:hover {
  border-color: var(--red);
  color: var(--red);
  background: #fff1f2;
}

.filter-chip.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 2px 8px rgba(230, 57, 70, .25);
}

.filter-chip-clear {
  border-color: #e5e7eb;
  color: #9ca3af;
}

.filter-chip-clear:hover {
  border-color: #9ca3af;
  color: #374151;
  background: #f9fafb;
}


/* ============================================================
   5. PAGE-SPECIFIC STYLES
============================================================ */

/* ── 5.1 Home / Hero Slider ── */
.hero-slider .swiper-slide img {
  border-radius: var(--radius);
}

.hero-slider .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: #cbd5e1;
  opacity: 1;
  border-radius: 4px;
  transition: all .3s;
}

.hero-slider .swiper-pagination-bullet-active {
  width: 28px;
}

.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev {
  background: white !important;
  box-shadow: var(--shadow) !important;
  border-radius: 50% !important;
  width: 40px !important;
  height: 40px !important;
  transition: all .2s;
}

.hero-slider .swiper-button-next::after,
.hero-slider .swiper-button-prev::after {
  font-size: 14px !important;
  color: #0f172a;
  font-weight: 700;
}

.hero-slider .swiper-button-next:hover,
.hero-slider .swiper-button-prev:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg) !important;
}

/* Best-seller banner (home) */
.best-seller-image {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  position: relative;
  overflow: hidden;
}

.best-seller-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 50%, rgba(230, 57, 70, .25) 0%, transparent 60%),
    radial-gradient(circle at 70% 50%, rgba(22, 114, 221, .2) 0%, transparent 60%);
}

.best-seller-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-badge {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 12px;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-badge .fire-icon {
  font-size: 1.4rem;
}

.hero-badge span {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: .02em;
}

.hero-badge .sub {
  font-size: .75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, .6);
  margin-top: 1px;
}


/* ── 5.2 Product Detail Page ── */
#newest-comment {
  scroll-margin-top: 381px;
}

#same-product-item {
  scroll-margin-top: 126px !important;
}

@media (min-width: 768px) {
  #same-product-item {
    scroll-margin-top: 181px !important;
  }

  #slider_mobile_comments {
    scroll-margin-top: 181px !important;
  }

  #information-product,
  #description-product {
    scroll-margin-top: 181px !important;
  }
}

.sticky-nav {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

/* Add-to-cart button */
#btn-add-product-to-order,
button[onclick*="addToOrder"] {
  border-radius: 10px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(230, 57, 70, .25) !important;
}

#btn-add-product-to-order:hover,
button[onclick*="addToOrder"]:hover {
  filter: brightness(.92);
}

#btn-add-product-to-order:active,
button[onclick*="addToOrder"]:active {
  transform: scale(.97);
}

button.border-2.border-gray-300 {
  border-radius: 10px !important;
  transition: border-color .15s, box-shadow .15s;
}

button.border-2.border-gray-300:focus,
button.border-2.border-gray-300:hover {
  border-color: #9ca3af !important;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, .04);
}

#main-image-product {
  transition: transform .3s ease;
}

#main-image-product:hover {
  transform: scale(1.04);
}

#same-product a img {
  border-radius: 10px !important;
  transition: border-color .15s, box-shadow .15s;
}

#same-product a img:hover {
  border-color: #9ca3af !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
}

.attr-chip-inner {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex-shrink: 0;
}

.seller-row {
  background: #f9fafb;
  border-radius: 12px;
  padding: .7rem 1rem;
  border: 1px solid var(--border);
}

.icon-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  flex-shrink: 0;
}

.comment-card-item {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  transition: box-shadow .18s;
}

.comment-card-item:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, .07);
}

.overlay-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: .9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f3f4f6;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: background .15s;
}

.close-btn:hover {
  background: #e5e7eb;
}

.mobile-buy-bar {
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
}

/* Detail page section heading (full-width underline variant) */
.detail-section-heading {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.detail-section-heading::after {
  content: '';
  display: block;
  width: 100%;
  height: 3px;
  background: var(--red);
  border-radius: 99px;
}

.spec-tr {
  border-bottom: 1px solid #f3f4f6;
}

.spec-tr:last-child {
  border-bottom: none;
}

.spec-th {
  background: #f9fafb !important;
  border-radius: 6px;
  color: #9ca3af !important;
  font-weight: 500 !important;
}

.nav-product-border {
  background: var(--red) !important;
}

#all-comment,
#product-info {
  overflow-y: auto;
}

#all-comment::-webkit-scrollbar,
#product-info::-webkit-scrollbar {
  width: 4px;
}

#all-comment::-webkit-scrollbar-thumb,
#product-info::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.rating-btn {
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
  color: #6b7280;
  transition: all .15s;
}

.rating-btn:hover,
.rating-btn.active {
  border-color: var(--red);
  color: var(--red);
  background: #fff1f2;
}

@keyframes pulse-soft {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .65
  }
}

.bg-blue-300 {
  animation: pulse-soft 2.8s ease-in-out infinite;
}


/* ── 5.3 Product List Page ── */
/* Uses: .section-card, .section-heading, .page-btn, .page-btn-label (defined in §4) */


/* ── 5.4 Best Sellers Page ── */
/* Uses: .section-card, .filter-chip, .page-btn, .page-btn-label, .hero-badge,
         .best-seller-image (defined above) */


/* ── 5.5 About Us Page ── */
.about-hero {
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  position: relative;
  overflow: hidden;
}

.about-hero .glow-1 {
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 57, 70, .4) 0%, transparent 70%);
  top: -100px;
  left: -80px;
  pointer-events: none;
  animation: floatG 7s ease-in-out infinite;
}

.about-hero .glow-2 {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(80, 80, 200, .3) 0%, transparent 70%);
  bottom: -80px;
  right: -60px;
  pointer-events: none;
  animation: floatG 9s ease-in-out infinite reverse;
}

@keyframes floatG {

  0%,
  100% {
    transform: translateY(0)
  }

  50% {
    transform: translateY(16px)
  }
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(230, 57, 70, .18);
  border: 1px solid rgba(230, 57, 70, .35);
  border-radius: 999px;
  padding: 4px 14px;
  font-size: .72rem;
  font-weight: 700;
  color: #fca5a5;
  letter-spacing: .06em;
}

.hero-tag .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e63946;
  animation: blink 1.4s infinite;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .2
  }
}

.about-item {
  border-right: 3px solid var(--red);
  padding-right: 14px;
}

.stat-card {
  background: linear-gradient(135deg, #fff1f2, #fff);
  border: 1px solid #fecdd3;
  border-radius: 14px;
  padding: 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.stat-icon {
  font-size: 1.6rem;
}

.stat-num {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--red);
}

.stat-label {
  font-size: .72rem;
  font-weight: 600;
  color: #6b7280;
}


/* ── 5.6 Contact Us Page ── */
.info-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.4rem 1rem;
  flex: 1;
  transition: box-shadow .18s, border-color .18s;
}

.info-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .07);
}

.info-card .icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: #fff1f2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  font-size: 1.3rem;
  border: 1px solid #fecdd3;
}

.contact-input {
  width: 100%;
  padding: .6rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: .875rem;
  color: #374151;
  background: #fafafa;
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
  direction: rtl;
}

.contact-input:focus {
  border-color: var(--red);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, .08);
}

.contact-input::placeholder {
  color: #9ca3af;
}

textarea.contact-input {
  resize: vertical;
  min-height: 110px;
}

.form-label {
  font-size: .8rem;
  font-weight: 600;
  color: #4b5563;
}

.btn-submit {
  padding: .65rem 2.5rem;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(230, 57, 70, .28);
  transition: filter .15s, transform .15s;
}

.btn-submit:hover {
  filter: brightness(.92);
}

.btn-submit:active {
  transform: scale(.97);
}

.notice-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 12px;
  padding: .9rem 1rem;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.notice-box i {
  color: #d97706;
  margin-top: 2px;
  flex-shrink: 0;
}

.address-row {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .85rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.address-row .icon-wrap-sm {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #fff1f2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  font-size: .9rem;
  flex-shrink: 0;
  border: 1px solid #fecdd3;
  margin-top: 6px;
}

.hours-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #059669;
  border-radius: 999px;
  padding: .3rem .9rem;
  font-size: .8rem;
  font-weight: 700;
}

.hours-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .4
  }
}


/* ── 5.7 Order / Cart Page ── */
.cart-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, border-color .2s;
  overflow: hidden;
}

.cart-item:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, .1);
  border-color: #d1d5db;
}

.counter-box {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  width: fit-content;
}

.counter-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  border: none;
  cursor: pointer;
  color: #374151;
  font-size: .85rem;
  transition: background .15s;
}

.counter-btn:hover {
  background: #f3f4f6;
}

.counter-val {
  width: 36px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  font-weight: 700;
  color: #1f2937;
  border-right: 1.5px solid var(--border);
  border-left: 1.5px solid var(--border);
}

.summary-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .65rem 0;
}

.summary-row+.summary-row {
  border-top: 1px solid #f3f4f6;
}

.summary-label {
  font-size: .82rem;
  font-weight: 600;
  color: #6b7280;
}

.summary-value {
  font-size: .82rem;
  font-weight: 700;
  color: #1f2937;
}

.summary-value.green {
  color: #16a34a;
}

.btn-checkout {
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: 12px;
  width: 100%;
  padding: .75rem;
  font-size: .9rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(230, 57, 70, .3);
  transition: background .15s, box-shadow .15s, transform .1s;
}

.btn-checkout:hover {
  background: #c62f3b;
  box-shadow: 0 5px 18px rgba(230, 57, 70, .4);
}

.btn-checkout:active {
  transform: scale(.98);
}

.mobile-checkout-bar {
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .06);
}


/* ── 5.8 User Panel ── */
.topbar {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 0 16px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--red);
  text-decoration: none;
}

.topbar-logo svg {
  width: 28px;
}

.topbar-back {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-2);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: white;
  transition: all .18s;
}

.topbar-back:hover {
  border-color: var(--red);
  color: var(--red);
}

/* User card & avatar */
.user-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 16px;
  text-align: center;
}

.avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 12px;
}

.avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fecdd3, #fda4af);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--red);
  border: 3px solid white;
  box-shadow: 0 0 0 3px var(--red-border);
}

.avatar-edit {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .55rem;
  border: 2px solid white;
  cursor: pointer;
}

.user-name {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-1);
}

.user-phone {
  font-size: .75rem;
  color: var(--text-3);
  margin-top: 3px;
  direction: ltr;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  background: var(--red-soft);
  border: 1px solid var(--red-border);
  color: var(--red);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: .7rem;
  font-weight: 700;
}

/* Sidebar nav */
.nav-menu {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.nav-item {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s;
  flex: 1;
  flex-direction: column;
  justify-content: start;
  gap: 4px;
  padding: 6px 0;
  font-size: 11px;
  border: none; /* خیلی مهم */
}
@media (min-width: 778px) {
  .nav-item{
    flex-direction: row;
  }
}

.nav-item:last-child {
  border-bottom: none;
}

.nav-item:hover {
  background: #fafafa;
  color: var(--text-1);
}

.nav-item.active {
  background: var(--red-soft);
  color: var(--red);
  border-right-color: var(--red);
}

.nav-item .icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  flex-shrink: 0;
  background: #f3f4f6;
  color: var(--text-3);
  transition: all .15s;
}

.nav-item.active .icon {
  background: var(--red-soft);
  color: var(--red);
}

.nav-item .badge-count {
  margin-right: auto;
  background: var(--red);
  color: white;
  font-size: .65rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}

.nav-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: .82rem;
  font-weight: 600;
  color: #ef4444;
  cursor: pointer;
  transition: all .15s;
}

.nav-logout:hover {
  background: #fef2f2;
}

.nav-logout .icon {
  background: #fef2f2;
  color: #ef4444;
}

/* Panel layout */
.layout {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f3f4f6;
}

.card-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title i {
  color: var(--red);
  font-size: .85rem;
}

.card-link {
  font-size: .75rem;
  font-weight: 600;
  color: var(--red);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.card-link:hover {
  opacity: .8;
}

/* Account info grid */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.info-field {
  padding: 14px 18px;
  border-bottom: 1px solid #f3f4f6;
  border-left: 1px solid #f3f4f6;
}

.info-field:nth-child(odd) {
  border-left: none;
}

.info-field:nth-last-child(-n+2) {
  border-bottom: none;
}

.field-label {
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-3);
  margin-bottom: 4px;
}

.field-value {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-1);
}

.field-empty {
  font-size: .8rem;
  color: var(--text-3);
}

.edit-btn {
  margin: 14px 18px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  background: var(--red-soft);
  border: 1.5px solid var(--red-border);
  color: var(--red);
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}

.edit-btn:hover {
  background: var(--red);
  color: white;
  border-color: var(--red);
}

/* Orders */
.order-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-bottom: 1px solid #f3f4f6;
  transition: background .15s;
  cursor: pointer;
}

.order-item:last-child {
  border-bottom: none;
}

.order-item:hover {
  background: #fafafa;
}

.order-thumb {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border: 1px solid var(--border);
}

.order-info {
  flex: 1;
  min-width: 0;
}

.order-title {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.order-date {
  font-size: .7rem;
  color: var(--text-3);
}

.order-id {
  font-size: .7rem;
  color: var(--text-3);
  direction: ltr;
}

.order-price {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-1);
  white-space: nowrap;
}

.status-pill {
  font-size: .68rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.status-delivered {
  background: #aed9ff;
  color: #337ab7;
}

.status-paid {

  background: #dcfce7;
  color: #16a34a;
}

.status-processing {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-canceled {
  background: #fee2e2;
  color: #dc2626;
}

.status-pending {
  background: #fef9c3;
  color: #ca8a04;
}

/* Addresses */
.address-item {
  padding: 14px 18px;
  border-bottom: 1px solid #f3f4f6;
}

.address-item:last-child {
  border-bottom: none;
}

.address-row-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.address-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  font-weight: 700;
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 2px 9px;
  margin-bottom: 6px;
}
.title-address {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 9px;
  margin-bottom: 6px;
  background: #aed9ff;
  color: #337ab7;
}

.address-text {
  font-size: .82rem;
  color: var(--text-2);
  line-height: 1.7;
}

.address-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.address-footer {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.address-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .7rem;
  color: var(--text-3);
}

.address-chip i {
  font-size: .65rem;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-3);
  font-size: .72rem;
  cursor: pointer;
  transition: all .15s;
}

.icon-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
}

.icon-btn.danger:hover {
  border-color: #ef4444;
  color: #ef4444;
  background: #fef2f2;
}

.add-address-btn {
  margin: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-3);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}

.add-address-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-soft);
}

/* Wishlist */
.wishlist-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.wish-item {
  padding: 14px;
  border-bottom: 1px solid #f3f4f6;
  border-left: 1px solid #f3f4f6;
  text-align: center;
  cursor: pointer;
  transition: background .15s;
  position: relative;
}

.wish-item:nth-child(3n) {
  border-left: none;
}

.wish-item:hover {
  background: #fafafa;
}

.wish-img {
  width: 70px;
  height: 70px;
  margin: 0 auto 8px;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  border: 1px solid var(--border);
}

.wish-name {
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-2);
  line-height: 1.5;
  margin-bottom: 6px;
}

.wish-price {
  font-size: .78rem;
  font-weight: 800;
  color: var(--text-1);
}

.wish-remove {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fef2f2;
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .6rem;
  cursor: pointer;
  border: 1px solid #fecaca;
  opacity: 0;
  transition: opacity .15s;
}

.wish-item:hover .wish-remove {
  opacity: 1;
}

/* Comments */
.comment-item {
  padding: 16px 18px;
  border-bottom: 1px solid #f3f4f6;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.comment-product {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-1);
}

.comment-date {
  font-size: .7rem;
  color: var(--text-3);
  white-space: nowrap;
}

.stars {
  display: flex;
  gap: 2px;
  margin-bottom: 6px;
}

.stars i {
  font-size: .7rem;
  color: #fbbf24;
}

.stars i.empty {
  color: #e5e7eb;
}

.comment-text {
  font-size: .8rem;
  color: var(--text-2);
  line-height: 1.7;
}

.comment-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
}

.cstatus-approved {
  background: #dcfce7;
  color: #16a34a;
}
.cstatus-rejected {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}

.cstatus-pending {
  background: #fef9c3;
  color: #ca8a04;
}

/* Stats bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.stat-item {
  padding: 16px 12px;
  text-align: center;
  border-left: 1px solid #f3f4f6;
}

.stat-item:last-child {
  border-left: none;
}

.stat-num {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--red);
}

.stat-lbl {
  font-size: .7rem;
  font-weight: 600;
  color: var(--text-3);
  margin-top: 3px;
}

/* Panel sections toggle */
.panel-section {
  display: none;
}

.panel-section.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Mobile bottom nav */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  z-index: 60;
  padding: 6px 8px;
}

.mob-nav-inner {
  display: flex;
  justify-content: space-around;
}

.mob-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: .58rem;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  transition: all .15s;
  flex: 1;
}

.mob-nav-btn i {
  font-size: .9rem;
}

.mob-nav-btn.active {
  color: var(--red);
  background: var(--red-soft);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(15, 23, 42, .45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(.97);
  transition: transform .25s ease;
}

.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f3f4f6;
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
  border-radius: var(--radius) var(--radius) 0 0;
}

.modal-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title i {
  color: var(--red);
}

.modal-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f3f4f6;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  font-size: .75rem;
  transition: all .15s;
}

.modal-close:hover {
  background: #e5e7eb;
  color: var(--text-1);
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Modal form */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-input {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .82rem;
  color: var(--text-1);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: #fafafa;
  width: 100%;
}

.form-input:focus {
  border-color: var(--red);
  background: white;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, .07);
}

.form-input::placeholder {
  color: var(--text-3);
}

.form-select {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .82rem;
  color: var(--text-1);
  outline: none;
  background: #fafafa;
  width: 100%;
  transition: border-color .15s;
  appearance: none;
  cursor: pointer;
}

.form-select:focus {
  border-color: var(--red);
  background: white;
}

.btn-primary {
  padding: 9px 22px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter .15s;
}

.btn-primary:hover {
  filter: brightness(.92);
}

.btn-cancel {
  padding: 9px 22px;
  background: white;
  color: var(--text-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}

.btn-cancel:hover {
  border-color: #9ca3af;
  color: var(--text-1);
}

/* All-orders sub-page */
.orders-all-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.back-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  font-size: .8rem;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}

.back-btn:hover {
  border-color: var(--red);
  color: var(--red);
}

.filter-tabs {
  display: flex;
  gap: 6px;
  padding: 14px 18px;
  border-bottom: 1px solid #f3f4f6;
  overflow-x: auto;
}

.filter-tab {
  padding: 5px 14px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}

.filter-tab:hover {
  border-color: var(--red);
  color: var(--red);
}

.filter-tab.active {
  background: var(--red);
  border-color: var(--red);
  color: white;
}

/* Panel animation */
@keyframes anim-fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.anim {
  animation: anim-fadeUp .35s ease both;
}

/* Panel responsive */
@media (max-width: 768px) {
  .sidebar {
    display: none;
  }

  .layout {
    display: block;
  }

  .mobile-bottom-nav {
    display: block;
  }

  .main-wrap {
    padding: 0px 12px 6px;
  }

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

  .info-field {
    border-left: none !important;
  }

  .info-field:last-child {
    border-bottom: none;
  }

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

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

  .stat-item:nth-child(2) {
    border-left: none;
  }
}


/* ============================================================
   6. THIRD-PARTY OVERRIDES
============================================================ */

/* ── 6.1 Swiper ── */
.swiper-pagination-bullet-active {
  color: white !important;
  background-color: white !important;
  border-radius: 5px !important;
  padding: 0 8px !important;
}

/* Product detail page */
.swiper-pagination-bullet {
  background: #d1d5db !important;
  opacity: 1 !important;
}

.swiper-pagination-bullet-active {
  background: #e63946 !important;
}


/* ── 6.2 noUiSlider ── */
.noUi-target {
  height: 7px !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0 20px;
  cursor: pointer;
}

.noUi-connects {
  height: 5px !important;
}

.noUi-connect {
  background: #1672dd !important;
  height: 6px !important;
}

.noUi-touch-area {
  display: none !important;
}

.noUi-handle {
  border: none !important;
  border-radius: 51% !important;
  background: #1672dd !important;
  cursor: pointer !important;
  box-shadow: none !important;
  width: 28px !important;
}

.noUi-horizontal .noUi-handle {
  width: 25px !important;
  height: 23px !important;
  right: -17px;
  top: -10px !important;
}

.noUi-handle::after,
.noUi-handle::before {
  content: "";
  display: none !important;
}


/* ── 6.3 Persian Datepicker ── */
.datepicker-container {
  z-index: 9999 !important;
}

.datepicker-plot-area {
  background: #ffffff !important;
  border: none !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 60px rgba(22, 114, 221, .25) !important;
  padding: 12px !important;
  font-family: 'IRANSansXFaNum', sans-serif !important;
  min-width: 280px !important;
}

.datepicker-navigator {
  background: linear-gradient(135deg, #1672dd, #0e4fa3) !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 12px !important;
}

.pwt-btn-switch {
  color: #ffffff !important;
  font-size: 14px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  letter-spacing: .5px !important;
}

.pwt-btn-next,
.pwt-btn-prev {
  color: #ffffff !important;
  background: rgba(255, 255, 255, .2) !important;
  border-radius: 8px !important;
  width: 28px !important;
  height: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  font-size: 12px !important;
  transition: background .2s ease !important;
}

.pwt-btn-next:hover,
.pwt-btn-prev:hover {
  background: rgba(255, 255, 255, .35) !important;
}

.header-row {
  display: flex !important;
  justify-content: space-around !important;
  margin-bottom: 6px !important;
}

.header-row-cell {
  color: #1672dd !important;
  font-weight: bold !important;
  font-size: 12px !important;
  text-align: center !important;
  width: 34px !important;
  padding: 4px 0 !important;
}

.table-days {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 2px !important;
}

.table-days td {
  text-align: center !important;
  padding: 3px !important;
  cursor: pointer !important;
  border-radius: 8px !important;
  transition: all .2s ease !important;
  font-size: 13px !important;
  width: 34px !important;
  height: 34px !important;
  color: #374151 !important;
}

.table-days td:hover {
  background: #e8f1fd !important;
  color: #1672dd !important;
}

.table-days td .other-month {
  color: #c5d5e8 !important;
}

.table-days td.today {
  border: 2px solid #1672dd !important;
  color: #1672dd !important;
  font-weight: bold !important;
}

.table-days td.selected {
  background: linear-gradient(135deg, #1672dd, #0e4fa3) !important;
  color: #ffffff !important;
  font-weight: bold !important;
  box-shadow: 0 4px 12px rgba(22, 114, 221, .4) !important;
}

.table-days td.selected span {
  color: #ffffff !important;
}

.table-days td.selected.today {
  border: 2px solid #0a3a7a !important;
}

.toolbox {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  border-top: 1px solid #e5e7eb !important;
  padding-top: 10px !important;
  margin-top: 10px !important;
}

.pwt-btn-today {
  background: linear-gradient(135deg, #1672dd, #0e4fa3) !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  padding: 6px 16px !important;
  font-size: 12px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  transition: all .2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.pwt-btn-today:hover {
  box-shadow: 0 4px 12px rgba(22, 114, 221, .4) !important;
  transform: translateY(-1px) !important;
}

.pwt-btn-calendar {
  color: #1672dd !important;
  font-size: 12px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  padding: 6px 12px !important;
  border: 1px solid #1672dd !important;
  border-radius: 8px !important;
  transition: all .2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.pwt-btn-calendar:hover {
  background: #e8f1fd !important;
}

.pwt-btn-submit {
  font-size: 15px;
}


/* ── 6.4 SweetAlert ── */
.swal-modal {
  width: 320px;
  height: 350px;
}

.swal-text {
  text-align: right;
  font-size: 16px;
}

.swal-button {
  background-color: rgb(239 68 68);
}

.swal-button:hover {
  background-color: rgb(220 38 38) !important;
  transition: .4s all ease;
}

@media (min-width: 1024px) {
  .swal-modal {
    width: 520px;
    height: 330px;
  }
}


/* ── Input number spinner hide ── */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
}

/* ── Mobile nav hide on desktop ── */
@media (max-width: 767px) {
  .close {
    display: none;
  }
}

#filter-overlay {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#filter-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* فیلترهای موبایل */
#filter-mobile,
#filter-mobile-sort,
#filter-mobile-category,
#filter-mobile-brand,
#filter-mobile-color {
  transform: translateY(100%);
  transition: transform 0.3s ease;
  display: block !important;
  /* hidden رو حذف کن */
  visibility: hidden;
}

#filter-mobile.open,
#filter-mobile-sort.open,
#filter-mobile-category.open,
#filter-mobile-brand.open,
#filter-mobile-color.open {
  transform: translateY(0);
  visibility: visible;
}

/* navbar mobile */
.mobile-nav {
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, .06);
  display: flex;
  width: 100%;
  justify-content: space-around;
}

/* .nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  padding: 6px 0;
  color: #9ca3af;
  text-decoration: none;
  font-size: .65rem;
  font-weight: 600;
  transition: color .15s; */
/* } */

.nav-item:hover,
.nav-item.active {
  color: #e63946;
}

.nav-item img {
  width: 22px;
  height: 22px;
  opacity: .55;
  transition: opacity .15s;
}

.nav-item:hover img,
.nav-item.active img {
  opacity: 1;
}
/* end navbar mobile */

.form-password{
  width:100%;padding:9px 12px;border:1.5px solid var(--border);border-radius:var(--radius-sm);font-family:inherit;font-size:.82rem;color:var(--text-1);outline:none;transition:border-color .15s
}
@media (min-width: 768px) {
  .alert-box{
    width: 23%;
    padding: 17px 10px;
}
}

/* header */

  :root {
    --red: #e63946;
    --red-soft: #fff1f2;
    --border: #e5e7eb;
    --shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
    --text-1: #0f172a;
    --text-2: #475569;
  }

  /* ── HEADER WRAP ── */
  #header-fixed {
    position: fixed; top: 0; right: 0; left: 0; z-index: 50;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 16px rgba(0,0,0,.06);
  }

  /* ── TOP ROW ── */
  .header-top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; padding: 10px 16px;
  }

  /* logo */
  .header-logo img { height: 55px; width: auto; object-fit: contain; }

  /* search */
  .search-wrap {
    flex: 1; max-width: 520px;
    position: relative;
  }
  .search-form {
    display: flex; align-items: center; gap: 8px;
    background: #f8fafc;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    padding: 8px 14px;
    transition: border-color .18s, box-shadow .18s;
  }
  .search-form:focus-within {
    border-color: var(--red);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(230,57,70,.08);
  }
  .search-form img { width: 18px; opacity: .5; flex-shrink: 0; }
  .search-form input {
    border: none; outline: none; background: transparent;
    font-family: inherit; font-size: .82rem; color: var(--text-1);
    width: 100%;
  }
  .search-form input::placeholder { color: #9ca3af; }

  /* search dropdown */
  #searchbox-md {
    position: absolute; top: calc(100% + 8px); right: 0; left: 0;
    background: white; border: 1px solid var(--border);
    border-radius: 14px; box-shadow: var(--shadow);
    padding: 14px; z-index: 60;
  }
  #searchbox-md.hidden { display: none; }
  .search-tag {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 12px; border-radius: 999px;
    border: 1px solid var(--border);
    color: var(--text-2);white-space: nowrap;
    transition: all .15s; text-decoration: none;
  }
  .search-tag:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }

  /* header action buttons */
  .header-actions { display: flex; align-items: center; gap: 6px; }
  .hdr-btn {
    display: flex; align-items: center; gap: 5px;
    padding: 7px 12px; border-radius: 999px;
    border: 1.5px solid var(--border);
    background: white; font-family: inherit;
    font-size: .78rem; font-weight: 600; color: var(--text-2);
    text-decoration: none; cursor: pointer;
    transition: all .18s; white-space: nowrap;
  }
  .hdr-btn img { width: 20px; }
  .hdr-btn:hover { border-color: #9ca3af; color: var(--text-1); }
  .hdr-btn.primary { background: var(--red); border-color: var(--red); color: white; }
  .hdr-btn.primary:hover { background: #c62f3b; }

  /* ── NAV ROW ── */
  .header-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px 8px;
    border-top: 1px solid #f3f4f6;
  }
  .nav-links { display: flex; align-items: center; gap: 2px; overflow: hidden; }
  .nav-link {
    display: flex; align-items: center; gap: 5px;
    padding: 7px 10px; border-radius: 8px;
    font-size: .8rem; font-weight: 600; color: var(--text-2);
    text-decoration: none; white-space: nowrap;
    transition: all .18s; position: relative;
  }
  .nav-link img { width: 16px; opacity: .6; transition: opacity .18s; }
  .nav-link::after {
    content: ''; position: absolute; bottom: 0; right: 8px; left: 8px;
    height: 2px; border-radius: 99px; background: var(--red);
    transform: scaleX(0); transition: transform .2s ease;
  }
  .nav-link:hover { color: var(--text-1); background: #f8fafc; }
  .nav-link:hover img { opacity: 1; }
  .nav-link:hover::after { transform: scaleX(1); }
  .nav-link.active { color: var(--red); }
  .nav-link.active img { opacity: 1; filter: hue-rotate(340deg) saturate(3); }
  .nav-link.active::after { transform: scaleX(1); }

  /* city badge */
  .city-badge {
    display: flex; align-items: center; gap: 5px;
    padding: 5px 14px; border-radius: 999px;
    background: #fff7ed; border: 1px solid #fed7aa;
    font-size: .75rem; color: #c2410c; white-space: nowrap;
  }
  .city-badge strong { color: #9a3412; }

  /* ── CATEGORY MEGA MENU ── */
  #menu-category {
    position: fixed;
    top: 116px;
    right: 0;
    left: 0;
    display: none;
    z-index: 60;
  }

  #menu-category.open { display: block; }
  .mega-menu-inner {
    max-width: 900px;
    background: white;
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 16px 40px rgba(0,0,0,.1);
    max-height: 480px; overflow-y: auto;
    padding: 20px 24px;
  }
  .mega-header {
    display: flex; align-items: center; justify-content: flex-start;
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
  }
  .mega-see-all {
    display: flex; align-items: center; gap: 5px;
    font-size: .78rem; font-weight: 700; color: var(--red);
    text-decoration: none;
  }
  .mega-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; direction: rtl; }
  .mega-cat-title {
    font-size: .85rem; font-weight: 800; color: var(--text-1);
    text-decoration: none; display: block; margin-bottom: 8px;
    transition: color .15s;
  }
  .mega-cat-title:hover { color: var(--red); }
  .mega-brand-link {
    display: block; font-size: .75rem; font-weight: 600;
    color: var(--text-2); text-decoration: none;
    padding: 2px 0; transition: color .15s;
  }
  .mega-brand-link:hover { color: var(--red); }
  .mega-product-link {
    display: block; font-size: .7rem; color: #9ca3af;
    text-decoration: none; padding: 2px 8px;
    transition: color .15s;
  }
  .mega-product-link:hover { color: var(--red); }

  /* ── MOBILE SEARCH OVERLAY ── */
  #search-mobile {
    position: fixed; inset: 0; z-index: 70;
    background: white;
    flex-direction: column; gap: 16px;
    padding: 16px;
    display: none;
  }
  #search-mobile.open { display: flex; }
  .search-mobile-header {
    display: flex; align-items: center; gap: 10px;
  }
  .search-mobile-back {
    width: 36px; height: 36px; border-radius: 50%;
    background: #f3f4f6; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-2); font-size: .85rem; flex-shrink: 0;
  }
  .search-mobile-form {
    flex: 1; display: flex; align-items: center; gap: 8px;
    background: #f8fafc; border: 1.5px solid var(--border);
    border-radius: 999px; padding: 9px 14px;
  }
  .search-mobile-form:focus-within { border-color: var(--red); background: white; }
  .search-mobile-form input {
    border: none; outline: none; background: transparent;
    font-family: inherit; font-size: .85rem; width: 100%;
  }
  .search-section-title {
    display: flex; align-items: center; gap: 6px;
    font-size: .8rem; font-weight: 700; color: var(--text-2);
    margin-bottom: 8px;
  }

  /* header spacer */
  .header-spacer { height: 110px; }
  @media (max-width: 768px) { .header-spacer { height: 70px; } }
/* end header */

  :root { --red: #e63946; --border: #e5e7eb; --shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05); }

  .section-card { background:#fff; border:1px solid var(--border); border-radius:14px; box-shadow:var(--shadow); }
  .section-heading { display:flex; flex-direction:column; gap:5px; }
  .section-heading::after { content:''; display:block; width:28px; height:3px; background:var(--red); border-radius:99px; }

  /* message item */
  .message-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid #f3f4f6;
    transition: background .15s;
  }
  .message-item:last-child { border-bottom: none; }
  .message-item:hover { background: #fafafa; }

  .message-avatar {
    width: 42px; height: 42px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
    border: 1.5px solid var(--border);
  }
  .message-avatar-fallback {
    width: 42px; height: 42px; border-radius: 50%;
    background: linear-gradient(135deg, #fecdd3, #fda4af);
    display: flex; align-items: center; justify-content: center;
    font-size: .95rem; font-weight: 800; color: var(--red);
    flex-shrink: 0; border: 1.5px solid #fecdd3;
  }

  .message-sender {
    font-size: .82rem; font-weight: 700; color: #1f2937;
  }
  .message-text {
    font-size: .82rem; color: #4b5563; line-height: 1.8; text-align: justify;
    margin-top: 4px;
  }
  .message-time {
    font-size: .68rem; color: #9ca3af; font-weight: 500;
  }
  .profile-container{
    margin-top: -131px;
  }
  @media (min-width: 776px) {

    .profile-container{
      margin-top: -40px;
    }
  }

/* payment result style */

  :root {
    --red: #e63946;
    --green: #16a34a;
    --orange: #d97706;
    --border: #e5e7eb;
    --shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05);
  }

  .result-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    max-width: 460px;
    width: 100%;
    padding: 36px 28px;
    text-align: center;
  }

  .result-icon {
    width: 86px; height: 86px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.2rem;
  }
  .result-icon.success { background: #dcfce7; color: var(--green); animation: popIn .4s cubic-bezier(.34,1.56,.64,1); }
  .result-icon.error,
  .result-icon.failed { background: #fee2e2; color: var(--red); animation: popIn .4s cubic-bezier(.34,1.56,.64,1); }
  .result-icon.canceled { background: #fef3c7; color: var(--orange); animation: popIn .4s cubic-bezier(.34,1.56,.64,1); }

  @keyframes popIn { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

  .result-title { font-size: 1.1rem; font-weight: 800; color: #1f2937; margin-bottom: 8px; }
  .result-message { font-size: .85rem; color: #6b7280; line-height: 1.8; margin-bottom: 20px; }

  .result-details {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 22px;
    text-align: right;
  }
  .detail-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 7px 0;
    font-size: .8rem;
  }
  .detail-row + .detail-row { border-top: 1px solid #f3f4f6; }
  .detail-label { color: #9ca3af; font-weight: 500; }
  .detail-value { color: #1f2937; font-weight: 700; direction: ltr; }

  .result-actions { display: flex; flex-direction: column; gap: 10px; }
  .btn-result-primary {
    background: var(--red); color: #fff; border: none;
    border-radius: 12px; padding: 12px;
    font-size: .88rem; font-weight: 800;
    text-decoration: none; display: block;
    box-shadow: 0 3px 12px rgba(230,57,70,.28);
    transition: filter .15s, transform .1s;
  }
  .btn-result-primary:hover { filter: brightness(.93); }
  .btn-result-primary:active { transform: scale(.98); }

  .btn-result-secondary {
    background: #fff; color: #6b7280; border: 1.5px solid var(--border);
    border-radius: 12px; padding: 11px;
    font-size: .85rem; font-weight: 700;
    text-decoration: none; display: block;
    transition: all .15s;
  }
  .btn-result-secondary:hover { border-color: #9ca3af; color: #1f2937; }

  .result-page-wrap {
    min-height: 70vh;
    display: flex; align-items: center; justify-content: center;
    padding: 24px 16px;
    background: #f2f4f8;
  }
  .item-nav-mobile:hover{
    color: #0f172a !important;
  }
  /* end payment result style */
/* category style */


  :root { --red: #e63946; --border: #e5e7eb; --shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05); }

  .section-card { background:#fff; border:1px solid var(--border); border-radius:14px; box-shadow:var(--shadow); }
  .section-heading { display:flex; flex-direction:column; gap:5px; }
  .section-heading::after { content:''; display:block; width:28px; height:3px; background:var(--red); border-radius:99px; }

  /* ── HERO ── */
  .cat-hero {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    position: relative; overflow: hidden;
  }
  .cat-hero .glow-1 {
    position:absolute; width:340px; height:340px; border-radius:50%;
    background: radial-gradient(circle, rgba(230,57,70,.4) 0%, transparent 70%);
    top:-90px; left:-70px; pointer-events:none;
    animation: floatG 7s ease-in-out infinite;
  }
  .cat-hero .glow-2 {
    position:absolute; width:280px; height:280px; border-radius:50%;
    background: radial-gradient(circle, rgba(80,80,200,.3) 0%, transparent 70%);
    bottom:-70px; right:-50px; pointer-events:none;
    animation: floatG 9s ease-in-out infinite reverse;
  }
  @keyframes floatG { 0%,100%{transform:translateY(0)} 50%{transform:translateY(16px)} }

  .hero-content { position:relative; z-index:2; display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center; }
  .hero-title { font-size:1.5rem; font-weight:800; color:#fff; line-height:1.2; }
  @media(min-width:768px){ .hero-title{font-size:1.9rem} }
  .hero-divider { width:36px; height:3px; background:linear-gradient(90deg,var(--red),#ff6b35); border-radius:99px; margin:6px auto 0; }
  .hero-sub { font-size:.78rem; color:rgba(255,255,255,.55); font-weight:500; margin-top:2px; }

  /* ── CATEGORY CARD ── */
  .cat-card {
    display: flex; flex-direction: column;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    transition: all .2s;
    position: relative;
  }
  .cat-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1); border-color: var(--red); transform: translateY(-2px); }

  .cat-image-wrap {
    width: 100%; aspect-ratio: 1.4 / 1;
    background: linear-gradient(135deg, #f9fafb, #f1f5f9);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; position: relative;
  }
  .cat-image-wrap img {
    width: 100%; height: 100%; object-fit: contain; padding: 14px;
    transition: transform .3s;
  }
  .cat-card:hover .cat-image-wrap img { transform: scale(1.08); }
  .cat-image-fallback {
    width: 56px; height: 56px; border-radius: 14px;
    background: #fff1f2; color: var(--red);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
  }

  .cat-info {
    padding: 12px 14px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px;
  }
  .cat-name { font-size: .85rem; font-weight: 700; color: #1f2937; }
  .cat-arrow {
    width: 26px; height: 26px; border-radius: 50%;
    background: #f9fafb; color: #9ca3af;
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem; flex-shrink: 0;
    transition: all .2s;
  }
  .cat-card:hover .cat-arrow { background: var(--red); color: #fff; }


  .cat-badge {
    position: absolute; top: 10px; right: 10px;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(4px);
    border-radius: 999px;
    padding: 3px 10px;
    font-size: .65rem; font-weight: 700; color: var(--red);
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
  }

  /* search box */
  .cat-search {
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1.5px solid var(--border);
    border-radius: 999px; padding: 10px 16px;
    transition: border-color .18s;
  }
  .cat-search:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(230,57,70,.07); }
  .cat-search input { border: none; outline: none; flex: 1; font-family: inherit; font-size: .85rem; background: transparent; }

/* end category style */

/* footer */
  :root { --red: #e63946; --border: #e5e7eb; --shadow: 0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.05); }

  .footer-card { background:#fff; box-shadow:var(--shadow); }

  /* trust badges */
  .trust-item { display:flex; flex-direction:column; align-items:center; gap:10px; padding:16px 10px; border-radius:14px; transition:background .2s; }
  .trust-item:hover { background:#f9fafb; }
  .trust-icon-wrap { width:64px; height:64px; display:flex; align-items:center; justify-content:center; }
  .trust-label { font-size:.78rem; font-weight:600; color:#4b5563; text-align:center; line-height:1.5; }

  /* mobile accordion */
  .footer-accordion-item { border-bottom:1px solid #f3f4f6; }
  .footer-accordion-header { display:flex; align-items:center; justify-content:space-between; padding:14px 6px; cursor:pointer; }
  .footer-accordion-content { display:none; flex-direction:column; gap:12px; padding:0 6px 16px; }
  .footer-accordion-content a { font-size:.82rem; color:#9ca3af; font-weight:500; text-decoration:none; transition:color .15s; }
  .footer-accordion-content a:hover { color:var(--red); }

  /* desktop columns */
  .footer-col-title { font-size:.92rem; font-weight:800; color:#1f2937; margin-bottom:16px; position:relative; padding-bottom:8px; }
  .footer-col-title::after { content:''; position:absolute; bottom:0; right:0; width:26px; height:3px; background:var(--red); border-radius:99px; }
  .footer-col-link { display:block; font-size:.82rem; color:#6b7280; font-weight:500; text-decoration:none; padding:5px 0; transition:color .15s, padding-right .15s; }
  .footer-col-link:hover { color:var(--red); padding-right:4px; }

  .back-to-top-btn { display:flex; align-items:center; gap:8px; padding:9px 18px; border-radius:999px; border:1.5px solid var(--border); background:#fff; color:#4b5563; font-size:.82rem; font-weight:600; cursor:pointer; transition:all .18s; }
  .back-to-top-btn:hover { border-color:var(--red); color:var(--red); background:#fff1f2; }
  .back-to-top-btn svg { width:12px; }

  .support-divider { color:#d1d5db; }

  .copyright-bar { background:linear-gradient(135deg, #1e1b4b, #312e81); border-radius:10px; padding:10px 16px; text-align:center; }
  .copyright-bar span { color:rgba(255,255,255,.85); font-size:.72rem; font-weight:500; line-height:1.8; }
  /* end footer */