@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;600;700;900&display=swap');

:root {
    --gold-primary: #D4AF37;
    --gold-light: #FFD700;
    --gold-dark: #AA6C39;
    --bg-dark: #121212;
    --bg-card: #1E1E1E;
    --text-light: #FFFFFF;
    --text-gray: #B0B0B0;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    margin: 0;
    padding: 0;
    direction: rtl;
    text-align: right;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Typography & Gold Text */
h1, h2, h3, h4, h5, h6 {
    color: var(--gold-primary);
    margin-bottom: 1rem;
}

.gold-text {
    background: linear-gradient(to right, var(--gold-dark), var(--gold-light), var(--gold-dark));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% auto;
    animation: shine 3s linear infinite;
}

@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* Navbar */
.navbar {
    background-color: rgba(0, 0, 0, 0.9);
    border-bottom: 2px solid var(--gold-primary);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    font-size: 1.8rem;
    font-weight: bold;
    text-decoration: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--gold-light);
}

/* Slider Section */
.hero-slider {
    position: relative;
    height: 80vh;
    overflow: hidden;
    width: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    overflow: hidden; /* Important for zoom effect */
}

.slide.active {
    opacity: 1;
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 6s linear; /* Default transition */
}

/* Ken Burns Effect */
.slide.active .slide-img {
    animation: zoomEffect 10s linear infinite alternate;
}

@keyframes zoomEffect {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.15); /* Slow zoom */
    }
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border: 2px solid var(--gold-primary);
    border-radius: 10px;
    opacity: 0; /* Hidden initially for animation */
    animation: fadeInUp 1s ease-out 0.5s forwards; /* Delay for slide load */
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--gold-primary);
    text-shadow: 
        0 0 5px var(--gold-dark),
        0 0 10px var(--gold-primary),
        0 0 20px var(--gold-light),
        0 0 40px var(--gold-primary);
    animation: goldenGlow 2s ease-in-out infinite alternate;
}

@keyframes goldenGlow {
    from {
        text-shadow: 
            0 0 5px var(--gold-dark),
            0 0 10px var(--gold-primary);
    }
    to {
        text-shadow: 
            0 0 10px var(--gold-dark),
            0 0 20px var(--gold-primary),
            0 0 30px var(--gold-light);
    }
}

/* Buttons */
.btn-gold {
    display: inline-block;
    padding: 10px 30px;
    background: linear-gradient(45deg, var(--gold-dark), var(--gold-primary));
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 25px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-gold:hover {
    background: linear-gradient(45deg, var(--gold-primary), var(--gold-light));
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

/* General Section Styles */
section {
    padding: 50px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    width: 100%;
}

/* Features/About Section */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 0 10%;
}

.feature-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid #333;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold-primary);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.feature-card h3 {
    margin: 20px 0 10px;
    font-size: 1.3rem;
    color: var(--text-light);
}

.feature-card p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* Forms */
.form-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 30px;
    background: var(--bg-card);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border: 1px solid #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-row-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--gold-primary);
}

.form-control {
    width: 100%;
    padding: 12px;
    background: #2a2a2a;
    border: 1px solid #444;
    border-radius: 5px;
    color: #fff;
    font-family: inherit;
    box-sizing: border-box; /* Important for padding */
}

.form-control:focus {
    outline: none;
    border-color: var(--gold-primary);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 40px 10%;
}

.product-card {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid #333;
}

.product-card:hover {
    transform: translateY(-10px);
    border-color: var(--gold-primary);
}

.product-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
    text-align: center;
}

.product-price {
    font-size: 1.25rem;
    color: var(--gold-light);
    font-weight: bold;
}

/* Product Details Page */
.product-details-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding: 50px 10%;
    align-items: flex-start;
}

.product-image-box {
    flex: 1;
    min-width: 300px;
}

.detail-img {
    width: 100%;
    border-radius: 15px;
    border: 1px solid #333;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.product-info-box {
    flex: 1;
    min-width: 300px;
}

