/* --- ریشه و متغیرها --- */
:root {
    --primary-color: #ffffff;
    --secondary-color: #f0f0f0;
    --accent-color: #4a90e2; /* آبی ملایم */
    --glass-bg: rgba(255, 255, 255, 0.15);
    --glass-border: rgba(255, 255, 255, 0.2);
    --star-color: #ffd700; /* طلایی */
    --font-family: 'Vazirmatn', sans-serif;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-Variable.woff2') format('woff2-variations');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* --- استایل‌های کلی --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: #1a1a2e; /* پس‌زمینه تیره که اشکال روی آن مشخص باشند */
    color: var(--primary-color);
    line-height: 1.7;
    overflow-x: hidden;
    direction: rtl;
}

/* --- پس‌زمینه متحرک --- */
.background-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.background-shapes div {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, rgba(74, 144, 226, 0.3), rgba(128, 0, 128, 0.3));
    animation: float 20s infinite ease-in-out;
}

/* موقعیت و اندازه تصادفی برای حباب‌ها */
.background-shapes div:nth-child(1) { width: 80px; height: 80px; top: 10%; left: 15%; animation-duration: 25s; }
.background-shapes div:nth-child(2) { width: 100px; height: 100px; top: 20%; left: 80%; animation-duration: 30s; }
.background-shapes div:nth-child(3) { width: 50px; height: 50px; top: 70%; left: 10%; animation-duration: 18s; }
.background-shapes div:nth-child(4) { width: 120px; height: 120px; top: 80%; left: 60%; animation-duration: 22s; }
.background-shapes div:nth-child(5) { width: 60px; height: 60px; top: 40%; left: 40%; animation-duration: 28s; }
.background-shapes div:nth-child(6) { width: 90px; height: 90px; top: 5%; left: 50%; animation-duration: 20s; }
.background-shapes div:nth-child(7) { width: 70px; height: 70px; top: 90%; left: 90%; animation-duration: 35s; }
.background-shapes div:nth-child(8) { width: 110px; height: 110px; top: 60%; left: 25%; animation-duration: 24s; }
.background-shapes div:nth-child(9) { width: 40px; height: 40px; top: 30%; left: 70%; animation-duration: 19s; }
.background-shapes div:nth-child(10) { width: 130px; height: 130px; top: 50%; left: 5%; animation-duration: 26s; }


@keyframes float {
    0% { transform: translateY(0) translateX(0) scale(1); filter: blur(15px); opacity: 0.7; }
    50% { transform: translateY(-50px) translateX(20px) scale(1.1); filter: blur(25px); opacity: 0.5; }
    100% { transform: translateY(0) translateX(0) scale(1); filter: blur(15px); opacity: 0.7; }
}

/* --- ساختار اصلی --- */
header, main, footer {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

header {
    padding-bottom: 1rem;
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

/* --- بخش محصولات --- */
#products {
    padding: 2rem 0;
}

.category-title {
    margin-bottom: 2.5rem;
}
.category-title h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}
.category-title p {
    color: var(--secondary-color);
    opacity: 0.8;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.product-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
}

.product-item img {
    max-width: 100%;
    height: 200px;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 1rem;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px;
}

.product-item h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.product-item p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    min-height: 50px;
}

.inquiry-btn {
    background-color: var(--accent-color);
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-family);
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.inquiry-btn:hover {
    background-color: #3a7ac8;
}

/* --- سیستم امتیازدهی --- */
.rating {
    margin-bottom: 1rem;
    direction: ltr; /* ستاره‌ها از چپ به راست چیده شوند */
    display: inline-block;
}

.rating i {
    font-size: 1.5rem;
    color: #ccc;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0 2px;
}

.rating i:hover,
.rating i.hovered {
    color: var(--star-color);
}

.rating i.active {
    color: var(--star-color);
    font-family: "Font Awesome 6 Free"; /* اطمینان از نمایش ستاره پر */
    font-weight: 900; /* اطمینان از نمایش ستاره پر */
}

/* --- بخش تماس با ما و فوتر --- */
#contact, footer {
    background: var(--glass-bg);
    border-top: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
    padding: 2rem;
    margin-top: 2rem;
}

#contact h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-info a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s;
}
.contact-info a:hover {
    color: #8bbaff;
}

footer {
    border-radius: 15px 15px 0 0;
    margin-top: 0;
}

/* --- مودال --- */
.modal {
    display: none; 
    position: fixed;
    z-index: 100; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.modal-content {
    background: rgba(42, 42, 62, 0.85);
    margin: 10% auto;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    animation: slide-down 0.5s ease-out;
}

@keyframes slide-down {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-btn {
    color: #aaa;
    position: absolute;
    left: 25px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: var(--primary-color);
}

.modal-content h2 {
    margin-bottom: 1rem;
    text-align: center;
}
.modal-content > p {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-options {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.option-bot, .option-call {
    background: var(--glass-bg);
    padding: 1.5rem;
    border-radius: 10px;
    flex-basis: 50%;
    text-align: center;
}

.option-bot h4, .option-call h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.option-bot p {
    color: #aaa;
}

.option-call p {
    margin-bottom: 0.5rem;
}

.option-call a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
}
.option-call a:hover {
    color: var(--accent-color);
}

/* --- واکنش‌گرایی --- */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.2rem;
    }
    .modal-content {
        margin: 20% auto;
        padding: 2rem;
    }
    .modal-options {
        flex-direction: column;
    }
    .product-grid {
        grid-template-columns: 1fr;
    }
}
