/* 
   Elite Luxury Design System
   Color Scheme: Ivory White, Cool Grays, Slate Charcoal, Gold Accents
   Font: Cairo (Google Fonts)
   Supports Bilingual RTL/LTR layout directions and Dynamic Admin Sidebar
*/

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

:root {
    /* Theme Default Colors (Can be overridden dynamically by inline style blocks) */
    --gold-primary: #C5A880;
    --gold-light: #E1D3BF;
    --gold-dark: #A68A62;
    --gold-gradient: linear-gradient(135deg, var(--gold-primary) 0%, var(--gold-dark) 100%);
    --gold-hover-gradient: linear-gradient(135deg, #D5B990 0%, #B69A72 100%);
    
    --white-pure: #FFFFFF;
    --white-soft: #F9F9FB;
    --gray-light: #F3F3F5;
    --gray-medium: #E2E2E6;
    --gray-dark: #8E8E93;
    
    --charcoal-light: #2D2D37;
    --charcoal-dark: #1E1E24;
    --charcoal-gradient: linear-gradient(135deg, var(--charcoal-light) 0%, var(--charcoal-dark) 100%);
    
    --text-primary: #2D2D37;
    --text-secondary: #6B6B76;
    --text-light: #E2E2E6;
    
    --success: #388E3C;
    --danger: #D32F2F;
    --warning: #F57C00;
    
    /* Layout & Styling Values */
    --font-family: 'Cairo', sans-serif;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 40px rgba(197, 168, 128, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --border-radius: 12px;
    --border-radius-lg: 20px;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--white-soft);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    text-align: right; /* RTL Default */
}

/* LTR Directions Overrides */
[dir="ltr"] body {
    text-align: left;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--charcoal-dark);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.main-header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--gray-medium);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.main-header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

[dir="ltr"] .nav-container {
    flex-direction: row;
}

.logo-area a {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--charcoal-dark);
}

.logo-area span {
    color: var(--gold-primary);
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

.nav-link {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold-primary);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--gold-primary);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: var(--gold-primary);
}

.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--border-radius);
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn-primary {
    background: var(--gold-gradient);
    color: var(--white-pure);
    box-shadow: 0 4px 15px rgba(197, 168, 128, 0.25);
}

.btn-primary:hover {
    background: var(--gold-hover-gradient);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(197, 168, 128, 0.35);
}

.btn-secondary {
    background: var(--charcoal-gradient);
    color: var(--white-pure);
}

.btn-secondary:hover {
    opacity: 0.95;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gold-primary);
    color: var(--gold-primary);
}

.btn-outline:hover {
    background: var(--gold-gradient);
    color: var(--white-pure);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 6px 15px;
    font-size: 12px;
}

.cart-icon-btn {
    position: relative;
    padding: 8px;
    background: var(--gray-light);
    border-radius: 50%;
    color: var(--charcoal-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--gold-dark);
    color: var(--white-pure);
    font-size: 11px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero-section {
    background: var(--charcoal-gradient);
    color: var(--white-pure);
    padding: 100px 0 120px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-image: radial-gradient(circle at 80% 20%, rgba(197, 168, 128, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-content h1 {
    font-size: 38px;
    font-weight: 800;
    color: var(--white-pure);
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero-content h1 span {
    color: var(--gold-primary);
}

.hero-content p {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 35px;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 15px;
}

.hero-showroom-links {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hero-showroom-links-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold-primary);
    font-weight: 700;
}

.showroom-btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.showroom-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(197, 168, 128, 0.3);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    transition: var(--transition);
}

/* LTR flip showroom icon */
[dir="ltr"] .showroom-btn i {
    transform: scaleX(-1);
}

.showroom-btn:hover {
    background: rgba(197, 168, 128, 0.1);
    border-color: var(--gold-primary);
    transform: translateY(-3px);
}

.showroom-btn span {
    font-size: 14px;
}

.showroom-btn i {
    color: var(--gold-primary);
    font-size: 18px;
}

/* Service Request Form Container (Homepage Hero Right) */
.hero-form-container {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-lg);
}

.hero-form-container h3 {
    color: var(--white-pure);
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
}

.hero-form-container h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 50px;
    height: 3px;
    background-color: var(--gold-primary);
}

[dir="rtl"] .hero-form-container h3::after {
    right: 0;
}
[dir="ltr"] .hero-form-container h3::after {
    left: 0;
}

/* Custom Sleek Inputs */
.form-input-group {
    margin-bottom: 15px;
}

.form-input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 6px;
}

