/* Root Variables */
:root {
    --primary-color: #1e7e34;
    --primary-dark: #155724;
    --secondary-color: #ffc107;
    --gold-color: #d4af37;
    --platinum-color: #e5e4e2;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #dee2e6;
    --success: #28a745;
    --danger: #dc3545;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    direction: rtl;
    text-align: right;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo i {
    font-size: 2rem;
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: all 0.3s;
    border-radius: 5px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(30, 126, 52, 0.1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lang-toggle,
.cart-btn,
.auth-btn,
.logout-btn {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    transition: all 0.3s;
}

.lang-toggle:hover,
.cart-btn:hover,
.auth-btn:hover,
.logout-btn:hover {
    background: var(--primary-color);
    color: white;
}

.cart-btn {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    left: -8px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 5px;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--text-dark);
}

.btn-primary:hover {
    background: #e0a800;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--bg-light);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Page Management */
.page {
    display: none;
    min-height: calc(100vh - 300px);
    padding: 2rem 0;
}

.page.active {
    display: block;
}

/* Featured Auctions */
.featured-auctions,
.categories-section,
.cta-section {
    padding: 4rem 0;
}

.featured-auctions h2,
.categories-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.auctions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.auction-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    cursor: pointer;
}

.auction-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.auction-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--text-light);
}

.auction-content {
    padding: 1.5rem;
}

.auction-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.auction-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.auction-description {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.auction-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.current-bid {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.bid-label {
    font-size: 0.85rem;
    color: var(--text-light);
    display: block;
}

.time-left {
    text-align: center;
}

.time-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--danger);
}

.time-label {
    font-size: 0.85rem;
    color: var(--text-light);
    display: block;
}

.auction-actions {
    display: flex;
    gap: 0.5rem;
}

.auction-actions .btn {
    flex: 1;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Categories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.categories-grid.large {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: var(--primary-color);
    color: white;
}

.category-card i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.category-card:hover i {
    color: white;
}

.category-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.category-card.large p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.category-card.large:hover p {
    color: rgba(255, 255, 255, 0.9);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
}

.filters {
    display: flex;
    gap: 1rem;
}

.filters select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    cursor: pointer;
}

/* Membership Page */
.membership-header {
    text-align: center;
    margin-bottom: 3rem;
}

.membership-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.membership-header p {
    font-size: 1.25rem;
    color: var(--text-light);
}

.membership-tiers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.tier-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s;
}

.tier-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.tier-card.premium {
    border: 3px solid var(--gold-color);
    transform: scale(1.05);
}

.tier-badge {
    display: inline-block;
    background: var(--text-light);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 600;
    margin-bottom: 1rem;
}

.tier-badge.gold {
    background: var(--gold-color);
}

.tier-badge.platinum {
    background: linear-gradient(135deg, #e5e4e2 0%, #9c9c9c 100%);
}

.tier-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.price span {
    font-size: 1rem;
    color: var(--text-light);
}

.features {
    list-style: none;
    text-align: right;
    margin-bottom: 2rem;
}

.features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.features li:last-child {
    border-bottom: none;
}

.features i {
    color: var(--success);
    margin-left: 0.5rem;
}

/* About Page */
.about-content {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.about-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.about-content h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.values-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.values-list li {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.values-list i {
    color: var(--primary-color);
    margin-left: 0.5rem;
    font-size: 1.5rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 800px;
}

.close {
    color: var(--text-light);
    position: absolute;
    left: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: var(--text-dark);
}

/* Forms */
.auth-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.interests-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.interest-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: normal;
}

.interest-checkbox input {
    width: auto;
    cursor: pointer;
}

.toggle-auth {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-light);
}

.toggle-auth a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.toggle-auth a:hover {
    text-decoration: underline;
}

/* Cart */
.cart-items-list {
    margin: 2rem 0;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-info h4 {
    margin-bottom: 0.5rem;
}

.cart-item-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.remove-item {
    background: var(--danger);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.remove-item:hover {
    background: #c82333;
}

.cart-footer {
    border-top: 2px solid var(--border-color);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

#cartTotal {
    color: var(--primary-color);
    font-weight: 700;
}

.empty-cart {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.empty-cart i {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.product-image-large {
    width: 100%;
    height: 400px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 6rem;
    color: var(--text-light);
}

.product-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.product-info .current-bid {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.product-info .auction-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.product-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.meta-item {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 5px;
}

.meta-label {
    font-size: 0.85rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 0.25rem;
}

.meta-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Footer */
.main-footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a,
.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover,
.footer-link:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .auctions-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filters {
        width: 100%;
        flex-direction: column;
    }

    .filters select {
        width: 100%;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

    .membership-tiers {
        grid-template-columns: 1fr;
    }

    .tier-card.premium {
        transform: scale(1);
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}
