﻿:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #38bdf8;
    --glass: rgba(30, 41, 59, 0.7);
    --border: rgba(255, 255, 255, 0.1);
    --success: #22c55e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Noto Sans Arabic', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    direction: rtl;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Glassmorphism Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.header-main {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.search-container {
    flex-grow: 1;
    max-width: 500px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 0.5rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
}

.search-container:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.2);
}

.search-container i {
    color: var(--text-muted);
}

.search-container input {
    background: none;
    border: none;
    color: var(--text-main);
    width: 100%;
    font-size: 0.95rem;
    outline: none;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px rgba(184, 134, 11, 0.3));
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo::before {
    content: 'A';
    font-family: 'Orbitron', sans-serif;
    color: #ffd700;
    border: 2px solid #ffd700;
    padding: 0 8px;
    border-radius: 4px;
    font-size: 1.4rem;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.nav-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.5rem;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Hero Section */
.hero {
    margin-top: 80px;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    text-align: center;
    padding: 0 10%;
    transition: all 0.3s ease;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Product Grid */
.container {
    padding: 4rem 5%;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    border-right: 4px solid var(--primary);
    padding-right: 1rem;
}

.category-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: none;
}

.category-filters::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 50px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-weight: 600;
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--text-main);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.4);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

.product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.btn-add {
    width: 100%;
    padding: 0.8rem;
    margin-top: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add:hover {
    background: var(--primary-hover);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    width: 400px;
    height: 100%;
    background: var(--bg-dark);
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
    z-index: 3001;
    /* Higher than bottom nav */
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .cart-sidebar {
        padding-bottom: 80px;
        /* Space to see the checkout button above any bottom elements */
    }
}

.cart-sidebar.open {
    left: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.close-cart {
    cursor: pointer;
    font-size: 1.5rem;
}

.cart-items {
    flex-grow: 0;
    flex-shrink: 1;
    overflow-y: auto;
    max-height: 35vh;
    margin-bottom: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
}

.cart-item img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.cart-footer {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    flex-shrink: 0;
    overflow-y: auto;
    max-height: 55vh;
}

.customer-info-fields {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.input-group input {
    width: 100%;
    padding: 0.8rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-main);
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: var(--primary);
    background: rgba(30, 41, 59, 0.9);
}

.shipping-select,
#customerCommune {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 0.5rem 0;
    cursor: pointer;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 1rem center;
    background-size: 1.2rem;
}

.shipping-select:focus,
#customerCommune:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.25);
    background-color: rgba(30, 41, 59, 0.95);
}

#customerCommune:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

.shipping-select option,
#customerCommune option {
    background: var(--bg-card);
    color: var(--text-main);
    padding: 1rem;
}

.shipping-select option,
#customerCommune option {
    background: var(--bg-dark);
    color: var(--text-main);
    padding: 10px;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Product Modal */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 900px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.product-modal.show .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--text-main);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.modal-img-container {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-img-container img {
    width: 100%;
    height: 450px;
    object-fit: cover;
}

.modal-info {
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-info h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modal-category {
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.modal-description {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.modal-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-top: auto;
}

.modal-price {
    font-size: 2rem;
    font-weight: 800;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Mobile Specific Overrides (Premium Feel) --- */
@media (max-width: 768px) {
    header {
        padding: 0.5rem 3%;
        height: auto;
    }

    .header-main {
        flex-direction: row;
        justify-content: space-between;
        gap: 0.5rem;
    }

    .search-container {
        flex-grow: 1;
        max-width: none;
        margin: 0 5px;
        padding: 0.45rem 0.8rem;
    }

    .search-container input {
        font-size: 0.85rem;
    }

    header .nav-icons {
        display: flex;
        gap: 0.8rem;
    }

    .cart-icon {
        font-size: 1.3rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .logo::before {
        font-size: 0.9rem;
        padding: 0 4px;
        box-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    }

    .bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 75px;
    }

    .hero {
        padding: 0 5%;
        height: 35vh;
        margin-top: 60px;
    }

    .hero h1 {
        font-size: 1.7rem;
    }

    .hero p {
        font-size: 0.9rem;
    }

    .container {
        padding: 1.5rem 2%;
    }

    .section-title {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .product-info {
        padding: 0.8rem;
    }

    .product-name {
        font-size: 0.9rem;
        height: 2.7rem;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .product-price {
        font-size: 1.1rem;
    }

    .btn-add {
        padding: 0.6rem;
        font-size: 0.8rem;
    }

    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-img-container img {
        height: 300px;
    }

    .modal-info {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .cart-sidebar {
        width: 100%;
        left: -100%;
    }

    .cart-sidebar.open {
        left: 0;
    }
}

/* Bottom Navigation Styles */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--glass);
    backdrop-filter: blur(25px);
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 0.7rem 0;
    border-top: 1px solid var(--border);
    z-index: 2000;
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bottom-nav .nav-item i {
    font-size: 1.3rem;
}

.bottom-nav .nav-item.active,
.bottom-nav .nav-item:hover {
    color: var(--accent);
}

.cart-icon-wrapper {
    position: relative;
}

.mobile-count {
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 50%;
    position: absolute;
    top: -5px;
    right: -10px;
}/* Notification Toast System */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: var(--success);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.3);
    z-index: 5000;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.notification.show {
    transform: translateX(-50%) translateY(0);
}

.checkout-btn {
    transition: transform 0.2s ease;
}

.checkout-btn:active {
    transform: scale(0.98);
}
