/* Minimal Theme - Clean & Simple with Essential Features */
/* Focus on typography, whitespace, and products */

:root {
    --primary: #000000;
    --secondary: #666666;
    --light: #f8f9fa;
    --border: #e0e0e0;
    --text: #333333;
    --white: #ffffff;
}

/* ===== GLOBAL STYLES ===== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text);
}

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

.display-1, .display-2, .display-3 {
    font-weight: 300;
    letter-spacing: -0.02em;
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: 0;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.875rem;
    padding: 12px 24px;
    border: 2px solid;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

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

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

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

/* ===== NAVBAR ===== */
.navbar {
    background: var(--white) !important;
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--primary) !important;
    letter-spacing: -0.5px;
}

.navbar-nav .nav-link {
    color: var(--text) !important;
    font-weight: 500;
    margin: 0 1rem;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link:hover {
    color: var(--primary) !important;
}

/* Keep nav labels and header buttons on one line ("ABOUT US", "LOG IN") */
.navbar-nav .nav-link,
.navbar .btn {
    white-space: nowrap;
}

/* Expanded nav on 1200-1399px laptops: tighter spacing so the account and
   cart buttons stay on screen (the nav collapses below 1200px). */
@media (min-width: 1200px) {
    .navbar-nav .nav-link {
        margin: 0 0.5rem;
    }
    .navbar .search-input {
        width: 200px;
    }
}
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .navbar-nav .nav-link {
        margin: 0 0.2rem;
        letter-spacing: 0;
    }
    .navbar .search-input {
        width: 150px;
    }
}

@media (min-width: 1200px) and (max-width: 1299.98px) {
    .navbar .search-input {
        width: 120px;
    }
    .navbar-collapse > .d-flex.gap-3 {
        gap: 0.5rem !important;
    }
}

/* Collapsed nav (below 1200px): stacked links */
@media (max-width: 1199.98px) {
    .navbar-nav .nav-link {
        margin: 0.5rem 0;
    }
    .navbar-collapse .d-flex.align-items-center.gap-3 {
        flex-wrap: wrap;
        padding: 0.5rem 0;
    }
}

/* Search with icon */
.search-input {
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 8px 40px 8px 16px;
    font-size: 0.875rem;
    position: relative;
}

.search-input:focus {
    border-color: var(--primary);
    box-shadow: none;
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary);
    pointer-events: none;
}

/* Cart */
.cart-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    position: relative;
    text-decoration: none;
}

.cart-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

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

/* ===== HERO SECTION ===== */
.hero {
    padding: 80px 0;
    background: var(--light);
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.125rem;
    color: var(--secondary);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* ===== PRODUCTS ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.product-card {
    border: none;
    background: var(--white);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-info {
    padding: 1.5rem 0;
    text-align: center;
}

.product-title {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

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

.product-price-sale {
    color: var(--secondary);
    text-decoration: line-through;
    margin-right: 0.5rem;
}

/* Product rating stars */
.product-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.product-rating .stars {
    display: flex;
    gap: 0.1rem;
}

.product-rating .stars i {
    font-size: 0.875rem;
}

.product-rating small {
    font-size: 0.75rem;
}

/* Product Badges Container */
.product-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    z-index: 1;
}

.product-badges .badge {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 0;
}

/* RTL badge positioning */
[dir="rtl"] .product-badges {
    right: auto;
    left: 12px;
    align-items: flex-start;
}

/* Legacy sale badge support */
.sale-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #dc3545;
    color: white;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 1;
}

/* ===== SECTIONS ===== */
.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 3rem;
    letter-spacing: -0.5px;
}

/* ===== FORMS ===== */
.form-control {
    border: 1px solid var(--border);
    border-radius: 0;
    padding: 12px 16px;
    font-size: 0.875rem;
}

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

/* Form validation styles */
.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-valid {
    border-color: #198754;
}

/* ===== MODAL STYLES ===== */
.modal-content {
    border: none;
    border-radius: 0;
}

.modal-header {
    border-bottom: 1px solid var(--border);
}

.modal-footer {
    border-top: 1px solid var(--border);
}

/* ===== SIDE CART ===== */
.offcanvas {
    border: none;
}

.offcanvas-header {
    border-bottom: 1px solid var(--border);
}

