:root {
    /* --btn-color: #c62828; */
    --btn-color: var(--primary-color);
    --btn-hover: #b71c1c;
}

/* ===== General ===== */
body {
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    background-color: #f8f9fa;
}

.navbar-bg {
 background-color: #aeaeae;
}


/* ===== Gallery ===== */
.gallery-thumb {
    width: 65px;
    height: 65px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, opacity 0.2s ease;
    opacity: 0.7;
}

.gallery-thumb:hover,
.gallery-thumb.active {
    border-color: var(--bs-primary);
    opacity: 1;
}

/* ===== Product Detail ===== */
.product-main-image img {
    border-radius: 12px;
    max-height: 450px;
    object-fit: cover;
}

.product-description {
    line-height: 2;
    font-size: 0.95rem;
}

/* ===== Price Table ===== */
.table-primary {
    --bs-table-bg: #e8f0fe;
}

/* ===== Toast ===== */
#toast-container {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.toast-msg {
    padding: 12px 24px;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}

.toast-msg.success {
    background-color: #198754;
}

.toast-msg.danger {
    background-color: #dc3545;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(-20px); }
}

/* ===== Cart ===== */
.table td, .table th {
    vertical-align: middle;
}

/* ===== Footer ===== */
footer {
    margin-top: auto;
}

/* ===== Responsive ===== */
@media (max-width: 576px) {
    .product-img {
        height: 160px;
    }

    .gallery-thumb {
        width: 50px;
        height: 50px;
    }
}

.notification-content {
    text-align: center;
}

.notification-link {
    color: #fff;
    text-decoration: underline;
}

.close-btn {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    padding: 0 8px;
}

/* هدر بالا */
.header-top {
    background: #212529;
    color: #ccc;
    font-size: 13px;
    position: sticky;
    top: 0;
    z-index: 1000; /* بالاتر از main-header */
}

.header-top-right span {
    display: flex;
    align-items: center;
}

.header-top-left a {
    color: #ccc;
    display: flex;
    align-items: center;
    padding-top: 3px;
    font-size: 13px;
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    text-decoration: none;
    color: inherit;
}

.cart-icon-wrapper {
    position: relative;
    display: inline-block;
}

.cart-icon-wrapper i {
    font-size: 20px;
}

/* Cart Badge - بالای آیکون */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #ef4444; /* قرمز */
    color: white;
    font-size: 11px;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* اگه عدد دو رقمی شد، بیضی بشه */
.cart-badge:has(+ *) {
    border-radius: 10px;
    padding: 2px 5px;
}


/* هدر اصلی */
.main-header {
    background: #c7c7c7;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 42px; 
    z-index: 999;
}

/* منو */
.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    border-radius: 6px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: #c62828;
    color: #fff;
}


.badge-new {
    background: #c62828;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
}

.badge-special {
    background: #f57c00;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
}

/* منوی موبایل */
.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s;
}

.mobile-menu.active {
    visibility: visible;
    opacity: 1;
}

.mobile-menu-overlay {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: -280px;
    bottom: 0;
    width: 280px;
    background: #fff;
    overflow-y: auto;
    transition: right 0.3s;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}

.mobile-menu.active .mobile-menu-content {
    right: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
}

.close-menu {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
}

.mobile-menu-list {
    padding: 0;
    margin: 0;
    list-style: none;
}


.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s;
    background: #f9fafb;
}

.mobile-submenu.active {
    max-height: 1000px;
}

.mobile-submenu-group {
    border-bottom: 1px solid #e5e7eb;
}

.mobile-submenu-title {
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #c62828;
    background: #fff;
}

.mobile-submenu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    font-size: 13px;
    color: #6b7280;
    border-bottom: 1px solid #f3f4f6;
}

.mobile-submenu-item:hover {
    background: #fff;
    color: #c62828;
}

.toggle-icon {
    transition: transform 0.3s;
}

.toggle-icon.rotate-180 {
    transform: rotate(180deg);
}

/* دکمه همبرگر */
.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .notification-content {
        font-size: 11px;
        padding: 0 40px;
    }
    .main-header{
        top: 0px;
    }
}


.notification-bar {
    background: #7d0000;
    color: #fff;
    font-size: 15px;          /* بزرگ‌تر از 13px */
    font-weight: 600;
    letter-spacing: 0.5px;
    overflow: hidden;
    max-height: 0;
    animation: slideDown 0.5s ease forwards;
}

.notification-content span {
    display: inline-block;
    color: #FFD700;
    animation: colorSwap 1.2s ease-in-out infinite;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.7);
}

@keyframes colorSwap {
    0%,  100% { color: #FFD700; }  /* زرد */
    50%        { color: #ffffff; }  /* سفید */
}


@keyframes blink {
    0%,  100% { opacity: 1; }
    50%        { opacity: 0.2; }
}

@keyframes slideDown {
    to {
        max-height: 50px;
        padding: 8px 0;
    }
}

.notification-bar.hide {
    animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
    from {
        max-height: 50px;
        padding: 8px 0;
    }
    to {
        max-height: 0;
        padding: 0;
    }
}


.mobile-menu-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;                 
    padding: 14px 16px;
    color: #374151;
    font-size: 14px;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s;
    width: 100%;
    text-align: right;
    direction: rtl;
    background: none;
    cursor: pointer;
}

.mobile-menu-item i {
    color: #c62828;
    width: 20px;
    text-align: center;
    margin: 0;
}


.mobile-menu-item:hover {
    background: #f9fafb;
}

.mobile-menu-item i {
    margin-left: 10px;
    color: #c62828;
}

.mobile-group-toggle {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    text-align: right;
}

.mobile-group-toggle:hover {
    background: #f9fafb;
}

.mobile-group-arrow {
    font-size: 12px;
    color: #9ca3af;
    transition: transform 0.3s ease;
}

.mobile-group-toggle.active .mobile-group-arrow {
    transform: rotate(180deg);
}

.mobile-group-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-right: 15px;
}

.mobile-group-list.open {
    max-height: 500px;
}



/*88888888888888888888888888888888888888888888888*/

/* منوی مگا */
.has-mega {
    position: relative;
}

.mega-menu {
    position: absolute;
    top: 100%;
    right: 0px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 10px 25px;
    width: max-content;
    max-width: 90vw; /* از لبه صفحه نره بیرون */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    z-index: 1000;
    background: white;
    border: 1px solid rgb(229, 231, 235);
    border-radius: 8px;
    padding: 20px;
    transition: 0.3s;
}

.has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* گرید 4 ردیفی */
.mega-container {
    display: grid;
    grid-template-rows: repeat(4, auto);
    grid-auto-flow: column;
    grid-auto-columns: minmax(120px, 150px);
    gap: 8px;
}

.mega-item a {
    display: block;
    padding: 10px 15px;
    color: #374151;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.mega-item a:hover {
    background: #ef4444; /* قرمز */
    color: white;
    transform: translateX(-3px);
}

/* فلش منو */
.nav-link .fa-chevron-down {
    transition: transform 0.3s ease;
}

.has-mega:hover .nav-link .fa-chevron-down {
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .mega-menu {
        min-width: 100%;
        right: 0;
        left: 0;
    }
    
    .mega-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-auto-flow: row;
        max-height: 300px;
        overflow-y: auto;
    }
}



/* grid */
/* Grid محصولات - 4 ستونی */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 2rem;
}

/* Product border */
/* کارت محصول */
/* .product-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    border-color: #c20d0d;
    box-shadow: 0 8px 24px rgba(194, 13, 13, 0.15);
    transform: translateY(-5px);
} */

