@font-face{
  font-family:"Vazirmatn";
  src:url("/fonts/Vazirmatn-Regular.ttf") format("truetype");
}

/* reset */
*{
  box-sizing:border-box;
  direction:rtl;
  font-family:"Vazirmatn",sans-serif;
  margin:0;
  padding:0;
}

body{
  background:#f9f9f9;
  color:#333;
  line-height:1.6;
  transition:background .25s,color .25s;
}

/* smooth ui transitions */
.header,
.navbar,
.product,
.card,
.bottom-nav,
.mini-cart{
  transition:background .25s,color .25s,box-shadow .25s;
}

.hidden{
  display:none!important;
}

/* hidden file inputs */
#storeBannerInput,
#storeLogoInput,
#avatarInput{
  display:none!important;
}

/* ================= HEADER ================= */

.header{
  display:flex;
  align-items:center;
  flex-wrap:nowrap;
  gap:6px;
  padding:8px;
  background:#fff;
  box-shadow:0 2px 6px rgba(0,0,0,.08);
}

/* logo */
.logo{
  font-size:16px;
  font-weight:bold;
  white-space:nowrap;
  flex:0 0 auto;
}

/* =========================
   SEARCH BOX
========================= */

.search-box{
  flex:1;
  position:relative;
  width:100%;
}

/* input */

.search-box input{
  width:100%;
  padding:8px 12px;
  border-radius:8px;
  border:1px solid #ccc;
  font-size:14px;
  outline:none;
  transition:all .15s;
}

.search-box input:focus{
  border-color:#2a7be4;
  box-shadow:0 0 0 2px rgba(42,123,228,0.15);
}


/* =========================
   DROPDOWN
========================= */

.search-dropdown{
  position:absolute;
  top:100%;
  right:0;
  left:0;
  margin-top:6px;
  background:#fff;
  border:1px solid #eee;
  border-radius:10px;
  box-shadow:0 10px 25px rgba(0,0,0,0.12);
  max-height:420px;
  overflow-y:auto;
  display:none;
  z-index:2000;
}


/* =========================
   SECTION TITLE
========================= */

.search-section{
  padding:8px 12px;
  font-size:12px;
  font-weight:600;
  color:#666;
  background:#f5f5f5;
  border-top:1px solid #eee;
}

.search-section:first-child{
  border-top:none;
}


/* =========================
   ITEM
========================= */

.search-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  cursor:pointer;
  border-bottom:1px solid #eee;
  transition:background .15s;
}

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

.search-item:hover{
  background:#f7f7f7;
}

/* keyboard active */

.search-item.active{
  background:#eef3ff;
}


/* =========================
   IMAGE
========================= */

.search-item img{
  width:42px;
  height:42px;
  object-fit:cover;
  border-radius:6px;
  flex-shrink:0;
}


/* =========================
   TEXT
========================= */

.search-title{
  font-size:13px;
  color:#222;
  line-height:1.3;
}

.search-title b{
  color:#2a7be4;
  font-weight:600;
}

.search-price{
  font-size:12px;
  color:#2e7d32;
  margin-top:2px;
}


/* =========================
   STATES
========================= */

.search-loading,
.search-empty,
.search-error{
  padding:14px;
  text-align:center;
  font-size:13px;
  color:#777;
}

.search-error{
  color:#d32f2f;
}


/* =========================
   SCROLLBAR
========================= */

.search-dropdown::-webkit-scrollbar{
  width:6px;
}

.search-dropdown::-webkit-scrollbar-thumb{
  background:#ccc;
  border-radius:6px;
}

.search-dropdown::-webkit-scrollbar-thumb:hover{
  background:#aaa;
}

.search-hint {
  padding: 10px;
  background: #f8f8f8;
  color: #777;
  border-bottom: 1px solid #eee;
  display: none;
  font-size: 14px;
}

/* ساختار کلی صفحه محصول */
.singleProduct{
  display:flex;
  gap:30px;
  padding:25px;
  max-width:1100px;
  margin:auto;
  flex-wrap:wrap;
}

/* گالری */
.productGallery{
  flex:1 1 80px;
}

.productMainImage{
  width:100%;
  border-radius:12px;
  box-shadow:0 4px 14px rgba(0,0,0,0.1);
  margin-bottom:15px;
}

.productThumbs{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding-bottom:5px;
}

.product-thumb{
  width:80px;
  height:80px;
  object-fit:cover;
  border-radius:10px;
  cursor:pointer;
  transition:.2s;
  border:2px solid transparent;
}

