* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0a4b8a;
    --primary-dark: #063a6b;
    --primary-light: #1e6faf;
    --secondary: #ff8c42;
    --secondary-dark: #e67e22;
    --success: #27ae60;
    --danger: #e74c3c;
    --gray-bg: #f8fafc;
    --text-dark: #1e2a3e;
    --text-gray: #64748b;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px -12px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Vazir', 'Tahoma', sans-serif;
    background: var(--gray-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1280px;
    margin: auto;
}

/* Header */
header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.logo i {
    color: var(--secondary);
    margin-left: 8px;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    margin-right: 1.8rem;
    transition: color 0.3s;
    font-weight: 500;
}

nav a:hover {
    color: var(--secondary);
}

.cart-link {
    position: relative;
}

.cart-count {
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    position: absolute;
    top: -8px;
    right: -12px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    padding: 4rem 0;
    border-radius: 0 0 50px 50px;
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin: 1.5rem 0;
}

.hero-stats div i {
    margin-left: 5px;
}

.btn {
    background: var(--secondary);
    color: white;
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-weight: bold;
}

.btn:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Features */
.features {
    padding: 4rem 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 20px;
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

/* Products */
.products-section {
    padding: 4rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    color: var(--primary);
    font-size: 1.8rem;
}

.view-all {
    color: var(--secondary);
    text-decoration: none;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--secondary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.product-card h3 {
    padding: 1rem 1rem 0;
    font-size: 1.1rem;
}

.product-price {
    color: var(--secondary);
    font-size: 1.3rem;
    font-weight: bold;
    padding: 0.5rem 1rem;
}

.product-category {
    color: var(--text-gray);
    font-size: 0.85rem;
    padding: 0 1rem;
}

.product-actions {
    padding: 1rem;
    display: flex;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.85rem;
}

/* Cart */
.cart-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin-bottom: 2rem;
}

.cart-item {
    background: white;
    border-radius: 16px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--secondary);
    font-weight: bold;
}

.remove-btn {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.remove-btn:hover {
    background: #c0392b;
    transform: scale(1.05);
}

.cart-summary {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.summary-total {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary);
    border-top: 2px solid var(--primary);
    margin-top: 0.5rem;
    padding-top: 1rem;
}

/* Checkout Form */
.checkout-form {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
}

.payment-methods {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-method:hover {
    border-color: var(--secondary);
}

.payment-method input {
    width: auto;
}

/* Filters */
.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.filter-btn {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Newsletter */
.newsletter {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 3rem;
    border-radius: 30px;
    margin: 2rem auto;
    color: white;
    text-align: center;
}

.newsletter-content form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 1.5rem auto 0;
}

.newsletter-content input {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 50px;
}

/* Footer */
footer {
    background: #1e293b;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-links a {
    display: block;
    color: #94a3b8;
    text-decoration: none;
    margin: 0.5rem 0;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--secondary);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: white;
    background: #334155;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--secondary);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid #334155;
}

/* Responsive */
@media (max-width: 768px) {
    .cart-wrapper {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
    }
    
    nav {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-gray);
}

.empty-cart {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 16px;
}

.empty-cart i {
    color: var(--text-gray);
    margin-bottom: 1rem;
}


/* Auth Pages */
.auth-container {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.auth-box {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.auth-header h2 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.input-group {
    position: relative;
    margin-bottom: 1.2rem;
}

.input-group i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
}

.input-group input {
    width: 100%;
    padding: 0.9rem 2.5rem 0.9rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
}

.input-group input:focus {
    border-color: var(--primary);
    outline: none;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.forgot-pass {
    color: var(--secondary);
    text-decoration: none;
}

.btn-auth {
    width: 100%;
    margin-top: 1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    background: white;
    padding: 0 1rem;
    position: relative;
    color: var(--text-gray);
}

.social-auth {
    display: flex;
    gap: 1rem;
}

.social-btn {
    flex: 1;
    padding: 0.8rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.social-btn.google:hover {
    border-color: #db4437;
    color: #db4437;
}

.social-btn.telegram:hover {
    border-color: #0088cc;
    color: #0088cc;
}

/* Password Strength */
.password-strength {
    font-size: 0.8rem;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-body {
    padding: 1.5rem;
}

/* Checkout Page */
.checkout-page {
    padding: 2rem 0;
}

.checkout-steps {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-gray);
}

.step.active {
    color: var(--primary);
}

.step-number {
    width: 32px;
    height: 32px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.step.active .step-number {
    background: var(--primary);
    color: white;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2rem;
}

.form-section {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-section h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.payment-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-card:hover {
    border-color: var(--secondary);
}

.payment-card input {
    display: none;
}

.payment-card:has(input:checked) {
    border-color: var(--secondary);
    background: #fff8f0;
}

.order-summary {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.order-items {
    max-height: 300px;
    overflow-y: auto;
    margin: 1rem 0;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.order-total {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #e2e8f0;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.grand-total {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
    border-top: 2px solid var(--primary);
    margin-top: 0.5rem;
    padding-top: 1rem;
}

.discount-row input {
    width: 120px;
    padding: 0.3rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.btn-payment {
    width: 100%;
    margin-top: 1rem;
}

.secure-badge {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-gray);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Related Products */
.related-products-section {
    padding: 3rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-grid {
        grid-template-columns: 1fr;
    }
    
    .checkout-steps {
        gap: 1rem;
    }
    
    .step-title {
        display: none;
    }
    
    .auth-box {
        padding: 1.5rem;
        margin: 1rem;
    }
}