.product-card .product-image,
.product-card .product-info {
    position: relative;
    z-index: 2;
}
/* متغیر زاویه رو قابل انیمیشن می‌کنیم */
@property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.product-card {
    position: relative;
    background: #fff;
    border-radius: 15px;
    /* padding: 1rem; */
    border: 2px solid #e5e7eb;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.product-card::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 15px;      /* با کارت یکی باشه */
    padding: 3px;             /* ضخامت نوار، از 2 بردمش 3 */
    background: conic-gradient(
        from var(--angle),
        transparent 0%,
        #ff4d4d 40%,
        #c20d0d 50%,
        #ff4d4d 60%,
        transparent 100%
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.product-card:hover {
    border-color: transparent;     /* border ثابت رو محو کن تا فقط نوار چرخان دیده شه */
    box-shadow: 0 8px 24px rgba(194, 13, 13, 0.15);
    transform: translateY(-5px);
}

.product-card:hover::before {
    opacity: 1;
    animation: rotate-border 3s linear infinite;
}

@keyframes rotate-border {
    to { --angle: 360deg; }
}



/* تصویر محصول */
/* .product-image {
    position: relative;
    display: block;
    width: 100%;
    height: 320px;
    overflow: hidden;
    background: #f7f7f7;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
} */

.product-image {
    position: relative;
    display: block;
    height: 280px; /* ارتفاع ثابت برای desktop */
    overflow: hidden;
    background: #f9fafb;
    border-radius: 15px 15px 0px 0px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* این خط مهم‌ترین چیزه */
    object-position: center;
    transition: transform 0.3s ease;
    border-radius: 15px 15px 0px 0px;
}


.product-card:hover .product-image img {
    transform: scale(1.08);
}

/* بج تخفیف */
.discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #c20d0d;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(194, 13, 13, 0.3);
}

/* اطلاعات محصول */
.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* عنوان محصول - بزرگتر */
.product-title {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

.product-title a:hover {
    color: #c20d0d;
}

/* قیمت */
.product-price {
    margin-top: auto;
    margin-bottom: 15px;
}

.price-discount {
    color: #c20d0d;
    font-weight: bold;
    font-size: 18px;
    display: block;
    margin-bottom: 5px;
}

.price-old {
    display: inline-block;
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.price-normal {
    font-weight: bold;
    font-size: 18px;
    color: #222;
}

.currency {
    font-size: 14px;
    font-weight: normal;
    margin-right: 4px;
}

/* دکمه افزودن به سبد */
.add-to-cart-btn {
    width: 100%;
    background: var(--btn-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart-btn:hover {
    /* background: #a00a0a; */
    background: linear-gradient(135deg, #fc0a1e 0%, #fa4e5f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(194, 13, 13, 0.3);
}

.cart-icon {
    width: 20px;
    height: 20px;
}

/* Responsive */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    .product-card {
        background: #fff;
        border: 2px solid #e5e7eb;
        border-radius: 12px;
        overflow: hidden;
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
        height: 100%;
        padding: 0rem;
    }

    .product-card:hover {
        border-color: #c20d0d;
        box-shadow: 0 8px 24px rgba(194, 13, 13, 0.15);
        transform: translateY(-5px);
    }
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .product-image {
        height: 250px;
    }
    
    .product-title {
        font-size: 16px;
    }
    
    .product-info {
        padding: 15px;
    }
    
    .add-to-cart-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .main-header{
        top: 0px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-title {
        font-size: 14px;
    }
    
    .product-info {
        padding: 12px;
    }
    
    .price-discount,
    .price-normal {
        font-size: 15px;
    }
    
    .add-to-cart-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}


/* pagination */

.pagination{
    display:flex;
    justify-content:center;
    gap:8px;
}

.page-btn{
    padding:8px 12px;
    border:1px solid #ddd;
    text-decoration:none;
    color:#333;
}

.page-btn.active{
    background:#c20d0d;
    color:#fff;
    border-color:#c20d0d;
}

/* .out-of-stock-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(220, 38, 38, 0.95);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 3;
} */

.product-card.out-of-stock {
    opacity: 0.7;
}

.product-card.out-of-stock .product-image img {
    filter: grayscale(50%);
}


.unavailable-text {
    font-size: 18px;
    color: #222;
    /* font-weight: bold;
    color: #dc2626;
    font-size: 18px; */
    font-weight: 500;
    display: block;

}

/* دکمه غیرفعال */
.add-to-cart-btn.disabled {
    background: #9ca3af;
    opacity: 0.6;
}

.add-to-cart-btn.disabled:hover {
    background: #9ca3af;
    transform: none;
}



/* ***********Prouct detail*********** */

/* ==================== Product Detail Page ==================== */

:root {
    --primary-color: #ef394e;
    --text-dark: #23254e;
    --text-gray: #81858b;
    --border-color: #e0e0e6;
    --bg-light: #f9f9f9;
}

* {
    box-sizing: border-box;
}

.product-detail-page {
    max-width: 1920;
    margin: 0 auto;
    padding: 20px;
}

/* Breadcrumb */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-gray);
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
    font-weight: 600;
}

.breadcrumb-nav a {
    color: var(--text-gray);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-nav a:hover {
    color: var(--primary-color);
}

.breadcrumb-nav span:last-child {
    color: var(--text-dark);
    font-weight: 500;
}

/* Main Grid */
/* .product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;

} */
.product-detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr 1fr;  /* نسبت بهتر */
    gap: 32px;
    max-width: 1400px;  /* محدود کردن عرض کل */
    margin: 0 auto;
    padding: 30px 0px;
}

.product-purchase-box {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    position: sticky;
    top: 120px;
    height: fit-content;
    max-height: calc(100vh - 100px);
}
/* ========== Gallery Section ========== */
.product-gallery {
    position: sticky;
    top: 120px;
    height: fit-content;
    max-height: calc(100vh - 100px);  /* جلوگیری از بلند شدن بیش از حد */
}

.main-image-container {
    position: relative;
    width: 100%;
    height: 420;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000; /* اگر عکس شفاف بود */
}

/* لایه blur شده پشت عکس */
.blurred-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.blurred-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(40px) brightness(0.7); /* blur بیشتر + کمی تیره‌تر */
    transform: scale(1.3); /* حذف کامل لبه‌های سفید */
}

/* عکس اصلی روی blur */
.main-image-container > img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0; /* حذف padding */
}

/* موبایل */
@media (max-width: 768px) {
    .main-image-container {
        height: 350px;
    }
    
    .blurred-bg img {
        filter: blur(30px) brightness(0.7);
    }
}



/* Zoom Overlay */
.zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.zoom-overlay.active {
    display: flex;
}

.zoom-overlay img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

/* Thumbnails */
.thumbnails-container {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 0;
}

.thumbnails-container::-webkit-scrollbar {
    height: 6px;
}

.thumbnails-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.gallery-thumb:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.gallery-thumb.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

/* ========== Product Info Section ========== */
.product-info-detail {
    padding: 0;  /* حذف padding اضافی */
    display: flex;
    flex-direction: column;
}

.product-detail-container {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 20px 0;
}

.product-detail-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0px 0 10px 0;
    line-height: 1.5;
}

/* Selected Model Badge */
.selected-model-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #d81818, #e34747);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.selected-model-badge .label {
    opacity: 0.9;
}

.selected-model-badge .value {
    font-weight: 700;
}

/* Tags */
.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 0px;
}

.tag-badge {
    background: #d6d6d6;
    color: #5c5c5c;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

/* Description */
.product-description {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.8;
    /* padding-bottom: 12px; */

}

/* Selection S*/
.selection-section {
    margin-bottom: 32px;
    border-top: 1px solid var(--border-color);
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-dark);
}

/* Model Options */
.model-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    grid-template-columns: repeat(3, 1fr); ;
    gap: 14px;
}

.model-option {
    position: relative;
    border: 2px solid var(--border-color);
    border-radius: 14px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: white;
}

.model-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.model-option.active {
    border-color: var(--primary-color);
    background: #fff5f6;
    box-shadow: 0 8px 20px rgba(239, 57, 78, 0.12);
}

.model-option input {
    display: none;
}

.model-content {
    display: flex;
    gap: 12px;
    align-items: center;
}

.model-thumb {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 8px;
    background: #f7f7f7;
    transition: transform 0.25s ease;
}

.model-option:hover .model-thumb {
    transform: scale(1.12);
}