.side-cart-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.side-cart-item:last-child {
    border-bottom: none;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.toast-header {
    border-bottom: 1px solid var(--border);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--primary);
    color: var(--white);
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer h6 {
    color: var(--white);
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.875rem;
}

.footer a:hover {
    color: var(--white);
}

/* ===== ACCESSIBILITY ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    z-index: 1100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* ===== RTL SUPPORT ===== */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .navbar-brand {
    margin-left: 1rem;
    margin-right: 0;
}

[dir="rtl"] .navbar-nav .nav-link {
    margin: 0 1rem 0 0;
}

[dir="rtl"] .cart-badge {
    right: auto;
    left: -8px;
}

[dir="rtl"] .product-price-sale {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="rtl"] .search-input {
    padding: 8px 16px 8px 40px;
    text-align: right;
}

[dir="rtl"] .search-icon {
    right: auto;
    left: 12px;
}

/* RTL dropdown fixes */
[dir="rtl"] .dropdown-menu {
    text-align: right;
}

[dir="rtl"] .dropdown-menu-end {
    left: 0 !important;
    right: auto !important;
}

/* RTL form controls */
[dir="rtl"] .form-control {
    text-align: right;
}

[dir="rtl"] .form-floating > label {
    left: auto;
    right: 0;
    padding-left: 0;
    padding-right: 0.75rem;
}

/* RTL spacing fixes */
[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .ms-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

[dir="rtl"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

/* RTL text alignment */
[dir="rtl"] .text-start {
    text-align: right !important;
}

[dir="rtl"] .text-end {
    text-align: left !important;
}

[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6 {
    text-align: right;
}

[dir="rtl"] .lead {
    text-align: right;
}

[dir="rtl"] footer {
    text-align: right;
}

[dir="rtl"] footer .list-unstyled {
    text-align: right;
}

/* RTL skip link */
[dir="rtl"] .skip-link {
    left: auto;
    right: 6px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .section {
        padding: 2rem 0;
    }

    .navbar-nav .nav-link {
        margin: 0.5rem 0;
    }

    /* RTL mobile adjustments */
    [dir="rtl"] .navbar-collapse {
        text-align: center;
    }

    [dir="rtl"] .hero {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .search-input {
        padding: 8px 32px 8px 12px;
    }

    [dir="rtl"] .search-input {
        padding: 8px 12px 8px 32px;
    }

    /* Enhanced mobile styles */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Full-width side cart on small screens */
    .offcanvas-end {
        width: 100% !important;
    }

    /* Better touch targets for mobile */
    .btn {
        min-height: 44px;
        padding: 12px 16px;
    }

    .btn-sm {
        min-height: 38px;
        padding: 10px 14px;
    }

    /* Larger touch targets for quantity controls */
    .quantity-plus, .quantity-minus, .side-cart-qty-btn {
        min-width: 44px !important;
        min-height: 44px !important;
    }

    /* Stack form elements vertically on mobile */
    .d-flex.gap-2:not(.flex-nowrap), .d-flex.gap-3:not(.flex-nowrap) {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    /* Mobile-friendly toast positioning */
    .toast-container {
        left: 1rem !important;
        right: 1rem !important;
        width: auto !important;
    }

    .toast {
        width: 100% !important;
    }

    /* Product grid single column on mobile */
    .product-grid {
        grid-template-columns: 1fr !important;
    }
}

    .search-icon {
        right: 8px;
    }

    [dir="rtl"] .search-icon {
        right: auto;
        left: 8px;
    }


/* ===== ANIMATIONS & TRANSITIONS ===== */
.navbar {
    transition: transform 0.3s ease;
}

/* Desktop hover effects only */
@media (hover: hover) {
    .product-card {
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }

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

.product-card img {
    transition: transform 0.3s ease;
}

.product-thumbnail {
    transition: all 0.2s ease;
    cursor: pointer;
}

.product-thumbnail:hover {
    transform: scale(1.05);
}

.product-thumbnail.active {
    border-color: var(--primary) !important;
    border-width: 2px !important;
}

.cart-badge {
    transition: transform 0.2s ease;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading states */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.text-minimal {
    color: var(--secondary);
    font-size: 0.875rem;
}

.border-minimal {
    border: 1px solid var(--border) !important;
}

.bg-minimal {
    background: var(--light) !important;
}

/* Loading states */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
/* ===== ENHANCED RTL SUPPORT ===== */
/* Comprehensive RTL support for Arabic and Hebrew languages */

/* Hero content RTL fixes */
[dir="rtl"] .hero h1 {
    text-align: right;
}

[dir="rtl"] .hero p {
    text-align: right;
}

[dir="rtl"] .hero .d-flex {
    justify-content: flex-end;
}

/* Features section RTL */
[dir="rtl"] .features-item {
    text-align: center !important;
}

[dir="rtl"] .features-item h5 {
    text-align: center !important;
    margin-top: 1rem;
}

/* Product card RTL fixes */
[dir="rtl"] .product-card .card-body {
    text-align: right;
}

[dir="rtl"] .product-price {
    text-align: right;
}

[dir="rtl"] .product-price-original {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Category banner RTL */
[dir="rtl"] .category-banner-content {
    text-align: right;
}

[dir="rtl"] .category-banner:hover .category-banner-cta {
    transform: translateX(-5px);
}

/* Enhanced spacing RTL fixes */
[dir="rtl"] .me-3 {
    margin-left: 1rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .ms-3 {
    margin-right: 1rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .me-4 {
    margin-left: 1.5rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .ms-4 {
    margin-right: 1.5rem !important;
    margin-left: 0 !important;
}

/* Badge and positioning RTL */
[dir="rtl"] .position-absolute.top-0.start-0 {
    left: auto !important;
    right: 0 !important;
}

[dir="rtl"] .position-absolute.top-0.end-0 {
    right: auto !important;
    left: 0 !important;
}

[dir="rtl"] .position-absolute.bottom-0.start-0 {
    left: auto !important;
    right: 0 !important;
}

[dir="rtl"] .position-absolute.bottom-0.end-0 {
    right: auto !important;
    left: 0 !important;
}

/* Typography RTL enhancements */
[dir="rtl"] .display-1, [dir="rtl"] .display-2, [dir="rtl"] .display-3, [dir="rtl"] .display-4, [dir="rtl"] .display-5, [dir="rtl"] .display-6 {
    text-align: right;
    line-height: 1.2;
}

/* Footer RTL fixes */
[dir="rtl"] footer h5, [dir="rtl"] footer h6 {
    text-align: right;
}

[dir="rtl"] footer .list-unstyled {
    text-align: right;
}

[dir="rtl"] footer .list-unstyled li {
    text-align: right;
}

/* Icon spacing RTL */
[dir="rtl"] .fa, [dir="rtl"] .fas, [dir="rtl"] .far, [dir="rtl"] .fab {
    margin-left: 0.5rem;
    margin-right: 0;
}

[dir="rtl"] .btn .fa, [dir="rtl"] .btn .fas {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* Specific icon fixes */
[dir="rtl"] .fas.fa-arrow-right {
    transform: scaleX(-1);
}

[dir="rtl"] .fas.fa-chevron-right {
    transform: scaleX(-1);
}

/* Navbar active indicator RTL */
[dir="rtl"] .navbar-nav .nav-link.active::after {
    right: 50%;
    left: auto;
    transform: translateX(50%);
}

/* Product overlay RTL */
[dir="rtl"] .product-overlay {
    left: 0;
    right: 0;
}

/* Side cart RTL fixes */
[dir="rtl"] .side-cart {
    left: 0;
    right: auto;
    transform: translateX(-100%);
}

[dir="rtl"] .side-cart.active {
    transform: translateX(0);
}

[dir="rtl"] .side-cart-item:hover {
    padding-right: 1rem;
    padding-left: 1rem;
}

/* Animation RTL adjustments */
[dir="rtl"] .animate-slide-in {
    animation: slideInLeft 1s ease-out 0.4s both;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Form floating labels RTL */
[dir="rtl"] .form-floating > .form-control:focus ~ label,
[dir="rtl"] .form-floating > .form-control:not(:placeholder-shown) ~ label {
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Dropdown menu RTL improvements */
[dir="rtl"] .dropdown-item {
    text-align: right;
}

/* Enhanced mobile RTL support */
@media (max-width: 768px) {
    [dir="rtl"] .hero {
        text-align: center;
    }

    [dir="rtl"] .hero h1 {
        text-align: center;
    }

    [dir="rtl"] .hero p {
        text-align: center;
    }

    [dir="rtl"] .hero .d-flex {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 576px) {
    [dir="rtl"] .product-grid {
        text-align: center;
    }

    [dir="rtl"] .search-container {
        direction: rtl;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
/* Enhanced focus indicators - keyboard navigation only */
button:focus-visible, .btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

/* Remove focus outline on mouse click */
button:focus:not(:focus-visible), .btn:focus:not(:focus-visible), a:focus:not(:focus-visible) {
    outline: none;
    box-shadow: none;
}

/* Skip link styling */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
    font-weight: 500;
}

.skip-link:focus {
    top: 6px;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
    :root {
        --border: #000000;
        --text: #000000;
    }

    .btn-outline-secondary, .btn-outline-primary {
        border-width: 2px;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== COOKIE CONSENT BANNER ===== */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    color: var(--white);
    padding: 1.5rem 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-consent.show {
    transform: translateY(0);
}

.cookie-consent p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.cookie-consent .btn-light {
    background: rgba(255, 255, 255, 0.9);
    border: none;
}

.cookie-consent .btn-light:hover {
    background: var(--white);
}

.cookie-consent .btn-primary {
    background: var(--white);
    color: var(--primary);
    border: none;
}

.cookie-consent .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1040;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.back-to-top:hover {
    background: var(--secondary);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.back-to-top i {
    font-size: 1.2rem;
}

[dir="rtl"] .back-to-top {
    right: auto;
    left: 2rem;
}

/* ===== GLOBAL LOADER ===== */
.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.global-loader .spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}

/* ===== MOBILE BOTTOM NAVIGATION ===== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0.5rem 0;
    z-index: 1030;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--secondary);
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
    position: relative;
    min-width: 60px;
    min-height: 48px;
    transition: color 0.2s ease;
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.mobile-bottom-nav .nav-item.active {
    color: var(--primary);
}

.mobile-bottom-nav .nav-item:active {
    transform: scale(0.95);
}

.mobile-bottom-nav .nav-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
    background: var(--primary);
    color: var(--white);
    border-radius: 10px;
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    min-width: 18px;
    text-align: center;
    font-weight: 600;
}

/* Add body padding when mobile nav is present */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 70px;
    }

    /* Hide back-to-top when bottom nav is visible */
    .back-to-top {
        bottom: 90px;
    }

    [dir="rtl"] .back-to-top {
        bottom: 90px;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .cookie-consent {
        padding: 1rem 0;
    }

    .cookie-consent p {
        font-size: 0.8rem;
    }

    .cookie-consent .btn {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 90px;
        right: 1.5rem;
    }

    [dir="rtl"] .back-to-top {
        right: auto;
        left: 1.5rem;
        bottom: 90px;
    }
}

/* ===== ORDER TRACKING TIMELINE ===== */
.order-timeline {
    position: relative;
    padding: 1rem 0;
}

.timeline-item {
    position: relative;
    padding-left: 3.5rem;
    padding-bottom: 2rem;
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.timeline-item.completed {
    opacity: 1;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 1.25rem;
    top: 2.5rem;
    bottom: 0;
    width: 2px;
    background: #dee2e6;
}

.timeline-item:last-child::before {
    display: none;
}

.timeline-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.timeline-item.completed .timeline-icon {
    background: var(--primary);
}

.timeline-content strong {
    font-size: 0.95rem;
    display: block;
    margin-bottom: 0.25rem;
}

.timeline-content small {
    font-size: 0.8rem;
}

/* RTL timeline */
[dir="rtl"] .timeline-item {
    padding-left: 0;
    padding-right: 3.5rem;
}

[dir="rtl"] .timeline-item::before {
    left: auto;
    right: 1.25rem;
}

[dir="rtl"] .timeline-icon {
    left: auto;
    right: 0;
}

/* ===== TOASTS VS SIDE CART =====
   main.js adds .side-cart-open to #toast-container while the side cart is shown.
   Keep the "Added to cart" toast clear of the cart's title and close button. */
.toast-container.side-cart-open {
    right: 400px !important;
    transition: right 0.3s ease;
}
[dir="rtl"] .toast-container.side-cart-open {
    right: auto !important;
    left: 400px !important;
}
@media (max-width: 576px) {
    /* Side cart is full width: the cart itself shows the new item */
    .toast-container.side-cart-open {
        display: none !important;
    }
}
