/* Custom Premium Design System for Otlob Brandy */

/* 1. Global Reset & Variables */
:root {
    --primary-color: #c8102e; /* Brand Crimson Red */
    --primary-hover: #a00c22;
    --dark-color: #111111;
    --dark-light: #222222;
    --light-color: #f8f9fa;
    --grey-color: #777777;
    --border-color: #e0e0e0;
    --white: #ffffff;
    --success-color: #28a745;
    --warning-color: #d39e00;
    
    /* Font Families */
    --font-arabic: 'Cairo', sans-serif;
    --font-english: 'Inter', sans-serif;
    
    /* Layout Sizes */
    --header-height: 80px;
    --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(0, 0, 0, 0.15);
    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
}

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

/* Font Assignments based on Document Direction */
html[dir="rtl"] body {
    font-family: var(--font-arabic);
}

html[dir="ltr"] body {
    font-family: var(--font-english);
}

body {
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

button, input, select, textarea {
    font-family: inherit;
    outline: none;
}

/* Utilities */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.hidden {
    display: none !important;
}

.text-danger {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--light-color);
}
::-webkit-scrollbar-thumb {
    background: var(--grey-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* 2. Announcement Bar */
.announcement-bar {
    background-color: var(--dark-color);
    color: var(--white);
    text-align: center;
    padding: 8px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 1000;
    position: relative;
    box-shadow: var(--shadow-sm);
}

/* 3. Main Header & Navigation */
.main-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.header-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Details */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    height: 50px;
    width: 50px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--primary-color);
}

.brand-name {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    color: var(--dark-color);
}

.accent-text {
    color: var(--primary-color);
}

/* Menu Items */
.nav-menu ul {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: var(--border-radius-sm);
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    background-color: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 2px 4px 2px 12px;
    width: 250px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15);
    width: 280px;
}

.search-box input {
    border: none;
    background: transparent;
    padding: 8px;
    font-size: 0.9rem;
    width: 100%;
}

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

.search-btn:hover {
    background-color: var(--primary-hover);
}

/* Action Buttons */
.action-btn {
    background: none;
    border: none;
    font-size: 1.35rem;
    color: var(--dark-color);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    width: 42px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.lang-toggle {
    font-size: 1rem;
    font-weight: 700;
    gap: 5px;
    width: auto;
    padding: 0 10px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
}

.cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: var(--primary-color);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--white);
}

/* Wallet Widget */
.wallet-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(200, 16, 46, 0.05);
    border: 1px dashed var(--primary-color);
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wallet-widget:hover {
    background-color: rgba(200, 16, 46, 0.1);
    transform: translateY(-2px);
}

.wallet-icon {
    color: var(--primary-color);
    font-size: 1.15rem;
}

.wallet-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.wallet-title {
    font-size: 0.68rem;
    color: var(--grey-color);
    font-weight: bold;
    text-transform: uppercase;
}

.wallet-amount {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dark-color);
}

/* User Dropdown */
.user-profile-menu {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    width: 250px;
    padding: 10px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transform-origin: top right;
    animation: scaleIn 0.2s ease-out;
}

html[dir="rtl"] .user-dropdown {
    right: auto;
    left: 0;
    transform-origin: top left;
}

.user-info-header {
    padding: 10px;
}

.user-info-header h4 {
    font-size: 0.95rem;
    font-weight: 700;
}

.user-info-header p {
    font-size: 0.8rem;
    color: var(--grey-color);
}

.dropdown-divider {
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 5px 0;
}

.dropdown-item {
    background: none;
    border: none;
    text-align: inherit;
    padding: 10px 14px;
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.dropdown-item:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none !important;
}

