/* ==================== Products Page Modern Shop Theme ==================== */

/* تنظیم پس‌زمینه کلی صفحه */
body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%) !important;
    background-color: #f5f7fa !important;
    color: #2d3748 !important;
    min-height: 100vh;
}

/* هدر صفحه */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-color: #667eea !important;
    padding: 40px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    position: relative;
}

.header h1 {
    color: #ffffff !important;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* دکمه‌های ناوبری */
.nav-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.nav-btn, .back-to-shop-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #ffffff !important;
    border: none;
    padding: 12px 28px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-to-shop-btn .icon {
    font-size: 1.2em;
}

.back-to-shop-btn .text {
    display: inline;
}

.nav-btn:hover, .back-to-shop-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
    background: linear-gradient(135deg, #fbc2eb 0%, #a18cd1 100%);
}

/* کارت‌های محصولات */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 40px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.product-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    padding: 25px 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-link {
    color: #2d3748 !important;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
    transition: color 0.3s ease;
}

.product-card:hover .product-link {
    color: #667eea !important;
}

/* کارت محصول پیشنهادی (جهاز) */
.product-card[data-product="jahaz"] {
    background: linear-gradient(145deg, #ffd700, #ffed4e);
    border: 3px solid #ffa500;
    box-shadow: 0 12px 35px rgba(255, 215, 0, 0.4);
    transform: scale(1.05);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 12px 35px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 15px 45px rgba(255, 215, 0, 0.6);
    }
}

.product-card[data-product="jahaz"]::after {
    content: '⭐ پیشنهاد ویژه';
    position: absolute;
    top: 10px;
    right: -35px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 5px 35px;
    transform: rotate(45deg);
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.product-card[data-product="jahaz"] .product-link {
    color: #5a3b00 !important;
    font-weight: 700;
}

.product-card[data-product="jahaz"]:hover {
    transform: scale(1.08) translateY(-10px);
    box-shadow: 0 18px 50px rgba(255, 215, 0, 0.6);
}

/* دکمه اطلاعات */
.info-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    z-index: 2;
}

.info-btn:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2, #f093fb);
}

.info-btn:active {
    transform: scale(0.95);
}

/* نوار جستجو */
#search-bar {
    width: 100%;
    max-width: 600px;
    padding: 15px 25px;
    border-radius: 30px;
    border: 2px solid #667eea;
    background: #ffffff;
    color: #2d3748;
    font-size: 1rem;
    margin: 30px auto;
    display: block;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
    transition: all 0.3s ease;
}

#search-bar:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

#search-bar::placeholder {
    color: #a0aec0;
}

/* پیام نتیجه نیافت */
#no-results {
    display: none;
    text-align: center;
    font-size: 1.3rem;
    color: #667eea;
    margin: 50px 0;
    font-weight: 600;
}

/* دکمه چت */
.chat-btn {
    position: fixed;
    bottom: 100px;
    right: 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff !important;
    border: none;
    padding: 15px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    z-index: 999;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.chat-btn:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.chat-btn::before {
    content: '💬';
    font-size: 1.2rem;
}

/* دکمه لاگین/ثبت‌نام */
#login-register-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    padding: 8px 18px;
    cursor: pointer;
    font-weight: 600;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    text-align: center;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 2203;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#login-register-btn:hover {
    background: linear-gradient(135deg, #764ba2, #f093fb);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.5);
    transform: translateY(-2px);
}

/* منوی کاربر */
.user-dropdown {
    position: fixed;
    top: 60px;
    left: 15px;
    z-index: 2202;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 90vw;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.user-dropdown-content {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    padding: 10px 0;
    min-width: 180px;
    max-width: 210px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 20px rgba(102, 126, 234, 0.2);
    border: 2px solid rgba(102, 126, 234, 0.3);
    overflow: hidden;
}

.user-info {
    padding: 15px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
    margin-bottom: 8px;
}

.user-name {
    color: #667eea !important;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
}

.dropdown-item {
    padding: 12px 18px;
    color: #2d3748 !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.95rem;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    color: #667eea !important;
    padding-right: 22px;
}

.dropdown-item .icon {
    margin-left: 10px;
    font-size: 1.1rem;
}

/* مودال‌ها */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.login-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.login-modal {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(102, 126, 234, 0.3);
    overflow: hidden;
    transform: translateY(-30px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.login-modal-overlay.show .login-modal {
    transform: translateY(0) scale(1);
}

.login-modal-header {
    padding: 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-modal-header h3 {
    color: #ffffff !important;
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.login-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.login-modal-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2d3748;
    font-size: 0.95rem;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    color: #2d3748;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.2);
    background: #ffffff;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff !important;
    border: none;
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #764ba2, #f093fb);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* ریسپانسیو */
@media (max-width: 767px) {
    body {
        padding: 80px 10px 120px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
        padding: 30px 15px;
    }
    
    .product-card {
        padding: 20px 12px;
        min-height: 80px;
    }
    
    .nav-btn, .back-to-shop-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
        gap: 6px;
    }
    
    .back-to-shop-btn .text {
        display: inline !important;
    }
    
    .back-to-shop-btn .icon {
        font-size: 1.1em;
    }
    
    .info-btn {
        display: none; /* Hide info button on mobile */
    }
    
    #search-bar {
        padding: 12px 20px;
        font-size: 0.95rem;
    }
    
    .chat-btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        bottom: 85px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 12px;
        padding: 25px 10px;
    }
    
    .product-card {
        padding: 15px 10px;
        font-size: 0.9rem;
        min-height: 70px;
    }
    
    .nav-btn, .back-to-shop-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
        gap: 5px;
    }
    
    .back-to-shop-btn .text {
        display: inline !important;
    }
    
    .back-to-shop-btn .icon {
        font-size: 1em;
    }
    
    .info-btn {
        display: none; /* Hide info button on small mobile */
    }
}
