/* Search Toggle Tab (small thin icon) */
.search-toggle {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%) translateX(-100%);
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 0 8px 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    z-index: 500;
    transition: transform 0.3s ease;
    opacity: 0;
    pointer-events: none;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
}

.search-toggle.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

.search-toggle:hover {
    background: #ff5a1f;
    transform: translateY(-50%) translateX(5px);
}

.search-toggle.open {
    transform: translateY(-50%) translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

.search-toggle i {
    font-size: 24px;
}

/* Search Panel (expandable) */
.search-panel {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%) translateX(-350px);
    width: 320px;
    max-height: 90vh;
    background: white;
    border-radius: 0 12px 12px 0;
    box-shadow: 2px 0 15px rgba(0,0,0,0.2);
    z-index: 550;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
}

.search-panel.open {
    transform: translateY(-50%) translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.search-panel-header {
    padding: 20px;
    border-bottom: 2px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-panel-header h3 {
    margin: 0;
    color: var(--secondary-color);
    font-size: 18px;
    font-weight: 700;
}

.search-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.search-close:hover {
    color: var(--primary-color);
}

.search-panel-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.search-field {
    margin-bottom: 18px;
}

.search-field label {
    display: block;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 8px;
    font-size: 14px;
}

.search-field input[type="text"],
.search-field select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s ease;
}

.search-field input[type="text"]:focus,
.search-field select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.price-range {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-label {
    background: var(--light-gray);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 13px;
}

.price-range input[type="range"] {
    width: 100%;
    height: 5px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

.price-range input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: background 0.2s ease;
}

.price-range input[type="range"]::-webkit-slider-thumb:hover {
    background: #ff5a1f;
}

.price-range input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    transition: background 0.2s ease;
}

.price-range input[type="range"]::-moz-range-thumb:hover {
    background: #ff5a1f;
}

/* Shift products when panel is open */
.search-open .products .container {
    margin-left: 340px;
    transition: margin-left 0.3s ease;
}

@media (max-width: 768px) {
    .search-panel {
        width: 280px;
        transform: translateY(-50%) translateX(-320px);
    }
    
    .search-open .products .container {
        margin-left: 0;
    }
}

/* Shift products only when panel open */


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b35;
    --secondary-color: #004e89;
    --accent-color: #f7b801;
    --light-gray: #f5f5f5;
    --dark-gray: #333;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    gap: 10px;
}

.logo i {
    font-size: 28px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--accent-color);
}

.nav-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.search-btn,
.cart-btn,
.user-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.search-btn:hover,
.cart-btn:hover,
.user-btn:hover,
.lang-btn:hover {
    transform: scale(1.1);
    color: var(--accent-color);
}

.lang-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

#currentLang {
    font-size: 11px;
    font-weight: 700;
}

.user-display {
    font-size: 13px;
    color: #ffe9df;
}
.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: var(--dark-gray);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.search-bar {
    display: none;
    gap: 10px;
}

.search-bar.active {
    display: flex;
}

.search-bar input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 25px;
    font-size: 14px;
}

/* Search bar button */
.search-bar button {
    background: var(--accent-color);
    border: none;
    color: var(--dark-gray);
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
}


.search-bar button:hover {
    background: #e6a800;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    padding: 100px 20px;
    text-align: center;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    animation: fadeInDown 0.8s ease;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--dark-gray);
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.btn-primary:hover {
    background: #e6a800;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(247, 184, 1, 0.3);
}

.btn-secondary {
    background: var(--primary-color);
    color: white;
}

.btn-secondary:hover {
    background: #e55a25;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: var(--border-radius);
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
}

.full-width {
    width: 100%;
}

/* Categories Section */
.categories {
    padding: 80px 20px;
    background: linear-gradient(to bottom, white, var(--light-gray));
}