.product-thumb:hover{
  border-color:#2a7be4;
  transform:scale(1.05);
}

/* اطلاعات محصول */
.productInfo{
  flex:1 1 350px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.productTitle{
  font-size:24px;
  font-weight:600;
}

.productStore span{
  color:#2a7be4;
  cursor:pointer;
  font-weight:600;
}

.productStore span:hover{
  text-decoration:underline;
}

.productDesc{
  color:#fff;
  white-space:pre-line;
}

.productPrice{
  font-size:22px;
  font-weight:700;
  color:#1f9d32;
}

.productStock{
  font-size:15px;
  color:#1f9d32;
}

/* دکمه ها */
.addCartBtn{
  margin-top:15px;
  padding:12px 16px;
  background:#28a745;      /* سبز */
  color:#fff;
  border:none;
  border-radius:10px;
  cursor:pointer;
  transition:.2s;
  font-size:15px;
}

.addCartBtn:hover{
  background:#218838;
  transform:translateY(-2px);
}

.backBtn{
  margin-top:10px;
  padding:12px 16px;
  background:#dc3545;      /* قرمز */
  color:#fff;
  border:none;
  border-radius:10px;
  cursor:pointer;
  transition:.2s;
  font-size:15px;
}

.backBtn:hover{
  background:#c82333;
  transform:translateY(-2px);
}

/* icons */
.header-icons{
  display:flex;
  align-items:center;
  gap:4px;
  flex:0 0 auto;
}

.icon-btn{
  background:none;
  border:none;
  font-size:20px;
  padding:4px;
  position:relative;
  cursor:pointer;
}

/* cart badge */
#cartBadge{
  position:absolute;
  top:-4px;
  right:-4px;
  background:red;
  color:#fff;
  font-size:9px;
  padding:2px 4px;
  border-radius:50%;
}

/* ========================================================= */
/*     HERO SLIDER – FINAL MERGED (replaces old slider css)  */
/* ========================================================= */

.hero-slider {
    width: 98%;
    max-width: 1400px;
    height: 270px;
    margin: 20px auto;
    border-radius: 22px;
    overflow: hidden;
    position: relative;
    background: #111;
    box-shadow: 0 8px 25px rgba(0,0,0,0.18);
}

.slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity .7s ease, transform 1.2s ease;
}
.slide.active {
    opacity: 1;
    transform: scale(1);
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 22px;
    filter: saturate(1.15) contrast(1.05);
    transform: scale(1.06);
    transition: transform 1.6s ease, filter .4s ease;
}
.slide.active img {
    transform: scale(1.02);
}

.slide:hover img {
    transform: scale(1.07);
    filter: brightness(.88);
}

/* SLIDER NAV BUTTONS */

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(6px);
    border: none;
    color: #fff;
    font-size: 22px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .25s, transform .25s;
}

.slider-btn:hover {
    background: rgba(0,0,0,.75);
    transform: translateY(-50%) scale(1.08);
}

.slider-btn:active {
    transform: translateY(-50%) scale(.96);
}

.slider-btn.prev { left: 14px; }
.slider-btn.next { right: 14px; }

/* DOTS */

.slider-dots {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    margin: auto;
    display: flex;
    gap: 10px;
    justify-content: center;
    z-index: 12;
}

.slider-dot {
    width: 10px;
    height: 10px;
    background: rgba(255,255,255,.45);
    border-radius: 50%;
    cursor: pointer;
    transition: .25s;
    box-shadow: 0 0 0 2px rgba(0,0,0,.2) inset;
}

.slider-dot:hover {
    background: rgba(255,255,255,.7);
}

.slider-dot.active {
    width: 22px;
    height: 10px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(0,0,0,.2) inset,
                0 4px 12px rgba(255,255,255,.35);
    transform: scale(1.2);
}

/* ========================================================= */
/*     YOUR ORIGINAL CODE (ALL UNTOUCHED & PRESERVED)        */
/* ========================================================= */

/* ========== BANNER EXTRA INFO ========== */

.banner-info{
  position:absolute;
  bottom:40px;
  right:40px;
  color:#fff;
  background:rgba(0,0,0,.4);
  padding:15px 25px;
  border-radius:10px;
}

.banner-info h2{
  margin:0 0 10px;
  font-size:22px;
}

.banner-info button{
  background:#ff6a00;
  border:none;
  color:#fff;
  padding:8px 16px;
  border-radius:6px;
  cursor:pointer;
}

