/* --- تنظیمات کلی و پس‌زمینه --- */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;500;700&display=swap');

@font-face {
  font-family: "Tanha";
  src: url("/Font/tanha-font-v0.10-Fontjo.com/tanha-font-v0.10-Fontjo.com/Tanha.ttf") format("truetype");

}

:root {
    --bg-color: #0d1117;
    --card-bg: #161b22;
    --border-color: rgba(255, 255, 255, 0.1);
    --glow-color: rgba(0, 123, 255, 0.5);
    --badge-bg: #6a1b9a;
    --text-color: #c9d1d9;
    --title-color: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tanha', sans-serif;
     background-color: #212121;

}

.header {
  /* --- موقعیت‌دهی --- */
  
  top: 0;
  z-index: 1000;
  
  /* --- افکت شیشه‌ای (Glassmorphism) --- */
  background-color: rgb(253, 253, 253); /* پس‌زمینه نیمه‌شفاف */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  /* --- ظاهر و ابعاد --- */
  height: 5rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* خط جداکننده ظریف */
  box-shadow: none; /* در این طرح به سایه نیازی نیست */
}

.nav { 
display: -webkit-box; 
display: -ms-flexbox; 
display: flex;
-webkit-box-pack: justify;
    -ms-flex-pack: justify;
        justify-content: space-between;
-webkit-box-align: center;
    -ms-flex-align: center;
        align-items: center;
padding: 0.5rem 0;
height: 100%;
}
.nav h1 { 
font-size: 1.5rem;
color: #263238;
cursor: pointer;
}
.nav__logo-link { 
display: -webkit-box; 
display: -ms-flexbox; 
display: flex;
-webkit-box-align: center;
    -ms-flex-align: center;
        align-items: center;
cursor: pointer;
}
.nav__logo {
width: 6rem;
height: 4rem;
}