.categories h2 {
    font-size: 36px;
    text-align: center;
    margin-bottom: 50px;
    color: var(--secondary-color);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.category-card {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.category-icon {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

.category-card p {
    color: #666;
    font-size: 14px;
}

/* Products Section */
.products {
    padding: 80px 20px;
    background: white;
}

.products h2 {
    font-size: 36px;
    text-align: center;
    margin-bottom: 50px;
    color: var(--secondary-color);
}

.search-filter-bar {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box-inline {
    flex: 1;
    min-width: 250px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-box-inline i {
    position: absolute;
    left: 15px;
    color: #999;
}

.search-box-inline input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid var(--light-gray);
    border-radius: 25px;
    font-size: 14px;
    transition: var(--transition);
}

.search-box-inline input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.sort-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-box label {
    color: var(--dark-gray);
    font-weight: 600;
}

.sort-box select {
    padding: 10px 15px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    background: white;
    transition: var(--transition);
}

.sort-box select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Search Sidebar */
.search-sidebar {
    position: fixed;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 300px;
    max-height: 90vh;
    background: white;
    box-shadow: 2px 0 20px rgba(0,0,0,0.1);
    z-index: 300; /* below navbar but above content */
    transition: opacity 0.25s ease, transform 0.25s ease;
    overflow: hidden;
    border-radius: 0 12px 12px 0;
    opacity: 0;
    pointer-events: none;
}

.search-sidebar.visible {
    /* In products section: show tab only; panel stays hidden until active */
}

.search-sidebar.visible:hover,
.search-sidebar.active {
    left: 0;
}

/* Hover trigger area */
.search-sidebar::before {
    content: '';
    position: fixed;
    left: 0;
    top: 0;
    width: 100px; /* larger hover zone */
    height: 100vh;
    z-index: 4000;
    pointer-events: auto; /* allow hover */
    background: linear-gradient(to right, rgba(0,0,0,0.08), rgba(0,0,0,0)); /* subtle hint */
}

/* Open when hovering the right edge trigger */
.search-sidebar.active {
    opacity: 1;
    pointer-events: auto;
}

.search-sidebar-tab {
    position: fixed;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    padding: 24px 12px;
    border-radius: 0 12px 12px 0;
    box-shadow: 2px 0 10px rgba(0,0,0,0.15);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-weight: 700;
    font-size: 14px;
    transition: var(--transition);
    z-index: 350; /* above sidebar */
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    letter-spacing: 1px;
}

/* Make the tab visible when in products section */
.show-search-tab .search-sidebar-tab,
.search-sidebar.visible .search-sidebar-tab {
    display: flex !important;
    opacity: 1;
}

/* Shift products container to avoid overlap when sidebar visible */
/* Shift products only when panel is open */
.search-open .products .container {
    margin-left: 340px; /* 300px width + spacing */
}

@media (max-width: 992px) {
    .search-open .products .container {
        margin-left: 0; /* no shift on small screens */
    }
}

@keyframes pulse {
    0%, 100% {
        transform: translateY(-50%) translateX(0);
        box-shadow: -4px 0 15px rgba(0,0,0,0.2);
    }
    50% {
        transform: translateY(-50%) translateX(-10px);
        box-shadow: -6px 0 20px rgba(0,0,0,0.3);
    }
}

.search-sidebar-tab:hover {
    transform: translateY(-50%) translateX(8px);
    background: #ff5858;
    box-shadow: 6px 0 20px rgba(0,0,0,0.35);
}

.search-sidebar-tab i {
    writing-mode: horizontal-tb;
    font-size: 20px;
    margin-bottom: 5px;
}

.search-sidebar-content {
    padding: 20px;
    overflow-y: auto;
    max-height: 90vh;
}

.sidebar-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
}

.sidebar-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-search-box {
    position: relative;
    margin-bottom: 25px;
}

.sidebar-search-box input {
    width: 100%;
    padding: 12px 35px 12px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.sidebar-search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.sidebar-search-box .clear-search {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.sidebar-search-box .clear-search:hover {
    color: var(--primary-color);
}

.sidebar-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-section h4 {
    margin: 0 0 15px 0;
    color: var(--dark-gray);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-section select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-section select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.price-range-label {
    background: var(--light-gray);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 14px;
}

.price-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.price-inputs input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 5px;
    background: #e0e0e0;
    outline: none;
}

.price-inputs input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.price-inputs input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.2);
}

.price-inputs input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.price-inputs input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.2);
}

.price-filter label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--dark-gray);
}

.price-slider-container {
    display: flex;
    gap: 15px;
    align-items: center;
}

.price-slider-container input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.price-slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
}

.price-slider-container input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.product-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--light-gray), #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: #999;
    overflow: hidden;
    position: relative;
    transition: background 0.3s ease;
}

.product-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.product-image:hover {
    background: linear-gradient(135deg, #e0e0e0, var(--light-gray));
}

.product-image:hover .product-thumb {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-color);
    color: var(--dark-gray);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.product-info {
    padding: 20px;
}

.product-category {
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.product-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark-gray);
}

.product-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.desc-toggle {
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 600;
    transition: color 0.2s ease;
}

.desc-toggle:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
}

.stars {
    color: var(--accent-color);
    font-size: 14px;
}

.rating-count {
    color: #999;
    font-size: 12px;
}