/* ========== TITLES ========== */

section h2{
  margin:15px 10px;
  font-size:18px;
  color:#2e7d32;
}

/* ========== PRODUCT / STORE CARDS GRID ========== */

#productsGrid,
#productsList{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:center;
  padding:10px;
}

/* کارت محصول */
.product{
  background:#fff;
  border-radius:12px;
  padding:10px;
  width:160px;
  box-shadow:0 3px 10px #0001;
  position:relative;
  transition:transform .2s;
}

.product:hover{
  transform:translateY(-3px);
}

.product img{
  width:100%;
  height:140px;
  object-fit:cover;
  border-radius:10px;
}

.product-title{
  font-size:14px;
  margin-top:6px;
}

.price{
  color:#2e7d32;
  font-weight:bold;
  font-size:13px;
}

.cart-controls{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:6px;
  margin-top:4px;
}

.cart-controls button{
  border:none;
  background:#2e7d32;
  color:#fff;
  width:22px;
  height:22px;
  border-radius:6px;
  font-size:14px;
  cursor:pointer;
}

.cart-controls span{
  font-size:11px;
  font-weight:bold;
}

/* ========== CARD GENERAL STYLE (Dashboard / Profile) ========== */

.card {
  background: #fff;
  border-radius: 12px;
  padding: 15px;
  margin: 10px;
  box-shadow: 0 3px 10px #0001;
}

.card input {
  display: block;
  width: 100%;
  margin: 5px 0;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

.card button {
  width: 100%;
  background: #2e7d32;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px;
  margin-top: 8px;
  cursor: pointer;
}

/* ========================================================= */
/*     SLIDE-IN MINI CART                                   */
/* ========================================================= */

.mini-cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 90%;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: 0.3s cubic-bezier(.25,.8,.25,1);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  border-radius: 12px 0 0 12px;
}

.mini-cart.active {
  transform: translateX(0);
}

.mini-cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
  z-index: 999;
}

.mini-cart-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mini-cart-header {
  padding: 16px;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mini-cart-content {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.mini-cart-footer {
  padding: 16px;
  border-top: 1px solid #eee;
}

.checkout-btn {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: none;
  background: #2ecc71;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.checkout-btn:hover {
  background: #27ae60;
}

/* ========== IMAGE WRAPPERS ========== */

.image-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 10px;
  cursor: pointer;
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.image-wrapper.avatar img { border-radius: 50%; }

.image-wrapper.banner {
  width: 100%;
  height: 180px;
}

.image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: .2s;
}

.image-wrapper:hover .image-overlay {
  opacity: 1;
}

/* ========== AVATAR UPLOAD AREA ========== */

.avatar-box { display: flex; flex-direction: column; gap: 10px; }

.avatar-wrapper {
  position: relative;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
}

.avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: .2s;
}

.avatar-wrapper:hover .avatar-overlay {
  opacity: 1;
}

.progress {
  width: 120px;
  height: 6px;
  background: #ddd;
  border-radius: 4px;
  overflow: hidden;
  display: none;
}

.progress div {
  height: 100%;
  width: 0%;
  background: #0f9d58;
  transition: width .2s;
}

/* ========== RED BUTTONS ========== */

#AddProductsCancelBtn,
#ProductsCancelBtn,
#CancelBtn,
#logoutBtn {
  background: #e53935;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
}

#AddProductsCancelBtn:hover,
#ProductsCancelBtn:hover,
#CancelBtn:hover,
#logoutBtn:hover {
  background: #c62828;
}

/* ========== TOAST ========== */

#toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #333;
  color: #fff;
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: .35s ease;
  z-index: 9999;
  box-shadow: 0 8px 25px rgba(0,0,0,.25);
}

#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

#toast.success { background: #2ecc71; }
#toast.error { background: #e74c3c; }
#toast.warning { background: #f39c12; }

/* ========== BOTTOM NAVIGATION ========== */

.bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 -2px 6px #0002;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 999;
}

.bottom-nav button {
  background: none;
  border: none;
  font-size: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.bottom-nav span {
  font-size: 10px;
}

section { padding-bottom: 80px; }

/* ==================== GLOBAL ANIMATIONS ==================== */

/* Fade-in عمومی */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Slide-up مخصوص کارت فروشگاه */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Glow subtle برای دکمه‌ها */
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(255,255,255,0.2); }
  50% { box-shadow: 0 0 12px rgba(255,255,255,0.4); }
}

