/* =========================================
   تعریف فونت ایران‌سنس (IRANSansX)
   ========================================= */

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/iransansx/woff2/IRANSansX-Regular.woff2') format('woff2'),
         url('../fonts/iransansx/woff/IRANSansX-Regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'IRANSansX';
    src: url('../fonts/iransansx/woff2/IRANSansX-Bold.woff2') format('woff2'),
         url('../fonts/iransansx/woff/IRANSansX-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* اعمال فونت روی کل بدنه سایت */
body {
    font-family: 'IRANSansX', Tahoma, sans-serif;
}

/* تنظیمات پایه */
:root {
    --primary-red: #d90429;
    --light-red: #ef233c;
    --white: #ffffff;
    --bg-light: #f8f9fa;
    --text-dark: #2b2d42;
    --text-gray: #8d99ae;
    --border-color: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}



a {
    text-decoration: none;
    color: inherit;
}

/* کلاس‌های عمومی */
.btn {
    padding: 12px 30px;
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    background-color: var(--light-red);
}

.section-container {
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 20px;
    width: 100%;
}

.section-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-red);
    margin: 10px auto 0;
}

/* =========================================
   استایل‌های هدر (Header)
   ========================================= */
.main-header {
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 9999; /* <--- تغییر مهم: عدد لایه بسیار بالا رفت */
    padding: 5px 0 0 0; 
    transition: all 0.4s ease;
}

/* کانتینر جدید برای محدود کردن عرض هدر (دقیقا هم عرض بخش محصولات) */
.header-container {
    width: 85%;
    margin: 0 auto; /* این دستور باعث می‌شود فاصله ۵ درصدی خالی، به طور مساوی در راست و چپ تقسیم شود */
}
/* بخش بالای هدر */
.header-top {
    display: flex;
    justify-content: space-between; /* لوگو و آیکون‌ها کاملا از هم دور می‌شوند */
    align-items: center;
    padding-bottom: 8px; /* پدینگ پایین بسیار کم شد */
    border-bottom: 1px solid var(--bg-light);
}

.logo-img {
    height: 45px; /* ارتفاع لوگو کوچکتر برای ظرافت بیشتر */
    max-width: 200px;
    object-fit: contain;
}
/* بخش پایین هدر (منوها) */
.header-bottom {
    padding: 8px 0; 
    display: flex;
    justify-content: flex-start; /* اگر قبلا center گذاشته بودید، همان center بنویسید */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
    max-height: 50px;
    transform: translateY(0);
    overflow: visible; /* <--- تغییر مهم: از hidden به visible تغییر کرد تا منو قیچی نشود */
}

/* === کلاسی که جاوا اسکریپت موقع اسکرول به پایین اضافه می‌کند === */
.main-header.hide-nav-bar .header-bottom {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    transform: translateY(-5px);
    visibility: hidden; /* <--- اضافه شد تا هنگام جمع شدن، لینک‌ها نامرئی شوند */
    overflow: hidden; /* فقط در حالت جمع شده، بیرون‌زدگی را مخفی می‌کند */
}
/* ========================================================= */

.nav-links {
    display: flex;
    gap: 35px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px; /* سایز فونت منو کمی ظریف‌تر شد */
    transition: color 0.3s;
    padding-bottom: 5px;
}

.nav-links a:hover, .active-link {
    color: var(--primary-red);
}

/* تنظیمات کانتینر سمت چپ هدر */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* استایل کادر ورود و ثبت‌نام */
.auth-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px; /* پدینگ دکمه ورود کمتر شد */
    border: 1px solid #333;
    border-radius: 6px;
    color: #333 !important;
    text-decoration: none;
    font-size: 13px; /* فونت کمی ظریف‌تر */
    font-weight: 500;
    background-color: transparent;
    transition: all 0.3s ease;
}

.auth-btn:hover {
    background-color: #f5f5f5;
    border-color: #000;
    color: #000 !important;
}

/* استایل آیکون سبد خرید */
.cart-btn {
    position: relative;
    color: var(--text-dark);
    font-size: 22px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.cart-btn:hover {
    color: var(--primary-red);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--primary-red);
    color: var(--white);
    font-size: 11px;
    width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-weight: bold;
    border: 2px solid var(--white);
}

/* تنظیم آیکون‌ها */
.custom-icon {
    width: 18px; /* آیکون‌ها کمی کوچکتر شدند */
    height: 18px;
    vertical-align: middle;
}

/* =========================================
   منوی کشویی (Dropdown Hover)
   ========================================= */
.dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    min-width: 220px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    border: 1px solid var(--bg-light);
    
    /* افکت مخفی بودن در حالت عادی */
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease;
    
    list-style: none;
    padding: 10px 0;
    z-index: 1001;
}

/* وقتی موس روی آیتم والد میرود */
.dropdown-parent:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li {
    width: 100%;
}

.dropdown li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-gray);
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #fcfcfc;
    transition: all 0.2s ease;
}

.dropdown li:last-child a {
    border-bottom: none;
}

/* افکت هاور روی زیرمنوها */
.dropdown li a:hover {
    background: var(--bg-light);
    color: var(--primary-red);
    padding-right: 28px; /* یک افکت زیبای حرکت به سمت چپ موقع هاور */
}

/* اسلایدر صفحه اصلی */
.slider-container {
    position: relative;
    width: 100%; /* چسبیدن کامل به لبه‌های چپ و راست صفحه */
    height: 390px; /* کاهش 22 درصدی سایز عمودی (ارتفاع) */
    margin: 0 auto 50px auto; /* بدون حاشیه کناری، فقط فاصله از پایین برای محتوای بعدی */
    overflow: hidden;
    background-color: var(--text-dark);
    
    border-radius: 0; /* لبه‌های کاملاً تیز برای دسکتاپ */
    box-shadow: none; /* بدون سایه در دسکتاپ */
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
}

.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 1;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    color: var(--white);
}

.slide-content h2 {
    font-size: 48px;
    margin-bottom: 15px;
}

.slide-content p {
    font-size: 18px;
    margin-bottom: 25px;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 3;
    transition: background 0.3s;
}

.slider-btn:hover {
    background: var(--primary-red);
}

.prev-btn { right: 20px; }
.next-btn { left: 20px; }

/* کارت دسته‌بندی‌ها */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px; /* فاصله بین کارت‌ها کمی بیشتر شد */
}

.category-card {
    background-color: var(--white);
    padding: 40px 20px; /* پدینگ بالا و پایین بیشتر شد تا قد کارت بلندتر و جادارتر شود */
    text-align: center;
    border-radius: 12px; /* گوشه‌ها کمی گردتر و مدرن‌تر */
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.category-card:hover {
    transform: translateY(-8px); /* در هاور کمی بیشتر بالا می‌آید */
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); /* سایه جذاب‌تر در حالت هاور */
    border-bottom: 3px solid var(--primary-red);
}

.category-card img {
    width: 110px; /* سایز عکس‌ها بزرگ‌تر شد تا چشمگیرتر شود */
    height: 110px;
    object-fit: contain;
    margin-bottom: 20px;
}