.form-input-group input,
.form-input-group select,
.form-input-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px 15px;
    color: var(--white-pure);
    font-family: var(--font-family);
    font-size: 14px;
    transition: var(--transition);
}

.form-input-group input:focus,
.form-input-group select:focus,
.form-input-group textarea:focus {
    outline: none;
    border-color: var(--gold-primary);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(197, 168, 128, 0.2);
}

.form-input-group select option {
    background-color: var(--charcoal-dark);
    color: var(--white-pure);
}

.form-input-group textarea {
    resize: none;
    height: 80px;
}

/* Service Cards / About Us */
.section {
    padding: 80px 0;
}

.section-bg-alt {
    background-color: var(--white-pure);
    border-top: 1px solid var(--gray-medium);
    border-bottom: 1px solid var(--gray-medium);
}

.section-title-wrapper {
    text-align: center;
    margin-bottom: 50px;
}

.section-subtitle {
    color: var(--gold-primary);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: block;
}

.section-title {
    font-size: 30px;
    font-weight: 800;
    color: var(--charcoal-dark);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--gold-primary);
}

/* Feature/Services Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.feature-card {
    background: var(--white-pure);
    border-radius: var(--border-radius);
    padding: 35px 30px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--gray-light);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    width: 100%;
    height: 4px;
    background: var(--gold-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

[dir="rtl"] .feature-card::before {
    left: 0;
    transform-origin: right;
}
[dir="ltr"] .feature-card::before {
    right: 0;
    transform-origin: left;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--gold-light);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 40px;
    color: var(--gold-primary);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 300;
}

/* About Us Section layout */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-img-wrapper {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.about-img-wrapper::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border: 2px solid var(--gold-primary);
    border-radius: inherit;
    pointer-events: none;
}

.about-content h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

.about-content p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 25px;
    line-height: 1.8;
}

/* E-Commerce Stores (Sanitary & Electrical) */
.store-banner {
    background: var(--charcoal-gradient);
    color: var(--white-pure);
    padding: 60px 0;
    text-align: center;
    position: relative;
    margin-bottom: 40px;
    border-bottom: 3px solid var(--gold-primary);
}

.store-banner h1 {
    color: var(--white-pure);
    font-size: 32px;
    margin-bottom: 10px;
}

.store-banner p {
    color: var(--gold-light);
    font-size: 15px;
    font-weight: 300;
}

.store-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    margin-bottom: 60px;
}

[dir="ltr"] .store-layout {
    grid-template-columns: 1fr 260px; /* Swap sidebar on right for English */
}

/* Sidebar / Filters */
.store-sidebar {
    background: var(--white-pure);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-medium);
    height: fit-content;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold-primary);
}

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

.filter-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--gray-medium);
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 13px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.product-card {
    background: var(--white-pure);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-light);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--gold-light);
}

.product-image-container {
    position: relative;
    padding-top: 80%;
    background: #F6F6F8;
    overflow: hidden;
}

.product-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image-container img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 15px;
    background: var(--gold-gradient);
    color: var(--white-pure);
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
}

[dir="rtl"] .product-badge {
    right: 15px;
}
[dir="ltr"] .product-badge {
    left: 15px;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 8px;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-desc-snippet {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--gray-light);
}

.product-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--gold-dark);
}

.product-price span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.add-to-cart-form {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.product-qty-input {
    width: 50px;
    padding: 8px;
    border: 1px solid var(--gray-medium);
    border-radius: var(--border-radius);
    text-align: center;
    font-family: var(--font-family);
    font-weight: 600;
}

/* Product Details Page */
.product-details-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 60px;
}

.product-gallery {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    background-color: var(--white-pure);
    border: 1px solid var(--gray-medium);
}