.menu { 
display: -webkit-box; 
list-style: none;
display: -ms-flexbox; 
display: flex;
-webkit-box-align: center;
    -ms-flex-align: center;
        align-items: center;
gap: 1rem;
}
.menu__item { 
display: -webkit-box; 
display: -ms-flexbox; 
display: flex;
-webkit-box-align: center;
    -ms-flex-align: center;
        align-items: center;
position: relative;
height: 100%;
}
.menu__link { 
display: -webkit-box; 
display: -ms-flexbox; 
display: flex;
text-decoration: none;
color: #000;
position: relative;
-webkit-box-align: center;
    -ms-flex-align: center;
        align-items: center;
text-align: center;
gap: 0.2rem;
font-size: 1rem;
}
.menu__link::after {
display:none;
content: "";
position: absolute;
left: 0;
bottom: -0.5rem;
width: 100%;
height: 0.2rem;
background-color: #fff;
-webkit-transition: width 250ms ease-in;
-o-transition: width 250ms ease-in;
transition: width 250ms ease-in;
border-radius: 0.8rem;
-webkit-border-radius: 0.8rem;
-moz-border-radius: 0.8rem;
-ms-border-radius: 0.8rem;
-o-border-radius: 0.8rem;
}
.menu__link:hover::after {
display: block;
width: 100%;
}
.header__content { 
display: -webkit-box; 
display: -ms-flexbox; 
display: flex;
-webkit-box-align: center;
    -ms-flex-align: center;
        align-items: center;
-webkit-box-pack: center;
    -ms-flex-pack: center;
        justify-content: center;
margin-top: 4rem;
margin-left: auto;
margin-right: auto;
gap: 1rem;
}
.header-content__coption { 
display: block;
margin-top: 4rem;
width: 40rem;
height: 20rem;
}
.header-content__title { 
display: flex;
font-size: 2rem;
margin-bottom: 2.5rem;
cursor: pointer;
color: #fff;
}
.header-content__title:hover { 
-webkit-animation: a 0.5s 1 linear; 
        animation: a 0.5s 1 linear;
}
@-webkit-keyframes a {
0% {
  -webkit-transform: scale(0.7, 1.3);
          transform: scale(0.7, 1.3);
}

25% {
  -webkit-transform: scale(1.3, 0.7);
          transform: scale(1.3, 0.7);
}

50% {
  -webkit-transform: scale(0.7, 1.3);
          transform: scale(0.7, 1.3);
}

75% {
  -webkit-transform: scale(1.3, 0.7);
          transform: scale(1.3, 0.7);
}

100% {
  -webkit-transform: scale(1, 1);
          transform: scale(1, 1);
}
}
@keyframes a {
0% {
  -webkit-transform: scale(0.7, 1.3);
          transform: scale(0.7, 1.3);
}

25% {
  -webkit-transform: scale(1.3, 0.7);
          transform: scale(1.3, 0.7);
}

50% {
  -webkit-transform: scale(0.7, 1.3);
          transform: scale(0.7, 1.3);
}

75% {
  -webkit-transform: scale(1.3, 0.7);
          transform: scale(1.3, 0.7);
}

100% {
  -webkit-transform: scale(1, 1);
          transform: scale(1, 1);
}
}
.header-content__text { 
gap: 1rem;
align-items: center;
margin-bottom: 1rem;
font-size: 0.9rem;
font-weight: 600;
color: #fff;
}
.head-caption {
line-height: 2rem;
}
.content__btn { 
display: inline-block;
background-color: var(--orange);
text-decoration: none;
color: #fff;
width: 10rem;
height: 3rem;
margin-top: 9rem;
border-radius: 10rem;
font-size: 0.8rem;
font-weight: bold;
-webkit-box-align: center;
    -ms-flex-align: center;
        align-items: center;
-webkit-box-pack: center;
    -ms-flex-pack: center;
        justify-content: center;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-transition: all 190ms ease-in;
-o-transition: all 190ms ease-in;
transition: all 190ms ease-in;
-webkit-box-shadow:  11px 11px 22px #e4ddda,
         0 0 22px #f8f4f2;
        box-shadow:  11px 11px 22px #d5cdc9,
         0 0 22px #fcfcfc

}
.content__btn:hover { 
background-color: #fff;
color: #000;
}
.header-content__logo { 
max-width: 40rem;
max-height: 40rem;
}
.nav__toggle-icon {
display: none;
cursor: pointer;
width: 3rem;
height: 3rem;
-webkit-box-pack: center;
    -ms-flex-pack: center;
        justify-content: center;
-webkit-box-align: center;
    -ms-flex-align: center;
        align-items: center;
}
.nav__toggle-line {
position: relative;
width: 2rem;
height: 0.2rem;
background-color: #000;
border-radius: 2rem;
-webkit-border-radius: 2rem;
-moz-border-radius: 2rem;
-ms-border-radius: 2rem;
-o-border-radius: 2rem;
-webkit-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
-webkit-transition: all;
-moz-transition: all;
-ms-transition: all;
-o-transition: all;
}
.nav__toggle-line::before,
.nav__toggle-line::after {
content: "";
position: absolute;
width: 2rem;
height: 0.2rem;
background-color: #000;
border-radius: 2rem;
-webkit-border-radius: 2rem;
-moz-border-radius: 2rem;
-ms-border-radius: 2rem;
-o-border-radius: 2rem;
-webkit-transition: all 0.3s ease-in-out;
-o-transition: all 0.3s ease-in-out;
transition: all 0.3s ease-in-out;
-webkit-transition: all;
-moz-transition: all;
-ms-transition: all;
-o-transition: all;
}
.nav__toggle-line::before {
top: -0.5rem;

}
.nav__toggle-line::after {
top: 0.5rem;

}

.active .nav__toggle-line {
background-color: transparent;
}

.active .nav__toggle-line::before {
top: -0.5rem;
transform: translateY(0.5rem) rotate( 45deg);
-webkit-transform: translateY(0.5rem) rotate( 45deg);
-moz-transform: translateY(0.5rem) rotate( 45deg);
-ms-transform: translateY(0.5rem) rotate( 45deg);
-o-transform: translateY(0.5rem) rotate( 45deg);
}
.active .nav__toggle-line::after {
top: 0.5rem;
transform: translateY(-0.5rem) rotate( -40deg);
-webkit-transform: translateY(-0.5rem) rotate( -40deg);
-moz-transform: translateY(-0.5rem) rotate( -40deg);
-ms-transform: translateY(-0.5rem) rotate( -40deg);
-o-transform: translateY(-0.5rem) rotate( -40deg);
}


/** ================================================== sub__menu ============================================================== **/

.sub__menu {
position: absolute;
list-style: none;
cursor: pointer;
top: 1.6rem;
right: 0;
opacity: 0;
visibility: visible;
pointer-events: none;
min-width: 14rem;
min-height: 5rem;
background-filter: blur(5px);
padding: 0.8rem 1rem;
border-radius: 0.5rem;
-webkit-box-shadow: 0px 0px 30px rgba(227, 228, 237, 0.37);
box-shadow: 0px 0px 30px rgba(153, 154, 159, 0.37);
transition: opacity 0.12s ease-in-out;
-webkit-transition: opacity 0.12s ease-in-out;
-moz-transition: opacity 0.12s ease-in-out;
-ms-transition: opacity 0.12s ease-in-out;
-o-transition: opacity 0.12s ease-in-out;
-webkit-border-radius: 0.5rem;
-moz-border-radius: 0.5rem;
-ms-border-radius: 0.5rem;
-o-border-radius: 0.5rem;
}
.sub__menu__item {
margin-bottom:  1.5rem;
margin-top: 1rem;
cursor: pointer;
}
.sub__menu__link {
text-decoration: none;
color: #fff;
font-size: 1rem;
font-weight: 500;
cursor: pointer;
}
.sub__menu__link:hover {
background-color: #f8f4f2;
border-radius: 0.5rem;
padding: 0.5rem 0.5rem;
color: #000;
} 