.model-details {
    flex: 1;
}

.model-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.model-price {
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
}

.model-stock {
    margin-top: 4px;
    color: #d32f2f;
    font-size: 12px;
}

.out-of-stock {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Price Box */
.price-box {
    background: #fafafa;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
}

.price-label {
    font-size: 16px;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.final-price {
    font-size: 24px;
    font-weight: 1000;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: left;

}

/* Product Actions Container */

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    width: 45%;
    align-self: center;
    max-height: 42px;
}

.qty-btn {
    width: 44px;
    height: 52px;
    border: none;
    background: white;
    color: var(--text-dark);
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: #f5f5f5;
    color: var(--primary-color);
}

.qty-btn:active {
    transform: scale(0.95);
}

.quantity-selector input {
    width: 50px;
    height: 52px;
    border: none;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    background: transparent;
    padding: 0;
    margin: 0;
    line-height: normal;
    -moz-appearance: textfield; /* حذف فلش‌های فایرفاکس */
}

/* حذف فلش‌های کروم/سافاری */
.quantity-selector input::-webkit-outer-spin-button,
.quantity-selector input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-selector input:focus {
    outline: none;
}

/* Buttons */
/* .add-to-cart-btn-detail {
    flex: 1;
    border: none;
    background: var(--btn-color);
    color: white;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.add-to-cart-btn-detail:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 57, 78, 0.25);
} */

.add-to-cart-btn-detail {
    position: relative;
    overflow: visible;
    flex: 1;
    border: 3px solid transparent;
    border-radius: 12px;
    background: var(--btn-color);
    color: white;
    padding: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.add-to-cart-btn-detail:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 57, 78, 0.25);
}