/* ==================== PRODUCT ROW ==================== */

.product-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-behavior: smooth;
  animation: fadeIn 0.6s ease forwards;
}

.product-row::-webkit-scrollbar { display: none; }

.product-scroll-wrapper { position: relative; }

/* دکمه‌های شناور شیشه‌ای */
.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  z-index: 12;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: #333;
  transition: all 0.25s ease;
}

.scroll-btn:hover {
  transform: translateY(-50%) scale(1.15);
  background: rgba(255,255,255,0.3);
}

/* سمت چپ و راست */
.scroll-btn.left { left: 10px; }
.scroll-btn.right { right: 10px; }

/* ==================== STORES SECTION ==================== */

#stores {
  padding: 12px;
  margin-bottom: 80px;
  animation: fadeIn 1s ease-out forwards;
}

#storesList {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 8px;
}

/* --- کارت فروشگاه --- */
.store-card {
  background: linear-gradient(160deg, #fff 10%, #f9f9f9 90%);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.25s ease;
  animation: fadeIn 0.7s ease forwards;
}

.store-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(0,0,0,.18);
}

/* --- هدر فروشگاه --- */
.store-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(230,230,230,0.9);
  padding-bottom: 6px;
}

.store-info h3 {
  font-size: 14px;
  margin: 0;
  font-weight: 600;
}

.store-logo {
  width: 35px;
  height: 35px;
  border-radius: 8px;
  object-fit: cover;
  transition: all 0.3s ease;
}

.store-logo:hover {
  transform: scale(1.05) rotate(-1deg);
}

/* -------- Products Row -------- */

.store-products {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 0;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.store-products::-webkit-scrollbar { display: none; }

/* -------- دکمه مشاهده فروشگاه -------- */
.view-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(120deg, #ff7f24, #ff4d00);
  color: #fff;
  padding: 6px 14px;
  border-radius: 22px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 8px;
  transition: all .25s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  animation: glowPulse 3s infinite;
}

.view-store-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(255,100,30,0.35);
}

.view-store-btn .arrow {
  font-size: 15px;
  transition: transform .25s ease;
}

.view-store-btn:hover .arrow {
  transform: translateX(4px);
}

/* ==================== FULL-WIDTH GLASS STORE HEADER ==================== */

.store-header-full {
  width: 100%;
  max-width: 1400px;     /* هم‌اندازه بنر */
  padding: 28px;

  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);

  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);

  margin: -55px auto 40px auto;   /* روی بنر قرار می‌گیرد */
  box-shadow: 0 10px 35px rgba(0,0,0,0.18);

  display: flex;
  align-items: center;
  gap: 22px;

}

.store-header-full::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.12);
  z-index: -1;
}

/* ==================== CARD: BANNER ==================== */

.store-banner-card {
  width: 98%;
  max-width: 1400px;
  height: 260px;

  margin: 20px auto 25px auto;

  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border-radius: 20px;
  overflow: hidden;

  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);

  animation: fadeIn 0.8s ease forwards;
}

.store-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform .35s ease;
}

.store-banner-card:hover .store-banner-img {
  transform: scale(1.08);
}

/* ==================== CARD: STORE INFO ==================== */

.store-info-card {
  width: 98%;
  max-width: 1400px;

  padding: 25px;

  background: rgba(255,255,255,0.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);

  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);

  margin: 0 auto 40px auto;

  display: flex;
  gap: 20px;
  align-items: center;

  animation: slideUp 0.8s ease forwards;
}

.store-logo-big {
  width: 140px;
  height: 140px;
  border-radius: 18px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.28);
}

.store-info-text h2 {
  font-size: 28px;
  margin: 0 0 10px;
  font-weight: 800;
  color: #000;
}

.store-info-text p {
  margin: 3px 0;
  font-size: 15px;
  line-height: 1.5;
  opacity: 0.85;
}

/* ==================== PRODUCT GRID ==================== */

#storeProductsList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 18px;

  max-width: 1300px;
  margin: 0 auto;
  justify-content: center; 
  justify-items: center;
  animation: fadeIn 0.8s ease forwards;
}

.product-card {
  flex: 0 0 auto;
  width: 110px;
  background: #fff;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  transition: all 0.25s ease;
  animation: fadeIn 0.7s ease forwards;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,.15);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 8px;
  transition: transform .3s ease, box-shadow .3s ease;
}