.menu__item:hover .sub__menu {
opacity: 1;
visibility: visible;
pointer-events: visible;  
}


.store-container {
    max-width: 1400px;
    z-index: 10;
    margin: 60rem auto 15rem auto;
    padding: 2rem 1.5rem;
}

/* --- استایل عناوین دسته‌بندی --- */
.card-category {
    margin-bottom: 4rem;
}

.category-title {
    font-size: 1.8rem;
    color: var(--title-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

/* --- چیدمان واکنش‌گرای کارت‌ها --- */
.card-grid {
  display: grid;
  /* تغییر کلیدی: به جای اجازه کش آمدن (1fr)، یک عرض ثابت تعریف می‌کنیم */
  grid-template-columns: repeat(auto-fit, 200px);
  gap: 1.5rem;
  /* این دستور بسیار مهم، کل بلوک کارت‌ها را در مرکز صفحه قرار می‌دهد */
  justify-content: center;
}

.card-title {
    text-align: center;
}
.card-caption {
    color: #fff;
}
/* --- استایل کارت‌های خدمات --- */
.service-card {
    position: relative;
    display: block;
    text-align: center;
    text-decoration: none;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;

    /* آماده‌سازی برای انیمیشن ورودی */
    opacity: 0;
    transform: translateY(20px);
    
    /* انیمیشن نرم برای هاور و ورود */
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.5s ease, transform 0.5s ease;
}

/* انیمیشن ورودی که توسط جاوااسکریپت فعال می‌شود */
.service-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* عکس تمام کادر را بدون تغییر نسبت پر می‌کند */
}

/* --- افکت‌های هاور فانتزی --- */
.service-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 0 25px var(--glow-color);
    border-color: rgba(0, 123, 255, 0.7);
}

/* --- استایل بج "New" --- */
.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--badge-bg);
    color: #fff;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 20px;
    z-index: 2;
}

/* --- واکنش‌گرایی برای موبایل --- */
@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1rem;
    }

    .category-title {
        font-size: 1.5rem;
    }
}


/* =======================================
   استایل نوار جستجو
   ======================================= */

.search-section {
    margin-top: 7rem;
    margin-bottom: 10rem; /* ایجاد فاصله از دسته‌بندی‌ها */
}

.search-bar {
    display: flex;
    align-items: center;
    max-width: 700px;
    margin: 0 auto;
    background-color: #161b22;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px; /* گرد کردن کامل گوشه‌ها */
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    /* افکت زیبا هنگام فعال شدن (فوکوس) */
    box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
    /* border-color: rgba(0, 123, 255, 0.7); */
}

.search-icon {
    width: 24px;
    height: 24px;
    color: #888;
    margin-left: 0.75rem; /* فاصله آیکون از متن */
}

#service-search-input {
    width: 100%;
    background-color: transparent;
    border: none;
    color: #BDBDBD;
    outline: none;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1.1rem;
    padding: 0.5rem;
}

#service-search-input::placeholder {
    color: #888;
}



/*
=====================================================
   استایل فوتر پیشرفته با افکت‌های ویژه
=====================================================
*/

/* --- 1. تنظیمات اصلی و متغیرهای رنگ --- */
:root {
    --footer-bg-color-1: #1a237e; /* آبی تیره */
    --footer-bg-color-2: #4a148c; /* بنفش تیره */
    --footer-bg-color-3: #004d40; /* سبز-آبی تیره */
    --footer-accent-color: #fff; /* صورتی درخشان برای تاکید */
    --footer-glass-bg: rgba(20, 20, 35, 0.5); /* رنگ پنل شیشه‌ای */
    --footer-glass-border: rgba(255, 255, 255, 0.1);
    --footer-text-primary: #f0f0f0;
    --footer-text-secondary: #a0a0b0;
}

/* --- 2. ساختار اصلی و پس‌زمینه متحرک --- */
.advanced-footer {
    width: 100%;
    padding: 6rem 2rem 2rem 2rem;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
    color: var(--footer-text-primary);
}

