:root {
    --primary: #004D40;
    --secondary: #FFC107;
    --background: #FAFAFA;
    --text: #212121;
}

/* Global Styles */
body {
    font-family: 'Cairo', sans-serif;
    padding-top: 76px;
    color: var(--text);
    background-color: var(--background);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
}

/* Navigation */
.navbar {
    background-color: transparent;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.navbar.scrolled {
    background-color: var(--primary);
}

.navbar-brand {
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--secondary) !important;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--background);
    font-weight: 600;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: var(--secondary);
}

/* Hero Section */
.hero {
    background-color: #f8f9fa;
    padding: 2rem 0;
}

.hero h1 {
    font-weight: 700;
    color: #2c3e50;
}

/* Hero Slider */
.slider-container {
    position: relative;
    height: calc(100vh - 76px);
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slide.active {
    opacity: 1;
}

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

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    background: rgba(0, 77, 64, 0.8);
    padding: 2rem;
    border-radius: 8px;
    max-width: 80%;
}

.slide-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.slide-content p {
    font-size: 1.2rem;
    margin: 0;
}

.slider-prev,
.slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
}

.slider-prev { left: 1rem; }
.slider-next { right: 1rem; }

.slider-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

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

.dot.active {
    background: var(--secondary);
}

/* Feature Cards */
.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.feature-icon {
    width: 100%;
    height: 100%;
    fill: var(--secondary);
}

.feature-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text);
    margin: 0;
}

/* Product Cards */
.card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.old-price {
    text-decoration: line-through;
    color: #95a5a6;
    margin-right: 0.5rem;
}

/* Map */
#map {
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

/* Modal Customization */
.modal-header {
    border-bottom: 2px solid #f8f9fa;
}

.modal-footer {
    border-top: 2px solid #f8f9fa;
}

/* Admin Dashboard */
.table {
    background-color: white;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .slider {
        height: 300px;
    }

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

/* Shopping Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    transition: right 0.3s ease;
    z-index: 1050;
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    right: 0;
}

.cart-header {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-footer {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
}

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

.cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    margin-left: 1rem;
}

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

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

/* Product Cards */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    border: none;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

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

.product-image-wrapper {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image-wrapper img,
.product-image-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.product-video {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.product-image-wrapper:hover img {
    opacity: 0;
}

.product-image-wrapper:hover video {
    opacity: 1;
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 1;
}

.product-badge.bestseller {
    background-color: var(--primary);
    color: white;
}

.product-badge.discount {
    background-color: var(--secondary);
    color: var(--primary);
}

.product-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.feature {
    font-size: 0.9rem;
    color: var(--text);
}

.feature i {
    color: var(--primary);
    margin-left: 0.5rem;
}

.price {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
    margin: 1rem 0;
}

.old-price {
    text-decoration: line-through;
    color: #999;
    margin-left: 0.5rem;
}

.new-price {
    color: var(--primary);
    font-weight: bold;
}

/* Shopping Cart */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1050;
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    right: 0;
}

.cart-header {
    padding: 1rem;
    background-color: var(--primary);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header .btn-close {
    filter: invert(1) brightness(200%);
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 1rem;
}

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

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

.cart-item-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--primary);
    font-weight: bold;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.quantity-btn:hover {
    background-color: #003b31;
}

.cart-footer {
    padding: 1rem;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: var(--primary);
}

/* RTL Specific Adjustments */
.btn-close {
    margin-right: auto;
    margin-left: 0;
}

.modal-footer {
    flex-direction: row-reverse;
}