.product-card:hover img {
  transform: scale(1.07);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.product-card p {
  font-size: 12px;
  margin: 3px 0 2px;
  line-height: 1.2;
  font-weight: 500;
}

.product-card span {
  font-size: 12px;
  font-weight: bold;
  color: #2e7d32;
  display: block;
  margin-top: 2px;
  text-shadow: 0 0 2px rgba(46,125,50,0.15);
}

/* کانتینر کلی محصولات فروشنده */
#vendorProducts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  padding: 16px 0;
}

/* هر کارت محصول */
.productCard {
  display: grid;
  grid-template-columns: 80px 1fr;
  grid-template-rows: auto auto auto auto;
  grid-template-areas:
    "image title"
    "image price"
    "image stock"
    "actions actions";

  column-gap: 12px;
  row-gap: 6px;

  padding: 12px;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  border: 1px solid #f0f0f0;

  font-family: inherit;
  direction: rtl;
  transition: background .25s, border-color .25s, color .25s;
}

/* تصویر */
.productCard img {
  grid-area: image;
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

/* عنوان */
.productCard h3 {
  grid-area: title;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

/* متن‌ها */
.productCard p {
  margin: 0;
  font-size: 13px;
  color: #666;
}

/* قیمت */
.productCard p:nth-of-type(1) {
  grid-area: price;
  margin-top: 4px;
  font-weight: 500;
  color: #1e88e5;
}

/* موجودی */
.productCard p:nth-of-type(2) {
  grid-area: stock;
  margin-top: 2px;
  font-size: 12px;
  color: #777;
}

/* دکمه‌ها */
.productCard .actions {
  grid-area: actions;
  margin-top: 8px;
  display: flex;
  gap: 8px;
  width: 100%;
}

.productCard .actions button {
  flex: 1;
  border: none;
  cursor: pointer;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  transition: background 0.2s, transform 0.1s;
}

/* ویرایش */
.productCard .actions button:first-child {
  background: #e3f2fd;
  color: #1565c0;
}

/* حذف */
.productCard .actions button:last-child {
  background: #ffebee;
  color: #c62828;
}

.productCard .actions button:hover {
  transform: translateY(-1px);
}

.productCard .actions button:first-child:hover {
  background: #bbdefb;
}

.productCard .actions button:last-child:hover {
  background: #ffcdd2;
}

/* ==================== CONTACT + ABOUT SECTIONS ==================== */

#contact p,
#about p {
  text-align: justify;
  line-height: 1.9;
  margin: 12px 0;
  animation: fadeIn 0.8s ease forwards;
}

.section-note {
  margin-top: 18px;
  color: #666;
  font-size: 14px;
}

.contact-item {
  margin: 18px 0;
}

.contact-item .label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  margin-bottom: 4px;
}

.contact-item .value {
  display: block;
  padding-right: 32px;
  font-size: 15px;
}

.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(120deg, #e8f0ff, #f0f4ff);
  color: #2f5cff;
  border-radius: 7px;
  font-size: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform .25s ease;
}

.icon-box:hover {
  transform: rotate(10deg) scale(1.15);
}

/* ========== DARK MODE ========== */

body.dark-mode {
  background: #121212;
  color: #e4e4e4;
}

/* Header */
body.dark-mode .header {
  background: #1e1e1e;
  box-shadow: 0 2px 6px #0006;
}

body.dark-mode .search-dropdown{
  background:#1e1e1e;
  border:1px solid #333;
  box-shadow:0 10px 25px rgba(0,0,0,0.5);
}

body.dark-mode .search-section{
  background:#2a2a2a;
  color:#ccc;
  border-top:1px solid #333;
}

body.dark-mode .search-item{
  border-bottom:1px solid #333;
}

body.dark-mode .search-item:hover{
  background:#2f2f2f;
}

body.dark-mode .search-item.active{
  background:#3a3f55;
}

body.dark-mode .search-title{
  color:#eee;
}

body.dark-mode .search-price{
  color:#9ccc65;
}

/* Toast default in dark mode */
body.dark-mode #toast:not(.success):not(.error):not(.warning) {
  background: #000;
  color: #fff;
}

/* Navbar */
body.dark-mode .navbar {
  background: #1e1e1e;
  border-bottom: 1px solid #333;
}

body.dark-mode .navbar button {
  color: #ddd;
}

/* Search */
body.dark-mode .search-box input {
  background: #2a2a2a;
  border: 1px solid #444;
  color: #fff;
}