.footer-wave {
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    transform: translateY(-100%);
    z-index: 5; /* بالاتر از پس‌زمینه، پایین‌تر از محتوا */
    filter: drop-shadow(0 -10px 10px rgba(0,0,0,0.5));
}

.footer-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(270deg, var(--footer-bg-color-1), var(--footer-bg-color-2), var(--footer-bg-color-3));
    background-size: 600% 600%;
    animation: gradient-animation 20s ease infinite;
    z-index: 1;
}

@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* --- 3. پنل شیشه‌ای اصلی (Glassmorphism) --- */
.advanced-footer .container {
    position: relative;
    
    z-index: 10;
    background: var(--footer-glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px); /* برای سافاری */
    border-radius: 20px;
    border: 1px solid var(--footer-glass-border);
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* --- 4. بخش جستجو --- */
.footer-top-section {
    text-align: center;
    padding: 1rem 0 3rem 0;
    border-bottom: 1px solid var(--footer-glass-border);
    margin-bottom: 3rem;
}

.footer-main-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.footer-subtitle {
    font-size: 1rem;
    color: var(--footer-text-secondary);
    margin-bottom: 2rem;
}

.footer-search-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: rgba(0,0,0,0.2);
    border-radius: 50px;
    border: 1px solid var(--footer-glass-border);
}

.footer-search-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    padding: 0.8rem 1.5rem;
    color: #fff;
    font-size: 1rem;
    outline: none;
}

.footer-search-input::placeholder {
    color: var(--footer-text-secondary);
}

.footer-search-button {
    background: var(--footer-accent-color);
    border: none;
    color: #000;
    padding: 0 1.5rem;
    border-radius: 50px 50px 50px 50px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
}

.footer-search-button:hover {
    background: #d81b60; /* نسخه تیره‌تر رنگ اصلی */
    color: #fff;
}

/* --- 5. استایل ستون‌ها و لینک‌ها --- */
.footer-main {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-column {
    flex: 1;
    min-width: 220px;
    padding: 0 1rem;
}

.footer-heading {
    font-size: 1.4rem;
    font-weight: bold;
    color: #fff;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--footer-accent-color);
    display: inline-block; /* برای اینکه border فقط به اندازه متن باشد */
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 1rem; }

.footer-links a {
    color: var(--footer-text-secondary);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--footer-accent-color);
    transform: translateX(5px);
    text-shadow: 0 0 10px var(--footer-accent-color);
}

/* --- 6. آیکون‌های اجتماعی و تماس --- */
.contact-info .contact-link {
    color: var(--footer-text-secondary);
    text-decoration: none;
    margin-bottom: 1rem;
    display: block;
    transition: color 0.3s ease;
}
.contact-info .contact-link:hover {
    color: var(--footer-accent-color);
}

.social-icons {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: #fff;
    text-decoration: none;
    border: 1px solid var(--footer-glass-border);
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--footer-accent-color);
    border-color: var(--footer-accent-color);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 0 15px var(--footer-accent-color);
}

/* --- 7. بخش پایینی فوتر --- */
.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--footer-glass-border);
    text-align: center;
    color: var(--footer-text-secondary);
}

