/* ============================================================
   assets/css/style.css - استایل‌های اصلی فروشگاه
   ============================================================ */

/* ----- متغیرهای اصلی ----- */
:root {
    --primary: #D4B26A;
    --secondary: #C7A55B;
    --bg: #F3E8D7;
    --text: #2A221E;
    --white: #ffffff;
    --danger: #EF4056;
    --success: #22c55e;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
}

/* ----- تنظیمات پایه ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

body {
    background-color: var(--bg) !important;
    color: var(--text) !important;
    padding-top: 92px;
    min-height: 100vh;
    direction: rtl;
}

::selection {
    background: var(--primary) !important;
    color: #fff !important;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ----- انیمیشن‌ها ----- */
@keyframes fadeUp {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.7; }
}

@keyframes bump {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ----- کلاس‌های انیمیشن ----- */
.ani-fade {
    animation: fadeUp 0.6s ease forwards;
    opacity: 0;
}

.ani-scale {
    animation: scaleIn 0.4s ease forwards;
    opacity: 0;
}

.d-1 { animation-delay: 0.05s; }
.d-2 { animation-delay: 0.1s; }
.d-3 { animation-delay: 0.15s; }
.d-4 { animation-delay: 0.2s; }

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

.animate-spin-slower {
    animation: spin-slow 25s linear infinite reverse;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-pulse-dot {
    animation: pulse-dot 1.5s ease-in-out infinite;
}

/* ============================================================
   اسلایدر اصلی
   ============================================================ */
.slide-item {
    transition: opacity 0.7s ease;
}

.slider-dot {
    transition: all 0.4s ease;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 999px;
    height: 6px;
    width: 6px;
    border: none;
    padding: 0;
}

.slider-dot.active {
    background: var(--primary) !important;
    width: 24px;
}

/* ============================================================
   کارت‌های محصول
   ============================================================ */
.product-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    border-color: var(--primary) !important;
}

.product-img {
    transition: transform 0.5s ease;
}

.product-card:hover .product-img {
    transform: scale(1.04);
}

.product-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8rem;
    line-height: 1.4;
    color: var(--text) !important;
    font-size: 0.75rem;
    font-weight: 500;
}

@media (min-width: 640px) {
    .product-name {
        height: 3.2rem;
        font-size: 0.95rem;
    }
}

/* ============================================================
   دکمه‌ها
   ============================================================ */
.btn-primary {
    background: var(--primary) !important;
    color: var(--text) !important;
    font-weight: 600;
    padding: 0.4rem 0.5rem;
    border-radius: 10px;
    transition: all 0.25s;
    box-shadow: 0 2px 12px rgba(212, 178, 106, 0.2);
    border: none;
    cursor: pointer;
    width: 100%;
    font-size: 0.7rem;
    text-align: center;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-primary:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(212, 178, 106, 0.3);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn-view {
    background: transparent;
    color: var(--text) !important;
    font-weight: 600;
    padding: 0.4rem 0.5rem;
    border-radius: 10px;
    transition: all 0.25s;
    border: 1.5px solid var(--primary) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 100%;
    text-decoration: none;
    font-size: 0.7rem;
}

.btn-view:hover {
    background: var(--primary) !important;
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(212, 178, 106, 0.3);
}

@media (min-width: 640px) {
    .btn-primary,
    .btn-view {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }
}

@media (min-width: 1024px) {
    .btn-primary,
    .btn-view {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 768px) {
    .product-card .btn-primary,
    .product-card .btn-view {
        font-size: 0.65rem;
        padding: 0.3rem 0.4rem;
    }
}

/* ============================================================
   دکمه علاقه‌مندی
   ============================================================ */
.wishlist-btn {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s;
    cursor: pointer;
    z-index: 5;
    position: absolute;
    top: 6px;
    left: 6px;
}

.wishlist-btn:hover {
    transform: scale(1.1);
    background: #fff;
}

.wishlist-btn.active svg {
    fill: #EF4056;
    stroke: #EF4056;
}

.wishlist-btn svg {
    transition: all 0.2s;
}

/* ============================================================
   نشان تخفیف
   ============================================================ */
.discount-badge {
    background: #EF4056;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    position: absolute;
    top: 6px;
    right: 6px;
}

/* ============================================================
   قیمت‌ها
   ============================================================ */
.price-old {
    color: #9e9e9e;
    font-size: 0.7rem;
    text-decoration: line-through;
}

.price-new {
    color: #EF4056;
    font-weight: 700;
    font-size: 0.95rem;
}

.price-normal {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text) !important;
}

/* ============================================================
   صفحه‌بندی
   ============================================================ */
.pagination-btn {
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text) !important;
    font-size: 0.85rem;
    transition: all 0.2s;
    text-decoration: none;
}

.pagination-btn:hover,
.pagination-btn.active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* ============================================================
   نظرات
   ============================================================ */
.testimonial-dot {
    transition: all 0.3s;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 999px;
    width: 8px;
    height: 8px;
    border: none;
    padding: 0;
}

.testimonial-dot.active {
    background: var(--primary) !important;
    width: 24px;
}

/* ============================================================
   نشان سبد خرید
   ============================================================ */
.cart-badge {
    background: #EF4056;
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -6px;
    right: -8px;
}

.cart-badge.bump {
    animation: bump 0.3s ease;
}

.mobile-cart-badge {
    background: #EF4056;
    color: white;
    font-size: 9px;
    font-weight: 700;
    border-radius: 50%;
    padding: 1px 6px;
    margin-right: 4px;
}

.bottom-cart-badge {
    background: #EF4056;
    color: white;
    font-size: 9px;
    font-weight: 700;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: -4px;
    right: -6px;
}

.btn-cart-header {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ============================================================
   کلاس‌های کمکی ریسپانسیو
   ============================================================ */
@media (max-width: 480px) {
    .xs\:inline {
        display: none;
    }
}

@media (min-width: 481px) {
    .xs\:inline {
        display: inline;
    }
}

@media (max-width: 640px) {
    .stat-number {
        font-size: 1.5rem;
    }
}

/* ============================================================
   اعلان (Notification)
   ============================================================ */
.custom-notification {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    padding: 12px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    font-weight: 500;
    direction: rtl;
    transition: all 0.3s ease;
    color: #fff;
    max-width: 90%;
}

.custom-notification.success {
    background: #22c55e;
}

.custom-notification.error {
    background: #ef4444;
}

.custom-notification.info {
    background: #3b82f6;
}

/* ============================================================
   اسکرول‌بار
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* ============================================================
   دکمه‌های اسلایدر جدیدترین محصولات
   ============================================================ */
#newPrev,
#newNext {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border: 1px solid var(--gray-200);
}

#newPrev:hover,
#newNext:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   حالت نمایش موبایل
   ============================================================ */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
}