.product-details-info h1 {
    font-size: 26px;
    margin-bottom: 15px;
}

.product-details-price {
    font-size: 24px;
    font-weight: 800;
    color: var(--gold-dark);
    margin-bottom: 25px;
}

.product-details-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--gray-medium);
}

/* Cart & Checkout Layout */
.cart-table-wrapper {
    background: var(--white-pure);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-medium);
    overflow-x: auto;
    margin-bottom: 30px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.cart-table th, 
.cart-table td {
    padding: 18px;
    border-bottom: 1px solid var(--gray-light);
}

[dir="rtl"] .cart-table th, 
[dir="rtl"] .cart-table td {
    text-align: right;
}

[dir="ltr"] .cart-table th, 
[dir="ltr"] .cart-table td {
    text-align: left;
}

.cart-table th {
    background-color: var(--gray-light);
    font-weight: 700;
    color: var(--charcoal-dark);
}

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

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

.cart-item-title {
    font-weight: 700;
    font-size: 14px;
}

.cart-qty-input {
    width: 60px;
    padding: 6px;
    border-radius: 5px;
    border: 1px solid var(--gray-medium);
    text-align: center;
}

.cart-remove-btn {
    color: var(--danger);
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
}

.cart-summary-box {
    background: var(--white-pure);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-medium);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: 600;
}

.summary-total {
    font-size: 18px;
    color: var(--gold-dark);
    font-weight: 800;
    padding-top: 15px;
    border-top: 1px solid var(--gray-light);
}

/* User Auth Pages */
.auth-container {
    max-width: 450px;
    margin: 80px auto;
    background: var(--white-pure);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-medium);
    padding: 35px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    font-size: 22px;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 13px;
}

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

.auth-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--charcoal-light);
    margin-bottom: 8px;
}

.auth-form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-medium);
    border-radius: 8px;
    font-size: 14px;
    font-family: var(--font-family);
    transition: var(--transition);
}

.auth-form-group input:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(197, 168, 128, 0.15);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 13px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--gold-primary);
    font-weight: 700;
}

/* Footer */
.main-footer {
    background: var(--charcoal-gradient);
    color: var(--white-pure);
    padding: 60px 0 20px;
    border-top: 4px solid var(--gold-primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--white-pure);
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--gold-primary);
}

[dir="rtl"] .footer-col h3::after {
    right: 0;
}
[dir="ltr"] .footer-col h3::after {
    left: 0;
}

.footer-col p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: var(--text-light);
    font-size: 14px;
}

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

[dir="rtl"] .footer-links a:hover {
    padding-right: 5px;
}
[dir="ltr"] .footer-links a:hover {
    padding-left: 5px;
}

.footer-social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-social-icons a {
    background: rgba(255, 255, 255, 0.05);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-social-icons a:hover {
    background: var(--gold-primary);
    color: var(--charcoal-dark);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
    color: var(--gray-dark);
}

/* Alert Boxes (Global) */
.alert {
    padding: 14px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    font-size: 14px;
    font-weight: 600;
}

.alert-success {
    background-color: #EBF7EE;
    color: var(--success);
    border: 1px solid #D3EDD9;
}

.alert-danger {
    background-color: #FDEDED;
    color: var(--danger);
    border: 1px solid #FBD9D9;
}

/* ========================================================
   Admin Sidebar Navigation & Layout Updates (Premium Look)
   ======================================================== */

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Vertical Sidebar default RTL styling */
.admin-sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--charcoal-dark) 0%, #111115 100%);
    color: var(--white-pure);
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 1000;
    padding: 30px 20px;
    box-shadow: 5px 0 25px rgba(0,0,0,0.15);
    overflow-y: auto;
    transition: var(--transition);
}

