/* ============================================================
   style.css - استایل اصلی فروشگاه نیتا (nitaco-shop.ir)
   ============================================================ */

/* ============ متغیرهای تم روشن (Light) ============ */
:root,
[data-theme="light"] {
    --bg-body:        linear-gradient(135deg, #fbf8f1 0%, #f0e2d0 100%);
    --bg-surface:     #ffffff;
    --bg-elevated:    #f4efe6;
    --bg-header:      #ffffff;
    --text-main:      #2c261e;
    --text-muted:     #7a6e5d;
    --border-color:   #e6dac8;
    --accent:         #b57d45; /* مسی/طلایی */
    --accent-hover:   #966432;
    --accent-soft:    #f4e8d8;
    --success:        #2e7d32;
    --danger:         #c62828;
    --warning:        #ed6c02;
    --text-on-dark:   #ffffff;
    --shadow:         0 4px 15px rgba(181, 125, 69, 0.08);
    --radius:         12px;
}

/* ============ متغیرهای تم تیره (Dark) ============ */
[data-theme="dark"] {
    --bg-body:        linear-gradient(135deg, #12100e 0%, #201612 40%, #3a2214 100%);
    --bg-surface:     #1c1714;
    --bg-elevated:    #2a201b;
    --bg-header:      #161210;
    --text-main:      #f5f0e6;
    --text-muted:     #a69b8d;
    --border-color:   #33271e;
    --accent:         #d4a373;
    --accent-hover:   #e0b68c;
    --accent-soft:    #33291f;
    --success:        #4caf50;
    --danger:         #ef5350;
    --warning:        #ffa726;
    --text-on-dark:   #ffffff;
    --shadow:         0 4px 15px rgba(0, 0, 0, 0.4);
}

/* ============ ریست ============ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }

body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background: var(--bg-body);
    background-attachment: fixed;
    background-size: cover;
    color: var(--text-main);
    line-height: 1.7;
    transition: background .3s, color .3s;
}

.site-main {
    background: transparent;
    min-height: 80vh;
    padding-bottom: 40px;
}

a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: 1240px; margin: 0 auto; padding: 0 16px; }

/* ============ نوار بالایی ============ */
.topbar { background: var(--bg-header); color: var(--text-main); font-size: 14px; border-bottom: 1px solid var(--border-color); padding:5px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 40px; gap: 12px; }
.topbar-links { display: flex; gap: 8px; flex-wrap: wrap; }
.topbar-link { 
    padding: 6px 12px; 
    border-radius: 15px; /* گرد کردن دکمه‌ها */
    display: inline-flex; 
    align-items: center; 
    gap: 6px; 
    transition: all .2s ease; 
    background: rgba(255, 255, 255, 0.1); /* پس‌زمینه ملایم برای دکمه‌ها */
    border: 1px solid rgba(255, 255, 255, 0.05); /* حاشیه بسیار ملایم */
    color: var(--text-main);
}

/* برای تم روشن که پس‌زمینه سفیده */
[data-theme="light"] .topbar-link {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.topbar-link:hover { background: var(--accent-soft); }
.topbar-admin { color: var(--warning); }

/* دکمه تم */
.btn-theme {
    background: transparent; 
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all .2s;
}
.btn-theme:hover { background: var(--bg-elevated); transform: scale(1.05); }
.btn-theme .icon-sun  { display: none; }
[data-theme="dark"] .btn-theme .icon-sun  { display: inline; }
[data-theme="dark"] .btn-theme .icon-moon { display: none; }

/* منطق تغییر متن */
.btn-theme .theme-text::after { content: "تیره"; }
[data-theme="dark"] .btn-theme .theme-text::after { content: "روشن"; }
.btn-theme .theme-text { font-size: 13px; white-space: nowrap; }
.btn-theme .theme-text::after { font-size: 13px; }

/* ============ هدر ============ */
.site-header { background: var(--bg-surface); box-shadow: var(--shadow); padding: 14px 0; transition: background .3s; }
.header-inner { display: flex; align-items: center; gap: 20px; }

/* لوگو */
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text-main); }
.logo img { height: 50px; width: auto; object-fit: contain; transition: opacity 0.3s ease; }
.logo-text { font-size: 22px; font-weight: 800; white-space: nowrap; letter-spacing: 1px; }
.logo .logo-light { display: block; }
.logo .logo-dark  { display: none; }
[data-theme="dark"] .logo .logo-light { display: none; }
[data-theme="dark"] .logo .logo-dark  { display: block; }

/* جستجو */
.search-box { flex: 1; display: flex; background: var(--bg-elevated); border: 1px solid var(--border-color); border-radius: 999px; overflow: hidden; max-width: 600px; }
.search-box input { flex: 1; border: none; background: transparent; padding: 10px 16px; color: var(--text-main); font-family: inherit; font-size: 14px; outline: none; }
.search-box button { border: none; background: var(--accent); color: var(--bg-body); padding: 0 18px; font-size: 15px; transition: background .2s; }
.search-box button:hover { background: var(--accent-hover); }

/* سبد خرید */
.cart-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent-soft); color: var(--text-main); padding: 10px 16px; border-radius: var(--radius); font-size: 14px; position: relative; transition: background .2s; }
.cart-btn:hover { background: var(--accent); color: var(--bg-body); }