.quote-arabic { color: var(--footer-text-primary); }
.copyright-text b { color: #ffffff; }


/* ==========================================================
   کد نهایی و اصلاح شده برای مودال خرید دو ستونه
   ========================================================== */

/* --- ۱. استایل کلی مودال و پس‌زمینه --- */
.purchase-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.purchase-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- ۲. کادر اصلی مودال --- */
.purchase-modal-content {
    position: relative;
    background-color: #f4f7fa;
    border-radius: 16px;
    width: 100%;
    max-width: 950px;
    max-height: 90vh;
    overflow-y: auto; /* اسکرول داخلی در صورت بلند بودن محتوا */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.purchase-modal-overlay.active .purchase-modal-content {
    transform: scale(1);
}

.purchase-modal-close-btn {
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    background: #e6e9f0;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: #6b7a90;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    z-index: 10;
}

.purchase-modal-close-btn:hover {
    background-color: #dbe2ea;
    transform: rotate(90deg);
}

/* --- ۳. چیدمان دو ستونه (بخش کلیدی اصلاح باگ) --- */
.purchase-grid {
    display: grid;
    /* این دستور چیدمان دو ستونه را تضمین می‌کند */
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    padding: 2rem;
    /* تراز کردن ستون‌ها از بالا برای جلوگیری از به هم ریختگی */
    align-items: flex-start;
}

/* --- ۴. استایل ستون خلاصه سفارش (سمت چپ) --- */
.purchase-summary-section {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    
    /* این بخش ستون خلاصه را به صورت عمودی مرتب می‌کند */
    display: flex;
    flex-direction: column;
    
    /* چسبیدن به بالا هنگام اسکرول در دسکتاپ */
    position: sticky;
    top: 1rem;
}

.summary-product-image img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.price-summary {
    width: 100%;
    margin: 1.5rem 0;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #6b7a90;
}
.price-row.final-price {
    font-size: 1.2rem;
    color: #1e2a3b;
}
.price-row strong { font-weight: 700; }
#detail-summary-total { color: #28a745; font-size: 1.5rem; }
.price-divider { border: none; height: 1px; background-color: #e6e9f0; margin: 1.5rem 0; }

/* کد نهایی برای بخش شرایط و قوانین */
.terms-group {
  /* این دستور چک‌باکس و متن را در یک ردیف قرار می‌دهد */
  display: flex;
  align-items: center; /* تراز عمودی در مرکز */
  gap: 0.5rem; /* فاصله بین چک‌باکس و متن */
  margin: 1.5rem 0;
}

.terms-group label {
  font-size: 0.9rem;
  color: #6b7a90;
  
  /* دستور کلیدی: به متن اجازه شکستن و رفتن به خط بعد را نمی‌دهد */
  white-space: nowrap;
}

.terms-group a {
  color: #007bff;
  text-decoration: none;
}
.cta-button {
    width: 100%;
    background: linear-gradient(45deg, #2edb77, #28a745);
    color: #fff;
    border: none;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.cta-button:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 6px 15px rgba(40, 167, 69, 0.3); }
.cta-button:disabled { background: #dbe2ea; color: #a0a8b4; cursor: not-allowed; }


/* --- ۵. استایل ستون فرم (سمت راست) --- */
.purchase-form-section {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
}

.product-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.product-icon { width: 50px; height: 50px; }
.product-header h1 { font-size: 1.5rem; font-weight: 700; }

.form-group { margin-bottom: 1.5rem; }
.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #6b7a90;
    margin-bottom: 0.5rem;
}

input, select, textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #e6e9f0;
    border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    transition: all 0.2s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #ff0019;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.amount-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.input-with-symbol { position: relative; }
.input-with-symbol span {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7a90;
}
textarea { resize: vertical; min-height: 80px; }


/* --- ۶. واکنش‌گرایی برای موبایل --- */
@media (max-width: 992px) {

}


/* ---- reset ---- */ 
/* body{ margin:0; font:normal 75% Arial, Helvetica, sans-serif; }  */
canvas{ display: block; vertical-align: bottom; } 
/* ---- particles.js container ---- */ 
#particles-js {
    position:absolute;
    width: 100%;
    height: 136%; 
    z-index: -1;
    background-color: #212121; 
    /* background-image: url(""); */
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 50% 50%; }
/* ---- stats.js ---- */ 
.count-particles{ 
background: none;
position: absolute;
top: 48px;
left: 0; width: 80px;
color: #13E8E9;
font-size: .8em;
text-align: left;
text-indent: 4px;
line-height: 14px;
padding-bottom: 2px;
font-family: Helvetica, Arial, sans-serif;
font-weight: bold; 
} 
.js-count-particles{ 
font-size: 1.1em; 
} 
#stats, .count-particles{ 
-webkit-user-select: none;
margin-top: 5px; 
margin-left: 5px; 
} 
#stats{ 
border-radius: 3px 3px 0 0; 
overflow: hidden; 
}
.count-particles{ 
border-radius: 0 0 3px 3px; 
}





/* --- استایل مودال پیش فاکتور --- */
/* --- استایل مودال پیش فاکتور حرفه‌ای (نسخه فشرده) --- */

/* این بخش استایل کلی مودال را تعریف می‌کند. 
  پس‌زمینه نیمه‌شفاف و انیمیشن نرم برای نمایش آن.
*/
.purchase-modal-overlay#pre-invoice-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(10, 22, 41, 0.5);
    backdrop-filter: blur(5px);
}

/* این بخش کادر اصلی پیش‌فاکتور را با جزئیاتی مانند
  گوشه‌های گرد، سایه و یک نوار رنگی در بالا طراحی می‌کند.
*/
.pre-invoice-content {
    background-color: #ffffff;
    border-radius: 12px;
    width: 100%;
    max-width: 550px; /* کاهش عرض برای ظاهر بهتر */
    padding: 0;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
    position: relative;
    color: #333;
    font-size: 0.9rem; /* کاهش جزئی اندازه فونت کلی */
    border-top: 4px solid #007bff;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.purchase-modal-overlay.active .pre-invoice-content {
    transform: scale(1);
    opacity: 1;
}