/* Footer */
footer {
    background: #000;
    padding: 40px 0;
    margin-top: auto;
    border-top: 1px solid #333;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    gap: 30px;
    padding: 0 20px;
}

.footer-section h3 {
    color: var(--gold-primary);
    margin-bottom: 20px;
}

.footer-links li {
    list-style: none;
    margin-bottom: 10px;
}

.footer-links a {
    color: #888;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--gold-primary);
    padding-right: 5px;
}

/* Merchant Dashboard Styles */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.dashboard-sidebar {
    width: 260px;
    background: #1a1a1a;
    padding: 20px;
    border-left: 1px solid #333;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

/* Mobile Sidebar Elements - Base Styles */
.mobile-header, .sidebar-overlay {
    display: none;
}

.sidebar-close {
    display: none; /* Hidden on desktop */
}

/* Updated Sidebar Header Structure */
.sidebar-header-mobile {
    text-align: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.sidebar-header-mobile h3 {
    font-size: 1.5rem;
    margin: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 15px;
    color: #ccc;
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: var(--gold-primary);
    color: #000;
    font-weight: bold;
}

.dashboard-content {
    flex: 1;
    padding: 40px;
    background: var(--bg-dark);
    overflow-y: auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.stat-card h3 {
    font-size: 1.1rem;
    color: #aaa;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2.5rem;
    color: var(--gold-primary);
    font-weight: bold;
    margin: 0;
}

.data-table-container, .table-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #333;
    overflow-x: auto;
}

.data-table, .table-container table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.data-table th, .data-table td, 
.table-container th, .table-container td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid #333;
}

.data-table th, .table-container th {
    background: rgba(212, 175, 55, 0.1);
    color: var(--gold-primary);
    font-weight: bold;
}

.data-table tr:hover, .table-container tr:hover {
    background: rgba(255,255,255,0.02);
}

.thumb-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #444;
}

/* Responsive Dashboard */
@media (max-width: 992px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    /* Mobile Header */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 20px;
        background: #1a1a1a;
        border-bottom: 1px solid #333;
    }

    .sidebar-toggle {
        background: none;
        border: none;
        color: var(--gold-primary);
        font-size: 1.5rem;
        cursor: pointer;
        padding: 5px;
    }
    
    /* Sidebar Off-canvas */
    .dashboard-sidebar {
        position: fixed;
        top: 0;
        right: -280px; /* Hidden off-screen */
        width: 260px;
        height: 100vh;
        z-index: 1000;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-bottom: none;
        border-left: 1px solid #333;
        box-shadow: -5px 0 25px rgba(0,0,0,0.7);
        padding: 0; 
        display: flex;
        flex-direction: column;
    }
    
    .dashboard-sidebar.active {
        right: 0;
    }
    
    /* Sidebar Header Mobile Mode */
    .sidebar-header-mobile {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px;
        margin: 0;
        background: #1a1a1a;
        text-align: right;
    }

    .sidebar-header-mobile h3 {
        font-size: 1.2rem;
        border: none;
        padding: 0;
    }
    
    .sidebar-close {
        display: block;
        background: none;
        border: none;
        color: #fff;
        font-size: 1.2rem;
        cursor: pointer;
    }
    
    .sidebar-menu {
        padding: 20px;
        display: block;
    }
    
    .sidebar-menu li {
        margin-bottom: 10px;
        flex: none;
        min-width: auto;
    }
    
    /* Overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.6);
        backdrop-filter: blur(3px);
        z-index: 999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }

    .dashboard-content {
        padding: 20px;
    }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--gold-primary);
    cursor: pointer;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 15px 20px;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none; /* Hidden by default */
        flex-direction: column;
        width: 100%;
        gap: 15px;
        margin-top: 15px;
        padding: 20px 0;
        text-align: center;
        border-top: 1px solid #333;
        background: rgba(0, 0, 0, 0.95);
    }
    
    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease-in-out;
    }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    .sidebar-menu li {
        min-width: 100px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}