/* Sidebar Position depending on Direction */
[dir="rtl"] .admin-sidebar {
    right: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

[dir="ltr"] .admin-sidebar {
    left: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* Sidebar Header Area */
.admin-sidebar-logo {
    font-weight: 800;
    font-size: 18px;
    color: var(--white-pure);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 35px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar-logo span {
    color: var(--gold-primary);
}

/* Sidebar Menu Items */
.admin-sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-sidebar-menu a {
    color: #A5A5B2;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 8px;
    transition: var(--transition);
}

.admin-sidebar-menu a i {
    width: 20px;
    font-size: 16px;
    text-align: center;
}

.admin-sidebar-menu a:hover,
.admin-sidebar-menu a.active {
    background: rgba(197, 168, 128, 0.1);
    color: var(--gold-primary);
    transform: translateX(-3px);
}

[dir="ltr"] .admin-sidebar-menu a:hover,
[dir="ltr"] .admin-sidebar-menu a.active {
    transform: translateX(3px);
}

/* Sidebar Footer (Profile / Logout) */
.admin-sidebar-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 13px;
}

.admin-sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--white-pure);
    font-weight: 600;
}

/* Admin Main Content Wrapper */
.admin-main {
    flex-grow: 1;
    padding: 45px;
    transition: var(--transition);
}

[dir="rtl"] .admin-main {
    margin-right: 280px;
}

[dir="ltr"] .admin-main {
    margin-left: 280px;
}

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

.admin-stat-card {
    background: var(--white-pure);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-medium);
    display: flex;
    flex-direction: column;
}

.admin-stat-card .stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.admin-stat-card .stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--charcoal-dark);
}

.admin-stat-card .stat-store {
    font-size: 11px;
    color: var(--gold-dark);
    margin-top: 10px;
    font-weight: 700;
}

.admin-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 35px;
}

.admin-card {
    background: var(--white-pure);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-medium);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.admin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-light);
}

.admin-card-title {
    font-size: 16px;
    font-weight: 700;
}

/* Admin Forms */
.admin-form-group {
    margin-bottom: 20px;
}

.admin-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--charcoal-light);
}

.admin-form-group input[type="text"],
.admin-form-group input[type="number"],
.admin-form-group input[type="email"],
.admin-form-group input[type="password"],
.admin-form-group input[type="color"],
.admin-form-group select,
.admin-form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--gray-medium);
    border-radius: 8px;
    font-size: 13px;
    font-family: var(--font-family);
    transition: var(--transition);
}

.admin-form-group input[type="color"] {
    height: 40px;
    padding: 5px;
    cursor: pointer;
}

.admin-form-group textarea {
    height: 120px;
    resize: vertical;
}

.admin-form-group input:focus,
.admin-form-group select:focus,
.admin-form-group textarea:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 0 3px rgba(197, 168, 128, 0.1);
}

/* Table Style for Admin */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.admin-table th,
.admin-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--gray-light);
}

[dir="rtl"] .admin-table th,
[dir="rtl"] .admin-table td {
    text-align: right;
}

[dir="ltr"] .admin-table th,
[dir="ltr"] .admin-table td {
    text-align: left;
}

.admin-table th {
    background: var(--gray-light);
    font-weight: 700;
}

.admin-table tr:hover {
    background: #FAFAFB;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    display: inline-block;
}

.badge-new, .badge-pending {
    background: #FFF3CD;
    color: #856404;
}

.badge-progress, .badge-processing {
    background: #CCE5FF;
    color: #004085;
}

.badge-completed {
    background: #D4EDDA;
    color: #155724;
}

.badge-cancelled {
    background: #F8D7DA;
    color: #721C24;
}

.action-links {
    display: flex;
    gap: 10px;
}

.action-link-edit {
    color: var(--gold-dark);
    font-weight: 700;
}

.action-link-delete {
    color: var(--danger);
    font-weight: 700;
}

/* Color Palette Previewer in settings */
.color-preview-box {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.color-preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
}

.color-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--gray-medium);
    margin-bottom: 5px;
}

/* Responsive Grid and Menu */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .store-layout {
        grid-template-columns: 1fr !important;
    }
    
    .product-details-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Burger button globally hidden on desktop */
.burger-menu-btn {
    display: none;
}