/* استایل هدر فاکتور شامل لوگو، عنوان و دکمه بستن.
  از Flexbox برای چیدمان منظم استفاده شده است.
*/
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem; /* کاهش پدینگ */
    border-bottom: 1px solid #e9ecef;
}

.invoice-header-logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: #007bff;
}

.invoice-header-logo i {
    font-size: 1.8rem; /* کاهش اندازه آیکون */
}

.invoice-header h2 {
    font-size: 1.6rem; /* کاهش اندازه عنوان */
    margin: 0;
    color: #1e2a3b;
    font-weight: 700;
}

/* دکمه بستن مودال */
#close-invoice-modal-btn {
    background: transparent;
    border: none;
    font-size: 2rem;
    color: #adb5bd;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

#close-invoice-modal-btn:hover {
    color: #343a40;
    transform: rotate(90deg);
}

/* بدنه اصلی فاکتور که شامل تمام جزئیات است.
*/
.invoice-body {
    padding: 1.5rem; /* کاهش پدینگ */
}

.invoice-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem; /* کاهش حاشیه */
}

.invoice-meta span {
    color: #6c757d;
}

.invoice-parties {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0; /* کاهش حاشیه */
}

.party-info h4 {
    margin-bottom: 0.4rem;
    color: #1e2a3b;
    font-size: 1rem;
}

.party-info p {
    margin: 0.2rem 0;
    color: #495057;
    font-size: 0.85rem;
}

.seller-info {
    text-align: left;
}

.invoice-body hr {
    border: none;
    height: 1px;
    background-color: #e9ecef;
    margin: 1rem 0; /* کاهش حاشیه */
}

.invoice-body h4 {
    margin-top: 1rem;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

/* استایل جدول جزئیات سفارش برای خوانایی بهتر.
*/
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.invoice-table th, .invoice-table td {
    padding: 0.7rem; /* کاهش پدینگ سلول‌ها */
    text-align: right;
    border-bottom: 1px solid #e9ecef;
}

.invoice-table thead {
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 0.9rem;
}

.invoice-table tfoot {
    font-weight: bold;
}

.invoice-table tfoot td:last-child {
    font-size: 1.3rem; /* کاهش اندازه قیمت نهایی */
    color: #28a745;
}

/* استایل بخش توضیحات.
*/
.invoice-description-wrapper {
    margin-top: 1rem;
    background-color: #f8f9fa;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #495057;
}

.invoice-description-wrapper p {
    margin: 0;
    line-height: 1.5;
}

/* استایل فوتر و دکمه‌های "چاپ" و "تایید".
  ظاهری مدرن با سایه و افکت هاور.
*/
.invoice-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem; /* کاهش پدینگ */
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 12px 12px;
}

.invoice-footer .cta-button {
    width: 40%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.65rem 1.4rem; /* پدینگ ظریف‌تر */
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.invoice-footer .cta-button#confirm-payment-btn {
    background: linear-gradient(45deg, #28a745, #218838);
    color: #fff;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.invoice-footer .cta-button#confirm-payment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.invoice-footer .cta-button.secondary-cta {
    background: transparent;
    color: #6c757d;
    border-color: #ced4da;
    box-shadow: none;
}

.invoice-footer .cta-button.secondary-cta:hover {
    background: #e9ecef;
    color: #212529;
    border-color: #adb5bd;
    transform: translateY(-2px);
}

.invoice-footer .cta-button i {
    font-size: 1rem;
}

/* استایل مخصوص زمان چاپ، که فقط فاکتور را نمایش می‌دهد
  و عناصر اضافی مانند دکمه‌ها را مخفی می‌کند.
*/
@media print {
    body * {
        visibility: hidden;
    }
    .pre-invoice-content, .pre-invoice-content * {
        visibility: visible;
    }
    .pre-invoice-content {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        max-width: 100%;
        box-shadow: none;
        border: none;
        border-radius: 0;
    }
    .invoice-footer, #close-invoice-modal-btn {
        display: none;
    }
}


        .error-modal-content {
            background-color: #fff;
            padding: 30px;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
            width: 90%;
            max-width: 400px;
            text-align: center;
            position: relative;
            transform: translateY(-20px);
            opacity: 0;
            transition: transform 0.3s ease, opacity 0.3s ease;
            z-index: 1001; /* بالاتر از سایر مودال‌ها */
        }

        .purchase-modal-overlay.active .error-modal-content {
            transform: translateY(0);
            opacity: 1;
        }

        .error-modal-header {
            margin-bottom: 20px;
        }

        .error-modal-header .icon {
            font-size: 48px;
            color: #e74c3c; /* Red for error */
            margin-bottom: 15px;
            display: inline-block;
        }

        .error-modal-header h3 {
            font-size: 22px;
            color: #333;
            margin: 0;
            font-weight: 600;
        }

        .error-modal-body p {
            font-size: 16px;
            color: #555;
            line-height: 1.6;
            margin: 0;
        }

        .error-modal-footer {
            margin-top: 30px;
        }

        .shahkar-notice {
            display: flex;
            align-items: center;
            background-color: #fff3cd; /* رنگ زرد هشدار */
            color: #664d03;
            padding: 1rem;
            border-radius: 8px;
            margin-bottom: 1.5rem;
            font-size: 14px;
            border: 1px solid #ffecb5;
            line-height: 1.7;
        }
        .shahkar-notice .icon {
            font-size: 20px;
            margin-left: 12px; /* فاصله آیکون از متن */
            color: #ffc107;
        }