/* Mobile Toggles and responsiveness for Header */
@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: -300px;
        width: 280px;
        height: calc(100vh - var(--header-height));
        background-color: var(--white);
        box-shadow: var(--shadow-lg);
        z-index: 998;
        transition: all 0.4s ease;
        padding: 30px 20px;
        border-right: 1px solid var(--border-color);
    }
    
    html[dir="rtl"] .nav-menu {
        left: auto;
        right: -300px;
        border-right: none;
        border-left: 1px solid var(--border-color);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    html[dir="rtl"] .nav-menu.active {
        right: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-link {
        display: block;
        padding: 12px 16px;
        font-size: 1.1rem;
    }
    
    .search-box {
        width: 170px;
    }
}

@media (max-width: 768px) {
    .search-box {
        display: none;
    }
    .brand-name {
        font-size: 1.1rem;
    }
    .logo-img {
        height: 40px;
        width: 40px;
    }
    .wallet-widget {
        padding: 4px 10px;
    }
    .wallet-title {
        display: none;
    }
    .wallet-amount {
        font-size: 0.75rem;
    }
    .announcement-bar {
        font-size: 0.72rem;
    }
}

/* 4. Hero Section & Offers Slider */
.hero-section {
    position: relative;
    height: 70vh;
    min-height: 450px;
    background: linear-gradient(135deg, #1a1a1a, #000000);
    overflow: hidden;
}

.hero-slider {
    height: 100%;
    position: relative;
}

.slide {
    height: 100%;
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.45));
}

html[dir="rtl"] .slide-overlay {
    background: linear-gradient(to left, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.45));
}

.slide-content {
    position: relative;
    z-index: 2;
    color: var(--white);
    max-width: 650px;
    padding: 0 20px;
    margin-right: auto;
    margin-left: 10%;
}

html[dir="rtl"] .slide-content {
    margin-left: auto;
    margin-right: 10%;
}

.slide-tag {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 30px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 20px;
    animation: fadeInUp 0.5s ease both;
}

.slide-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    animation: fadeInUp 0.7s ease both 0.2s;
}

.slide-desc {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
    animation: fadeInUp 0.9s ease both 0.4s;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.hero-arrow:hover {
    background-color: var(--primary-color);
    transform: translateY(-50%) scale(1.05);
}

.hero-arrow.prev {
    left: 20px;
}
.hero-arrow.next {
    right: 20px;
}

.hero-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-dot.active {
    background-color: var(--primary-color);
    width: 28px;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .hero-section {
        height: 55vh;
        min-height: 380px;
    }
    .slide-title {
        font-size: 2rem;
    }
    .slide-desc {
        font-size: 0.95rem;
    }
    .hero-arrow {
        width: 38px;
        height: 38px;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(200, 16, 46, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 16, 46, 0.4);
}

.btn-secondary {
    background-color: var(--dark-color);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--dark-light);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

/* 5. Main Catalog/Shop Layout */
.main-container {
    max-width: 1400px;
    width: 95%;
    margin: 60px auto;
}

.shop-section {
    width: 100%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    position: relative;
    padding-bottom: 8px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

html[dir="rtl"] .section-title::after {
    left: auto;
    right: 0;
}

.filters-container {
    display: flex;
    gap: 12px;
}

.filter-btn {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    width: 100%;
}

.loading-spinner {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px;
    font-size: 2rem;
    color: var(--primary-color);
}

/* Product Card */
.product-card {
    background-color: var(--white);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
    border-color: rgba(200, 16, 46, 0.1);
}

.product-img-wrapper {
    position: relative;
    height: 350px;
    background-color: #eaeaea;
    overflow: hidden;
    cursor: pointer;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-img {
    transform: scale(1.08);
}

.product-tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--dark-color);
    color: var(--white);
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 30px;
    z-index: 2;
}

html[dir="rtl"] .product-tag {
    left: auto;
    right: 15px;
}

.product-quick-view {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    background-color: rgba(200, 16, 46, 0.9);
    color: var(--white);
    text-align: center;
    padding: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: bottom 0.3s ease;
    border: none;
    z-index: 3;
}

.product-card:hover .product-quick-view {
    bottom: 0;
}

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

.product-category {
    font-size: 0.75rem;
    color: var(--grey-color);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.product-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-color);
}

.add-cart-icon-btn {
    background-color: var(--light-color);
    color: var(--dark-color);
    border: 1px solid var(--border-color);
    height: 38px;
    width: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.add-cart-icon-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    transform: scale(1.05);
}

/* 6. MODALS & DRAWERS DEFINITION */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal-container {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    position: relative;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--grey-color);
    cursor: pointer;
    transition: color 0.3s ease;
}