.category-card h4 {
    font-size: 20px; /* فونت عنوان دسته‌بندی درشت‌تر و خواناتر شد */
    font-weight: bold;
    color: var(--text-dark);
    margin: 0;
}

/* کارت محصولات */
.products-grid {
    display: grid;
    /* عرض پایه کارت‌ها رو کمی کمتر کردم (از 250 به 220) */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px; /* فاصله بینشون هم یه کوچولو جمع‌وجورتر شد */
}

.product-card {
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    text-align: center;
    padding-bottom: 15px; /* فضای خالی پایین کارت کمتر شد */
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.product-img {
    width: 100%;
    height: 200px;
    background-color: #ffffff; /* پس‌زمینه سفید برای اینکه عکس‌ها زیباتر دیده شوند */
    object-fit: contain; /* این خط باعث می‌شود عکس کامل در کادر جا شود و برش نخورد */
    padding: 15px; /* کمی فاصله از لبه‌ها به عکس دادیم تا به کادر نچسبد */
}


.product-title {
    font-size: 14px;
    margin: 12px 0 5px;
    padding: 0 10px;
    
    /* محدود کردن به 2 خط */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;line-height: 1.4;
    min-height: 40px;
}


.product-price {
    color: var(--primary-red);
    font-weight: bold;
    font-size: 14px; /* سایز فونت قیمت رو از 16 به 14 کاهش دادم */
    margin-bottom: 15px;
}

.product-card .btn {
    margin: auto auto 0 auto;
    width: 80%;
    padding: 8px 20px; /* دکمه افزودن به سبد رو هم ظریف‌تر کردم */
    font-size: 14px;
}


/* فوتر (Footer) */
footer {
    background-color: var(--text-dark);
    color: var(--white);
    text-align: center;
    padding: 30px 20px;
    margin-top: auto; /* برای چسبیدن به پایین صفحه */
}

footer p {
    color: var(--text-gray);
    margin-top: 10px;
}

/* تنظیمات آیکون فلش */
.dropdown-icon {
    margin-right: 5px;
    vertical-align: middle;
    transition: all 0.3s ease; /* انیمیشن نرم */
}

/* اگر هاور شد، رنگ لینک عوض شود (کد رنگ قرمز خودتان را اینجا بگذارید) */
.nav-link:hover {
    color: #e60000; /* مثلا این رنگ قرمز */
}

/* وقتی ماوس روی آیتم محصولات می‌رود، فلش هم بچرخد (اختیاری برای زیبایی بیشتر) */
li:hover .dropdown-icon {
    transform: rotate(180deg); 
}

/* =========================================
   صفحه ورود و ثبت‌نام (Login / Register)
   ========================================= */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 40px 20px;
    background-color: var(--bg-light);
}

.auth-card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    width: 100%;
    max-width: 450px;
    text-align: center;
}

.auth-card h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.auth-card p.subtitle {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: right; /* راست‌چین برای لیبل‌ها */
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: bold;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    outline: none;
    background-color: #fafafa;
}

.form-control:focus {
    border-color: var(--primary-red);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.1);
}

/* کلاس کمکی برای فیلدهایی مثل ایمیل و موبایل که باید چپ‌چین باشند */
.ltr-input {
    direction: ltr;
    text-align: left;
    font-family: Tahoma, sans-serif;
}

.ltr-input::placeholder {
    text-align: right;
    font-family: 'IRANSansX', Tahoma, sans-serif;
}

.btn-full {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
}

.auth-links {
    margin-top: 20px;
    font-size: 13px;
}

.auth-links a {
    color: var(--primary-red);
    font-weight: bold;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* مدیریت مراحل (Steps) فرم */
.auth-step {
    display: none; /* در حالت عادی مخفی هستند */
}

.auth-step.active {
    display: block; /* فقط مرحله فعال نمایش داده میشود */
    animation: fadeInStep 0.4s ease forwards;
}

@keyframes fadeInStep {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}


.cart-wrapper {
    max-width: 1550px;
    margin: 40px auto;
    padding: 0 20px;
    min-height: 60vh;
}

.cart-title {
    font-size: 24px;
    color: var(--text-dark);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-red);
    padding-bottom: 10px;
    display: inline-block;
}

.cart-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    align-items: flex-start;
}

/* بخش لیست محصولات */
.cart-items-section {
    flex: 1 1 58%;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    padding: 30px;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 15px;
}

.cart-item:last-child {
    border-bottom: none;
}

.item-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 2;
}

.item-info img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--bg-light);
    padding: 5px;
}

.item-details h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.item-details .item-price {
    font-size: 14px;
    color: var(--text-gray);
}

/* کنترل تعداد */
.quantity-control {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.quantity-btn {
    background: none;
    border: none;
    width: 35px;
    height: 35px;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-dark);
    transition: 0.2s;
}

.quantity-btn:hover {
    background: var(--border-color);
}

.quantity-input {
    width: 40px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: bold;
    pointer-events: none; /* جلوگیری از تایپ دستی برای سادگی */
}

/* قیمت کل هر ردیف و دکمه حذف */
.item-total-price {
    flex: 1;
    text-align: left;
    font-weight: bold;
    color: var(--text-dark);
}

.remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.remove-btn svg {
    width: 20px;
    height: 20px;
    fill: #ff4d4f;
    transition: 0.3s;
}

.remove-btn:hover svg {
    fill: #cf1322;
    transform: scale(1.1);
}

/* بخش خلاصه سفارش */
.cart-summary-section {
    flex: 1 1 42%;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    padding: 30px;
    position: sticky;
    top: 20px;
}

.summary-title {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 15px;
    color: var(--text-gray);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
    font-size: 18px;
    font-weight: bold;
    color: var(--text-dark);
}

.checkout-btn {
    display: block;
    width: 100%;
    background: var(--primary-red);
    color: var(--white);
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    margin-top: 25px;
    font-weight: bold;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.checkout-btn:hover {
    background: #b00320; /* رنگ تیره‌تر برای هاور */
}

.empty-cart-msg {
    text-align: center;
    padding: 50px 20px;
    display: none; /* در حالت پیش‌فرض مخفی است */
}

.empty-cart-msg h3 {
    margin-bottom: 15px;
    color: var(--text-gray);
}

/* واکنش‌گرایی (موبایل) */
@media (max-width: 768px) {

  /* کادرها زیر هم بیان */
  .cart-container {
    flex-wrap: wrap;
  }

  .cart-items-section,
  .cart-summary-section {
    flex: 1 1 100%;
    padding: 20px;
  }

  /* آیتم‌های سبد خرید */
  .cart-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .item-info {
    width: 100%;
  }

  /* کنترل تعداد وسط‌چین */
  .quantity-control {
    align-self: flex-start;
  }

  /* قیمت نهایی هر محصول */
  .item-total-price {
    width: 100%;
    text-align: right;
    margin-top: 5px;
    font-size: 15px;
  }

  /* دکمه حذف کوچکتر */
  .remove-btn {
    align-self: flex-end;
  }

}

/* =========================================
   استایل‌های اختصاصی صفحه تسویه حساب (Checkout)
   ========================================= */

/* تنظیم آیکون‌های هدر برای اطمینان از سایز مناسب */
.custom-icon {
    width: 20px;
    height: 20px;
    vertical-align: middle;
}

/* === کدهای اضافه شده برای هم‌ارتفاع شدن کادرها === */
.cart-container {
    align-items: stretch !important; /* کشیدن کادرها برای هم‌ارتفاع شدن */
}

.cart-summary-section {
    display: flex;
    flex-direction: column;
}

.checkout-btn {
    margin-top: auto; /* هول دادن دکمه به پایین کادر خلاصه سفارش */
}
/* ================================================= */

/* گریدبندی دو ستونه برای فرم اطلاعات */
.checkout-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 25px;
    margin-top: 20px;
}