/* ======================================= */
/* استایل جدید مودال تایید شماره تماس    */
/* ======================================= */

/* استفاده از فونت جدید برای کل مودال */
.verification-modal-content {
    font-family: 'Vazirmatn', sans-serif;
    background: linear-gradient(145deg, #2e2e2e, #1a1a1a);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid #444;
    max-width: 400px;
    color: #f0f0f0;
}

/* هدر مودال */
.verification-header {
    padding: 1.2rem;
    border-bottom: 1px solid #444;
    text-align: center;
}

.verification-header h3 {
    margin: 0;
    font-weight: 700;
    font-size: 1.25rem;
}

.verification-header .fa-shield-alt {
    color: #00e676; /* رنگ سبز درخشان */
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

/* بدنه اصلی مودال */
.verification-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 2rem 1.5rem;
    text-align: center;
}

/* متن راهنما */
.verification-body p {
    line-height: 1.7;
    color: #b0b0b0;
    font-size: 0.9rem;
    max-width: 300px;
}
.verification-body p strong {
    color: #fff;
    font-weight: 500;
}

/* استایل حرفه‌ای برای فیلد ورود کد */
#verification-code-input {
    font-family: 'Vazirmatn', sans-serif;
    letter-spacing: 0.8rem; /* ایجاد فاصله بین اعداد */
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    padding: 12px 20px;
    width: 100%;
    height: 60px;
    max-width: 300px;
    border-radius: 12px;
    border: 2px solid #555;
    background-color: #1e1e1e;
    color: #fff;
    transition: all 0.3s ease;
}

#verification-code-input::placeholder {
    letter-spacing: normal;
    font-size: 2rem;
}

#verification-code-input:focus {
    outline: none;
    border-color: #00e676;
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.4);
}

/* بخش تایمر و دکمه ارسال مجدد */
.resend-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.resend-btn {
    background: none;
    font-family: 'Vazirmatn', sans-serif;
    border: none;
    color: #fff;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.2s ease;
}
.resend-btn:hover {
    color: #82b1ff;
}

.resend-btn:disabled {
    color: #777;
    cursor: not-allowed;
}

#resend-countdown {
    color: #aaa;
    direction: ltr;
}

/* فوتر و دکمه‌های اصلی */
.verification-footer {
    padding: 1.5rem;
    border-top: 1px solid #444;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.verification-footer .cta-button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* دکمه اصلی تایید */
#confirm-verification-btn {
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.8rem;
    background: linear-gradient(45deg, #00e676, #00c853);
    color: #111;
    box-shadow: 0 4px 15px rgba(0, 230, 118, 0.3);
}

#confirm-verification-btn:hover {
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 6px 20px rgb(249, 250, 250);
}

/* دکمه دوم (انصراف) */
#cancel-verification-btn {
    background-color: transparent;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.8rem;
    color: #000;
}

#cancel-verification-btn:hover {
    background-color: #333;
    color: #fff;
}


/* --- استایل مودال نکات قبل از سفارش --- */
.tips-body {
    margin-bottom: 25px;
    padding-right: 20px;
    text-align: right;
}

.tips-body ul {
    list-style-type: none;
    padding-right: 0;
}

.tips-body ul li {
    position: relative;
    padding-right: 25px;
    margin-bottom: 15px;
    line-height: 1.8;
    color: var(--text-secondary); /* رنگ متن از استایل‌های قبلی شما */
}

.tips-body ul li::before {
    content: "\f058"; /* آیکون تیک از فونت‌آسام */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 5px;
    color: #27ae60; /* رنگ تیک */
}