.header-divider { height: 2px; background: var(--border-color); }

/* ============ فلش‌ها ============ */
.flashes-wrap { margin: 16px auto 0; }
.alert { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 10px; font-size: 14px; border-right: 4px solid; }
.alert-success { background: #e8f5e9; color: #1b5e20; border-color: #2e7d32; }
.alert-danger  { background: #ffebee; color: #b71c1c; border-color: #c62828; }
[data-theme="dark"] .alert-success { background: #1b3a1e; color: #a5d6a7; }
[data-theme="dark"] .alert-danger  { background: #3a1b1b; color: #ef9a9a; }

/* ============ بردکرامب ============ */
.breadcrumb { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; font-size: 14px; color: var(--text-muted); }
.breadcrumb li { display: flex; align-items: center; }
.breadcrumb li:not(:last-child)::after { content: "\f104"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin: 0 8px; font-size: 10px; color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb li:last-child { color: var(--text-main); font-weight: bold; }

/* ============ اسلایدر ============ */
.slider-container { position: relative; width: 100%; max-width: 1240px; margin: 20px auto; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 1240 / 400; }
.slider-wrapper { display: flex; transition: transform 0.5s ease-in-out; height: 100%; }
.slide { min-width: 100%; height: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.4); color: #fff; border: none; width: 40px; height: 40px; border-radius: 50%; font-size: 18px; cursor: pointer; transition: background .2s; z-index: 10; display: flex; align-items: center; justify-content: center; }
.slider-btn:hover { background: rgba(0,0,0,0.8); }
.slider-btn.prev { right: 16px; }
.slider-btn.next { left: 16px; }
.slider-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 10; }
.slider-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: background .2s; }
.slider-dots .dot.active { background: #fff; width: 24px; border-radius: 5px; }

/* ============ چیدمان اصلی (۱ به ۴) ============ */
.main-layout { display: grid; grid-template-columns: 1fr 4fr; gap: 24px; margin: 30px 0; align-items: start; }

/* سایدبار دسته‌بندی */
.sidebar { background: var(--bg-surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.sidebar-title { background: var(--bg-elevated); padding: 14px 16px; margin: 0; font-size: 16px; border-bottom: 1px solid var(--border-color); }
.sidebar-menu { list-style: none; padding: 0; margin: 0; }
.sidebar-menu li a { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border-color); font-size: 14px; transition: background .2s, padding .2s; }
.sidebar-menu li a:hover { background: var(--bg-elevated); padding-right: 20px; color: var(--accent); }
.sidebar-menu li a i { margin-left: 8px; color: var(--text-muted); }

/* گرید محصولات */
.products-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 20px; 
}

.product-card { 
    background: var(--bg-surface); 
    border-radius: var(--radius); 
    box-shadow: var(--shadow); 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    transition: transform .2s, box-shadow .2s; 
    height: 100%; /* اطمینان از هم‌ارتفاع بودن کارت‌ها */
}

.product-card:hover { 
    transform: translateY(-4px); 
    box-shadow: 0 8px 20px rgba(0,0,0,.1); 
}

/* کادر مربعی عکس */
.product-img-wrap { 
    position: relative; 
    width: 100%;
    padding-top: 100%; /* ترفند CSS برای ساخت کادر مربعی (نسبت ۱:۱) */
    background: var(--bg-elevated); 
    overflow: hidden;
}

/* تنظیم عکس برای پر کردن کادر مربعی بدون دفرمه شدن */
.product-img-wrap img { 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; 
    height: 100%; 
    object-fit: cover; /* عکس کادر رو پر می‌کنه و اضافی‌ها رو برش می‌ده */
    transition: transform 0.3s ease;
}

.product-card:hover .product-img-wrap img {
    transform: scale(1.05); /* افکت زوم ملایم روی عکس */
}

.product-info { padding: 16px; display: flex; flex-direction: column; flex-grow: 1; }
.product-title { font-size: 15px; font-weight: bold; margin: 0 0 10px; line-height: 1.4; height: 42px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.product-price { margin-top: auto; font-size: 16px; font-weight: bold; color: var(--accent); margin-bottom: 12px; }
.product-price del { font-size: 13px; color: var(--text-muted); margin-right: 6px; font-weight: normal; }
.btn-buy { display: block; text-align: center; background: var(--accent-soft); color: var(--text-main); padding: 10px; border-radius: 8px; font-size: 14px; font-weight: bold; transition: background .2s, color .2s; }
.btn-buy:hover { background: var(--accent); color: var(--bg-body); }

/* استایل دکمه‌های تنوع (رنگ/سایز) */
.variant-label {
    transition: all 0.2s;
}
.variant-label:has(input:checked) {
    border-color: var(--accent) !important;
    background: var(--accent-soft) !important;
    box-shadow: 0 0 0 2px var(--accent);
}
.variant-label.disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    text-decoration: line-through;
}

/* ============ فوتر ============ */
.site-footer { background: linear-gradient(135deg, #f7f2ea 0%, #ebdcc9 100%); color: var(--text-main); margin-top: 40px; padding-top: 40px; border-top: 2px solid var(--border-color); position: relative; }
[data-theme="dark"] .site-footer { background: linear-gradient(135deg, #1f1814 0%, #2e1f16 100%); border-top: 1px solid var(--border-color); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; padding-bottom: 30px; }
.footer-col h4 { color: var(--accent); margin: 0 0 20px; font-size: 16px; font-weight: 800; position: relative; padding-bottom: 8px; }
.footer-col h4::after { content: ''; position: absolute; right: 0; bottom: 0; width: 40px; height: 3px; background: var(--accent); border-radius: 2px; }
.footer-col p { margin: 6px 0; font-size: 14px; line-height: 1.9; color: var(--text-muted); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 0; }
.footer-col li a { display: inline-block; position: relative; padding: 8px 0; font-size: 14px; color: var(--text-muted); text-decoration: none; transition: color 0.3s ease; }
.footer-col li a::after { content: ''; position: absolute; right: 0; bottom: 4px; width: 0; height: 2px; background: var(--accent); transition: width 0.3s ease; }
.footer-col li a:hover { color: var(--accent); }
.footer-col li a:hover::after { width: 100%; }
.footer-addr { display: flex; gap: 8px; align-items: flex-start; }
.socials { display: flex; gap: 10px; margin-top: 10px; }
.socials a { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-surface); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; color: var(--text-main); transition: all .3s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.socials a:hover { background: var(--accent); color: #fff; transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(0,0,0,0.05); padding: 20px 0; font-size: 13px; text-align: center; color: var(--text-muted); }
[data-theme="dark"] .footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); }

/* خط درخشان بالای فوتر */
.site-footer::before { content: ''; position: absolute; top: -4px; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0.7; border-radius: 2px; }

/* افکت هاور کارت‌های مزایا */
.container > div > div[style*="text-align: center"]:hover {
    transform: translateY(-5px);
}

/* ============ صفحه جزئیات محصول ============ */
.product-single { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; background: var(--bg-surface); padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow); }
.product-single-img { background: var(--bg-elevated); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; justify-content: center; }
.product-single-img img { max-width: 100%; max-height: 500px; object-fit: contain; mix-blend-mode: multiply; }
[data-theme="dark"] .product-single-img img { mix-blend-mode: normal; }
.product-single-info { display: flex; flex-direction: column; }
.product-single-price { font-size: 22px; font-weight: bold; padding-bottom: 20px; border-bottom: 1px solid var(--border-color); margin-bottom: 20px; }
.product-single-price del { font-size: 16px; color: var(--text-muted); font-weight: normal; }

/* ============ صفحه سبد خرید ============ */
.cart-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; align-items: start; }
.cart-items { background: var(--bg-surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.cart-item { display: flex; align-items: center; padding: 20px; border-bottom: 1px solid var(--border-color); gap: 20px; }
.cart-item:last-child { border-bottom: none; }
.cart-item img { width: 80px; height: 80px; object-fit: contain; border-radius: 8px; background: var(--bg-elevated); padding: 5px; }
.cart-item-details { flex: 1; }
.cart-item-details h3 { margin: 0 0 10px; font-size: 16px; }
.cart-item-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cart-summary { background: var(--bg-surface); padding: 25px; border-radius: var(--radius); box-shadow: var(--shadow); position: sticky; top: 20px; }

/* ============ صفحه تسویه حساب ============ */
.checkout-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; align-items: start; }
.checkout-box { background: var(--bg-surface); padding: 25px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }
.checkout-box h3 { margin-top: 0; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--border-color); }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 14px; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-elevated); color: var(--text-main); font-family: inherit; }
.shipping-option { display: flex; align-items: center; gap: 10px; padding: 15px; border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 10px; cursor: pointer; transition: background 0.2s; }
.shipping-option:hover { background: var(--bg-elevated); }
.shipping-option input[type="radio"] { margin: 0; }
.shipping-option span:last-child { margin-right: auto; font-weight: bold; }
.checkout-summary { background: var(--bg-surface); padding: 25px; border-radius: var(--radius); box-shadow: var(--shadow); position: sticky; top: 20px; }

/* ============ پنل کاربری و کیف پول ============ */
.profile-layout { display: grid; grid-template-columns: 1fr 2fr; gap: 30px; align-items: start; }
.wallet-card, .profile-box { background: var(--bg-surface); padding: 25px; border-radius: var(--radius); box-shadow: var(--shadow); }
.wallet-card { border-top: 4px solid var(--accent); }
.wallet-card .form-group input { width: 100%; padding: 10px; border: 1px solid var(--border-color); border-radius: 8px; background: var(--bg-elevated); color: var(--text-main); margin-bottom: 15px; }
.transactions-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 15px; }
.transactions-table th, .transactions-table td { padding: 12px; border-bottom: 1px solid var(--border-color); text-align: right; }
.transactions-table th { background: var(--bg-elevated); }

/* ============ گالری عکس محصول ============ */
.product-single-img-wrap { display: flex; flex-direction: column; gap: 15px; }
.product-single-img { background: var(--bg-elevated); border-radius: var(--radius); padding: 20px; display: flex; align-items: center; justify-content: center; min-height: 400px; }
.product-single-img img { max-width: 100%; max-height: 450px; object-fit: contain; mix-blend-mode: multiply; transition: transform 0.3s; }
[data-theme="dark"] .product-single-img img { mix-blend-mode: normal; }
.product-thumbnails { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; }
.product-thumbnails img { width: 70px; height: 70px; object-fit: contain; border-radius: 8px; background: var(--bg-surface); border: 1px solid var(--border-color); padding: 5px; transition: border-color 0.2s; }
.product-thumbnails img:hover { border-color: var(--accent); }

/* ============ منوی کشویی سایدبار ============ */
.sidebar-menu > li > a { display: flex; align-items: center; justify-content: space-between; }
.sidebar-menu .sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
    border-right: 2px solid var(--accent-soft);
    margin-right: 15px;
    border-radius: 0 0 8px 8px;
    background: var(--bg-surface);
}

/* وقتی منو باز شد */
.sidebar-menu li.open .sub-menu {
    max-height: 500px; /* ارتفاع کافی برای نمایش زیرمنوها */
}
.sidebar-menu li.open > a .fa-chevron-down { transform: rotate(180deg); }


/* ============================================================
   ============ بخش ریسپانسیو (موبایل و تبلت) ============
   ============================================================ */

@media (max-width: 900px) {
    .main-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .header-inner { flex-wrap: wrap; }
    .search-box { order: 3; flex-basis: 100%; max-width: none; }
    .logo img { height: 48px; }
    /* سایدبار (دسته‌بندی و پشتیبانی) بعد از محصولات نمایش داده شود */
    .sidebar {
        order: 2;
        margin-top: 20px; /* فاصله از محصولات */
    }

    /* بخش محصولات اول نمایش داده شود */
    .products-section {
        order: 1;
    }
}

@media (max-width: 768px) {
    /* محصول */
    .product-single { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
    .product-single-img img { max-height: 300px; }

    /* سبد خرید */
    .cart-layout { grid-template-columns: 1fr; }
    .cart-item { flex-direction: column; align-items: flex-start; }
    .cart-item-actions { width: 100%; flex-direction: row; justify-content: space-between; align-items: center; }
    
    /* سایدبار (دسته‌بندی و پشتیبانی) بعد از محصولات نمایش داده شود */
    .sidebar {
        order: 2;
        margin-top: 20px; /* فاصله از محصولات */
    }

    /* بخش محصولات اول نمایش داده شود */
    .products-section {
        order: 1;
    }

    /* تسویه حساب */
    .checkout-layout { grid-template-columns: 1fr; }

    /* پنل کاربری */
    .profile-layout { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
    .topbar-inner { font-size: 12px; }
    .topbar-link { padding: 4px 6px; }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    
    /* لوگو */
    .logo-text { font-size: 16px; }
    .logo img { height: 40px; }
    
    /* سایدبار (دسته‌بندی و پشتیبانی) بعد از محصولات نمایش داده شود */
    .sidebar {
        order: 2;
        margin-top: 20px; /* فاصله از محصولات */
    }

    /* بخش محصولات اول نمایش داده شود */
    .products-section {
        order: 1;
    }
}


/* ============ انیمیشن‌های سراسری ============ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

/* انیمیشن برای کارت محصولات در هنگام لود */
.product-card {
    animation: fadeIn 0.5s ease forwards;
}

/* افکت هاور نرم‌تر برای دکمه‌ها */
.btn-buy, .btn-cancel, .btn-action {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* انیمیشن برای پیام‌های فلش (Alert) */
.alert {
    animation: fadeIn 0.3s ease;
}

/* انیمیشن نرم برای تغییر تم */
body {
    transition: background 0.4s ease, color 0.4s ease;
}

/* انیمیشن ورود برای اسلایدر */
.slider-container {
    animation: fadeIn 0.6s ease;
}

/* انیمیشن برای کارت‌های آماری داشبورد */
.stat-card {
    animation: fadeIn 0.5s ease forwards;
}

/* انیمیشن برای منوی کشویی (اگر از جاوااسکریپت استفاده می‌کنید) */
.sub-menu {
    transition: height 0.3s ease, opacity 0.3s ease;
}



/* حذف حباب پیام پیش‌فرض مرورگر */
input:invalid, select:invalid, textarea:invalid {
    box-shadow: none !important;
    outline: none !important;
}

/* استایل اختصاصی منوهای تنوع (variant-select) */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 35px 10px 15px; /* فضا برای فلش */
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    }
.variant-select {
    flex: 1;
    padding: 10px 35px 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-surface);
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    
    /* حذف ظاهر پیش‌فرض */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 14px;
}

.variant-select:hover {
    border-color: var(--accent);
}

.variant-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* استایل گزینه‌ها (تا جایی که مرورگر اجازه بده) */
.variant-select option {
    background-color: var(--bg-surface);
    color: var(--text-main);
    padding: 10px;
    font-family: inherit;
}

/* ============ استایل روش‌های ارسال و پرداخت ============ */
.shipping-option {
    transition: all 0.2s ease;
}

.shipping-option:hover {
    border-color: var(--accent) !important;
    background: var(--bg-elevated) !important;
}

/* وقتی رادیو انتخاب شده، لیبل رو هایلایت کن */
.shipping-option:has(input:checked) {
    border-color: var(--accent) !important;
    background: var(--accent-soft) !important;
    box-shadow: 0 0 0 1px var(--accent);
}


/* ============ استایل نمادهای اعتماد در فوتر ============ */
.trust-logo-img {
    height: 80px !important; /* اجبار به ارتفاع ۸۰ پیکسل */
    width: auto !important;  /* عرض خودکار متناسب با ارتفاع */
    max-width: 100%;
    border-radius: 8px;
    object-fit: contain;
}

/* ============ دکمه بازگشت به بالا ============ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent);
    color: var(--bg-body);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-hover);
    transform: translateY(-5px);
}

/* در موبایل کمی کوچیک‌تر */
@media (max-width: 768px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        left: 20px;
        font-size: 18px;
    }
}


/* ============ لوگوی درگاه پرداخت ============ */
.payment-logo {
    height: 28px;
    width: auto;
    max-width: 80px;
    object-fit: contain;
    border-radius: 4px;
    background: #fff;
    padding: 2px 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

/* افکت کوچیک روی هاور */
label:hover .payment-logo {
    transform: scale(1.05);
}

/* در تم تیره، پس‌زمینه سفید رو حفظ می‌کنیم تا لوگو دیده بشه */
[data-theme="dark"] .payment-logo {
    background: #fff;
    padding: 3px 5px;
}

/* در موبایل کمی کوچیک‌تر */
@media (max-width: 600px) {
    .payment-logo {
        height: 24px;
        max-width: 60px;
    }
}