:root {
    --primary-color: #ff6b00;
    --secondary-color: #0056b3;
    --text-color: #333;
    --light-gray: #f4f4f4;
    --white: #ffffff;
    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Cairo', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--light-gray);
    color: var(--text-color);
}

body.menu-open {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Improved Navbar */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hamburger {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
}

.hamburger:hover {
    color: var(--primary-color);
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo .clone {
    color: var(--text-color);
    font-size: 14px;
}

.nav-center {
    flex: 1;
    max-width: 500px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--light-gray);
    border-radius: 25px;
    padding: 8px 16px;
    gap: 10px;
}

.search-bar i {
    color: #999;
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    font-size: 14px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-icon {
    font-size: 20px;
    color: var(--text-color);
    position: relative;
    text-decoration: none;
    padding: 8px;
}

.nav-icon:hover {
    color: var(--primary-color);
}

/* User Menu Dropdown */
.user-menu {
    position: relative;
}

.user-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--border-radius);
    transition: background 0.3s;
}

.user-btn:hover {
    background: var(--light-gray);
}

.user-btn i.fa-user-circle {
    font-size: 24px;
    color: var(--primary-color);
}

.user-name {
    font-weight: 600;
    color: var(--text-color);
}

.user-btn i.fa-chevron-down {
    font-size: 12px;
    color: #999;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    margin-top: 8px;
    display: none;
    z-index: 1001;
}

.user-menu.active .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.2s;
}

.user-dropdown a:hover {
    background: var(--light-gray);
}

.user-dropdown hr {
    margin: 0;
    border: none;
    border-top: 1px solid #eee;
}

/* Side Menu */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1998;
    display: none;
}

.overlay.active {
    display: block;
}

.side-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: white;
    z-index: 1999;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.side-menu.active {
    left: 0;
}

.side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.side-menu-header h2 {
    margin: 0;
    color: var(--primary-color);
}

.close-menu {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #999;
}

.close-menu:hover {
    color: var(--text-color);
}

.side-menu-content {
    padding: 20px 0;
}

.user-profile-section {
    text-align: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.user-avatar {
    font-size: 64px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.user-profile-section h3 {
    margin: 10px 0 5px;
    font-size: 18px;
}

.user-profile-section p {
    margin: 0;
    color: #999;
    font-size: 14px;
}

.side-nav {
    padding: 10px 0;
}

.side-nav a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: background 0.2s;
    position: relative;
}

.side-nav a:hover {
    background: var(--light-gray);
    color: var(--primary-color);
}

.side-nav a i {
    width: 20px;
    text-align: center;
}

.menu-badge {
    position: absolute;
    right: 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
}

.side-menu-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: #dc3545;
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
}

.btn-logout:hover {
    background: #c82333;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 8px 16px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #e65100;
}

.btn-outline {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: var(--border-radius);
    background: transparent;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #ff9a44 0%, #fc6076 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
    margin-bottom: 30px;
}

.hero h1 {
    margin: 0 0 10px;
    font-size: 36px;
}

/* Layout */
.main-content {
    display: flex;
    gap: 30px;
    padding-bottom: 50px;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    height: fit-content;
    box-shadow: var(--shadow);
}

.sidebar h3 {
    margin-top: 0;
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 10px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
}

.sidebar li a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 4px;
    transition: background 0.2s;
}

.sidebar li a:hover,
.sidebar li a.active {
    background-color: #fff3e0;
    color: var(--primary-color);
}

.deals-grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Deal Card */
.deal-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.deal-card:hover {
    transform: translateY(-5px);
}

.deal-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ff0000;
    color: var(--white);
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 14px;
}

.deal-content {
    padding: 15px;
}

.category-tag {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
}

.deal-content h3 {
    margin: 5px 0 10px;
    font-size: 18px;
    height: 44px;
    overflow: hidden;
}

.price-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.current-price {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 20px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: bold;
}

/* Deal Actions */
.deal-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.deal-actions .btn-secondary {
    flex: 1;
    background-color: #6c757d;
    color: white;
    padding: 10px;
    text-align: center;
    border-radius: var(--border-radius);
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.deal-actions .btn-primary {
    flex: 1;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-large {
    padding: 12px 24px;
    font-size: 16px;
}

/* Single Deal Page */
.single-deal {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.deal-gallery img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.deal-info {
    margin-top: 20px;
}

.price-box.large .current-price {
    font-size: 32px;
}

.description {
    line-height: 1.6;
    color: #555;
    margin: 20px 0;
}

.quantity-selector {
    margin-bottom: 15px;
}

.quantity-selector input {
    padding: 5px;
    width: 60px;
}

.btn-full {
    width: 100%;
}

.deal-meta {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    display: flex;
    gap: 20px;
    color: #666;
}

.deal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.deal-buttons button {
    flex: 1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--white);
    margin: 10% auto;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    cursor: pointer;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Profile */
.profile-header {
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.order-card {
    background: var(--white);
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    display: flex;
    gap: 20px;
    box-shadow: var(--shadow);
}

.order-card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.alert-box {
    background-color: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: var(--border-radius);
    margin: 20px 0;
}

.status-badge.completed {
    background-color: #d4edda;
    color: #155724;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Cart Styles */
.cart-link {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: #ff0000;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* Cart Page */
.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.empty-cart h2 {
    margin: 20px 0 10px;
}

.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 20px;
    box-shadow: var(--shadow);
}

.cart-item img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.cart-item-details h3 {
    margin: 0 0 10px;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 18px;
}

.qty-input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 4px;
}

.item-subtotal {
    font-size: 18px;
    color: var(--primary-color);
}

.remove-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
}

.remove-btn:hover {
    background: #c82333;
}

.cart-summary {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    height: fit-content;
}

.cart-summary h2 {
    margin-top: 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.summary-row.total {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
}

.continue-shopping {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: var(--primary-color);
    text-decoration: none;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section h4 {
    color: white;
    margin-bottom: 15px;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-section ul li i {
    margin-right: 8px;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #34495e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    color: #bdc3c7;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-center {
        display: none;
    }

    .user-name {
        display: none;
    }

    .cart-container {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
    }

    .cart-item-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: space-between;
    }

    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }
}