.product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.price {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 14px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.add-to-cart-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.3);
}

.add-to-cart-btn:active {
    transform: scale(0.98);
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 200;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--light-gray);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
}

.cart-header h3 {
    font-size: 20px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--light-gray);
    border-radius: 8px;
    margin-bottom: 15px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 600;
}

.cart-item-remove {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cart-item-remove:hover {
    background: #e55a25;
}

.cart-summary {
    padding: 20px;
    border-top: 1px solid var(--light-gray);
    background: var(--light-gray);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.summary-row.total {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color);
    padding-top: 12px;
    border-top: 1px solid white;
    margin-bottom: 20px;
}

/* Checkout Modal */
.checkout-modal,
.admin-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 300;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.checkout-modal.active,
.admin-modal.active {
    display: flex;
}

.checkout-content,
.admin-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.checkout-header,
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    border-bottom: 1px solid var(--light-gray);
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    color: white;
    border-radius: 15px 15px 0 0;
}

.checkout-header h2,
.admin-header h2 {
    margin: 0;
    font-size: 24px;
}

.checkout-body,
.admin-body {
    padding: 30px;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    font-size: 18px;
    color: var(--secondary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-gray);
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.form-hint {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #c33;
    font-size: 0.9rem;
}

.success-message {
    background: #efe;
    color: #3c3;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #3c3;
    font-size: 0.9rem;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.order-summary {
    background: var(--light-gray);
    padding: 15px;
    border-radius: 8px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.summary-item:last-child {
    margin-bottom: 0;
    padding-top: 10px;
    border-top: 1px solid white;
    font-weight: 600;
    font-size: 16px;
    color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: flex-end;
}

.form-actions .btn {
    flex: 1;
    max-width: 200px;
}

.info-text {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 13px;
    color: #1565c0;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-text a {
    color: #1565c0;
    font-weight: 600;
    text-decoration: none;
}

.info-text a:hover {
    text-decoration: underline;
}

.admin-section {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid var(--light-gray);
}

.admin-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--light-gray);
    margin-bottom: 20px;
}

.admin-tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

.admin-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.admin-tab-btn:hover {
    color: var(--primary-color);
}

.admin-tab-content {
    display: none;
}

.admin-tab-content.active {
    display: block;
    animation: slideUp 0.3s ease;
}

.admin-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.products-admin-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-admin-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    background: #f9fafb;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    gap: 15px;
}

.product-admin-info {
    display: flex;
    gap: 15px;
    flex: 1;
    align-items: center;
}

.product-admin-image {
    width: 70px;
    height: 70px;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.product-admin-image img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
}

.product-admin-details {
    flex: 1;
}

.product-admin-name {
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 4px;
}

.product-admin-price {
    font-size: 14px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 4px;
}

.product-admin-category {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.product-admin-desc {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-card {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    background: #f9fafb;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

.order-status-select {
    border-radius: 6px !important;
    font-weight: 500 !important;
    border: none !important;
    transition: all 0.3s ease;
}

.order-status-select:hover {
    transform: scale(1.02);
}

.order-line {
    font-size: 13px;
    color: #444;
    margin-bottom: 4px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 60px 20px 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.footer-section p {
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-color);
    color: var(--dark-gray);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .filter-buttons {
        gap: 10px;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 12px;
    }

    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 24px;
    }

    .categories h2,
    .products h2 {
        font-size: 24px;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }
}

/* Product Detail Modal */
.product-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.product-detail-images {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--light-gray), #e0e0e0);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    background: var(--light-gray);
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.add-images-section {
    margin-top: 15px;
}

.product-detail-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-category {
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-description {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
}

.detail-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #999;
}

.detail-pricing {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 8px;
}

.detail-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

.detail-original-price {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
}

@media (max-width: 768px) {
    .product-detail-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Reviews Section */
.product-reviews-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--light-gray);
}

.product-reviews-section h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.add-review-form {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.add-review-form h4 {
    margin-bottom: 15px;
    color: var(--dark-gray);
    font-size: 16px;
}

.review-rating-input {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    gap: 5px;
}

.star-rating-input input {
    display: none;
}

.star-rating-input label {
    font-size: 28px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
}

.star-rating-input input:checked ~ label,
.star-rating-input label:hover,
.star-rating-input label:hover ~ label {
    color: var(--accent-color);
}

#reviewComment {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    margin-bottom: 10px;
    resize: vertical;
}

#reviewComment:focus {
    outline: none;
    border-color: var(--primary-color);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.review-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.review-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.review-user-info {
    display: flex;
    flex-direction: column;
}

.review-username {
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 14px;
}

.review-date {
    font-size: 12px;
    color: #999;
}

.review-rating {
    color: var(--accent-color);
    font-size: 16px;
}

.review-comment {
    color: #555;
    line-height: 1.6;
    font-size: 14px;
}

.review-verified {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.review-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.review-delete-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 12px;
    padding: 4px 8px;
    transition: color 0.2s ease;
}

.review-delete-btn:hover {
    color: var(--primary-color);
}

.loading-text {
    text-align: center;
    color: #999;
    padding: 20px;
    font-style: italic;
}

.no-reviews {
    text-align: center;
    color: #999;
    padding: 30px;
    font-size: 14px;
}

/* Order Tracking */
.orders-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: var(--transition);
}

