* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* تم روشن (پیش‌فرض) */
body {
    background-color: #ffffff;
    color: #000000;
    transition: all 0.3s ease;
}

/* تم تیره */
body.dark-mode {
    background-color: #1a1a2e !important;
    color: #f0f0f0 !important;
}

body.dark-mode .product-card {
    background-color: #16213e !important;
    border-color: #2c3e50 !important;
    color: #f0f0f0 !important;
}

body.dark-mode header {
    background-color: #0f0f1a !important;
    border-bottom-color: #e67e22 !important;
}

body.dark-mode .select-btn {
    background-color: #e67e22 !important;
}

body.dark-mode footer {
    background-color: #0f0f1a !important;
    color: #b0b0b0 !important;
}

body.dark-mode .about-card,
body.dark-mode .order-form,
body.dark-mode .success-box {
    background-color: #16213e !important;
    border-color: #2c3e50 !important;
}

/* دکمه تغییر تم */
.theme-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    background: #007bff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.theme-toggle:hover {
    transform: scale(1.05);
}

/* عکس شناور */
.floating-image {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 80px;
    height: 80px;
    border-radius: 18px;
    background: rgba(0,0,0,0.1);
    padding: 4px;
    z-index: 999;
    border: 1px solid #007bff;
}

.floating-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.floating-caption {
    position: fixed;
    bottom: 25px;
    right: 115px;
    background: rgba(0,0,0,0.1);
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 20px;
    font-weight: bold;
    color: #e67e22;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    z-index: 999;
    backdrop-filter: blur(4px);
}

/* هدر */
header {
    background: #f8f9fa;
    border-bottom: 2px solid #007bff;
    padding: 1rem;
    text-align: center;
}

header h1 {
    font-size: 1.5rem;
    color: #007bff;
}

nav a {
    color: #333;
    text-decoration: none;
    margin: 0 1rem;
    font-weight: bold;
}

nav a:hover {
    color: #007bff;
}

/* محصولات با فلکس باکس برای همترازی دکمه‌ها */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
    border-radius: 20px;
    padding: 1.5rem;
    text-align: center;
    transition: 0.3s;
    border: 1px solid #ddd;
    cursor: pointer;
    height: 100%;
}

.product-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.product-card h3 {
    margin-bottom: 0.5rem;
}

.price {
    font-size: 1.4rem;
    color: #e67e22;
    font-weight: bold;
    margin: 0.5rem 0;
}

.desc {
    margin: 1rem 0;
    font-size: 0.9rem;
    opacity: 0.85;
    flex-grow: 1;
}

.select-btn {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 10px 22px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: bold;
    margin-top: 1rem;
    align-self: center;
    width: auto;
    min-width: 140px;
}

.select-btn:hover {
    background: #0056b3;
}

/* فرم‌ها */
.order-form, .about-card, .success-box {
    max-width: 650px;
    margin: 0 auto;
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 30px;
    border: 1px solid #ddd;
}

.order-form input, .order-form textarea {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border-radius: 10px;
    border: 1px solid #ccc;
}

.order-form button {
    margin-top: 1rem;
    width: 100%;
    background: #007bff;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
}

.error-msg {
    color: red;
    font-size: 0.8rem;
}

/* فوتر */
footer {
    background: #f1f3f5;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

/* واکنشگرا برای موبایل */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    .floating-image {
        width: 55px;
        height: 55px;
        bottom: 12px;
        right: 12px;
    }
    .floating-caption {
        right: 80px;
        font-size: 16px;
        bottom: 18px;
        padding: 4px 10px;
    }
    .theme-toggle {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
        top: 12px;
        left: 12px;
    }
}
/* ریسپانسیو کامل برای موبایل */
@media (max-width: 768px) {
    body { font-size: 14px; }
    header h1 { font-size: 1.2rem; }
    nav a { margin: 0 0.5rem; font-size: 0.8rem; }
    .products-grid { grid-template-columns: 1fr; gap: 1rem; }
    .product-card { padding: 1rem; }
    .product-card h3 { font-size: 1rem; }
    .price { font-size: 1.2rem; }
    .desc { font-size: 0.8rem; }
    .select-btn { padding: 8px 16px; font-size: 0.9rem; min-width: 120px; }
    .order-form, .about-card, .success-box { margin: 0.5rem; padding: 1rem; }
    .order-form h2 { font-size: 1rem; }
    .order-form input, .order-form textarea { padding: 8px; font-size: 0.9rem; }
    .order-form button { padding: 10px; font-size: 0.95rem; }
    .floating-image { width: 45px; height: 45px; bottom: 8px; right: 8px; }
    .floating-caption { right: 65px; font-size: 12px; bottom: 12px; padding: 3px 8px; }
    .theme-toggle { width: 38px; height: 38px; font-size: 1rem; top: 10px; left: 10px; }
    .auth-form { margin: 1rem; padding: 1rem; }
    .profile-container { margin: 1rem; }
    .order-card { padding: 0.8rem; }
    footer p { font-size: 0.7rem; }
}
@media (max-width: 480px) {
    header h1 { font-size: 1rem; }
    nav a { margin: 0 0.3rem; font-size: 0.7rem; }
    .product-card h3 { font-size: 0.9rem; }
    .price { font-size: 1rem; }
    .select-btn { padding: 6px 12px; font-size: 0.8rem; }
}