/* Mobile Sidebar Drawer Styles */
.drawer-overlay {
    display: none; /* Hide on desktop */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-drawer {
    display: none; /* Hide on desktop */
    position: fixed;
    top: 0;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    z-index: 1050;
    background: linear-gradient(180deg, var(--charcoal-light) 0%, var(--charcoal-dark) 100%);
    color: var(--white-pure);
    padding: 30px 20px;
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
    overflow-y: auto;
    transition: right 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Hide off-screen by default using absolute offsets (immune to RTL coordinate system flips) */
[dir="rtl"] .mobile-drawer {
    right: -100%;
    left: auto;
}
[dir="ltr"] .mobile-drawer {
    left: -100%;
    right: auto;
}

[dir="rtl"] .mobile-drawer.open {
    right: 0 !important;
    left: auto !important;
}
[dir="ltr"] .mobile-drawer.open {
    left: 0 !important;
    right: auto !important;
}

.mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.close-drawer-btn {
    background: transparent;
    border: none;
    color: #FFF;
    font-size: 20px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-drawer-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--gold-primary);
}

.drawer-menu-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.drawer-menu-links a {
    color: #A5A5B2;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    border-radius: 8px;
    transition: var(--transition);
}

[dir="rtl"] .drawer-menu-links a i {
    margin-left: 5px;
}
[dir="ltr"] .drawer-menu-links a i {
    margin-right: 5px;
}

.drawer-menu-links a i {
    font-size: 16px;
    color: var(--gold-primary);
    width: 20px;
    text-align: center;
}

.drawer-menu-links a:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white-pure);
}

.drawer-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 25px 0;
}

.drawer-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.drawer-action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: var(--white-pure);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

[dir="rtl"] .drawer-action-btn i {
    margin-left: 5px;
}
[dir="ltr"] .drawer-action-btn i {
    margin-right: 5px;
}

.drawer-action-btn i {
    color: var(--gold-primary);
    width: 20px;
    text-align: center;
}

.drawer-action-btn:hover {
    border-color: var(--gold-primary);
    background: rgba(197, 168, 128, 0.1);
}

.drawer-auth-stack {
    padding: 0 10px;
}

.drawer-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 20px;
    font-size: 14px;
}

.drawer-user-info i {
    font-size: 18px;
    color: var(--gold-primary);
}

@media (max-width: 768px) {
    .drawer-overlay {
        display: block;
    }
    
    .mobile-drawer {
        display: block;
        width: 100%;
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .desktop-nav {
        display: none !important;
    }
    
    .desktop-actions {
        display: none !important;
    }
    
    .burger-menu-btn {
        display: block;
        background: transparent;
        border: none;
        font-size: 24px;
        color: var(--charcoal-dark);
        cursor: pointer;
        padding: 8px;
        transition: var(--transition);
    }
    
    .burger-menu-btn:hover {
        color: var(--gold-primary);
    }

    .nav-menu {
        display: none;
    }
    
    /* Collapse Admin Sidebar to standard block on Mobile */
    .admin-wrapper {
        flex-direction: column !important;
    }
    
    .admin-sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }
    
    .admin-sidebar-logo {
        margin-bottom: 20px;
    }
    
    .admin-sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .admin-sidebar-menu a {
        padding: 8px 12px;
        font-size: 12px;
        gap: 5px;
    }
    
    .admin-sidebar-footer {
        margin-top: 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 15px;
    }
    
    .admin-sidebar-user {
        margin-bottom: 0;
    }
    
    .admin-main {
        padding: 20px !important;
        margin: 0 !important;
    }
    
    .admin-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Splash Screen / Welcome Flash Overlay */
.welcome-splash {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.welcome-splash.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.splash-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoomInSplash 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.splash-close-btn {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    color: #FFF;
    border: none;
    font-size: 36px;
    line-height: 1;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.splash-close-btn:hover {
    background: var(--gold-primary);
    color: #FFF;
    transform: rotate(90deg);
}

@keyframes zoomInSplash {
    from {
        transform: scale(0.85);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Homepage Hero Welcome Banner */
.hero-banner-container {
    width: 100%;
    margin-bottom: 25px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    border: 1px solid rgba(255, 255, 255, 0.15);
    animation: fadeInBanner 0.6s ease-out;
}

.hero-banner-img {
    width: 100%;
    height: auto;
    max-height: 280px;
    object-fit: cover;
    display: block;
}

@keyframes fadeInBanner {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