.order-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-gray);
}

.order-id {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 16px;
}

.order-date {
    color: #999;
    font-size: 13px;
}

.order-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.order-status.pending {
    background: #fff3cd;
    color: #856404;
}

.order-status.confirmed {
    background: #cce5ff;
    color: #004085;
}

.order-status.shipped {
    background: #d1ecf1;
    color: #0c5460;
}

.order-status.delivered {
    background: #d4edda;
    color: #155724;
}

.order-status.cancelled {
    background: #f8d7da;
    color: #721c24;
}

.order-items {
    margin: 15px 0;
}

.order-item {
    display: flex;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--light-gray);
    flex-shrink: 0;
}

.order-item-image:not(img) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-item-details {
    flex: 1;
}

.order-item-name {
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 4px;
}

.order-item-qty {
    color: #999;
    font-size: 13px;
}

.order-item-price {
    font-weight: 700;
    color: var(--primary-color);
    text-align: right;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 2px solid var(--light-gray);
    margin-top: 15px;
}

.order-total {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.order-address {
    background: var(--light-gray);
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 13px;
    color: #666;
}

.order-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    position: relative;
}

.order-timeline::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

.timeline-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    flex: 1;
}

.timeline-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.timeline-step.active .timeline-icon {
    background: var(--primary-color);
    color: white;
}

.timeline-step.completed .timeline-icon {
    background: #28a745;
    color: white;
}

.timeline-label {
    font-size: 11px;
    color: #999;
    text-align: center;
}

.timeline-step.active .timeline-label,
.timeline-step.completed .timeline-label {
    color: var(--dark-gray);
    font-weight: 600;
}

.no-orders {
    text-align: center;
    padding: 40px;
    color: #999;
}

.no-orders i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
    opacity: 0.3;
}

@media (max-width: 768px) {
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .order-timeline {
        flex-wrap: wrap;
    }
    
    .timeline-label {
        font-size: 10px;
    }
}

/* RTL Support for Arabic */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .navbar,
[dir="rtl"] .nav-wrapper,
[dir="rtl"] .nav-menu,
[dir="rtl"] .nav-icons {
    direction: rtl;
}

[dir="rtl"] .logo {
    flex-direction: row-reverse;
}

[dir="rtl"] .cart-count {
    right: auto;
    left: -8px;
}

[dir="rtl"] .search-toggle {
    left: auto;
    right: 0;
    transform: translateY(-50%) translateX(100%);
    border-radius: 8px 0 0 8px;
}

[dir="rtl"] .search-toggle.show {
    transform: translateY(-50%) translateX(0);
}

[dir="rtl"] .search-toggle:hover {
    transform: translateY(-50%) translateX(-5px);
}

[dir="rtl"] .search-panel {
    left: auto;
    right: 0;
    transform: translateY(-50%) translateX(350px);
    border-radius: 12px 0 0 12px;
}

[dir="rtl"] .search-panel.open {
    transform: translateY(-50%) translateX(0);
}

[dir="rtl"] .search-open .products .container {
    margin-left: 0;
    margin-right: 340px;
}

[dir="rtl"] .product-card,
[dir="rtl"] .category-card,
[dir="rtl"] .order-card,
[dir="rtl"] .review-card {
    text-align: right;
}

[dir="rtl"] .cart-sidebar {
    left: auto;
    right: 0;
}

[dir="rtl"] .cart-sidebar.active {
    transform: translateX(0);
}

[dir="rtl"] .filter-buttons {
    direction: rtl;
}

[dir="rtl"] .product-price,
[dir="rtl"] .order-item {
    flex-direction: row-reverse;
}

[dir="rtl"] .review-header,
[dir="rtl"] .order-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .star-rating-input {
    flex-direction: row;
}

@media (max-width: 768px) {
    [dir="rtl"] .search-open .products .container {
        margin-right: 0;
    }
}