/* Cards */
body.dark-mode .product,
body.dark-mode .card {
  background: #1e1e1e;
  box-shadow: 0 3px 10px #0006;
}

body.dark-mode .product-title {
  color: #eee;
}

/* Price */
body.dark-mode .price {
  color: #4caf50;
}

/* Mini Cart */
body.dark-mode .mini-cart {
  background: #1e1e1e;
  color: #fff;
}

/* Buttons */
body.dark-mode button {
  color: #fff;
}

body.dark-mode .card button,
body.dark-mode .checkout-btn,
body.dark-mode .add-cart-btn {
  background: #4caf50;
}

/* Inputs */
body.dark-mode input {
  background: #2a2a2a;
  border: 1px solid #444;
  color: #fff;
}

/* Bottom Navigation (dark) */
body.dark-mode .bottom-nav {
  background: #1e1e1e;
  box-shadow: 0 -2px 6px #0006;
}

body.dark-mode .bottom-nav button {
  color: #ddd;
}

body.dark-mode .store-card,
body.dark-mode .product-card,
body.dark-mode #productPage {
  background: #1e1e1e;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  border-color: #333;
}

body.dark-mode .store-info-text h2 {
  color: #fff;
}

body.dark-mode .store-title,
body.dark-mode .store-city,
body.dark-mode .store-desc,
body.dark-mode #productTitle,
body.dark-mode #productDesc {
  color: #e4e4e4;
}

body.dark-mode #productPrice {
  color: #4caf50;
}

body.dark-mode .product-card p {
  color: #ccc;
}

body.dark-mode #productImage {
  border: 1px solid #333;
}

body.dark-mode .buy-btn {
  background: #4caf50;
}
body.dark-mode .productCard {
  background: #1e1e1e;
  border-color: #2a2a2a;
  box-shadow: none;
}

body.dark-mode .productCard h3 {
  color: #eaeaea;
}

body.dark-mode .productCard p {
  color: #cccccc;
}

body.dark-mode .productCard p:nth-of-type(1) {
  color: #64b5f6;
}

body.dark-mode .productCard p:nth-of-type(2) {
  color: #b0b0b0;
}

body.dark-mode .productCard .actions button:first-child {
  background: #0d47a1;
  color: #e3f2fd;
}

body.dark-mode .productCard .actions button:first-child:hover {
  background: #1565c0;
}

body.dark-mode .productCard .actions button:last-child {
  background: #b71c1c;
  color: #ffebee;
}

body.dark-mode .productCard .actions button:last-child:hover {
  background: #d32f2f;
}

/* ================== RESPONSIVE ================== */

@media (max-width: 768px){

  .search-box{
    width:100%;
  }

  .search-item{
    padding:12px;
  }

  .search-item img{
    width:36px;
    height:36px;
  }

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

  .singleProduct{
    flex-direction:column;
    padding:15px;
  }

  .productTitle{
    font-size:20px;
  }

  .productPrice{
    font-size:20px;
  }

  .productMainImage{
    border-radius:10px;
  }

.hero-slider{
  height:170px;
}

.store-banner-card {
  height: 170px;
}

.store-info-card {
  width: 98%;

}

.store-logo-big {
  width: 100px;
  height: 100px;
}

.store-info-text h2 {
  font-size: 17px;
}

.store-info-text p {
  font-size: 12px;
}

.productCard {
  grid-template-columns: 1fr;
  grid-template-areas:
    "image"
    "title"
    "price"
    "stock"
    "actions";
  text-align: right;
}

.productCard img {
  margin-bottom: 8px;
}

}

/*
  .slider-btn{
    width:34px;
    height:34px;
    font-size:16px;
  }

  .store-card{
    padding:8px;
  }

  .store-header{
    margin-bottom:6px;
  }

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

  .store-city{
    font-size:11px;
  }

  .product-card{
    min-width:70px;
    width:70px;
    padding:4px;
  }

  .product-card img{
    width:70px;
    height:70px;
    border-radius:5px;
  }

  .product-card p{
    font-size:10px;
    line-height:1.1;
    margin:3px 0;
  }

  .product-card span{
    font-size:10px;
  }

  #storesList,
  #productsGrid{
    gap:8px;
  }

  #productPage{
    padding:12px;
  }

  #productImage{
    height:170px;
  }

  #productTitle{
    font-size:16px;
  }

  #productPrice{
    font-size:14px;
  }

  .buy-btn{
    font-size:13px;
    padding:7px 14px;
  }

*/