/* Reset و تنظیمات پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    margin: 0;
    color: #fff;
    direction: rtl;
    scroll-behavior: smooth;
    background: linear-gradient(135deg, #0f0f0f, #1a1a1a);
    background-size: 400% 400%;
    animation: bgAnimation 15s ease infinite;
    overflow-x: hidden;
}

@keyframes bgAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* هدر و نویگیشن */
.header {
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: #fff;
    padding: 15px 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    animation: fadeInDown 0.8s ease-out;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: bold;
    color: #d4af37;
    white-space: nowrap;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
}

#typewriter {
    color: #d4af37;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    position: relative;
    padding: 5px 0;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: #d4af37;
    transition: width 0.3s ease;
}

.nav a:hover::after {
    width: 100%;
    left: 0;
}

.nav a:hover {
    color: #d4af37;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.7);
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: #d4af37;
}

/* بخش محصولات */
.shop {
    padding: 80px 0;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 42px;
    text-align: center;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-in-out;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    color: #d4af37;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
}

.section-title.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.product {
    background: rgba(30, 30, 30, 0.7);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transform: translateY(20px) scale(0.98);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    position: relative;
    overflow: hidden;
}

.product::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, transparent 100%);
    z-index: -1;
}

.product.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.product:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.3);
}

.product-image-container {
    position: relative;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 12px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
}

.product-image {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
    transition: all 0.5s ease;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
}

.product:hover .product-image {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.5));
}

.quick-view {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    padding: 10px;
    background: rgba(212, 175, 55, 0.9);
    color: #111;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
}

.product:hover .quick-view {
    bottom: 0;
}

.product-title {
    font-size: 20px;
    margin-bottom: 15px;
    color: #fff;
    transition: color 0.3s ease;
}

.product:hover .product-title {
    color: #d4af37;
}

.product-rating {
    margin-bottom: 15px;
    color: #d4af37;
    font-size: 14px;
}

.product-rating .far {
    color: #555;
}

.rating-count {
    color: #aaa;
    font-size: 12px;
    margin-right: 5px;
}

.price-container {
    margin-bottom: 20px;
}

.price {
    display: inline-block;
    font-size: 22px;
    font-weight: bold;
    color: #d4af37;
}

.old-price {
    display: inline-block;
    font-size: 16px;
    color: #aaa;
    text-decoration: line-through;
    margin-right: 10px;
}

.product-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.buy-btn {
    background: linear-gradient(135deg, #d4af37, #f1c40f);
    color: #111;
    border: none;
    padding: 12px 25px;
    font-weight: bold;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-grow: 1;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}

.buy-btn:hover {
    background: linear-gradient(135deg, #f1c40f, #d4af37);
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(212, 175, 55, 0.4);
}

.buy-btn:active {
    transform: translateY(1px);
}

.buy-btn.pre-order {
    background: linear-gradient(135deg, #3498db, #2980b9);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.buy-btn.pre-order:hover {
    background: linear-gradient(135deg, #2980b9, #3498db);
    box-shadow: 0 7px 15px rgba(52, 152, 219, 0.4);
}

.share-buttons {
    display: flex;
    gap: 8px;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.share-btn:nth-child(1):hover {
    background: #0088cc;
    color: white;
}

.share-btn:nth-child(2):hover {
    background: #25D366;
    color: white;
}

/* برچسب محصولات */
.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    z-index: 2;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.product-badge.hot {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.product-badge.new {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.product-badge.offer {
    background: linear-gradient(135deg, #e67e22, #d35400);
}

.product-badge.limited {
    background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

.product-badge.coming-soon {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

/* اعلان سبد خرید */
.cart-notification {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(30, 30, 30, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #d4af37;
    padding: 15px 30px;
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 999;
    transition: bottom 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.cart-notification.show {
    bottom: 30px;
}

/* فوتر */
.footer {
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    color: #ccc;
    padding: 60px 0 30px;
    margin-top: 80px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    color: #d4af37;
    margin-bottom: 20px;
    font-size: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 2px;
    background: #d4af37;
}

.footer-section p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #d4af37;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    color: #ccc;
    font-size: 20px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    color: #d4af37;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

/* انیمیشن‌ها */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* پس‌زمینه کانوا */
#background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: #111;
}

/* رسپانسیو */
@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .header {
        padding: 15px 20px;
    }
    
    .product {
        padding: 20px 15px;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .share-buttons {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 32px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}