.checkout-form-grid .form-group {
    margin-bottom: 0;
}

/* فیلدهایی که کل عرض را می‌گیرند (مثل آدرس) */
.checkout-form-grid .full-width {
    grid-column: 1 / -1;
}

/* بخش انتخاب روش‌های پرداخت */
.payment-methods {
    margin-top: 30px;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

.payment-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-option:hover {
    background-color: var(--bg-light);
    border-color: #cdd4df;
}

.payment-option input[type="radio"] {
    margin-left: 12px;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-red);
}

/* پررنگ شدن و تغییر رنگ کادر هنگام انتخاب روش پرداخت */
.payment-option input[type="radio"]:checked + span {
    font-weight: bold;
    color: var(--text-dark);
}

.payment-option:has(input:checked) {
    border-color: var(--primary-red);
    background-color: rgba(217, 4, 41, 0.05);
}


/* =========================================
   استایل‌های صفحه تماس با ما (Contact Us)
   ========================================= */

.contact-page {
    margin: 50px auto;
    padding: 0 15px;
    max-width: 1200px;
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-title {
    font-size: 32px;
    color: var(--text-dark, #333);
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 16px;
    color: #666;
}

/* ساختار گرید برای دسکتاپ (دو ستون) */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* فرم بزرگتر، اطلاعات کوچکتر */
    gap: 40px;
    align-items: flex-start;
}

/* --- بخش اطلاعات و کارت‌ها --- */
.info-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid var(--border-color, #eee);
}

.info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #fff0f0; /* پس زمینه کم رنگ قرمز برای آیکون */
    color: var(--primary-red, #d90429);
    border-radius: 12px;
    flex-shrink: 0;
}

.info-text h3 {
    font-size: 16px;
    color: var(--text-dark, #333);
    margin-bottom: 5px;
}

.info-text p {
    font-size: 14px;
    color: #555;
    margin: 0;
    line-height: 1.6;
}

.map-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid var(--border-color, #eee);
}

/* --- بخش فرم --- */
.contact-form-section {
    background: #fff;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color, #eee);
}

.contact-form-section h2 {
    margin-bottom: 30px;
    font-size: 22px;
    color: var(--text-dark, #333);
    border-bottom: 2px solid var(--bg-light, #f5f5f5);
    padding-bottom: 15px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 14px;
    color: #444;
    font-weight: bold;
}

.input-group .required {
    color: var(--primary-red, #d90429);
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 12px;
    font-family: inherit; /* ارث بری فونت سایت */
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fafafa;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--primary-red, #d90429);
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.1); /* هاله محو قرمز دور کادر */
}

.submit-btn {
    background: var(--primary-red, #d90429);
    color: #fff;
    border: none;
    padding: 16px;
    font-size: 16px;
    font-weight: bold;
    font-family: inherit;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    background: #b90323; /* کمی تیره‌تر در حالت هاور */
}

/* =========================================
   مدیا کوئری برای موبایل و تبلت
   ========================================= */
@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr; /* زیر هم رفتن ستون‌ها در تبلت */
    }
    
    /* تغییر جایگاه: فرم بیاید بالای اطلاعات تماس در موبایل */
    .contact-form-section {
        order: -1; 
    }
}

@media (max-width: 768px) {
    .contact-form-section {
        padding: 25px 20px;
    }

    .form-row {
        grid-template-columns: 1fr; /* فیلدهای نام و موبایل زیر هم در گوشی */
    }

    .page-title {
        font-size: 26px;
    }
}

/* =========================================
   استایل‌های جدید صفحه جزئیات محصول (Product Detail 3-Column)
   ========================================= */

.product-detail-page {
    margin: 30px auto 60px;
    padding: 0 15px;
    max-width: 1300px;
}

.breadcrumb {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 25px;
}
.breadcrumb a { color: var(--text-gray); transition: 0.3s; }
.breadcrumb a:hover { color: var(--primary-red); }
.breadcrumb .separator { margin: 0 10px; color: #ccc; }

/* ساختار ۳ ستونه */
/* ساختار ۳ ستونه - اصلاح شده */
.product-top-grid {
    display: grid;
    /* به جای درصد از fr استفاده می‌کنیم تا gap باعث بیرون زدگی نشود */
    grid-template-columns: 3fr 4.5fr 2.5fr; 
    gap: 20px;
    margin-bottom: 40px;
    align-items: start;
}

/* ستون راست: گالری */
.col-gallery {
    background: var(--white);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.main-image-box {
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}
.main-image-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.thumbnails { display: flex; gap: 10px; }
.thumb {
    width: 70px; height: 70px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: 0.3s;
    object-fit: contain;
    background: #fff;
}
.thumb.active, .thumb:hover {
    border-color: var(--primary-red);
    opacity: 1;
}

/* ستون وسط: اطلاعات */
.col-info { padding: 10px 0; }
.product-title {
    font-size: 22px;
    margin-bottom: 15px;
    color: var(--text-dark);
}
.product-meta { color: var(--text-gray); font-size: 14px; margin-bottom: 25px; }
.product-attributes ul { list-style: none; padding-right: 15px; margin-top: 10px; }
.product-attributes li {
    position: relative;
    margin-bottom: 8px;
    color: #555;
    font-size: 15px;
}
.product-attributes li::before {
    content: "•"; color: var(--text-gray);
    position: absolute; right: -15px;
}

/* انتخاب رنگ */
.color-selector { margin-top: 30px; }
.colors { display: flex; gap: 10px; margin-top: 10px; }
.color-btn {
    width: 35px; height: 35px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
    position: relative;
}
.color-btn.active { border-color: var(--primary-red); }
.color-btn.active::after {
    content: "✓"; position: absolute;
    color: white; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
}

/* ستون چپ: باکس خرید */
.col-buy {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.col-buy > div {
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--bg-light);
    font-size: 14px;
    color: #444;
}
.price-section { border-bottom: none !important; margin-top: 10px; }
.price-amount { font-size: 26px; font-weight: bold; color: var(--text-dark); }
.price-currency { font-size: 14px; color: var(--text-gray); }

/* دکمه سبد خرید و کنترلر تعداد */
.cart-action-wrapper { min-height: 50px; margin-top: 20px; }
.quantity-control-box {
    display: none; /* مخفی در حالت عادی */
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--primary-red);
    border-radius: 8px;
    overflow: hidden;
    height: 48px;
}
.quantity-control-box.active { display: flex; } /* وقتی فعال شد */
.qty-btn {
    width: 48px; height: 100%;
    background: #fff; border: none;
    color: var(--primary-red);
    font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.qty-btn:hover { background: #fff0f2; }
.qty-number {
    flex: 1; text-align: center;
    font-size: 18px; font-weight: bold; color: var(--primary-red);
}

/* تب‌ها */
.product-tabs-section {
    background: var(--white);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    margin-top: 20px;
}
.tabs-header {
    display: flex; gap: 30px;
    border-bottom: 1px solid var(--border-color);
    padding: 0 30px;
    background: #fdfdfd; border-radius: 12px 12px 0 0;
}
.tab-btn {
    padding: 20px 0; border: none; background: none;
    font-size: 16px; font-weight: bold; color: var(--text-gray);
    cursor: pointer; position: relative;
}
.tab-btn.active { color: var(--primary-red); }
.tab-btn.active::after {
    content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
    height: 3px; background-color: var(--primary-red);
}
.tabs-content-container { padding: 30px; min-height: 250px; } /* ارتفاع ثابت برای جلوگیری از پرش */
.tab-pane { display: none; animation: fadeIn 0.3s; line-height: 1.8; color: #555;}
.tab-pane.active { display: block; }
.tab-pane ul { padding-right: 20px; margin-top: 15px;}

@media (max-width: 992px) {
    .product-top-grid { grid-template-columns: 1fr; }
    .col-gallery { max-width: 500px; margin: 0 auto; width: 100%; }
}

/* تنظیمات برای سایز تبلت و لپ‌تاپ‌های کوچک (992px و کمتر) */
/* در این سایز، فقط کادرهای اصلی زیر هم می‌آیند */
@media (max-width: 992px) {
    .cart-container {
        flex-direction: column !important;
    }
    
    .cart-items-section,
    .cart-summary-section {
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }

    .cart-summary-section {
        position: static !important;
        margin-top: 20px;
    }
}

/* واکنش‌گرایی فقط برای موبایل (768px و کمتر) */
/* در این سایز، فیلدهای فرم (مثل نام و نام خانوادگی) هم زیر هم قرار می‌گیرند */
@media (max-width: 768px) {
    .checkout-form-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- END: کدهای جدید برای تبلت و موبایل ---- */
/* =========================================
   زیباسازی و واکنش‌گرایی هدر برای تبلت و موبایل
   ========================================= */

/* تنظیمات برای تبلت (992px و کمتر) */
@media (max-width: 992px) {
    .header-container {
        width: 95%; /* استفاده از فضای بیشتر در تبلت */
    }

    .nav-links {
        gap: 20px; /* کاهش فاصله بین منوها */
        justify-content: center; /* وسط چین کردن منوها */
    }
    
    .nav-links a {
        font-size: 13px; /* کمی کوچکتر شدن فونت منو */
    }
}

/* =========================================
   کدهای منوی کشویی موبایل (همبرگری)
   ========================================= */

/* مخفی کردن دکمه منو در کامپیوتر */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
    padding: 0px;
    margin-left: 0px; /* فاصله از دکمه ورود */
}

/* تنظیمات اختصاصی هدر برای موبایل (768px و کمتر) */
@media (max-width: 768px) {
    .header-container {
        width: 100%;
        padding: 0 15px;
    }

    .logo-img {
        height: 35px; 
    }

    /* ترفند حفظ شده: مخفی کردن متن ورود برای زیبایی فضای هدر */
    .auth-btn span {
        display: none; 
    }
    .auth-btn {
        padding: 8px;
        border: none; 
        background: var(--bg-light);
        border-radius: 50%; 
    }

    /* === استایل‌های جدید منوی همبرگری === */
    .mobile-menu-btn {
        display: block; /* نمایش دکمه در موبایل */
    }

    .header-bottom {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        max-height: 0; /* در حالت بسته ارتفاع صفر است */
        overflow: hidden; /* مخفی کردن محتوا در حالت بسته */
        transition: max-height 0.4s ease-in-out;
        z-index: 99999;
        padding: 0; /* حذف پدینگ در حالت بسته */
    }

    .header-bottom.active {
        max-height: 500px; /* باز شدن منو */
        border-top: 1px solid var(--border-color);
    }

    .nav-links {
        flex-direction: column; /* زیر هم قرار گرفتن لینک‌ها */
        align-items: flex-start;
        padding: 10px 20px 20px 20px;
        gap: 0;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid var(--bg-light);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        display: block;
        padding: 15px 0; /* دکمه‌های بزرگتر برای لمس راحت‌تر */
        font-size: 15px;
        width: 100%;
    }

    /* تنظیم زیرمنو (محصولات) در داخل منوی موبایل */
    .dropdown {
        position: static;
        box-shadow: none;
        transform: none;
        padding: 0 15px;
        display: none; /* مخفی در حالت عادی */
        border-right: 2px solid var(--primary-red);
        background: #fafafa;
        margin-top: 5px;
        min-width: 100%;
        opacity: 1; /* خنثی کردن کدهای دسکتاپ */
        visibility: visible;
    }

    /* با لمس کردن، زیرمنو باز می‌شود */
    .dropdown-parent:hover .dropdown,
    .dropdown-parent:active .dropdown {
        display: block;
    }
}

/* تنظیمات اختصاصی اسلایدر برای موبایل (استایل اپلی) */
@media (max-width: 768px) {
    .slider-container {
        width: 92%; /* فاصله گرفتن از لبه‌های چپ و راست در موبایل */
        height: 250px; /* تنظیم ارتفاع متناسب با صفحه موبایل */
        margin: 20px auto 40px auto; /* ایجاد حاشیه دور تا دور اسلایدر */
        
        /* استایل‌های الهام گرفته از محصولات اپل (فقط برای موبایل) */
        border-radius: 24px; /* گوشه‌های کرو و مدرن */
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12); /* سایه نرم برای جدا شدن از پس‌زمینه */
        transform: translateZ(0); /* روان‌سازی انحنا در موبایل */
    }
    
    /* تنظیم سایز متن‌ها در موبایل */
    .slide-content h2 {
        font-size: 26px; 
    }
    .slide-content p {
        font-size: 13px;
    }
}

/* ==========================================
   طراحی دکمه افزودن به سبد خرید و حالت موفقیت
   ========================================== */

/* برگرداندن رنگ قرمز و ظاهر زیبای دکمه اصلی */
.add-to-cart-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.add-to-cart-btn:hover {
    background-color: var(--light-red);
}

/* ظاهر کادر موفقیت */
.cart-success-state {
    display: none; 
    width: 100%;
    justify-content: space-between;
    align-items: center;
    background-color: #fbfcfa;
    border: 1px solid #4caf50;
    border-radius: 8px;
    padding: 10px 15px;
    gap: 10px;
}

.cart-success-state.active {
    display: flex;
}

/* بخش متن و لینک */
.success-message {
    display: flex;
    flex-direction: column; /* متن و لینک زیر هم قرار میگیرند تا جا باز شود */
    align-items: flex-start;
    gap: 4px;
}

.success-text {
    color: #2e7b32;
    font-size: 12px;
    font-weight: bold;
}

.view-cart-link {
    color: #19bfd3;
    font-size: 12px;
    font-weight: bold;
    text-decoration: none;
}

.view-cart-link:hover {
    text-decoration: underline;
}

/* کنترلر افقی و منظم (پلاس، عدد، مایناس، سطل زباله) */
.compact-qty-control {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #e0e0e2;
    border-radius: 6px;
    height: 38px;
}

.adjust-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    width: 32px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.adjust-btn:hover {
    background-color: #f0f0f1;
}

.qty-val-text {
    font-size: 15px;
    font-weight: bold;
    color: var(--primary-red);
    min-width: 26px;
    text-align: center;
}

.trash-btn {
    background: none;
    border: none;
    border-right: 1px solid #e0e0e2; /* خط جداکننده سطل زباله */
    cursor: pointer;
    color: var(--primary-red);
    width: 38px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.trash-btn:hover {
    background-color: #fff2f4;
}

/* تنظیمات نسخه موبایل (Sticky) */
@media (max-width: 768px) {
    .cart-success-state {
        flex-direction: row; /* در موبایل هم در یک خط می‌ماند */
        padding: 8px 10px;
    }
    .success-text {
        font-size: 11px;
    }
    .view-cart-link {
        font-size: 11px;
    }
    .adjust-btn, .trash-btn {
        width: 28px;
    }
}

/* ==================================================
   دکمه سبد خرید چسبان مخصوص موبایل (اصلاح شده و تمیز)
   ================================================== */

@media (max-width: 768px) {
    
    /* کل باکس خرید به حالت عادی برمی‌گردد و سر جای خودش در صفحه می‌ماند */
    .col-buy {
        position: static !important;
        box-shadow: none !important;
        display: block !important;
        padding: 20px;
    }

    /* فاصله دادن به پایین صفحه تا دکمه چسبان روی محتوای سایت (مثل فوتر) نیفتد */
    main.container {
        padding-bottom: 80px;
    }

    /* فقط و فقط باکسِ دربرگیرنده‌ی دکمه را به پایین صفحه می‌چسبانیم */
    .cart-action-wrapper {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        background-color: #ffffff; 
        padding: 12px 16px;
        box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.08); 
        z-index: 9999 !important; /* برای اینکه حتما روی همه چیز قرار بگیرد */
        margin: 0 !important; 
        border-top: 1px solid #f0f0f1;
    }

    /* تنظیمات کادر سبز رنگ (پس از کلیک) برای موبایل که در نوار پایین به خوبی جا بگیرد */
    .cart-success-state.active {
        display: flex;
        flex-direction: row; /* در موبایل حتما در یک خط بماند */
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 6px 10px; /* پدینگ کمتر برای موبایل */
    }

    /* کوچک‌تر کردن دکمه‌های مثبت و منفی در حالت موبایل برای زیبایی بیشتر */
    .compact-qty-control {
        height: 34px;
    }
    .adjust-btn, .trash-btn {
        width: 28px;
        font-size: 16px;
    }
    .qty-val-text {
        font-size: 14px;
        min-width: 20px;
    }
}

/* ==========================================
   طراحی فرم ارسال نظر
   ========================================== */
.review-form-container {
    background-color: #fbfcfa;
    border: 1px solid #e0e0e2;
    border-radius: 8px;
    padding: 24px;
    margin-top: 30px;
}

.review-form-title {
    font-size: 16px;
    margin-bottom: 20px;
    color: #333;
    font-weight: bold;
}

.review-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.review-form .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.review-form label {
    font-size: 13px;
    margin-bottom: 8px;
    color: #555;
    font-weight: bold;
}

/* استایل کادرهای ورودی */
.review-form input,
.review-form select,
.review-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    background-color: #fff;
    transition: border-color 0.3s;
}

.review-form input:focus,
.review-form select:focus,
.review-form textarea:focus {
    outline: none;
    border-color: var(--primary-red);
}

/* دکمه ثبت نظر */
.submit-review-btn {
    background-color: var(--primary-red);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 10px;
}

.submit-review-btn:hover {
    background-color: var(--light-red);
}

/* رسپانسیو کردن فرم برای موبایل */
@media (max-width: 768px) {
    .review-form .form-row {
        flex-direction: column; /* در موبایل، نام و امتیاز زیر هم می‌افتند */
        gap: 15px;
    }
    
    .review-form-container {
        padding: 15px;
    }
}

/* =========================================
   Product List Page Styles
========================================= */
.list-layout {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    align-items: flex-start;
}

/* Sidebar Filters */
.sidebar-filters {
    width: 280px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 20px;
}

.filter-widget {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}
.filter-widget:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.filter-list li {
    margin-bottom: 10px;
}
.filter-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
}

/* Price Filter Input */
.price-filter {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.price-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
}
.filter-btn {
    background: var(--primary-red, #e53935);
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: 0.3s;
}
.filter-btn:hover {
    background: #c62828;
}

/* Main Content & Sort Bar */
.main-content {
    flex-grow: 1;
    min-width: 0;
}

.sort-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #fff;
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid #eee;
    margin-bottom: 20px;
}
.sort-title {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #333;
    font-weight: bold;
    font-size: 14px;
}
.sort-options {
    list-style: none;
    display: flex;
    gap: 15px;
    padding: 0;
    margin: 0;
}
.sort-options li {
    font-size: 13px;
    color: #777;
    cursor: pointer;
    transition: 0.2s;
}
.sort-options li:hover,
.sort-options li.active {
    color: var(--primary-red, #e53935);
    font-weight: bold;
}
.mobile-filter-btn {
    display: none; /* فقط در موبایل نمایش داده می‌شود */
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

/* Product Card */
.product-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 15px;
    transition: box-shadow 0.3s ease, transform 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    border-color: #ddd;
}
.product-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.product-img-box {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-img-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.card-title {
    font-size: 14px;
    font-weight: normal;
    color: #333;
    line-height: 1.6;
    margin: 0 0 15px 0;
    flex-grow: 1; /* هماهنگ کردن ارتفاع کارت‌ها */
}
.card-price-row {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    margin-top: auto;
}
.price-amount {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}
.price-currency {
    font-size: 12px;
    color: #777;
}
.old-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
}
.current-price {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Badges (Discount & Out of stock) */
.discount-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--primary-red, #e53935);
    color: #fff;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: bold;
}
.out-of-stock .product-img-box img {
    opacity: 0.5;
    filter: grayscale(100%);
}
.out-stock-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 13px;
    z-index: 2;
}
.out-stock-text {
    font-size: 13px;
    color: #999;
    font-weight: bold;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}
.page-btn {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    color: #555;
    transition: 0.2s;
}
.page-btn:hover:not([disabled]) {
    border-color: #999;
}
.page-btn.active {
    background: var(--primary-red, #e53935);
    color: #fff;
    border-color: var(--primary-red, #e53935);
}
.page-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .sidebar-filters {
        display: none; /* مخفی کردن سایدبار در حالت موبایل (نیاز به دکمه پاپ‌آپ دارد) */
    }
    .mobile-filter-btn {
        display: block;
        margin-right: auto;
    }
    .mobile-filter-btn button {
        background: #f5f5f5;
        border: 1px solid #ddd;
        padding: 8px 15px;
        border-radius: 6px;
        font-family: inherit;
    }
    .sort-options {
        display: none; /* مخفی کردن گزینه‌های مرتب‌سازی طولانی در موبایل */
    }
}
@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 ستونه در موبایل */
        gap: 10px;
    }
    .card-title {
        font-size: 12px;
    }
    .price-amount {
        font-size: 15px;
    }
    .product-card {
        padding: 10px;
    }
}

/* =========================================
   Payment Result Page Styles
========================================= */
.payment-result-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 150px);
    padding: 40px 20px;
}

.result-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

/* Status Icons */
.status-icon-wrapper {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.status-icon {
    width: 80px;
    height: 80px;
}

/* Success State Colors */
.success-state .status-icon.success {
    color: #2e7d32; /* سبز ملایم */
}
.success-state .status-title {
    color: #2e7d32;
}

/* Failed State Colors */
.failed-state .status-icon.failed {
    color: #d32f2f; /* قرمز */
}
.failed-state .status-title {
    color: #d32f2f;
}

.status-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.status-message {
    color: #666;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 30px;
}

/* Order Details Box */
.order-details-box {
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: right;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.detail-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-label {
    color: #777;
    font-size: 14px;
}

.detail-value {
    color: #333;
    font-size: 14px;
    font-weight: bold;
}

.detail-value.highlight {
    color: var(--primary-red, #e53935);
    font-size: 16px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.action-buttons .btn {
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    flex: 1;
    transition: 0.3s;
}

.action-buttons .btn-primary {
    background: var(--primary-red, #e53935);
    color: #fff;
    border: 1px solid var(--primary-red, #e53935);
}
.action-buttons .btn-primary:hover {
    background: #c62828;
}

.action-buttons .btn-secondary {
    background: #fff;
    color: #555;
    border: 1px solid #ddd;
}
.action-buttons .btn-secondary:hover {
    background: #f5f5f5;
    color: #333;
}

/* Responsive */
@media (max-width: 576px) {
    .result-card {
        padding: 30px 20px;
    }
    .action-buttons {
        flex-direction: column;
    }
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
/* =========================================
   User Panel Styles
========================================= */
.bg-gray {
    background-color: #f7f8fa;
}

.user-panel-page {
    padding: 40px 20px;
}

.user-panel-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* Sidebar Styles */
.user-sidebar {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    overflow: hidden;
}

.user-profile-summary {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
    background-color: #fafafa;
}

.user-avatar {
    width: 70px;
    height: 70px;
    background: #e0e0e0;
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
}

.user-avatar svg {
    width: 35px;
    height: 35px;
}

.user-name {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.user-phone {
    font-size: 13px;
    color: #777;
}

.user-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-menu li {
    border-bottom: 1px solid #f5f5f5;
}
.user-menu li:last-child {
    border-bottom: none;
}

.user-menu a {
    display: block;
    padding: 15px 20px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
    border-right: 3px solid transparent;
}

.user-menu a:hover {
    background: #fdfdfd;
    color: var(--primary-red, #e53935);
}

.user-menu a.active {
    color: var(--primary-red, #e53935);
    background: #fff0f0;
    border-right-color: var(--primary-red, #e53935);
    font-weight: bold;
}

.text-danger {
    color: #d32f2f !important;
}

/* Content Area Styles */
.user-content-area {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 30px;
    min-height: 500px;
}

.panel-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.panel-section.active {
    display: block;
}

.section-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.subsection-title {
    font-size: 16px;
    color: #444;
    margin: 30px 0 15px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon.processing { background: #fff3e0; color: #f57c00; }
.stat-icon.delivered { background: #e8f5e9; color: #388e3c; }
.stat-icon.saved { background: #ffebee; color: #d32f2f; }

.stat-data {
    display: flex;
    flex-direction: column;
}

.stat-title {
    font-size: 12px;
    color: #777;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* Orders Table */
.table-responsive {
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    text-align: right;
}

.orders-table th {
    background: #f9f9f9;
    color: #555;
    font-size: 13px;
    font-weight: normal;
    padding: 12px 15px;
    border-bottom: 2px solid #eee;
}

.orders-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
    color: #444;
    vertical-align: middle;
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}
.badge-warning { background: #fff3e0; color: #f57c00; }
.badge-success { background: #e8f5e9; color: #388e3c; }
.badge-danger { background: #ffebee; color: #d32f2f; }

.view-btn {
    color: #2196f3;
    text-decoration: none;
    font-size: 13px;
}
.view-btn:hover { text-decoration: underline; }

/* Edit Profile Form */
.edit-profile-form {
    max-width: 600px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}

.form-control {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: 0.3s;
}

.form-control:focus {
    border-color: var(--primary-red, #e53935);
    outline: none;
}

.form-control:disabled {
    background: #f5f5f5;
    color: #888;
}

/* Responsive */
@media (max-width: 992px) {
    .user-panel-layout {
        grid-template-columns: 1fr;
    }
    
    .user-sidebar {
        display: flex;
        flex-direction: column;
    }
    
    .user-profile-summary {
        display: flex;
        align-items: center;
        gap: 15px;
        text-align: right;
        padding: 20px;
    }
    
    .user-avatar { margin: 0; }
    
    .user-menu {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        border-top: 1px solid #eee;
    }
    
    .user-menu li { border-bottom: none; }
    
    .user-menu a {
        border-right: none;
        border-bottom: 3px solid transparent;
        padding: 15px;
    }
    
    .user-menu a.active {
        border-right-color: transparent;
        border-bottom-color: var(--primary-red, #e53935);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
}

/* ==========================================
   استایل‌های اختصاصی صفحه 404
   ========================================== */
.not-found-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    /* استفاده از رنگ پس‌زمینه اصلی سایت شما */
    background-color: var(--bg-light, #f8f9fa); 
    text-align: center;
    padding: 20px;
}

.not-found-content {
    background: var(--white, #ffffff);
    padding: 50px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    max-width: 500px;
    width: 100%;
}

.icon-404 {
    width: 80px;
    height: 80px;
    /* استفاده از رنگ قرمز اصلی سایت شما */
    stroke: var(--primary-red, #d90429);
    margin-bottom: 20px;
}

.title-404 {
    font-size: 80px;
    font-weight: bold;
    color: var(--primary-red, #d90429);
    margin: 0;
    line-height: 1;
}

.subtitle-404 {
    font-size: 22px;
    color: var(--text-dark, #333333);
    margin: 15px 0;
}

.text-404 {
    font-size: 15px;
    color: #666666;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* هماهنگ شده با دکمه‌های سایت شما */
.btn-back-home {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-red, #d90429);
    color: var(--white, #ffffff);
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn-back-home:hover {
    background-color: var(--light-red, #ef233c);
    color: var(--white, #ffffff);
}
/* ==========================================
   استایل‌های بخش محصولات ویژه (وسط‌چین و داینامیک)
   ========================================== */
.featured-products-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
}

.featured-products-container .product-card {
    min-height: 380px;
    flex: 0 0 calc(20% - 16px);
    max-width: calc(20% - 16px);
    min-width: 200px;
    margin: 0;
    font-size: 13px; /* کوچک‌تر کردن فونت کل کارت */
}

/* کوچک کردن فونت‌های داخل کارت */
.featured-products-container .product-card .product-title {
    font-size: 13px !important;
    line-height: 1.4;
    min-height: 36px;
    max-height: 36px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.featured-products-container .product-card .product-price {
    font-size: 14px !important;
}

.featured-products-container .product-card .btn-add-cart {
    font-size: 12px !important;
    padding: 8px !important;
}

/* لپ‌تاپ معمولی - 4 کارت */
@media (max-width: 1200px) {
    .featured-products-container .product-card {
        flex: 0 0 calc(25% - 15px);
        max-width: calc(25% - 15px);
    }
}

/* تبلت - 3 کارت */
@media (max-width: 992px) {
    .featured-products-container .product-card {
        flex: 0 0 calc(33.333% - 14px);
        max-width: calc(33.333% - 14px);
    }
}

/* موبایل - 1 کارت در هر ردیف */
@media (max-width: 576px) {
    .featured-products-container {
        gap: 12px;
    }
    .featured-products-container .product-card {
        flex: 0 0 100%; /* تک‌تک */
        max-width: 100%;
        min-width: unset;
        min-height: unset; /* ارتفاع آزاد در موبایل */
    }
}

/* تنظیمات اختصاصی موبایل و تبلت برای صفحه جزئیات محصول */
@media (max-width: 992px) {
    
    /* ۱. کوچک کردن عکس محصول در موبایل */
    .col-gallery .main-image-box img {
        max-height: 280px; /* می‌توانید این عدد را بسته به سلیقه خود تغییر دهید */
        width: 100%;
        object-fit: contain;
    }

    /* ۲. فعال‌سازی فلکس برای ستون اطلاعات جهت تغییر چیدمان */
    .col-info {
        display: flex;
        flex-direction: column;
    }

    /* ۳. ساخت کادر جذاب برای انتخاب رنگ و انتقال آن به زیر عکس */
    .color-selector {
        order: -1; /* این دستور جادویی، بخش رنگ را به بالاترین قسمت ستون یعنی دقیقاً زیر گالری می‌فرستد */
        background-color: #fdfdfd; /* رنگ پس‌زمینه کادر */
        padding: 15px 20px;
        border-radius: 12px;
        border: 1px solid #ececec;
        margin-top: 5px;
        margin-bottom: 25px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03); /* یک سایه بسیار نرم و شیک */
    }

    /* تنظیم فاصله‌ها در کادر رنگ برای موبایل */
    .color-selector h3 {
        margin-top: 0;
        margin-bottom: 12px;
        font-size: 15px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .colors {
        margin-top: 0;
        justify-content: flex-start; /* رنگ‌ها را از سمت راست مرتب می‌کند */
    }
}

/* =========================================
   اصلاحات صفحه تماس با ما (دسکتاپ و موبایل)
   ========================================= */

/* ۱. حل مشکل کوچک شدن و بهم ریختگی فیلدها در دسکتاپ */
.contact-form .form-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; /* اجبار به دو ستونه بودن در دسکتاپ */
    gap: 20px;
    width: 100%;
}

/* در موبایل فیلدها زیر هم قرار بگیرند */
@media (max-width: 768px) {
    .contact-form .form-row {
        grid-template-columns: 1fr !important;
    }
}

/* ۲. حل مشکل جابجایی فرم و اطلاعات در موبایل و تبلت */
@media (max-width: 992px) {
    .contact-wrapper {
        display: flex;
        flex-direction: column;
    }
    
    /* بازگرداندن اطلاعات تماس به بالا */
    .contact-info-section {
        order: 1;
    }
    
    /* خنثی کردن order: -1 قبلی و انتقال فرم به پایین */
    .contact-form-section {
        order: 2 !important;
        margin-top: 20px; /* ایجاد یک فاصله مناسب با اطلاعات تماس */
    }
}

/* شک دارم*/
/* =========================================
   اصلاحات نهایی ریسپانسیو صفحه تماس با ما
   ========================================= */

/* دسکتاپ: تنظیم تناسب عرض فرم و اطلاعات */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* فرم کمی عریض‌تر از اطلاعات تماس */
    gap: 40px;
    align-items: start;
}

/* حل مشکل فیلدهای کنار هم در دسکتاپ */
.contact-form .form-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px;
    width: 100%;
}

/* --- تنظیمات تبلت و موبایل --- */
@media (max-width: 992px) {
    /* تغییر گرید به ستون‌های زیر هم در موبایل */
    .contact-wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 30px;
    }
    
    /* اولویت اول: نمایش اطلاعات تماس */
    .contact-info-section {
        order: 1 !important;
    }
    
    /* اولویت دوم: نمایش فرم در پایین اطلاعات */
    .contact-form-section {
        order: 2 !important;
        margin-top: 0;
    }
}

/* در سایز موبایل‌های کوچکتر فیلدهای ردیف اول فرم هم زیر هم بروند */
@media (max-width: 768px) {
    .contact-form .form-row {
        grid-template-columns: 1fr !important;
    }
    
    .contact-section.section-padding {
        padding: 40px 0; /* کاهش پدینگ کلی در موبایل برای زیبایی بیشتر */
    }
}

.product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    padding-bottom: 15px; /* فضای خالی برای دکمه */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
}

/* دکمه افزودن به سبد خرید درون کارت */
.card-add-cart-btn {
    width: calc(100% - 30px);
    margin: 10px auto 0;
    padding: 10px;
    background-color: #ff4757; /* رنگ قرمز اصلی سایت */
    color: white;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 2;
}

/* انیمیشن هاور دکمه */
.card-add-cart-btn:hover {
    background-color: #ff6b81;
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.4);
}

/* انیمیشن آیکون هنگام هاور */
.card-add-cart-btn svg {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.card-add-cart-btn:hover svg {
    transform: translateX(-4px) scale(1.1);
}

/* انیمیشن کلیک (فشرده شدن) */
.card-add-cart-btn:active {
    transform: scale(0.95);
}

/* حالت موفقیت (افزوده شد) */
.card-add-cart-btn.added {
    background-color: #2ecc71 !important;
    box-shadow: 0 5px 15px rgba(46, 204, 113, 0.4) !important;
    pointer-events: none;
}

/* استایل برای کارت‌های ناموجود */
.product-card.out-of-stock .card-add-cart-btn {
    background-color: #e0e0e0;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
}
.product-card.out-of-stock .card-add-cart-btn:hover {
    transform: none;
}

/* برای اینکه لینک محصول، دکمه را پوشش ندهد */
.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
    flex-grow: 1;
}

/* =========================================
   استایل‌های صفحه درباره ما (About Us)
   ========================================= */

.about-page {
    padding-bottom: 60px;
}

/* بنر عنوان صفحه */
.about-hero {
    background-color: var(--bg-light, #f8f9fa);
    padding: 60px 20px;
    text-align: center;
    margin-bottom: 50px;
    border-bottom: 1px solid var(--border-color, #e0e0e0);
}

.hero-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-dark, #2b2b2b);
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--text-muted, #757575);
}

/* بخش معرفی (متن و عکس) */
.about-intro-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 80px;
}

.about-text h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: var(--text-dark, #2b2b2b);
    position: relative;
    padding-bottom: 10px;
}

.about-text h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-red, #d90429);
    border-radius: 2px;
}

.about-text p {
    font-size: 15px;
    line-height: 2;
    color: var(--text-dark, #2b2b2b);
    margin-bottom: 15px;
    text-align: justify;
}

/* جایگزین تصویر (تا زمانی که عکس واقعی بگذارید) */
.image-placeholder {
    width: 100%;
    height: 350px;
    background: linear-gradient(45deg, #e9ecef, #dee2e6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #868e96;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* در صورتی که خواستید تگ img بگذارید این کلاس برای آن است */
.about-image-wrapper img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    display: block;
}

/* بخش ویژگی‌ها (کارت‌ها) */
.section-heading {
    text-align: center;
    font-size: 24px;
    margin-bottom: 40px;
    color: var(--text-dark, #2b2b2b);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.feature-card {
    background-color: #fff;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transform: translateY(-5px);
    border-color: #cdd4df;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(217, 4, 41, 0.05); /* رنگ قرمز خیلی کمرنگ */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    color: var(--primary-red, #d90429);
}

.feature-icon svg {
    width: 30px;
    height: 30px;
}

.feature-card h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-dark, #2b2b2b);
}

.feature-card p {
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-muted, #757575);
}

/* =========================================
   کانتینر اصلی (ایجاد حاشیه و وسط‌چین کردن کل سایت)
   ========================================= */
.container {
    width: 90%; /* عرض محتوا را 90 درصد صفحه می‌کند تا 5 درصد از راست و 5 درصد از چپ خالی بماند */
    max-width: 1200px; /* در مانیتورهای خیلی بزرگ، از یک حدی بیشتر کش نیاید */
    margin: 0 auto; /* محتوا را دقیقاً در وسط صفحه قرار می‌دهد */
}

/* ================= واکنش‌گرایی (موبایل و تبلت) ================= */
@media (max-width: 992px) {
    .about-intro-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    .about-hero {
        padding: 40px 15px;
    }
    .hero-title {
        font-size: 26px;
    }
}

.logout-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.logout-modal.active {
    display: flex;
}

.logout-modal-content {
    background: white;
    padding: 40px;
    border-radius: 10px;
    width: 420px;        /* قبلاً 280 بود */
    text-align: center;
}

.logout-modal-content h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.logout-modal-content p {
    font-size: 15px;
}

.logout-modal-buttons {
    margin-top: 22px;
    display: flex;
    justify-content: center;
    gap: 15px;   /* فاصله بین دکمه‌ها */
}


.logout-confirm,
.logout-cancel {
    padding: 14px 26px;
    font-size: 16px;
    border: none;
    border-radius: 7px;
    cursor: pointer;
}


.logout-confirm {
    background: #e63946;
    color: white;
}

.logout-cancel {
    background: #777;
    color: white;
}

.logout-modal {
    display: flex;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 9999;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.logout-modal.active {
    opacity: 1;
    pointer-events: all;
}

.logout-modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 380px;
    text-align: center;

    transform: scale(0.9);
    transition: transform 0.25s ease;
}

.logout-modal.active .logout-modal-content {
    transform: scale(1);
}


.card-qty-control {
    align-items: center;
    justify-content: space-between;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fcfcfc;
    width: 100%;
    height: 38px;
}

.card-qty-control button {
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-btn-trash { color: #dc3545 !important; }

.card-qty-val {
    flex-grow: 1;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* =========================================
   Live Search (Header)
   ========================================= */
.header-search-wrapper {
    position: relative;
    flex-grow: 1;
    max-width: 400px;
    margin-right: 20px;
}

.search-input-box {
    display: flex;
    align-items: center;
    background-color: #f1f3f5;
    border-radius: 8px;
    padding: 8px 15px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.search-input-box:focus-within {
    border-color: var(--primary-red);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.1);
}

.search-icon {
    color: var(--text-gray);
    margin-left: 10px;
}

#live-search-input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: 14px;
    color: var(--text-dark);
    font-family: inherit;
}

.search-results-dropdown {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1005;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    
    /* انتقال اسکرول‌بار به سمت راست */
    direction: ltr;
    
    /* استایل اسکرول‌بار (فایرفاکس) */
    scrollbar-color: var(--primary-red) #f1f3f5;
    scrollbar-width: thin;
}

/* استایل اسکرول‌بار (کروم و سافاری) */
.search-results-dropdown::-webkit-scrollbar {
    width: 8px;
}

.search-results-dropdown::-webkit-scrollbar-track {
    background: #f1f3f5;
    border-radius: 8px;
}

.search-results-dropdown::-webkit-scrollbar-thumb {
    background: var(--primary-red);
    border-radius: 8px;
}

.search-results-dropdown::-webkit-scrollbar-thumb:hover {
    background: #ef233c;
}

/* بازگرداندن راست‌چین بودن به محتویات داخلی */
.search-results-dropdown > * {
    direction: rtl;
}

.search-results-dropdown.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f1f1f1;
    transition: background 0.2s;
    text-decoration: none;
    color: var(--text-dark);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-item-img {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    margin-left: 15px;
    background-color: #fff;
    border: 1px solid #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.no-img {
    font-size: 10px;
    color: #999;
}

.search-item-info {
    flex-grow: 1;
}

.search-item-info h4 {
    font-size: 14px;
    margin-bottom: 5px;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-item-meta {
    font-size: 13px;
}

.search-item-meta .price {
    color: var(--primary-red);
    font-weight: bold;
}

.search-item-meta .out-of-stock {
    color: #999;
}

.no-results {
    padding: 15px;
    text-align: center;
    color: var(--text-gray);
    font-size: 14px;
}

/* =========================================
   سیستم اعلانات توست (Toast Notification Container)
   ========================================= */
#toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 380px;
    width: calc(100% - 40px);
    pointer-events: none;
    direction: rtl;
}

.toast-notification {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-right: 5px solid #2b2d42;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-family: inherit;
}

.toast-notification.hide {
    opacity: 0;
    transform: translateX(-30px);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
}

.toast-icon {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast-text {
    display: flex;
    flex-direction: column;
}

.toast-title {
    font-weight: 700;
    font-size: 14px;
    color: #1a1a2e;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 13px;
    color: #4a4a68;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    font-size: 18px;
    line-height: 1;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: #333;
    background: #f0f0f0;
}

/* انواع اعلانات */
.toast-notification.success {
    border-right-color: #2e7d32;
}
.toast-notification.success .toast-icon {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.toast-notification.error {
    border-right-color: #d32f2f;
}
.toast-notification.error .toast-icon {
    background-color: #ffebee;
    color: #d32f2f;
}

.toast-notification.warning {
    border-right-color: #f57c00;
}
.toast-notification.warning .toast-icon {
    background-color: #fff3e0;
    color: #f57c00;
}

.toast-notification.info {
    border-right-color: #0288d1;
}
.toast-notification.info .toast-icon {
    background-color: #e1f5fe;
    color: #0288d1;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

