* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fff;
    color: #333;
}

/* RTL Support */
html[dir="rtl"] {
    direction: rtl;
}

html[dir="rtl"] .header-content {
    flex-direction: row-reverse;
}

html[dir="rtl"] .switcher {
    flex-direction: row-reverse;
}

html[dir="rtl"] .search-bar {
    flex-direction: row-reverse;
}

html[dir="rtl"] .categories {
    flex-direction: row-reverse;
}

html[dir="rtl"] .modal-body {
    flex-direction: row-reverse;
}

html[dir="rtl"] .footer-content {
    direction: rtl;
}

/* Header */
.header {
    background: #90854f7f;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    gap: 20px;
}

.switcher {
    display: flex;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.switcher-button {
    padding: 10px 20px;
    cursor: pointer;
    border: 1px solid #2c3e50;
    background: #fff;
    color: #2c3e50;
    font-weight: 600;
    transition: all 0.3s ease;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.switcher-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.switcher-button:hover::before {
    left: 100%;
}

.switcher-button.active {
    background: #2c3e50;
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.3);
}

.address-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.delivery-address {
    background: #2c3e50;
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    width: 100%;
    flex: 1;
}

.icon-button {
    width: 40px;
    height: 40px;
    background: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    position: relative;
}

.cart-button {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

/* Carousel */
.carousel-section {
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 12px;
}

.carousel-slide {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
    transform: translateX(100%);
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.carousel-slide.prev {
    transform: translateX(-100%);
    z-index: 0;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    color: #2c3e50;
    border: none;
    padding: 15px 20px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 8px;
    z-index: 10;
    transition: background 0.3s;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 1);
}

.carousel-prev {
    left: 20px;
}

.carousel-next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active,
.dot:hover {
    background: rgba(255, 255, 255, 1);
}

@media (max-width: 768px) {
    .carousel-wrapper {
        height: 250px;
    }
    
    .carousel-btn {
        padding: 10px 15px;
        font-size: 18px;
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
}

/* Search and Categories */
.search-section {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
}

.categories {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.category-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #e8e8e8;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.category-btn.active {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}

/* Products Grid */
.products-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: #f5f5f5;
}

.product-info {
    padding: 15px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.product-price {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

/* Modal */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10001;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #333;
    z-index: 10002;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #f0f0f0;
}

.modal-body {
    display: flex;
    padding: 30px;
    gap: 30px;
}

.modal-image-container {
    flex: 1;
    min-width: 300px;
}

.modal-product-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
}

.modal-info-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.modal-product-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #333;
}

.modal-product-description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin: 0 0 20px 0;
    flex-grow: 1;
}

.modal-notes {
    margin-bottom: 20px;
}

.modal-notes label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.modal-notes textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    resize: vertical;
}

.modal-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: auto;
}

.modal-price {
    display: flex;
    flex-direction: column;
}

.price-amount {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.price-vat {
    font-size: 12px;
    color: #999;
}

.modal-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 5px;
}

.qty-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 10px;
    color: #333;
}

.qty-btn:hover {
    background: #f0f0f0;
}

.qty-value {
    min-width: 30px;
    text-align: center;
    font-weight: 500;
}

.add-to-cart-btn {
    background: #9b59b6;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.add-to-cart-btn:hover {
    background: #8e44ad;
}

@media (max-width: 768px) {
    .modal-body {
        flex-direction: column;
        padding: 20px;
    }
    .modal-image-container {
        min-width: auto;
    }
    .header-content {
        flex-wrap: wrap;
    }
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 20px;
    }
}

/* Footer */
.footer {
    background: #000;
    color: #fff;
    padding: 50px 20px 40px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 50px;
    align-items: start;
    position: relative;
}

.footer-middle {
    justify-self: center;
    grid-column: 2 / 4;
}

.footer-right {
    justify-self: end;
    grid-column: 4;
    margin-left: auto;
}

.footer-left {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    font-size: 36px;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 5px;
    color: #f39c12;
    font-family: 'Georgia', 'Times New Roman', serif;
    letter-spacing: 1px;
}

.footer-logo-sub {
    font-size: 12px;
    color: #ecf0f1;
    margin-bottom: 15px;
    font-weight: 300;
    letter-spacing: 2px;
}

.footer-vat-arabic {
    font-size: 14px;
    color: #ecf0f1;
    margin-bottom: 5px;
    line-height: 1.6;
}

.footer-vat {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    margin-top: 5px;
}

.footer-middle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #f39c12;
}

.footer-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-social-copyright {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-social {
    display: flex;
    gap: 12px;
    align-items: center;
}

.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s;
    padding: 2px;
}

.social-icon:hover {
    transform: scale(1.1);
}

.social-icon-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

.footer-copyright {
    color: #ecf0f1;
    font-size: 14px;
    margin: 0;
}

.footer-apps {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.3s;
}

.app-button:hover {
    opacity: 0.9;
}

.app-button img {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
}

.app-text {
    display: flex;
    flex-direction: column;
}

.app-text-small {
    font-size: 10px;
    color: #fff;
    line-height: 1.2;
}

.app-text-large {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}

/* Cart Styles */
.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 20px;
    min-height: 100px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.cart-item-notes {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.cart-item-price {
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.remove-item-btn {
    background: #e74c3c;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.remove-item-btn:hover {
    background: #c0392b;
}

.cart-footer {
    border-top: 2px solid #eee;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-total {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.checkout-btn {
    background: #27ae60;
}

.checkout-btn:hover {
    background: #229954;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10003;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-middle {
        grid-column: 1;
        grid-template-columns: 1fr;
        gap: 20px;
        justify-self: center;
    }
    
    .footer-right {
        grid-column: 1;
        justify-self: center;
    }
    
    .footer-social-copyright {
        align-items: center;
    }
    
    .footer-copyright {
        text-align: center;
    }
    
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cart-item-actions {
        width: 100%;
        justify-content: space-between;
    }
}

