.product-box {
    height: 420px;
    border-radius: 22px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,.12);
    transition: all .45s cubic-bezier(.25,.8,.25,1);
}

.product-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 70px rgba(0,0,0,.18);
}

/* IMAGE */
.product-media {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s ease;
}

.product-box:hover img {
    transform: scale(1.15);
}

/* BADGE */
.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg,#ff3d3d,#ff7a7a);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 12px;
    z-index: 3;
}

/* WISHLIST */
.wishlist-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    border: none;
    font-size: 18px;
    color: #999;
    cursor: pointer;
    z-index: 3;
    transition: all .3s ease;
}

.wishlist-btn.active {
    color: #ff3d3d;
    transform: scale(1.2);
}

/* OVERLAY */
.product-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity .4s ease;
}

.product-box:hover .product-overlay {
    opacity: 1;
}

.overlay-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%,-40%) scale(.9);
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    transition: all .4s ease;
}

.product-box:hover .overlay-actions {
    opacity: 1;
    transform: translate(-50%,-50%) scale(1);
}

/* INFO */
.product-info {
    padding: 18px 16px;
    background: linear-gradient(to top,rgba(0,0,0,.06),#fff);
}

.product-title {
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-rating {
    font-size: 12px;
    color: #f1b500;
}

.product-rating span {
    color: #777;
}

.product-meta {
    font-size: 11.5px;
    color: #666;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.dot {
    width: 4px;
    height: 4px;
    background: #aaa;
    border-radius: 50%;
}

.soft-divider {
    width: 60%;
    height: 1px;
    margin: 12px auto;
    background: linear-gradient(to right,transparent,#ccc,transparent);
}

/* PRICE */
.price-wrapper {
    padding: 10px 14px;
    border-radius: 16px;
    background: linear-gradient(135deg,rgba(25,135,84,.15),rgba(25,135,84,.05));
    display: inline-flex;
    flex-direction: column;
    align-items: center;
}

.price-new {
    font-size: 17px;
    font-weight: 900;
    color: #198754;
}

.price-old {
    font-size: 12px;
    color: #999;
}

@media (max-width: 992px) {

    .product-box {
        height: 390px;
    }

    .product-media {
        height: 230px;
    }

    .product-title {
        font-size: 14.5px;
    }

    .price-new {
        font-size: 16px;
    }
}

@media (max-width: 400px) {

    /* اسلایدها نفس بکشن */
    .swiper-slide {
        height: auto !important;
    }

    /* کارت بدون height ثابت */
    .product-box {
        height: auto !important;
        min-height: 280px;
        display: flex;
        flex-direction: column;
    }

    /* تصویر */
    .product-media {
        width: 200px;
        flex-shrink: 0;
    }

    /* info همیشه پایین بمونه */
    .product-info {
        width: 200px;

        flex-grow: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 16px 14px;
    }

    /* hover کامل غیرفعال */
    .product-box:hover img,
    .product-box:hover .product-overlay,
    .product-box:hover .overlay-actions {
        transform: none !important;
        opacity: unset !important;
    }

    /* overlay فقط با active */
    .product-overlay {
        opacity: 0;
        pointer-events: none;
    }

    .product-box.active .product-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .overlay-actions {
        opacity: 0;
        transform: translate(-50%, -50%) scale(.95);
    }

    .product-box.active .overlay-actions {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    /* دکمه‌ها انگشتی */
    .overlay-actions .btn {
        width: 100%;
        padding: 12px 16px;
        font-size: 15px;
        border-radius: 16px;
    }

    /* wishlist امن */
    .wishlist-btn {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }
}

.cool-btn {
    background: linear-gradient(135deg, #000, #222);
    border: 1px solid #333;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 14px 24px;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cool-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    transition: all 0.5s ease;
}

.cool-btn:hover::before {
    left: 100%;
}

.cool-btn:hover {
    transform: translateY(-2px) scale(1.01);

    background: linear-gradient(135deg, #111, #000);
}

.cool-btn:active {
    transform: scale(0.97);
}
.cart-header h4 {
    letter-spacing: 0.3px;
}

.cart-item {
    transition: all 0.25s ease;
}

.cart-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 35px rgba(0,0,0,0.08);
}

.quantity-box button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-weight: bold;
}

.quantity-box span {
    min-width: 24px;
    text-align: center;
}

@media (max-width: 768px) {
    .cart-header {
        margin-top: 1.5rem; /* فاصله از هدر */
    }
    .cart-item {
        text-align: center;
    }

    .cart-item .text-end {
        text-align: center !important;
    }
}

.card {
    background-color: #fff;
    border: none;
}

.card h5 {
    letter-spacing: 0.3px;
}

.card .fw-semibold {
    font-weight: 600;
}

.card .btn-dark {
    border-radius: 12px;
    padding: 12px 0;
    font-weight: 600;
}

.card .text-decoration-underline:hover {
    text-decoration: none;
    color: #000;
}

.address-card {
    cursor: pointer;
    transition: all .2s ease;
}
.address-card:hover {
    border-color: #000;
    background-color: #fdfdfd;
}
.address-radio {
    display: none;
}
.address-radio:checked + .address-card {
    border: 2px solid #000;
    background-color: #f8f9fa;
}

:root {
    --primary-color: #4361ee;
    --success-color: #2ec4b6;
    --danger-color: #e71d36;
}

/* استایل آواتار متنی به جای عکس */
.user-avatar-initials {
    width: 80px; height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #7209b7);
    color: white;
    display: flex; align-items: center; justify-content: center;
    border-radius: 24px;
    font-size: 1.8rem; font-weight: bold;
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
}

/* بنر خوش‌آمدگویی */
.welcome-banner {
    background: linear-gradient(90deg, #1e1e2f, #3f3f5f);
    position: relative; overflow: hidden;
}

/* آیتم‌های منو */
.custom-nav-item {
    color: #555;
    border-radius: 15px !important;
    padding: 12px 20px !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; align-items: center; gap: 12px;
}
.custom-nav-item:hover {
    background-color: #f0f2ff;
    color: var(--primary-color);
    padding-right: 25px !important;
}
.custom-nav-item.active {
    background-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 8px 15px rgba(67, 97, 238, 0.2);
}

/* کارت‌های وضعیت */
.icon-box {
    width: 45px; height: 45px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}
.bg-primary-soft { background-color: #eef2ff; }
.bg-danger-soft { background-color: #fff1f2; }
.bg-success-soft { background-color: #f0fdf4; }

/* دایره وضعیت در جدول */
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 5px;
}

.order-row { transition: all 0.2s; cursor: pointer; }
.order-row:hover { background-color: #fbfbfb}

.rounded-5 { border-radius: 2rem !important; }

.bg-purple-soft { background-color: #f3e8ff; }
.text-purple { color: #7e22ce; }
.settings-icon-box {
    width: 55px; height: 55px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
}

/* شخصی‌سازی فیلدهای شناور (Floating Labels) */
.custom-form-floating > .form-control {
    border: 2px solid #f0f0f0;
    border-radius: 18px;
    padding: 1rem 0.75rem;
    transition: all 0.3s ease;
    background-color: #fbfbfb;
}

.custom-form-floating > .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.1);
    background-color: #fff;
}

.custom-form-floating > label {
    padding-right: 1.5rem; /* تنظیم برای RTL */
    color: #888;
}

/* دکمه با استایل گرادینت */
.btn-primary-gradient {
    background: linear-gradient(135deg, var(--primary-color), #7209b7);
    border: none;
    color: white;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.3);
    color: white;
}

/* حذف خط آبی دور دکمه‌ها در حالت کلیک */
.btn:focus { box-shadow: none !important; }

/* استایل برای تراز متن در فیلد موبایل */
.text-start { text-align: left !important; direction: ltr !important; }

/* افکت کارت‌های آدرس */
.address-card {
    transition: all 0.3s ease;
    border: 2px solid transparent !important;
    background-color: #fff;
}

.address-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color) !important;
    box-shadow: 0 15px 30px rgba(0,0,0,0.05) !important;
}

/* خط‌چین برای کارت‌های غیرفعال یا ثانویه */
.border-dashed {
    border: 1px dashed #dee2e6 !important;
}

/* استایل مودال */
.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.form-select {
    border: 2px solid #f0f0f0;
    border-radius: 18px;
    height: 58px;
    background-color: #fbfbfb;
}

/* انیمیشن برای ورود بخش‌ها */
.animate__fadeIn {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* استایل انباشته شدن عکس محصولات */
.order-product-previews img {
    transition: transform 0.3s ease;
    background-color: white;
}

.order-product-previews img:hover {
    transform: translateY(-5px) scale(1.1);
    z-index: 10;
}

.ms-n3 {
    margin-right: -15px !important; /* برای RTL */
}

.more-products {
    width: 60px;
    height: 60px;
    background-color: #f0f2f5;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: #666;
    z-index: 1;
}

.order-main-card {
    transition: all 0.3s ease;
    border: 1px solid transparent !important;
}

.order-main-card:hover {
    border-color: #e0e0e0 !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05) !important;
}

.active-filter {
    background-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.2);
}

.rounded-top-4 {
    border-top-left-radius: 1.5rem !important;
    border-top-right-radius: 1.5rem !important;
}

/* استایل دکمه‌های کوچک داخل کارت */
.order-main-card .btn-sm {
    font-size: 0.75rem;
    padding: 8px 16px;
}

:root {
    --subtle-gray: #f4f4f7;
    --dark-accent: #1a1a1a;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}


/* هدر خلاقانه */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}
.section-title::after {
    content: '';
    position: absolute;
    bottom: 10px;
    right: 0;
    width: 40%;
    height: 8px;
    background: rgba(0,0,0,0.05);
    z-index: -1;
}

/* تب‌های مدرن (Glassmorphism hint) */
.nav-pills-custom {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.nav-pills-custom::-webkit-scrollbar { display: none; }

.nav-link-custom {
    padding: 10px 28px;
    border-radius: 30px;
    background: var(--subtle-gray);
    color: #555;
    border: none;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link-custom.active {
    background: var(--dark-accent);
    color: #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* کارت محصولات خلاقانه */
.style-card {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 3/4;
    cursor: pointer;
    border: none;
    margin-bottom: 15px;
}

.style-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

/* لایه روی تصویر هنگام هاور */
.style-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: var(--transition);
}

.style-card:hover img {
    transform: scale(1.1) rotate(-1deg);
}

.style-card:hover .style-card-overlay {
    opacity: 1;
}

.style-tag {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    transform: translateY(10px);
    transition: var(--transition);
}

.style-card:hover .style-tag {
    transform: translateY(0);
}

/* دکمه "مشاهده" فانتزی */
.view-btn {
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 20px;
    left: 20px;
    transform: scale(0);
    transition: var(--transition);
}

.style-card:hover .view-btn {
    transform: scale(1);
}
/* دکمه‌های فیلتر */
.filter-group {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 15px;
    scrollbar-width: none;
}
.filter-btn {
    border: 1px solid #eee;
    background: #f8f9fa;
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    white-space: nowrap;
}
.filter-btn.active {
    background: #eaba3e;
    color: whitesmoke;
    border-color: var(--accent);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* استایل کارت محصول */
.product-wrapper {
    transition: transform 0.4s ease, opacity 0.4s ease;
}
.style-card {
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 3/4;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.style-card img { width: 100%; height: 100%; object-fit: cover; }

/* انیمیشن مخفی شدن */
.product-wrapper.hide {
    display: none;
}

/* انیمیشن ظاهر شدن */
.product-wrapper.show {
    animation: fadeInScale 0.5s forwards;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}


