/* style.css */

/* ============ Font Face ============ */
@font-face {
    font-family: 'AzarMehr';
    src: url('../fonts/AzarMehr-FD[DSTY,KSHD,wght].woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ============ Base Styles ============ */
* {
    font-family: 'AzarMehr', 'Vazirmatn', Tahoma, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #0f0f0f;
    color: #ffffff;
    line-height: 1.6;
    /* الگوی پس‌زمینه محو برای زیبایی */
    background-image:
            radial-gradient(circle at 50% 0%, rgba(225, 29, 72, 0.15) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(251, 191, 36, 0.05) 0%, transparent 30%);
    background-attachment: fixed;
}

/* ============ Scrollbar ============ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Custom Scrollbar for categories */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e11d48;
    border-radius: 2px;
}

/* ============ Typography & Effects ============ */
.text-gradient-gold {
    background: linear-gradient(to right, #fbbf24, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% auto;
    animation: shine 4s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

.glass-effect {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============ Line Clamp ============ */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============ Product Card ============ */
.product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(17, 24, 39, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(225, 29, 72, 0.15);
    border-color: rgba(225, 29, 72, 0.3);
}

.product-card:hover .product-image-hover {
    opacity: 1;
}

.product-card:hover .product-image-main {
    opacity: 0;
}

.product-image-main,
.product-image-hover {
    transition: opacity 0.5s ease;
}

/* ============ Swiper ============ */
.swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
}

.swiper-pagination-bullet-active {
    background: #e11d48;
}

.swiper-slide-thumb-active {
    opacity: 1 !important;
    border-color: #e11d48 !important;
}

.swiper-button-next,
.swiper-button-prev {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-swiper:hover .swiper-button-next,
.main-swiper:hover .swiper-button-prev {
    opacity: 1;
}

.swiper-button-disabled {
    opacity: 0.3 !important;
}

/* ============ Animations ============ */
#cart-sidebar > aside {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

#filter-sidebar > aside {
    animation: slideInRight 0.3s ease;
}

/* ============ Focus States ============ */
input:focus,
button:focus {
    outline: 2px solid #e11d48;
    outline-offset: 2px;
}

/* ============ Disable Button ============ */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============ Toast ============ */
#toast {
    transition: all 0.3s ease;
}

/* ============ Safe Area ============ */
.safe-bottom {
    padding-bottom: env(safe-area-inset-bottom, 20px);
}

/* ============ Custom Colors (CSS Variables) ============ */
:root {
    --bf-red: #e11d48;
    --bf-dark: #0f0f0f;
    --bf-gold: #fbbf24;
}

/* ============ Utility Classes ============ */
.bg-bf-red { background-color: var(--bf-red); }
.bg-bf-dark { background-color: var(--bf-dark); }
.bg-bf-gold { background-color: var(--bf-gold); }
.text-bf-red { color: var(--bf-red); }
.text-bf-dark { color: var(--bf-dark); }
.text-bf-gold { color: var(--bf-gold); }
.border-bf-red { border-color: var(--bf-red); }
.hover\:bg-bf-red:hover { background-color: var(--bf-red); }

/* ============ Category Tree ============ */
.category-item,
.category-item-mobile {
    transition: all 0.2s ease;
}

/* Rotate animation for chevron */
.rotate-180 {
    transform: rotate(180deg);
}

/* ============ Instagram Gradient ============ */
.instagram-gradient {
    background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d, #f56040, #f77737, #fcaf45, #ffdc80);
}