.rate-display-container {
    text-align: left;
    margin-top: -1px;
    margin-bottom: 10px;
    height: 15px; /* برای جلوگیری از پرش صفحه */
}
.rate-text {
    color: #ee0c0c; /* رنگ خاکستری */
    font-size: 0.8rem;
}




@media screen and  (max-width: 992px) {

.header__content { 
  display: -webkit-box; 
  display: -ms-flexbox; 
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-orient: vertical;
  -webkit-box-direction: reverse;
      -ms-flex-direction: column-reverse;
          flex-direction: column-reverse;
  margin-top: 0;

}
.header-content__title {
  font-size: 1.2rem;
  margin-bottom: 0%;
  max-width: 100%;
  text-align: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.header-content__text {
  margin-bottom: 1rem;
  max-width: 100%;
  font-size: 0.88rem;
  height: auto;
  justify-content: center;
  text-align: center;
  line-height: 2rem;
}
.header-content__coption { 
  display: block;
  text-align: right;
  margin-top: 0;
  max-width: 100%;
  height: auto;
}
.content__btn {
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
  margin-bottom: 2rem;
  font-weight: bold;
}
.header-content__logo {
    width: auto;
    height: auto;
    margin-bottom: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.card-category {
 margin-top: 5rem;
}
.category-title {
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}
.purchase-grid {
    grid-template-columns: 1fr; /* تک ستونه شدن در موبایل */
}
.purchase-summary-section {
    grid-row: 1; /* در موبایل، خلاصه سفارش بالا قرار می‌گیرد */
    position: static; /* حالت چسبنده را غیرفعال کن */
}
.purchase-modal-content {
    padding: 0;
}}



/* --- 8. واکنش‌گرایی --- */
@media (max-width: 768px) {

    .menu {
        /* موقعیت‌دهی در بالای صفحه، زیر هدر */
        position: absolute;
        top: 5rem; /* فاصله از بالای والد (معمولا هدر) - این مقدار را با ارتفاع هدر خود تنظیم کنید */
        right: 0;
        left: 0;
        
        /* ظاهر منو */
        background-color: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(8px); /* مقدار مثبت و صحیح برای افکت شیشه‌ای */
        -webkit-backdrop-filter: blur(8px);
        border-bottom-left-radius: 1rem;
        border-bottom-right-radius: 1rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        
        /* چیدمان داخلی */
        font-size: 0.5rem;
        padding: 1rem;
        z-index: 999; /* یک z-index بالا برای اطمینان از قرار گرفتن روی همه عناصر */
        
        /* بخش کلیدی برای انیمیشن: منو به صورت پیش‌فرض محو و کمی بالاتر است */
        opacity: 0;
        visibility: hidden; /* در حالت مخفی، قابل کلیک و انتخاب نیست */
        transform: translateY(-20px); /* کمی منو را به بالا می‌برد تا افکت بهتری داشته باشد */
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    }


    .advanced-footer {
        padding: 6rem 1rem 2rem 1rem;
    }

    .advanced-footer .container {
        padding: 1.5rem;
    }

    .footer-main-title {
        font-size: 1.5rem;
    }

    .footer-main {
        flex-direction: column;
        text-align: center;
    }

    .footer-column {
        min-width: 100%;
        margin-bottom: 2rem;
    }
    
    .social-icons, .contact-info, .footer-heading {
        justify-content: center;
        margin-left: auto;
        margin-right: auto;
    }
    .card-category {
        margin-top: 15rem;
    }
    .header__content { 
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column-reverse;
        margin-top: 0;
    }
    .category-title {
        font-size: 1.2rem;
        font-weight: 700;
        text-align: center;
        margin-bottom: 1rem;
    }
    .header-content__logo { 
        width: 23rem;
        height: 23rem;
        margin-bottom: 1rem;
    }}
   


/* --- استایل مودال نتایج جستجو --- */
.search-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.search-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-content {
    position: relative;
    background-color: #161b22; /* رنگ پس‌زمینه مشابه کارت‌ها */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    width: 100%;
    max-width: 1200px;
    height: 80vh;
    padding: 2rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.search-modal-content h2 {
    color: #fff;
    margin-bottom: 1.5rem;
    text-align: center;
}

#search-results-grid {
    overflow-y: auto; /* اسکرول در صورت زیاد بودن نتایج */
    padding: 1rem;
}

.search-modal-close-btn {
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    background: #333;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.8rem;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

.search-modal-close-btn:hover {
    background-color: #e63946;
    transform: rotate(90deg);
}

.no-results-message {
    color: #aaa;
    text-align: center;
    font-size: 1.2rem;
    padding: 3rem;
}