html[dir="rtl"] .modal-close-btn {
    right: auto;
    left: 20px;
}

.modal-close-btn:hover {
    color: var(--primary-color);
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.modal-subtitle {
    font-size: 0.9rem;
    color: var(--grey-color);
    margin-bottom: 25px;
}

/* Form Styles inside Modals */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.form-group label {
    font-weight: 700;
    font-size: 0.9rem;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: var(--border-radius-md);
    background-color: var(--light-color);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    background-color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* Authentication Modal */
.auth-modal {
    max-width: 450px;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.auth-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 12px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    color: var(--grey-color);
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.auth-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.auth-form {
    animation: fadeIn 0.4s ease;
}

/* Shopping Cart Drawer */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1999;
    display: none;
    animation: fadeIn 0.3s ease;
}

.cart-drawer-overlay.active {
    display: block;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100%;
    background-color: var(--white);
    z-index: 2000;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html[dir="rtl"] .cart-drawer {
    right: auto;
    left: -450px;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html[dir="rtl"] .cart-drawer.active {
    left: 0;
}

@media (max-width: 500px) {
    .cart-drawer {
        width: 100%;
        right: -100%;
    }
    html[dir="rtl"] .cart-drawer {
        left: -100%;
    }
}

.cart-drawer-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-drawer-header h3 {
    font-size: 1.25rem;
    font-weight: 800;
}

.close-drawer-btn {
    background: none;
    border: none;
    font-size: 1.35rem;
    color: var(--grey-color);
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-drawer-btn:hover {
    color: var(--primary-color);
}

.cart-drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-empty-message {
    text-align: center;
    margin: auto;
    color: var(--grey-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.cart-empty-message i {
    font-size: 3rem;
    opacity: 0.3;
}

/* Cart Item Cards */
.cart-item {
    display: flex;
    gap: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 15px;
}

.cart-item-img {
    width: 80px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.cart-item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item-price {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.cart-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    background-color: var(--light-color);
    overflow: hidden;
}

.quantity-btn {
    background: none;
    border: none;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.quantity-btn:hover {
    background-color: var(--border-color);
}

.quantity-value {
    padding: 0 12px;
    font-weight: 700;
    font-size: 0.85rem;
}

.remove-item-btn {
    background: none;
    border: none;
    color: var(--grey-color);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.remove-item-btn:hover {
    color: var(--primary-color);
}

.cart-drawer-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    background-color: var(--light-color);
}

.cart-totals {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 800;
}

.cart-totals .total-price {
    color: var(--primary-color);
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.05rem;
}

/* 7. Product Detail Modal Specific Layout */
.product-detail-modal {
    max-width: 900px;
    padding: 0;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    max-height: 90vh;
}

@media (max-width: 768px) {
    .product-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Detail Modal Image Carousel */
.detail-media-container {
    position: relative;
    background-color: #eee;
    height: 550px;
}

@media (max-width: 768px) {
    .detail-media-container {
        height: 380px;
    }
}

.detail-carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.detail-carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.detail-carousel-slide.active {
    opacity: 1;
    position: relative;
}

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

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.carousel-arrow:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.carousel-arrow.prev {
    left: 15px;
}
.carousel-arrow.next {
    right: 15px;
}

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

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    border: 2px solid var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background-color: var(--primary-color);
    width: 24px;
    border-radius: 10px;
}

/* Detail Info Column */
.detail-info-col {
    padding: 40px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    height: 550px;
}

@media (max-width: 768px) {
    .detail-info-col {
        height: auto;
        padding: 24px;
    }
}

.detail-category {
    font-size: 0.8rem;
    color: var(--grey-color);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.detail-title {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 15px;
}

.detail-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.detail-desc {
    font-size: 0.95rem;
    color: var(--dark-light);
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.detail-selectors {
    margin-bottom: 30px;
}

.selector-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.size-options, .color-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.size-btn {
    border: 1px solid var(--border-color);
    background-color: var(--white);
    width: 44px;
    height: 44px;
    font-weight: 700;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.size-btn:hover, .size-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(200, 16, 46, 0.05);
}

.color-btn {
    border: 1px solid var(--border-color);
    background-color: var(--white);
    padding: 8px 18px;
    border-radius: var(--border-radius-md);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.color-btn:hover, .color-btn.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background-color: rgba(200, 16, 46, 0.05);
}

/* Clipboard Copy Button styling */
.btn-copy {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
    padding: 2px 6px;
    font-size: 0.95rem;
    transition: transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.btn-copy:hover {
    transform: scale(1.15);
}

/* 8. Checkout Modal Layout & Payments option design */
.checkout-modal {
    max-width: 900px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
    margin-top: 25px;
}

@media (max-width: 768px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary-color);
    padding-left: 10px;
}

html[dir="rtl"] .form-section-title {
    border-left: none;
    border-right: 4px solid var(--primary-color);
    padding-left: 0;
    padding-right: 10px;
}

/* Radio buttons payment selector */
.payment-option-label {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 14px 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    user-select: none;
}

.payment-option-label:hover {
    border-color: var(--primary-color);
    background-color: rgba(200, 16, 46, 0.02);
}

.payment-option-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.payment-option-label.active {
    border-color: var(--primary-color);
    background-color: rgba(200, 16, 46, 0.05);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.checkout-summary {
    background-color: var(--light-color);
    border-radius: var(--border-radius-lg);
    padding: 24px;
    border: 1px solid var(--border-color);
    align-self: flex-start;
}

.summary-items {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.summary-item-card {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.summary-item-card span:first-child {
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding-right: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.05rem;
    font-weight: 700;
    margin-top: 15px;
}

.wallet-row {
    margin-top: 10px;
    font-size: 0.95rem;
    color: var(--grey-color);
}

.wallet-status-msg {
    margin-top: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    padding: 10px;
    border-radius: var(--border-radius-sm);
    text-align: center;
}

.checkout-submit-btn {
    margin-top: 20px;
}

/* 9. Admin Portal Styling */
.admin-portal-section {
    background-color: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    margin-top: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.admin-grid {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 30px;
}

@media (max-width: 992px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        flex-direction: row;
        border: none;
        padding: 0;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 10px;
        gap: 8px;
    }
    
    html[dir="rtl"] .admin-sidebar {
        border-left: none;
        padding-left: 0;
    }
    
    .admin-tab-btn {
        padding: 10px 16px !important;
        font-size: 0.85rem !important;
        width: auto !important;
    }
}

.admin-sidebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-right: 1px solid var(--border-color);
    padding-right: 20px;
}

html[dir="rtl"] .admin-sidebar {
    border-right: none;
    border-left: 1px solid var(--border-color);
    padding-right: 0;
    padding-left: 20px;
}

.admin-tab-btn {
    background: none;
    border: none;
    text-align: inherit;
    padding: 14px 20px;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    color: var(--grey-color);
}

.admin-tab-btn:hover, .admin-tab-btn.active {
    background-color: rgba(200, 16, 46, 0.05);
    color: var(--primary-color);
}

.admin-content {
    min-height: 400px;
}

.admin-tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.admin-tab-content.active-tab {
    display: block;
}

.admin-tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Admin Table styling */
.admin-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 10px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--border-color);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: inherit;
}

.admin-table th, .admin-table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    white-space: nowrap;
}

.admin-table th {
    background-color: var(--light-color);
    font-weight: 800;
    color: var(--dark-color);
}

.admin-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.01);
}

.admin-table-img {
    width: 50px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.admin-actions-cell {
    display: flex;
    gap: 8px;
}

.btn-icon-danger {
    background-color: rgba(200, 16, 46, 0.1);
    color: var(--primary-color);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon-danger:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-icon-primary {
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon-primary:hover {
    background-color: #007bff;
    color: var(--white);
}

.admin-image-previews {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.admin-preview-img-box {
    position: relative;
    width: 70px;
    height: 80px;
}

.admin-preview-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.admin-preview-remove {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Status Badges */
.status-badge {
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
}

.status-badge.paid {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.status-badge.review, .status-badge.pending {
    background-color: rgba(255, 193, 7, 0.15);
    color: var(--warning-color);
}

.status-badge.approved {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.status-badge.rejected {
    background-color: rgba(200, 16, 46, 0.1);
    color: var(--primary-color);
}

/* 10. User Orders Styling */
.orders-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 450px;
    overflow-y: auto;
}

.order-history-card {
    background-color: var(--light-color);
    border-radius: var(--border-radius-md);
    padding: 18px;
    border: 1px solid var(--border-color);
}

.order-history-header {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.order-history-details {
    font-size: 0.85rem;
    color: var(--grey-color);
    margin-bottom: 10px;
}

.order-history-items {
    font-size: 0.9rem;
    font-weight: 600;
}

/* 11. Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

html[dir="rtl"] .toast-container {
    left: auto;
    right: 30px;
}

.toast-msg {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 12px 24px;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    animation: slideInToast 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.toast-msg.success {
    border-left: 4px solid var(--success-color);
}

html[dir="rtl"] .toast-msg.success {
    border-left: none;
    border-right: 4px solid var(--success-color);
}

.toast-msg.error {
    border-left: 4px solid var(--primary-color);
}

html[dir="rtl"] .toast-msg.error {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

/* 12. Floating contact badge and popup elements */
.owner-link {
    color: var(--primary-color);
    font-weight: 700;
    border-bottom: 1px dashed var(--primary-color);
}
.owner-link:hover {
    color: var(--white);
    border-bottom-color: var(--white);
}

.owner-contact-badge {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: 40px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html[dir="rtl"] .owner-contact-badge {
    left: auto;
    right: 20px;
}

.owner-contact-badge:hover {
    transform: scale(1.05) translateY(-3px);
    background-color: var(--primary-color);
    color: var(--white);
}

.owner-contact-badge:hover .badge-icon {
    color: var(--primary-color);
    background-color: var(--white);
}

.owner-contact-badge:hover .badge-tel {
    color: var(--white);
}

.badge-icon {
    background-color: var(--primary-color);
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.badge-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge-title {
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    opacity: 0.7;
}

.badge-tel {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--dark-color);
}

/* 13. Keyframe Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes fadeInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInToast {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 14. Footer Design */
.main-footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 60px 0 20px 0;
    border-top: 4px solid var(--primary-color);
}

.footer-container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

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

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 800;
}

.footer-brand p {
    font-size: 0.9rem;
    color: #ccc;
    max-width: 350px;
}

.footer-links h4, .footer-contact h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}

.footer-links h4::after, .footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
}

html[dir="rtl"] .footer-links h4::after, html[dir="rtl"] .footer-contact h4::after {
    left: auto;
    right: 0;
}

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

.footer-links a {
    color: #ccc;
    font-size: 0.9rem;
}

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

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

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

.footer-contact p {
    color: #ccc;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.social-icons a {
    background-color: var(--dark-light);
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

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

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