.add-to-cart-btn-detail::before {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: 14px;
    padding: 3px;
    background: conic-gradient(
        from var(--angle),
        transparent 0deg,
        #fff 25deg,
        #fff 50deg,
        transparent 75deg,
        transparent 360deg
    );
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.add-to-cart-btn-detail:hover::before {
    opacity: 1;
    animation: rotate-border 2s linear infinite;
}


.add-to-cart-btn-detail.unavailable {
    background: #9ca3af;
    opacity: 0.6;
    cursor: not-allowed;
    width: 100%;
}

.add-to-cart-btn-detail.unavailable:hover {
    background: #9ca3af;
    transform: none;
    box-shadow: none;
}

/* Mobile */
@media (max-width: 992px) {

    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .product-gallery {
        position: static;
    }

    .main-image-container {
        background-color: #f8f9fa;
        height: 360px;
    }
}

@media (max-width: 768px) {

    .product-detail-page {
        padding: 14px;
    }

    .unavailable-text{
        font-size: 12px;
    }
    .main-image-container {
        background-color: #f8f9fa;
        height: 300px;
    }

    .gallery-thumb {
        width: 62px;
        height: 62px;
    }

    .model-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .final-price {
        font-size: 24px;
        text-align: left;
    }

    .product-actions {
        gap: 10px;
    }

    .quantity-selector {
        justify-content: center;
    }

    .add-to-cart-btn-detail {
        width: 100%;
        font-size: 13px;
    }
}


/* ========== Options Section ========== */

.options-section {
    border-top: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.option-group {
    margin-top: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.option-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #1a1a1a;
}

/* Grid Layout - 3 columns */
.option-choices {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

/* Option Item Container */
.option-item {
    position: relative;
}

/* Hide default radio/checkbox */
.option-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Label as clickable card */
.option-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 14px 10px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
}

/* Hover effect */
.option-label:hover {
    /* border-color: var(--primary-color); */
    border-color: #179b48;
    box-shadow: 0 2px 12px rgba(239, 65, 54, 0.15);
    transform: translateY(-2px);
}

/* Active/Selected state */
.option-input:checked + .option-label {
    /* border-color: var(--primary-color); */
    border-color: #179b48;

    /* background: linear-gradient(135deg, #fff5f4 0%, #ffffff 100%); */
    background: linear-gradient(135deg, #f4fffc 0%, #ffffff 100%);

    /* box-shadow: 0 4px 16px rgba(239, 65, 54, 0.2); */
    box-shadow: 0 4px 16px rgba(54, 239, 84, 0.2);
}

/* Checkmark for selected */
.option-input:checked + .option-label::after {
    content: '✓';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 20px;
    height: 20px;
    /* background: var(--primary-color); */
    background: #179b48;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* Option Content */
.option-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.option-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

.option-input:checked + .option-label .option-name {
    /* color: var(--primary-color); */
    color: #00742b;
    font-weight: 600;
}

.option-price {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 2px;
}

/* Stock badge */
.option-stock {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 500;
    display: inline-block;
    margin-top: 4px;
}

.option-stock.available {
    background: #e8f5e9;
    color: #2e7d32;
}

.option-stock.unavailable {
    background: #ffebee;
    color: #c62828;
}

/* Unavailable/Disabled state */
.option-unavailable .option-label {
    background: #f5f5f5;
    border-color: #d1d5db;
    cursor: not-allowed;
    opacity: 0.6;
}

.option-unavailable .option-label:hover {
    border-color: #d1d5db;
    box-shadow: none;
    transform: none;
}

.option-unavailable .option-name {
    color: #9ca3af;
}

/* Responsive */
@media (max-width: 992px) {
    .option-choices {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .option-choices {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .option-label {
        min-height: 60px;
        padding: 12px 10px;
    }
}


/* Notificatio Bar */
#notification-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.notification {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInUp 0.4s ease-out;
    border-right: 4px solid #22c55e;
    position: relative;
    overflow: hidden;
}

.notification.error {
    border-right-color: #ef4444;
}

.notification.warning {
    border-right-color: #f59e0b;
}

.notification-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification.success .notification-icon {
    background: #22c55e;
    color: white;
}

.notification.error .notification-icon {
    background: #ef4444;
    color: white;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 4px;
}

.notification-message {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

.notification-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.notification-btn {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.notification-btn.primary {
    background: #3b82f6;
    color: white;
}

.notification-btn.primary:hover {
    background: #2563eb;
}

.notification-btn.secondary {
    background: #f3f4f6;
    color: #6b7280;
}

.notification-btn.secondary:hover {
    background: #e5e7eb;
}

.notification-close {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #f3f4f6;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    transition: all 0.2s;
}

.notification-close:hover {
    background: #e5e7eb;
    color: #1f2937;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notification.hiding {
    animation: slideOutDown 0.3s ease-in forwards;
}

@keyframes slideOutDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #ef4444, #dc2626);
    border-radius: 0 0 0 12px;
    transition: width 0.1s linear;
}

/* CART */
/* ==================== Cart Page Styles ==================== */


/* ==================== Cart Page Styles ==================== */


/* ==================== Checkout Button ==================== */



.shipping-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


    .cart-page * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    .cart-page {
        background: #f8f9fa;
        min-height: 100vh;
        padding: 30px 0;
        font-family: inherit;
    }

    /* ========== Container ========== */
    .cart-wrapper {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 20px;
    }

    /* ========== Header ========== */
    .cart-page-header {
        background: white;
        padding: 20px 30px;
        border-radius: 12px;
        margin-bottom: 30px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.06);
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .cart-header-icon {
        /* background: linear-gradient(135deg, #FF4757 0%, #ff6b7a 100%); */
        background: #ee4e4e;
        color: white;
        width: 48px;
        height: 48px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
    }

    .cart-page-header h1 {
        font-size: 22px;
        font-weight: 700;
        color: #2c3e50;
        letter-spacing: -0.3px;
    }

    .cart-count {
        color: #ffffff;
        padding: 6px 14px;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        margin-right: auto;
        background: #ee4e4e;
        /* background: linear-gradient(135deg, #FF4757 0%, #ff6b7a 100%); */
    }

    /* ========== Main Layout ========== */
    .cart-main {
        display: grid;
        grid-template-columns: 1fr 400px;
        gap: 30px;
        align-items: start;
    }

    /* ========== Cart Items ========== */
    .cart-items-section {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .cart-item {
        background: white;
        border-radius: 16px;
        padding: 25px;
        box-shadow: 0 2px 16px rgba(0,0,0,0.06);
        display: grid;
        grid-template-columns: 160px 1fr auto;
        gap: 25px;
        align-items: start;
        position: relative;
        transition: all 0.3s ease;
    }

    .cart-item:hover {
        box-shadow: 0 4px 24px rgba(0,0,0,0.1);
        transform: translateY(-2px);
        background: #f3ffb1;
    }

    /* ========== Product Image ========== */
    .item-image-wrapper {
        width: 160px;
        height: 160px;
        border-radius: 12px;
        overflow: hidden;
        background: #f8f9fa;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    .item-image-wrapper img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .sale-badge {
        position: absolute;
        top: 10px;
        left: 10px;
        background: linear-gradient(135deg, #FF4757 0%, #ff6b7a 100%);
        color: white;
        padding: 6px 14px;
        border-radius: 8px;
        font-size: 12px;
        font-weight: 700;
        box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
        z-index: 2;
    }

    /* ========== Product Details ========== */
    .item-info {
        display: flex;
        flex-direction: column;
        gap: 14px;
        flex: 1;
    }

    .item-title {
        font-size: 18px;
        font-weight: 600;
        color: #2c3e50;
        line-height: 1.7;
        margin-bottom: 4px;
    }

    .item-title a {
        color: inherit;
        text-decoration: none;
        transition: color 0.2s;
    }

    .item-title a:hover {
        color: #FF4757;
    }

    /* ========== Meta Info ========== */
    .item-meta {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .meta-row {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        color: #6c757d;
    }

    .meta-row i {
        width: 18px;
        font-size: 14px;
        opacity: 0.7;
    }

    .model-badge {
        background: #f1f3f5;
        color: #495057;
        padding: 6px 12px;
        border-radius: 8px;
        font-size: 13px;
        font-weight: 600;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        width: fit-content;
    }

    /* ========== Options ========== */
    .selected-options {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 5px;
    }

    .option-item-cart {
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        padding: 6px 12px;
        border-radius: 8px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 13px;
        color: #495057;
        font-weight: 600;
    }

    .option-color {
        width: 16px;
        height: 16px;
        border-radius: 50%;
        border: 2px solid white;
        box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
    }

    /* ========== Stock Status ========== */
    .stock-status {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 8px 14px;
        border-radius: 10px;
        font-size: 13px;
        font-weight: 600;
        width: fit-content;
    }

    .stock-status.in-stock {
        background: rgba(40, 167, 69, 0.1);
        color: #28a745;
    }

    .stock-status.out-stock {
        background: rgba(220, 53, 69, 0.1);
        color: #dc3545;
    }

    /* ========== Price & Actions ========== */
    .item-actions {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: space-between;
        min-height: 160px;
        min-width: 180px;
    }

    .price-section {
        text-align: left;
    }

    .old-price {
        color: #adb5bd;
        font-size: 14px;
        text-decoration: line-through;
        margin-bottom: 5px;
    }

    .current-price {
        color: #2c3e50;
        font-size: 20px;
        font-weight: 800;
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .price-currency {
        font-size: 14px;
        font-weight: 600;
        color: #6c757d;
    }

    /* ========== Quantity Controls ========== */
    .quantity-section {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 30px;
    }

    .quantity-controls {
        display: flex;
        align-items: center;
        background: white;
        border: 2px solid #FF4757;
        border-radius: 14px;
        overflow: hidden;
        height: 42px;
    }

    .qty-btn-cart {
        width: 46px;
        height: 52px;
        border: none;
        background: transparent;
        color: #FF4757;
        font-size: 17px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .qty-btn-cart:hover {
        background: #FF4757;
        color: white;
    }

    .qty-btn-cart.remove-btn:hover {
        background: #dc3545;
    }

    .qty-number {
        width: 36px;
        text-align: center;
        font-size: 18px;
        font-weight: 700;
        color: #2c3e50;
    }

    .item-total {
        font-size: 16px;
        color: #6c757d;
        font-weight: 600;
    }

    .item-total strong {
        color: #2c3e50;
        font-size: 18px;
    }

    /* ========== Summary Card ========== */
    .cart-summary {
        position: sticky;
        top: 120px;
    }

    .summary-card {
        background: white;
        border-radius: 16px;
        padding: 30px;
        box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    }



    .summary-title {
        font-size: 20px;
        font-weight: 700;
        color: #2c3e50;
        margin-bottom: 25px;
        padding-bottom: 20px;
        border-bottom: 1px solid #f1f3f5;
    }
    
    .final-price-card{
        /* font-size: 24px;
        font-weight: 800;
        color: var(--primary-color);
        margin-bottom: 10px; */
        color: #c62828;
        font-size: 1.15rem;
    }

    .summary-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 18px;
        font-size: 15px;
        color: #424242;
    }

    .summary-row.total {
        margin-top: 25px;
        padding-top: 25px;
        border-top: 1px solid #f1f3f5;
        font-size: 20px;
        font-weight: 800;
        color: #2c3e50;
    }

    .summary-row.discount {
        color: #28a745;
        font-weight: 600;
    }

    .checkout-btn {
        width: 100%;
        margin-top: 1.5rem;
        border: none;
        text-decoration: none;
        background: var(--btn-color);
        color: #fff;
        height: 54px;
        border-radius: 14px;
        font-size: 1rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.7rem;
        transition: 0.25s ease;
    }

    .checkout-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 24px rgba(239, 68, 68, 0.3);
    }

    .checkout-btn:active {
        transform: scale(0.98);
    }

        /* ========== Empty Cart ========== */
    .empty-cart {
        background: white;
        border-radius: 16px;
        padding: 80px 40px;
        text-align: center;
        box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    }

    .empty-cart-icon {
        width: 120px;
        height: 120px;
        margin: 0 auto 30px;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 50px;
        color: #adb5bd;
    }

    .empty-cart h2 {
        font-size: 24px;
        font-weight: 700;
        color: #2c3e50;
        margin-bottom: 15px;
    }

    .empty-cart p {
        font-size: 16px;
        color: #6c757d;
        margin-bottom: 35px;
        line-height: 1.6;
    }

    .browse-btn {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 16px 40px;
        /* background: linear-gradient(135deg, #FF4757 0%, #ff6b7a 100%); */
        background: var(--btn-color);
        color: white;
        text-decoration: none;
        border-radius: 14px;
        font-size: 16px;
        font-weight: 700;
        transition: all 0.3s ease;
        box-shadow: 0 4px 14px rgba(255, 71, 87, 0.35);
    }

    .browse-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(255, 71, 87, 0.45);
        color: white;
    }

    /* ========== Loading State ========== */
    .loading-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

    .loading-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .loading-spinner {
        width: 60px;
        height: 60px;
        border: 4px solid rgba(255,255,255,0.3);
        border-top-color: white;
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

    @keyframes spin {
        to { transform: rotate(360deg); }
    }

    /* ========== Responsive Design ========== */
    @media (max-width: 1200px) {
        .cart-main {
            grid-template-columns: 1fr 350px;
            gap: 25px;
        }

        .cart-item {
            grid-template-columns: 140px 1fr auto;
            gap: 20px;
            padding: 20px;
        }

        .item-image-wrapper {
            width: 140px;
            height: 140px;
        }

        .item-actions {
            min-width: 160px;
        }
    }

    @media (max-width: 992px) {
        .cart-main {
            grid-template-columns: 1fr;
            gap: 30px;
        }

        .cart-summary {
            position: static;
            order: -1;
        }

        .summary-card {
            max-width: 500px;
            margin: 0 auto;
        }
    }

    @media (max-width: 768px) {
        .cart-page {
            padding: 20px 0;
        }

        .cart-wrapper {
            padding: 0 15px;
        }

        .cart-page-header {
            padding: 15px 20px;
            flex-wrap: wrap;
        }

        .cart-page-header h1 {
            font-size: 18px;
        }

        .cart-count {
            order: 3;
            width: 100%;
            text-align: center;
            margin-top: 10px;
        }

        .cart-item {
            grid-template-columns: 1fr;
            gap: 20px;
            padding: 20px;
        }

        .item-image-wrapper {
            width: 100%;
            height: 200px;
            margin: 0 auto;
        }

        .item-actions {
            width: 100%;
            min-height: auto;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
        }

        .quantity-section {
            flex-direction: row;
            align-items: center;
            gap: 20px;
        }

        .current-price {
            font-size: 20px;
        }

        .summary-card {
            padding: 25px 20px;
        }
    }

    @media (max-width: 576px) {
        .cart-item {
            padding: 15px;
        }

        .item-title {
            font-size: 15px;
        }

        .selected-options {
            gap: 8px;
        }

        .option-item {
            font-size: 12px;
            padding: 6px 10px;
            flex: 0 0 calc(50% - 4px);
            width: auto; 
        }

        .quantity-controls {
            height: 52px;
        }

        .qty-btn {
            width: 54px;
            height: 52px;
            font-size: 16px;
        }

        .qty-number {
            width: 50px;
            font-size: 16px;
        }

        .item-actions {
            flex-direction: column;
            align-items: stretch;
            gap: 20px;
        }

        .quantity-section {
            justify-content: space-between;
        }

        .price-section {
            text-align: center;
        }

        .current-price {
            justify-content: left;
        }

        .checkout-btn {
            height: 54px;
            font-size: 15px;
        }
    }



    /* Search bar */

/* Search Bar Styles - Red Theme */
.search-wrapper {
    position: relative;
    flex: 0 0 auto;
    margin-left: 20px;
}

.search-container {
    position: relative;
    width: 300px;
}

.search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
    direction: rtl;
}

.search-input:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.search-input::placeholder {
    color: #999;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #dc2626;
    pointer-events: none;
}

.search-results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    max-width: 90vw;
    width: 800px;
    max-height: 500px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
    direction: rtl;
}

.search-results.active {
    display: block;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 12px;
    direction: rtl;
}

.search-product-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #333;
    background: #f8f9fa;
    direction: rtl;
}

.search-product-item:hover {
    background: linear-gradient(135deg, #FF4757 0%, #ff6b7a 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.search-product-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.search-product-info {
    flex: 1;
    min-width: 0;
}

.search-product-title {
    font-size: 13px;
    font-weight: 500;
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.search-loading,
.search-no-results,
.search-error {
    padding: 30px;
    text-align: center;
    color: #666;
}

.search-loading i,
.search-no-results i,
.search-error i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.search-loading i {
    color: #dc2626;
    animation: spin 1s linear infinite;
}

.search-no-results i {
    color: #999;
}

.search-error i {
    color: #ef4444;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.search-view-all {
    display: block;
    padding: 12px;
    text-align: center;
    background: linear-gradient(135deg, #FF4757 0%, #ff6b7a 100%);
    color: white;
    text-decoration: none;
    border-radius: 0 0 12px 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.search-view-all:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    color: white;
}

/* Responsive */
@media (max-width: 1200px) {
    .search-results {
        width: 700px;
    }
    
    .search-results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .search-wrapper {
        margin-left: 10px;
    }
    
    .search-container {
        width: 200px;
    }
    
    .search-results {
        width: 95vw;
        right: -50px;
    }
    
    .search-results-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    
    .search-product-item img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .search-container {
        width: 150px;
    }
    
    .search-input {
        padding: 8px 35px 8px 12px;
        font-size: 13px;
    }
    
    .search-icon {
        left: 10px;
        font-size: 14px;
    }
}


/* NEW Product Detail */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}


.trust-badges {
    background: linear-gradient(to bottom, #ffffff, #fdcece);
    /* background: #fdbebe; */
}

.trust-badge-img {
    max-width: 90px;
    height: auto;
    transition: transform 0.3s ease;
    filter: grayscale(20%);
}

.trust-badge-img:hover {
    transform: scale(1.05);
    filter: grayscale(0%);
}

@media (max-width: 768px) {
    .trust-badge-img {
        max-width: 90px;
    }
}
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 20px;
}

/* برای موبایل تک ستونی بشه */
@media (max-width: 768px) {
    .contact-info-grid {
        grid-template-columns: 1fr;
    }
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contact-item.full-width {
    grid-column: 1 / -1;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 20px;
    color: white;
}

.phone-icon {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.email-icon {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.telegram-icon {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.whatsapp-icon {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.location-icon {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.contact-text {
    flex: 1;
    text-align: right;
}

.contact-label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 3px;
}

.contact-value {
    color: #c0392b;
    font-weight: 600;
    text-decoration: none;
    font-size: 15px;
}

.contact-value:hover {
    text-decoration: underline;
}

.working-hours h5 {
    font-weight: 700;
    color: #444;
}

.working-hours p {
    color: #666;
    font-size: 15px;
}



/* Unavailable Item Styles */
.unavailable-item {
    position: relative;
    pointer-events: none;
}

.unavailable-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(200, 200, 200, 0.684);
    border-radius: inherit;
    z-index: 1;
}

.unavailable-item .unavailable-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: all;
}

.unavailable-overlay .unavailable-text {
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: rgb(255 0 0 / 90%);
}

.unavailable-overlay .remove-unavailable-btn {
    background: rgb(230 51 51 / 90%);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: background 0.2s;
    pointer-events: all;
}

.unavailable-overlay .remove-unavailable-btn:hover {
    background: #b02a37;
}

.unavailable-overlay,
.low-stock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 5;
}

/* ===== Low Stock (کمبود موجودی) ===== */
.low-stock-item {
    position: relative;
    pointer-events: none;
}

.low-stock-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 193, 7, 0.45); /* پررنگ‌تر تا دیده بشه */
    border-radius: inherit;
    z-index: 1;
}

.low-stock-item .low-stock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: all;
}

.low-stock-overlay .low-stock-text {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: rgb(204 102 0 / 95%);
}

.low-stock-overlay .reduce-stock-btn {
    background: rgb(245 158 11 / 95%);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-family: inherit;
    transition: background 0.2s;
    pointer-events: all;
}

.low-stock-overlay .reduce-stock-btn:hover {
    background: #d97706;
}


/* ===== CHECKOUT PAGE ===== */
.checkout-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.checkout-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-weight: 700;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

/* بخش‌ها */
.checkout-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.section-title {
    margin-top: 15px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: #c62828;
}


/* فرم آدرس جدید */
.new-address-form {
    margin-top: 16px;
    padding: 16px;
    background: #fafafa;
    border-radius: 10px;
}

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
}

.form-group.full-width {
    flex: 1 1 100%;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #424242;
}

.form-group input,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid #bdbdbd;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #c62828;
    box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.1);
}

/* روش ارسال */
.shipping-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shipping-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.shipping-card:hover {
    border-color: #ef9a9a;
}

.shipping-card.selected {
    border-color: #c62828;
    background: #fbe9e7;
}

.shipping-card input[type="radio"] {
    accent-color: #c62828;
}

.shipping-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.shipping-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.shipping-desc {
    font-size: 0.8rem;
    color: #616161;
}

.shipping-time {
    font-size: 0.8rem;
    color: #9e9e9e;
}

.shipping-price {
    font-weight: 600;
    color: #c62828;
    white-space: nowrap;
}

/* کد تخفیف */
.discount-input-group {
    display: flex;
    gap: 10px;
}

.discount-input-group input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #bdbdbd;
    border-radius: 8px;
    font-size: 0.9rem;
}

.discount-input-group input:focus {
    outline: none;
    border-color: #c62828;
}

.btn-apply-discount {
    padding: 10px 20px;
    background: var(--btn-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-apply-discount:hover {
    background: #b71c1c;
}

.discount-message {
    margin-top: 8px;
    font-size: 0.85rem;
}

.discount-message.success {
    color: #2e7d32;
}

.discount-message.error {
    color: #c62828;
}

/* خلاصه سفارش */
.checkout-summary {
    position: sticky;
    top: 20px;
}

.summary-box {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.summary-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.summary-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 12px 0;
}

.total-row {
    font-size: 1.05rem;
    font-weight: 700;
    color: #212121;
}

.total-value {
    color: #c62828;
    font-size: 1.15rem;
}

.discount-value {
    color: #2e7d32;
}

.btn-pay {
    width: 100%;
    padding: 14px;
    margin-top: 20px;
    background: var(--btn-color);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.25s ease;
}

.btn-pay:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(239, 68, 68, 0.3);
}

.btn-pay:active {
    transform: scale(0.98);
}

.btn-pay:disabled {
    background-color: #9ca3af;
}

/* ریسپانسیو */
@media (max-width: 900px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .checkout-summary {
        position: static;
    }
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
    }
}

/* Gift Discount Box */
.gift-discount-box {
    background: linear-gradient(135deg, #fff5f5, #fff);
    border: 2px dashed var(--primary-color, #ef394e);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-top: 20px;
    margin-bottom: 10px;
    box-shadow: 0 2px 12px rgba(239, 57, 78, 0.08);
}

.gift-discount-box i {
    font-size: 2.2rem;
    color: var(--primary-color, #ef394e);
    margin-bottom: 12px;
    display: block;
}

.gift-discount-box p {
    color: var(--text-dark, #23254e);
    font-size: 0.95rem;
    margin-bottom: 14px;
    line-height: 1.8;
}

.gift-discount-box .discount-code {
    display: inline-block;
    background: var(--primary-color, #ef394e);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 10px 28px;
    border-radius: 8px;
    direction: ltr;
    user-select: all;
    cursor: pointer;
}


/* Account CSS */

/* ===== Dashboard ===== */
.dashboard-container {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;align-items: flex-start;
}

.dashboard-sidebar {
    width: 240px;
    flex-shrink: 0;background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    position: sticky;
    top: 1rem;
}

.dashboard-sidebar .user-info {
    background: var(--primary, #c0392b);
    color: #fff;
    padding: 1.2rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
}

.dashboard-sidebar .user-info i {
    font-size: 1.8rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.sidebar-nav a {
    padding: 0.85rem 1.2rem;
    color: #444;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s, color 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: #fdf0ef;
    color: var(--primary, #c0392b);
}

.sidebar-nav a.logout-link {
    color: #e74c3c;
    margin-top: auto;
}

.sidebar-nav a.logout-link:hover {
    background: #fdf0ef;
}

.dashboard-main {
    flex: 1;
    min-width: 0;
}

.dashboard-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary, #c0392b);
}

.dashboard-section {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.section-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h2 i {
    color: var(--primary, #c0392b);
}

.section-header a {
    font-size: 0.85rem;
    color: var(--primary, #c0392b);
    text-decoration: none;
}

.orders-table-wrapper {
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.orders-table th {
    background: #f8f8f8;
    padding: 0.75rem 1rem;
    text-align: right;
    color: #555;
    font-weight: 600;
    border-bottom: 2px solid #eee;
}

.orders-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

.orders-table tr:last-child td {
    border-bottom: none;
}

.orders-table tr:hover td {
    background: #fafafa;
}

.order-status {
    display: inline-block;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-pending   { background: #fff3cd; color: #856404; }
.status-confirmed { background: #d1ecf1; color: #0c5460; }
.status-shipped   { background: #cce5ff; color: #004085; }
.status-delivered { background: #d4edda; color: #155724; }
.status-cancelled { background: #f8d7da; color: #721c24; }

.order-detail-status{
    width: max-content;
    padding: 0px 10px;
}

.btn-detail {
    padding: 0.3rem 0.8rem;
    background: var(--primary, #c0392b);
    color: #fff;
    border-radius: 6px;
    font-size: 0.82rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn-detail:hover { opacity: 0.85; }

.empty-state {
    text-align: center;
    color: #999;
    padding: 2rem;
    font-size: 0.95rem;
}
/* ===== Order Detail ===== */
.order-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.2rem;
}

.order-detail-header .order-id {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
}

.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.order-item-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #fafafa;
    border-radius: 8px;
}

.order-item-row img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.order-item-info {
    flex: 1;font-size: 0.9rem;
    color: #333;
}

.order-item-info .item-name {
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.order-item-info .item-meta {
    color: #888;
    font-size: 0.82rem;
}

.order-summary-box {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.order-summary-box .summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    color: #555;
    border-bottom: 1px solid #eee;
}

.order-summary-box .summary-row:last-child {
    border-bottom: none;
    font-weight: 700;
    color: #222;
    font-size: 1rem;
}
/* ===== Addresses ===== */
.address-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.address-card {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 1rem;
    position: relative;
    font-size: 0.9rem;
    color: #444;
    line-height: 1.7;
    transition: border-color 0.2s;
    margin-bottom: 5px;
}

.address-card:hover {
    border-color: var(--primary, #c0392b);
}

.address-card.default-address {
    border-color: var(--primary, #c0392b);
    background: #fdf0ef;
}

.address-card .default-badge {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    background: var(--primary, #c0392b);
    color: #fff;
    font-size: 0.72rem;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}

.address-card .address-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.address-actions .btn-edit,
.address-actions .btn-delete {
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.82rem;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn-edit   { background: #eee; color: #333; }
.btn-delete { background: #f8d7da; color: #721c24; }

.btn-edit:hover,
.btn-delete:hover { opacity: 0.8; }

.btn-add-address {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    background: var(--primary, #c0392b);
    color: #fff;
    border-radius: 8px;
    font-size: 0.9rem;
    text-decoration: none;
    margin-top: 1rem;
    transition: opacity 0.2s;
}

.btn-add-address:hover { opacity: 0.85; }

/* ===== Password Forms ===== */
.password-form-container {
    max-width: 420px;
    margin: 0 auto;
}

.password-form-container h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.2rem;
    text-align: center;
}

.password-form .form-group {
    margin-bottom: 1rem;
}

.password-form .form-group label {
    display: block;
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0.3rem;
    font-weight: 500;
}

.password-form .form-group input {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
    outline: none;
}

.password-form .form-group input:focus {
    border-color: var(--primary, #c0392b);
    box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.08);
}

.password-form .btn-submit {
    width: 100%;
    padding: 0.7rem;
    background: var(--primary, #c0392b);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background 0.2s;
}

.password-form .btn-submit:hover {
    background: var(--primary-hover, #a93226);
}

.password-form .form-hint {
    font-size: 0.78rem;
    color: #999;
    margin-top: 0.2rem;
}

.password-form .error-msg {
    color: #c0392b;
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

/* ===== Gift Discount Box ===== */
.gift-discount-box {
    border: 2px dashed var(--primary, #c0392b);
    border-radius: 12px;
    padding: 1.2rem 1.5rem;
    text-align: center;
    background: #fff8f7;
    margin: 1.5rem 0;
}

.gift-discount-box i {
    font-size: 2rem;
    color: var(--primary, #c0392b);
    margin-bottom: 0.6rem;
    display: block;
}

.gift-discount-box p {
    font-size: 0.9rem;
    color: #444;
    line-height: 1.8;
    margin-bottom: 0.8rem;
}

.gift-discount-box .discount-code {
    display: inline-block;
    background: var(--primary, #c0392b);
    color: #fff;
    padding: 0.5rem 1.4rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 2px;
    user-select: all;
    cursor: pointer;
    transition: opacity 0.2s;
}

.gift-discount-box .discount-code:hover {
    opacity: 0.85;
}

.gift-discount-box .copy-hint {
    display: block;
    font-size: 0.75rem;
    color: #999;
    margin-top: 0.4rem;
}

/* ===== Auth Pages (Login / Register / OTP) ===== */
.auth-wrapper {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    padding: 2rem 1rem;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 14px;
    padding: 2rem 1.8rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.auth-container .auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-container .auth-title {
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.4rem;
}

.auth-container .auth-subtitle {
    text-align: center;
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 1.5rem;
}

/* ===== Auth Form ===== */
.auth-form .form-group {
    margin-bottom: 1rem;
}

.auth-form .form-group label {
    display: block;
    font-size: 0.84rem;
    font-weight: 500;
    color: #555;
    margin-bottom: 0.35rem;
}

.auth-form .form-group input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    direction: ltr;
    /* text-align: right; */
}

.auth-form .form-group .otp{
    text-align: center;
}

.auth-form .form-group input:focus {
    border-color: var(--primary, #c0392b);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.08);
}

.auth-form .form-group input::placeholder {
    color: #bbb;
    font-size: 0.83rem;
}

/* Phone input specific */
.auth-form .phone-input {
    direction: ltr !important;
    text-align: left !important;
    letter-spacing: 1px;
    font-family: 'Vazirmatn', monospace;
}

/* ===== OTP Input ===== */
.otp-inputs {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    direction: ltr;
    margin-bottom: 1rem;
}

.otp-inputs input {
    width: 48px;
    height: 52px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.otp-inputs input:focus {
    border-color: var(--primary, #c0392b);
    box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.08);
}

/* ===== Auth Buttons ===== */
.auth-form .btn-auth {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary, #c0392b);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 0.5rem;
}

.auth-form .btn-auth:hover {
    background: var(--primary-hover, #a93226);
}

.auth-form .btn-auth:active {
    transform: scale(0.98);
}

.auth-form .btn-auth:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* ===== Auth Links ===== */
.auth-links {
    text-align: center;
    margin-top: 1.2rem;
    font-size: 0.82rem;
    color: #777;
}

.auth-links a {
    color: var(--primary, #c0392b);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.auth-links a:hover {
    opacity: 0.75;
    text-decoration: underline;
}

/* ===== OTP Timer ===== */
.otp-timer {
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.8rem;
}

.otp-timer span {
    font-weight: 700;
    color: var(--primary, #c0392b);
    font-family: monospace;
}

.otp-timer .resend-btn {
    background: none;
    border: none;
    color: var(--primary, #c0392b);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    text-decoration: underline;
    padding: 0;
}

.otp-timer .resend-btn:disabled {
    color: #bbb;
    cursor: not-allowed;
    text-decoration: none;
}

/* ===== Auth Errors ===== */
.auth-form .form-errors {
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 0.6rem 0.9rem;
    margin-bottom: 1rem;
}

.auth-form .form-errors li {
    font-size: 0.8rem;
    color: #c0392b;
    list-style: none;
    line-height: 1.6;
}

/* ===== Auth Divider ===== */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.2rem 0;
    gap: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e0e0e0;
}

.auth-divider span {
    font-size: 0.78rem;
    color: #aaa;
}

/* ===== Auth Responsive ===== */
@media (max-width: 480px) {
    .auth-container {
        padding: 1.5rem 1.2rem;
        border-radius: 10px;
    }

    .otp-inputs input {
        width: 42px;
        height: 46px;
        font-size: 1.1rem;
    }

    .auth-container .auth-title {
        font-size: 1.05rem;
    }
}


/* ===== Responsive Account ===== */
@media (max-width: 992px) {
    /* قبلاً: .dashboard-layout */
    .dashboard-container {
        flex-direction: column;
    }

    .dashboard-sidebar {
        width: 100%;
        position: sticky;
        top: 0;
        z-index: 100;
        border-radius: 0;
        padding: 0;
        margin-bottom: 0;
    }

    .dashboard-sidebar .user-info {
        background-color: #ff4345;
        height: 5vh;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }
    .dashboard-sidebar .user-info i{
        font-size: 1.2rem;
    }

    .dashboard-sidebar .nav-links {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0;
        padding: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }

    .dashboard-sidebar .nav-links a {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        border-bottom: 2px solid transparent;
    }

    .dashboard-sidebar .nav-links a.active {
        border-bottom-color: var(--primary, #c0392b);
        color: var(--primary, #c0392b);
    }
    .dashboard-main{
        width: 100%;
    }
}

@media (max-width: 768px) {
    .order-item-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-item-row img {
        width: 50px;
        height: 50px;
    }

    .address-grid {
        grid-template-columns: 1fr;
    }

    .auth-container {
        padding: 1.5rem 1rem;
    }

    .gift-discount-box {
        padding: 1rem;
    }

    .gift-discount-box .discount-code {
        font-size: 0.95rem;
        padding: 0.4rem 1rem;
    }
}
@media (max-width: 768px) {
    .addresses-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .address-card {
        padding: 1rem;
        font-size: 0.84rem;
        border-radius: 8px;
    }

    .address-card p {
        display: block;
        margin: 0.3rem 0;
        word-wrap: break-word;
        white-space: normal;
        text-align: right;
    }

    .address-card .address-actions {
        justify-content: center;
        gap: 0.5rem;
        margin-top: 1.6rem;
    }
    .address-text {
        /* word-break: break-word; */
        line-height: 1.6;
    }
    
    
}
.address-card p {
    margin: 0.25rem 0;
    line-height: 1.6;
}

.address-name {
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.address-phone {
    color: #666;
    font-size: 0.82rem;
}

.address-postal {
    font-size: 0.8rem;
    color: #888;
    direction: ltr;
    text-align: right;
}


@media (max-width: 480px) {
    .dashboard-content {
        padding: 0.8rem;
    }

    .orders-table th,
    .orders-table td {
        padding: 0.5rem 0.4rem;
        font-size: 0.78rem;
    }

    .password-form-container {
        max-width: 100%;
    }

    .order-summary-box {
        padding: 0.8rem;
    }

    .btn-add-address {
        width: 100%;
        justify-content: center;
    }
}

/* ===== Order Detail Page - Missing Styles ===== */

.order-detail-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}

.order-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 3.5rem;
    padding-bottom: 1.2rem;
    margin-bottom: 1.2rem;
    border-bottom: 1px solid #eee;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.meta-label {
    font-size: 0.82rem;
    color: #888;
    font-weight: 500;
}

.meta-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #23254e;
    text-align: right;
}

/* Fix mismatch: template uses .item-info, CSS had .order-item-info */
.item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.item-info .item-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #23254e;
}

.item-variant {
    font-size: 0.82rem;
    color: #888;
}

.item-qty {
    font-size: 0.88rem;
    color: #555;
    min-width: 60px;
    text-align: center;
}

.item-price {
    font-weight: 700;
    font-size: 0.95rem;
    color: #c62828;
    min-width: 100px;
    text-align: left;
}

/* Fix mismatch: template uses .order-summary, CSS had .order-summary-box */
.order-summary {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 1.2rem 1.5rem;
    margin-top: 1.5rem;
}

.order-summary .summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid #eee;
    font-size: 0.92rem;
    color: #444;
}

.order-summary .summary-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1rem;
    color: #23254e;
}

.order-summary .summary-row.discount {
    color: #388e3c;
}

.order-summary .summary-row.total {
    font-weight: 800;
    font-size: 1.05rem;
    color: #c62828;
}

.order-address {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 1.2rem 1.5rem;
    margin-top: 1.5rem;
    line-height: 2;
    font-size: 0.92rem;
    color: #444;
}

.order-address strong {
    color: #23254e;
}

/* Responsive */
@media (max-width: 768px) {
    .order-detail-card {
        padding: 1.2rem;
    }

    .order-meta {
        flex-direction: column;
        gap: 0.8rem;
    }

    .order-item-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .item-price {
        text-align: right;
    }
}
.form-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  padding: 28px 32px;
}

.field-error {
  display: block;
  font-size: 12px;
  color: #c62828;
  margin-top: 4px;
}

.form-card .btn-auth {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #c62828;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
  transition: background 0.2s;
}

.form-card .btn-auth:hover {
  background: #a31f1f;
}



@media (max-width: 768px) {
    .address-row {
        flex-direction: column;
        gap: 0.25rem;
    }
}












/* آدرس‌ها */
.address-list-checkout {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.address-card-checkout {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.address-card-checkout:hover {
    border-color: #ef9a9a;
}

.address-card-checkout.selected {
    border-color: #c62828;
    background: #fbe9e7;
}
.address-card-checkout:has(input[type="radio"]:checked) {
    border-color: #c62828;
    background: #fbe9e7;
}

.address-card-checkout input[type="radio"] {
    margin-top: 4px;
    accent-color: #c62828;
}

.address-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.address-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.address-detail {
    font-size: 0.85rem;
    color: #616161;
}

.address-meta {
    font-size: 0.8rem;
    color: #9e9e9e;
    margin-top: 4px;
}

.new-address-toggle .address-content {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    color: #c62828;
    font-weight: 500;
}

.stock-alert {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  background: #fff3f3;
  border: 1px solid #f0b4b4;
  border-radius: 12px;
  color: #c0392b;
  font-size: 0.9rem;
  line-height: 1.6;
}

.stock-alert svg,
.stock-alert i {
  flex-shrink: 0;
  font-size: 1.1rem;
  color: #e74c3c;
}

.stock-alert .stock-alert-text {
  flex: 1;
}

/* وقتی چند پیام موجودی داری */
.stock-alert ul {
  margin: 0;
  padding-right: 1.2rem;
}

.stock-alert ul li {
  margin: 0.2rem 0;
}

/* ===== گالری تصاویر ===== */
.gallery-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.gallery-header {
    text-align: center;
    margin-bottom: 2rem;
}

.gallery-heading {
    font-size: 28px;
    color: #c20d0d;
    margin-bottom: 8px;
    font-weight: 600;
}

.gallery-subtitle {
    color: #6b7280;
    font-size: 15px;
    font-weight: 500;
}

/* نوار فیلتر */
.gallery-filters {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 2rem;
    padding: 18px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.filter-label {
    font-weight: 700;
    color: #333;
    font-size: 14px;
    margin-left: 6px;
}

.filter-chip {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #6b7280;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    border-color: #c20d0d;
    color: #c20d0d;
}

.filter-chip.active {
    background: #c20d0d;
    border-color: #c20d0d;
    color: #fff;
}

/* گرید گالری */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 60px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    border: 2px solid #e5e7eb;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover {
    border-color: #eb3030;
    box-shadow: 0 8px 24px rgba(194, 13, 13, 0.15);
    transform: translateY(-4px);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;    /* پایین */
    align-items: center;          /* وسط افقی */
    gap: 6px;
    padding: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item-title {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-align: center;

    /* دورخط مشکی */
    text-shadow:
        -1px -1px 0 #000,
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
}

.gallery-zoom-icon {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 18px;
}

.gallery-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 16px;
}

/* لایت‌باکس */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
}

.lightbox.open {
    display: flex;
}

.lightbox-img {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: #fff;
    margin-top: 16px;
    font-size: 15px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 42px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: #ff4d4d;
}

/* ریسپانسیو */
@media (max-width: 992px) {
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}


/* 404 */
/* ===== 404 Error Page ===== */
.error-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: var(--bg-light);
}

.error-content {
    text-align: center;
    max-width: 520px;
}

.error-code {
    font-size: 9rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--btn-hover));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(239, 57, 78, 0.15);
    animation: error-float 3s ease-in-out infinite;
}

.error-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0.5rem 0 1rem;
}

.error-text {
    color: var(--text-gray);
    font-size: 1.05rem;
    line-height: 1.9;
    margin-bottom: 2rem;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.error-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

.error-btn-primary {
    background: var(--primary-color);
    color: #fff;
    box-shadow: 0 6px 18px rgba(239, 57, 78, 0.3);
}

.error-btn-primary:hover {
    background: var(--btn-hover);
    color: #fff;
    transform: translateY(-2px);
}

.error-btn-outline {
    background: #fff;
    color: var(--text-dark);
    border: 1.5px solid var(--border-color, #e0e0e6);
}

.error-btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

@keyframes error-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@media (max-width: 576px) {
    .error-code { font-size: 6rem; }
    .error-title { font-size: 1.3rem; }
    .error-actions { flex-direction: column; }
    .error-btn { justify-content: center; }
}

.trust-feature-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}
.trust-feature-text {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
}

/* لینک‌های فوتر */
.footer-links li {
    margin-bottom: 0.5rem;
}
.footer-links a {
    color: #e0e0e6;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-links a:hover {
    color: var(--primary-color);
}

/* آیکون پیام‌رسان‌ها */
.footer-messengers {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
}
.messenger-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    transition: transform 0.2s ease;
}
.messenger-icon:hover {
    transform: scale(1.15);
}

/* ===== Static pages (FAQ / Terms / Shipping) ===== */
.static-hero {
    background: linear-gradient(135deg, #ef394e 0%, #b71c1c 100%);
    /* padding: 1rem 0; */
}

.faq-accordion .accordion-item {
    border: 1px solid var(--border-color);
    border-radius: 12px !important;
    margin-bottom: 1rem;
    /* overflow: hidden; */
}

.faq-accordion .accordion-button {
    font-weight: 600;
    color: var(--text-dark);
    background: #fff;
}

.faq-accordion .accordion-button:not(.collapsed) {
    color: var(--primary-color);
    background: #fff5f6;
    box-shadow: none;
}

.faq-accordion .accordion-button:focus {
    box-shadow: none;
    border-color: var(--border-color);
}

.faq-accordion .accordion-body {
    color: var(--text-gray);
    line-height: 2;
}

.btn-faq-contact {
    background: var(--primary-color);
    color: #fff;
    padding: 0.6rem 1.8rem;
    border-radius: 30px;
    transition: background 0.2s;
}
.btn-faq-contact:hover {
    background: var(--btn-hover);
    color: #fff;
}

.faq-accordion .accordion-collapse {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}

.faq-accordion .accordion-collapse.open {
  /* مقدار واقعی با JS ست میشه؛ این فقط fallback */
  max-height: 1000px;
}

.faq-accordion .accordion-body {
  color: var(--text-gray);
  line-height: 2;
  opacity: 1;            /* تضمین می‌کنیم متن هیچ‌وقت محو نشه */
}

/* فلش دکمه */
.faq-accordion .accordion-button::after {
  transition: transform .3s ease;
}
.faq-accordion .accordion-button:not(.collapsed)::after {
  transform: rotate(180deg);
}


.static-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .04);
}
.static-block { margin-bottom: 1.75rem; }
.static-block:last-of-type { margin-bottom: 0; }
.static-block-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--primary, #d6336c);
}
.static-block p {
  color: var(--text-gray, #666);
  line-height: 2.1;
  margin: 0;
}
.static-note {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: #fafafa;
  border-right: 4px solid var(--primary, #d6336c);
  border-radius: 8px;
  color: var(--text-gray, #666);
}

/* Shipping cards */
.shipping-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.shipping-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 16px;
  padding: 1.75rem 1.25rem;
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
}
.shipping-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}
.shipping-icon {
  font-size: 2.25rem;
  color: var(--primary, #d6336c);
  margin-bottom: .75rem;
}
.shipping-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .5rem;
}
.shipping-card p {
  color: var(--text-gray, #777);
  font-size: .92rem;
  line-height: 1.9;
  margin: 0;
}

.contact-hero {
    background: linear-gradient(135deg, #c20d0d 0%, #ef394e 100%);
    color: #fff; padding: 60px 0; text-align: center;
    border-radius: 0 0 30px 30px;
}
.contact-hero h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 10px; }
.contact-hero p { opacity: .92; max-width: 560px; margin: 0 auto; }

.sajad{
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #cd9c22;
}

#splash-screen {
  position: fixed;
  inset: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.4s ease;
}

#splash-screen img {
  width: 160px;
  animation: zoomIn 1s ease forwards;
}

@keyframes zoomIn {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

#splash-screen.hide {
  opacity: 0;
  pointer-events: none;
}
