/* 
   LAVÉ Beauty - Premium App Style CSS (v3.5)
*/

:root {
    --color-primary: #634d4a;
    --color-secondary: #fdf2f0;
    --color-text: #333;
    --color-text-light: #777;
    --color-white: #ffffff;
    --color-bg: #fcf8f5;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-soft: 12px;
    --radius-round: 50px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    padding-bottom: 90px;
    /* Space for bottom nav */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- APP HEADER --- */
.app-header {
    background: var(--color-primary);
    height: 90px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: none;
    /* Remove sharp shadow */
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 60px;
    object-fit: contain;
}

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

.header-actions i {
    font-size: 1.3rem;
    color: white;
    cursor: pointer;
}

.cart-trigger {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -12px;
    right: -5px;
    left: auto;
    background: transparent;
    color: #fff;
    font-size: 0.95rem;
    /* Prominent size */
    width: auto;
    height: auto;
    min-width: unset;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    font-weight: 900;
    border: none;
    box-shadow: none;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* --- BOTTOM NAVIGATION --- */
/* --- BOTTOM NAVIGATION (iOS Glassmorphism) --- */
.bottom-nav {
    position: fixed;
    bottom: 25px;
    left: 20px;
    right: 20px;
    height: 70px;
    background: rgba(255, 255, 255, 0.1);
    /* 90% Transparency */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-radius: 35px;
    /* Smooth rounded corners */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.4s ease;
    padding: 0 10px;
    max-width: 400px;
    margin: 0 auto;
    /* Center visually */
    overflow: hidden;
    /* Contain the spotlight */
}

/* Moving Spotlight Effect */
.nav-spotlight {
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, var(--color-primary) 0%, transparent 70%);
    opacity: 0;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    /* Smooth fade in/out */
    filter: blur(10px);
    z-index: -1;
    /* Behind text/icons */
}

.bottom-nav:active .nav-spotlight {
    opacity: 0.4;
    /* Visible on touch */
}

/* Hide Nav on Scroll Down Class */
.bottom-nav.nav-hidden {
    transform: translateY(150%) scale(0.9);
    opacity: 0;
    pointer-events: none;
}

.nav-item {
    text-decoration: none;
    color: #999;
    /* Inactive Gray */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    flex: 1;
    height: 100%;
    -webkit-tap-highlight-color: transparent;
}

.nav-item i {
    font-size: 1.4rem;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item span {
    font-size: 0.7rem;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* Active State */
.nav-item.active,
.nav-item.scrubbing {
    color: var(--color-primary);
    /* Use theme color instead of blue for consistency */
}

.nav-item.active i,
.nav-item.scrubbing i {
    transform: translateY(-2px) scale(1.1);
    filter: drop-shadow(0 0 8px rgba(99, 77, 74, 0.3));
    /* Glow Effect */
}

.nav-item.active span,
.nav-item.scrubbing span {
    font-weight: 700;
    opacity: 1;
}

/* Interaction Effects */
.nav-item:active i {
    transform: scale(0.9);
}

/* Optional: Active Indicator Dot */
.nav-item.active::after,
.nav-item.scrubbing::after {
    content: '';
    position: absolute;
    bottom: 5px;
    width: 4px;
    height: 4px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 5px var(--color-primary);
}

.badge-dot,
.cart-badge-dot {
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    border: 2px solid white;
}

/* --- APP VIEWS --- */
.app-view {
    display: none;
    animation: fadeIn 0.4s easeOut;
}

.app-view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    padding: 100px 20px;
    background: url('hero-bg.jpg') center/cover no-repeat;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-glass-box {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px 30px;
    border-radius: 20px;
    max-width: 700px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero h1 {
    font-family: 'Amiri', serif;
    font-size: 2.8rem;
    color: var(--color-primary);
    margin-bottom: 15px;
    line-height: 1.3;
}

.hero p {
    color: var(--color-text-light);
    margin-bottom: 30px;
}

/* --- HERO BANNER SLIDER --- */
.hero-slider {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    background: #f0f0f0;
    margin-top: 20px;
}

.banners-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}


.banner-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


.banner-item.active {
    opacity: 1;
    z-index: 10;
}

.banner-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.2), transparent);
    z-index: 2;
    pointer-events: none;
    /* Allow clicks to pass through to video */
}

.banner-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    padding: 30px;
    display: flex;
    flex-direction: column;
    text-align: center;
    color: white;
    pointer-events: none;
}

.banner-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.2;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

@media (max-width: 768px) {
    .banner-title {
        font-size: 1.6rem !important;
        padding: 0 10px;
    }

    .banner-content {
        padding-bottom: 30px !important;
    }
}


.banner-content.pos-bottom {
    justify-content: flex-end;
    padding-bottom: 70px;
}

.banner-content.pos-top {
    justify-content: flex-start;
    padding-top: 50px;
}

.banner-content.pos-center {
    justify-content: center;
}


.slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 25px;
    z-index: 25;
    pointer-events: none;
}

.slider-controls button {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    font-size: 1.1rem;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    opacity: 0.6;
}

.slider-controls button:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    opacity: 1;
    transform: scale(1.15) rotate(0deg);
    color: white;
    box-shadow: 0 15px 40px rgba(99, 77, 74, 0.4);
}

.slider-controls button:active {
    transform: scale(0.95);
}

.slider-controls button i {
    transition: transform 0.3s ease;
}

.slider-prev:hover i {
    transform: translateX(3px);
}

.slider-next:hover i {
    transform: translateX(-3px);
}


.slider-dots {
    position: absolute;
    bottom: 25px;
    left: 15px;
    /* Side position for modern aesthetic */
    display: flex;
    gap: 12px;
    z-index: 25;
}

.dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dot.active {
    background: white;
    width: 35px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}


.banner-skeleton {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 50%, #eee 75%);
    background-size: 200% 100%;
    animation: skeleton-load 1.5s infinite;
}

@keyframes skeleton-load {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@media (max-width: 600px) {
    .hero-slider {
        height: 350px;
    }

    .banner-title {
        font-size: 1.6rem;
    }
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--radius-round);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(213, 158, 137, 0.3);
}

.btn-primary:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

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

/* --- CATEGORIES --- */
.section-padding {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 30px;
    font-family: 'Amiri', serif;
    font-size: 2rem;
    color: var(--color-text);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.category-card {
    position: relative;
    height: 140px;
    border-radius: var(--radius-soft);
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.category-card:hover {
    transform: scale(0.98);
}

.category-image-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    z-index: 2;
}

.category-icon-large {
    position: relative;
    z-index: 3;
    font-size: 2.2rem;
    color: var(--color-primary);
    opacity: 0.8;
}

.category-title {
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 4;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}


/* --- BRANDS SECTION --- */
.brands-section {
    background: transparent;
    padding: 20px 0 40px 0 !important;
}

.brands-header {
    text-align: center;
    margin-bottom: 15px;
}

.brands-title {
    font-family: 'Cairo', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 10px;
}

.brands-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
}

.brands-separator .line {
    height: 2px;
    flex: 1;
    max-width: 150px;
    background: #333;
}

.brands-separator .dot {
    width: 10px;
    height: 10px;
    border: 2px solid #333;
    border-radius: 50%;
}

.partners-marquee-section {
    padding: 20px 0;
    overflow: hidden;
    position: relative;
    background: transparent;
    direction: ltr !important;
}

.marquee-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.marquee-row {
    display: flex;
    width: max-content;
}

.marquee-content {
    display: flex;
    gap: 30px;
}

.moving-left {
    animation: marquee-left 100s linear infinite;
}

.moving-right {
    animation: marquee-right 100s linear infinite;
}

@keyframes marquee-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-33.333%);
    }
}

@keyframes marquee-right {
    0% {
        transform: translateX(-66.666%);
    }

    100% {
        transform: translateX(-33.333%);
    }
}

.partner-card {
    width: 110px;
    height: 110px;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

.partner-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 1;
    filter: none;
    transition: var(--transition);
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.partner-card:hover img {
    opacity: 1;
    filter: grayscale(0);
    transform: scale(1.05);
}

/* --- PRODUCTS GRID --- */
.products-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 10px;
}


/* Order Details Item Fix */
.detail-item-meta {
    display: flex;
    justify-content: space-between !important;
    align-items: center;
    width: 100%;
    margin-top: 5px;
    gap: 10px;
}

.price-unit {
    display: flex;
    align-items: center;
    gap: 8px;
    /* Safe space between strikethrough and current */
    font-size: 0.85rem;
    color: #666;
    flex-wrap: wrap;
    /* Ensure long prices wrap if needed */
}

.qty-badge {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    color: #333;
}

.price-total {
    font-size: 0.95rem;
    white-space: nowrap;
    /* Keep total on one line */
}

.home-product-slider {
    margin: 20px 0 10px;
}

.home-slider-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 10px;
}

.home-slider-title {
    font-size: 1.2rem;
    margin: 0;
    color: var(--color-text);
    font-weight: 700;
}

.home-slider-controls {
    display: flex;
    gap: 8px;
}

.home-slider-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e6e6e6;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: #666;
}

.home-slider-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

.home-slider-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 5px 0 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.home-slider-track::-webkit-scrollbar {
    display: none;
}

.home-slider-card {
    flex: 0 0 150px;
    background: var(--card-bg, #ffffff);
    border-radius: var(--card-radius, 16px);
    border: 1px solid var(--card-border-color, #f0f0f0);
    box-shadow: var(--card-shadow, 0 10px 24px rgba(0, 0, 0, 0.08));
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: start;
    transition: var(--transition);
    font-family: var(--card-font, 'Cairo', sans-serif);
    backdrop-filter: blur(var(--card-glass-blur, 0px));
    -webkit-backdrop-filter: blur(var(--card-glass-blur, 0px));
}

.home-slider-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12);
}

.home-slider-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    background: #f9f9f9;
}

.home-slider-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.home-slider-card:hover .home-slider-image img {
    transform: scale(1.06);
}

.home-slider-info {
    padding: 10px 12px 12px;
    background: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.home-slider-name {
    margin: 0 0 6px;
    font-size: var(--card-title-size, 0.88rem);
    font-weight: 700;
    color: var(--card-title-color, #2d2d2d);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.2em;
    line-height: 1.2;
}

.home-slider-price {
    display: flex;
    align-items: center;
    gap: 6px;
}

.home-slider-price .new {
    font-weight: 700;
    color: var(--card-price-color, var(--color-primary));
    font-size: var(--card-price-size, 0.95rem);
}

.home-slider-price .old {
    font-size: var(--card-discount-size, 0.75rem);
    color: var(--card-discount-color, #e74c3c);
    text-decoration: line-through;
}

.home-slider-card .cart-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    background: var(--card-btn-bg, #6d4c41);
    color: var(--card-btn-text-color, #fff);
    border: 1px solid var(--card-btn-border-color, transparent);
    border-radius: var(--card-btn-radius, 10px);
    font-size: var(--card-btn-font-size, 0.85rem);
    font-weight: 700;
    padding: 8px 6px;
    cursor: pointer;
}

@media (min-width: 768px) {
    .home-slider-card {
        flex-basis: 180px;
    }
}


.product-card {
    background: white;
    border-radius: var(--radius-soft);
    overflow: hidden;
    box-shadow: var(--shadow-subtle);
    transition: var(--transition);
}

.product-image-container {
    aspect-ratio: 1/1;
    position: relative;
    background: #f9f9f9;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Badges Layering */
.product-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
}

.product-badge {
    background: var(--color-primary);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

/* Video Banner Styles */
.video-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
}

.video-fallback-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.video-fallback-play:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-fallback-play i {
    color: white;
    font-size: 2rem;
    margin-left: 4px;
    /* Optical adjustment */
}

.banner-item.error {
    border: 5px solid red !important;
}

.banner-item.error::after {
    content: 'فشل تحميل الفيديو';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: red;
    color: white;
    padding: 10px;
    z-index: 100;
}

.product-badge.secondary {
    background: #34495e;
}

/* Modal Badges */
.product-badges-modal {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.badge {
    background: var(--color-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: bold;
    display: inline-block;
}

.badge.secondary {
    background: #34495e;
}

.fav-btn {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: #ccc;
    cursor: pointer;
    transition: var(--transition);
    z-index: 5;
}

.fav-btn.active {
    color: #e74c3c;
    transform: scale(1.1);
}

.product-info {
    padding: 12px;
}

.product-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8em;
}

.product-price {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 10px;
}

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

.cart-btn {
    background: var(--color-secondary);
    color: var(--color-primary);
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.order-btn {
    flex: 1;
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* --- SEARCH OVERLAY --- */
.search-overlay {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    background: white;
    padding: 15px 20px;
    z-index: 1001;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.search-overlay.active {
    top: 0;
}

.search-inner {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-inner input {
    flex: 1;
    border: none;
    background: #f5f5f5;
    padding: 12px 20px;
    border-radius: 20px;
    font-family: inherit;
    font-size: 1rem;
}

/* --- LOADING SCREEN --- */
#loading-screen {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.logo-pulse-img {
    width: 120px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- MODAL --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 0 15px 15px 15px;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    height: calc(100vh - 30px);
    border-radius: 35px;
    padding: 0;
    overflow: hidden;
    position: relative;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.2);
    animation: slideUpModal 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

@keyframes slideUpModal {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.hero-slider {
    width: 100%;
    height: 350px;
    background: #f8f8f8;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    /* Enhanced curvature */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
    margin-bottom: 25px;
}

.banners-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 0 10px;
    margin-bottom: 25px;
}

.banners-grid .hero-slider {
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    margin-bottom: 0;
}


@media (max-width: 768px) {
    .banners-grid {
        gap: 10px;
        /* Smaller gap on mobile */
        padding: 0 5px;
    }

    .banners-grid .hero-slider {
        aspect-ratio: 1 / 1;
        height: auto;
    }

    .banners-grid .banner-title {
        font-size: 0.85rem !important;
        /* Smaller text for split mobile view */
    }
}


.modal-image-container {
    width: 100%;
    height: 350px;
    background: #f9f9f9;
    position: relative;
}

.modal-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2010;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    color: var(--color-primary);
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.modal-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 20px;
    display: block;
}

#modal-desc {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 auto 25px auto;
    text-align: center;
    word-break: break-word;
    max-width: 90%;
    display: block;
    white-space: pre-line;
}

.modal-fav-btn {
    background: #fdf2f0;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 1.4rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(99, 77, 74, 0.1);
}

/* --- CART --- */
.cart-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 92vh;
    background: white;
    z-index: 2100;
    border-radius: 25px 25px 0 0;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    transform: translateY(0);
}

@media (min-width: 768px) {
    .cart-sidebar {
        width: 420px;
        height: 100vh;
        left: auto;
        right: 0;
        top: 0;
        border-radius: 0;
        transform: translateX(100%);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .cart-sidebar.active {
        transform: translateX(0);
    }

    .cart-header {
        padding: 15px 20px;
    }

    .cart-items {
        padding: 15px 20px;
    }

    .cart-footer {
        padding: 15px 20px;
    }
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-footer {
    padding: 12px 15px;
    border-top: 1px solid #f5f5f5;
    background: #fff;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.03);
}

/* Compact Cart Item Styles */
.cart-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
    align-items: center;
}

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

.cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    background: #f9f9f9;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-details {
    font-size: 0.7rem;
    color: #888;
    margin-bottom: 4px;
}

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

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

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8f8f8;
    padding: 2px 8px;
    border-radius: 20px;
}

.quantity-controls button {
    border: none;
    background: none;
    width: 24px;
    height: 24px;
    font-size: 1.2rem;
}

.quantity-controls span {
    font-size: 0.9rem;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

/* --- CART INTERNALS --- */
.quantity-controls button {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-primary);
    cursor: pointer;
    transition: var(--transition);
}

.quantity-controls button:hover {
    background: var(--color-secondary) !important;
    border-color: var(--color-primary) !important;
}

#applied-coupon-msg {
    animation: fadeIn 0.3s ease;
}

#cart-coupon-input:focus {
    outline: none;
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 5px rgba(213, 158, 137, 0.2);
}

/* Responsive Grid Adjustments */
@media (min-width: 768px) {
    .products-wrapper {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .bottom-nav {
        max-width: 450px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        bottom: 25px !important;
        border-radius: 30px !important;
    }
}

@media (max-width: 480px) {
    .products-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 4px;
    }

    .product-card {
        padding: 0;
        border-radius: 8px;
    }

    .product-info h3 {
        font-size: 0.9rem;
    }

    .app-header {
        height: 60px;
    }

    .logo-img {
        height: 28px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.9rem;
    }
}





/* --- PRODUCT BADGES (Dynamic) --- */
.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 5px;
    z-index: 5;
    pointer-events: none;
    max-width: 100%;
}

.product-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* --- PAYMENT INFO SECTION --- */
.payment-info-section {
    background-color: #634d4a;
    /* Matches the user's brown theme */
    color: #fff;
    padding: 30px 20px 50px 20px;
    text-align: center;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-top: 40px;
}

.payment-title {
    font-family: 'Amiri', serif;
    /* Using Amiri for that specific Arabic style */
    font-size: 2.4rem;
    color: #dcbfa6;
    /* The rose-gold/beige text color from the image */
    margin-bottom: 25px;
    font-weight: 700;
}

.bank-details {
    margin-bottom: 30px;
    direction: rtl;
}

.bank-details p {
    font-size: 1.2rem;
    margin-bottom: 8px;
    font-family: 'Amiri', serif;
    /* Matches the serif font in the image */
    letter-spacing: 0;
    color: #fcece6;
    /* Off-white text */
    line-height: 1.4;
}

/* Container for the Payment Icons - Rounded Box */
.payment-icons-box {
    background: #7a635f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 12px 30px;
    border-radius: 18px;
    flex-wrap: wrap;
    /* Default loose wrap for desktop */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    margin-top: 10px;
    max-width: 100%;
}

.payment-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 35px;
}

.payment-icon img {
    height: 100%;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.apple-pay img {
    height: 30px;
}

.visa img {
    height: 24px;
}

.mastercard img {
    height: 28px;
}

.mada img {
    background: #fff;
    padding: 3px 5px;
    border-radius: 4px;
    height: 26px;
    filter: none;
}

/* Mobile Responsiveness for Bank Details & Icons */
@media (max-width: 480px) {
    .payment-info-section {
        padding-left: 15px;
        padding-right: 5px;
        /* Minimized padding to push text to the edge */
    }

    .payment-title {
        font-size: 1.6rem;
    }

    .bank-details p {
        font-size: 0.9rem;
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        /* Align to the start (Right in RTL) */
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
        white-space: nowrap;
        padding-right: 0;
        /* Removed extra padding to stick to the side */
        margin-right: -5px;
        /* Pull it slightly more to the right visually */
    }

    .bank-details p span {
        font-size: 1rem;
        direction: ltr;
        /* Ensure numbers read correctly */
        unicode-bidi: embed;
        font-family: 'Arial', sans-serif;
    }

    /* Force icons into one row on mobile */
    .payment-icons-box {
        flex-wrap: nowrap;
        /* Force single row */
        gap: 10px;
        padding: 10px 15px;
        width: 95%;
        /* Use more width */
        justify-content: space-between;
        /* Spread them out nicely */
    }

    .payment-icon {
        height: 28px;
        /* Slightly smaller icons for mobile */
    }

    .apple-pay img {
        height: 26px;
    }

    .visa img {
        height: 20px;
    }

    .mastercard img {
        height: 24px;
    }

    /* Enlarge Mada slightly */
    .mada img {
        height: 24px;
        /* Increased from 20px */
        padding: 2px 4px;
        /* Reduced padding slightly to give more room for logo */
    }
}

/* --- CATEGORY FILTERS (PRODUCTS VIEW - COMPACT) --- */
.category-filters-container {
    padding: 2px 5px 12px 5px;
    margin: 0 -10px;
    /* Slight bleed */
    display: flex;
    gap: 8px;
    overflow-x: auto;
    /* Hide scrollbar but allow scroll */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
    position: relative;
    /* Not sticky */
    z-index: 1;
    align-items: center;
}

.category-filters-container::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    white-space: nowrap;
    padding: 6px 14px;
    border-radius: 8px;
    /* Softer rect */
    font-size: 0.85rem;
    cursor: pointer;
    border: 1px solid #f0f0f0;
    background: #fff;
    color: var(--color-text-light);
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
}

.filter-chip:hover {
    background: #fdf2f0;
    border-color: #d59e89;
    color: var(--color-primary);
}

.filter-chip.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: 0 2px 8px rgba(99, 77, 74, 0.2);
    transform: translateY(-1px);
    font-weight: 700;
}

/* "All" Chip Distinct Style (Optional, currently keeping uniform) */
#filter-chip-all {
    margin-left: 0;
}

/* --- MODAL MOBILE TWEAKS --- */
@media (max-width: 480px) {
    .modal-overlay {
        padding: 0 10px 15px 10px;
        /* Side padding for overlay */
        align-items: center;
        /* Center vertically */
    }

    .modal-content {
        width: 100%;
        max-width: 360px;
        /* Limit width */
        height: auto;
        /* Allow auto height */
        max-height: 85vh;
        /* But cap it */
        border-radius: 25px;
        /* Softer rounds */
        margin: 0 auto;
        /* Center horizontally */
    }

    .modal-image-container {
        height: 280px;
        /* Smaller image height */
    }

    #modal-title {
        font-size: 1.1rem;
        /* Smaller title */
        margin-bottom: 5px;
    }

    .modal-price {
        margin-bottom: 15px;
        font-size: 1.2rem;
        /* Smaller price */
    }

    .modal-price span {
        font-size: 1.2rem !important;
    }

    #modal-desc {
        font-size: 0.85rem;
        /* Smaller text */
        margin-bottom: 20px;
    }

    .modal-body {
        padding: 20px;
    }

    /* Adjust Logo for Mobile */
    .app-header {
        height: 75px;
        mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
        -webkit-mask-image: linear-gradient(to bottom, black 75%, transparent 100%);
    }

    .logo-img {
        height: 45px;
    }
}

.modal-close {
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
    top: 15px;
    right: 15px;
}

/* --- SOCIAL LINKS --- */
.social-icon {
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.social-icon:hover::before {
    width: 100%;
    height: 100%;
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.15);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25) !important;
}

.social-icon.tiktok:hover {
    background: linear-gradient(135deg, #ff0050, #00f2ea) !important;
    /* TikTok gradient */
    box-shadow: 0 8px 20px rgba(255, 0, 80, 0.4) !important;
}

.social-icon.instagram:hover {
    background: linear-gradient(135deg, #f58529 0%, #dd2a7b 50%, #8134af 100%) !important;
    box-shadow: 0 8px 20px rgba(221, 42, 123, 0.5) !important;
    transform: translateY(-5px) scale(1.15) rotate(5deg);
}

.social-icon:active {
    transform: translateY(-2px) scale(1.05);
}

/* --- LOGIN MODAL (FIREBASE AUTH) --- */
#login-modal {
    z-index: 3000 !important;
}

.login-modal-content {
    max-width: 400px;
    padding: 20px;
    border-radius: 20px;
    text-align: right;
    direction: rtl;
}

.modal-close-left {
    position: absolute;
    top: 15px;
    left: 15px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #e76f6f;
    cursor: pointer;
    line-height: 1;
    z-index: 10;
}

.login-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-top: 10px;
}

.login-title {
    font-family: 'Cairo', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0;
}

.user-avatar-circle {
    width: 60px;
    height: 60px;
    background: #f7fafc;
    border: 1px solid #edf2f7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
    font-size: 1.5rem;
}

.login-label {
    display: block;
    font-size: 0.95rem;
    color: #4a5568;
    margin-bottom: 8px;
    font-weight: 600;
}

.phone-input-wrapper,
.otp-input-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 15px;
    margin-bottom: 20px;
    background: #fff;
    transition: border-color 0.2s;
}

.phone-input-wrapper:focus-within,
.otp-input-wrapper:focus-within {
    border-color: #f7b2b2;
}

.country-code {
    font-size: 1.1rem;
    color: #1a202c;
    padding-left: 15px;
    border-left: 1px solid #edf2f7;
    margin-left: 15px;
}

#login-phone,
#login-otp {
    border: none;
    outline: none;
    font-size: 1.1rem;
    color: #2d3748;
    width: 100%;
    background: transparent;
    font-family: 'Cairo', sans-serif;
    letter-spacing: 1px;
}

.login-btn-main {
    width: 100%;
    padding: 14px;
    background: #f7b2b2;
    color: #4a5568;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.login-btn-main:hover {
    background: #f5a1a1;
    transform: translateY(-1px);
}

.login-btn-main:active {
    transform: translateY(0);
}

.btn-text-only {
    background: none;
    border: none;
    color: #718096;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
}

.btn-text-only:hover {
    text-decoration: underline;
}

#recaptcha-container {
    margin-bottom: 15px;
}

/* --- PROFILE VIEW --- */
.profile-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--color-secondary);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 15px;
}

.profile-name {
    font-family: 'Amiri', serif;
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--color-primary);
}

.profile-email {
    color: #888;
    font-size: 0.9rem;
}

.profile-tabs {
    display: flex;
    background: white;
    padding: 5px;
    border-radius: 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.profile-tab-btn {
    flex: 1;
    border: none;
    background: none;
    padding: 12px;
    border-radius: 30px;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-tab-btn.active {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(99, 77, 74, 0.2);
}

.profile-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

.my-order-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f5f5f5;
}

.order-id {
    font-weight: bold;
    color: #333;
    font-size: 0.95rem;
}

.order-date {
    font-size: 0.75rem;
    color: #888;
    margin-top: 2px;
}

.order-status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.status-new {
    background: #e3f2fd;
    color: #1976d2;
}

.status-completed {
    background: #e8f5e9;
    color: #388e3c;
}

.status-cancelled {
    background: #ffebee;
    color: #d32f2f;
}

.order-items-preview {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.order-item-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #eee;
    flex-shrink: 0;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.order-total {
    font-weight: bold;
    color: var(--color-primary);
}

.settings-form .form-group {
    margin-bottom: 15px;
}

.settings-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    font-family: inherit;
    transition: border 0.3s;
}

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

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* --- PROFILE VIEW --- */
.profile-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--color-secondary);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 15px;
}

.profile-name {
    font-family: 'Amiri', serif;
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: var(--color-primary);
}

.profile-email {
    color: #888;
    font-size: 0.9rem;
}

.profile-tabs {
    display: flex;
    background: white;
    padding: 5px;
    border-radius: 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.profile-tab-btn {
    flex: 1;
    border: none;
    background: none;
    padding: 12px;
    border-radius: 30px;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
}

.profile-tab-btn.active {
    background: var(--color-primary);
    color: white;
    box-shadow: 0 4px 10px rgba(99, 77, 74, 0.2);
}

.profile-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

.my-order-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f5f5f5;
}

.order-id {
    font-weight: bold;
    color: #333;
    font-size: 0.95rem;
}

.order-date {
    font-size: 0.75rem;
    color: #888;
    margin-top: 2px;
}

.order-status-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.status-new {
    background: #e3f2fd;
    color: #1976d2;
}

.status-completed {
    background: #e8f5e9;
    color: #388e3c;
}

.status-cancelled {
    background: #ffebee;
    color: #d32f2f;
}

.order-items-preview {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 5px;
    margin-bottom: 10px;
}

.order-item-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #eee;
    flex-shrink: 0;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.order-total {
    font-weight: bold;
    color: var(--color-primary);
}

.settings-form .form-group {
    margin-bottom: 15px;
}

.settings-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #eee;
    border-radius: 10px;
    font-family: inherit;
    transition: border 0.3s;
}

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

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* --- PREMIUM ORDER STYLES --- */
.order-card-premium {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.order-card-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
}

.order-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.order-id-badge {
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.9rem;
    color: #444;
    border: 1px solid #eee;
}

.status-badge-premium {
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-new {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.status-processing {
    background: rgba(230, 126, 34, 0.1);
    color: #e67e22;
    border: 1px solid rgba(230, 126, 34, 0.2);
}

.status-shipped {
    background: rgba(155, 89, 182, 0.1);
    color: #9b59b6;
    border: 1px solid rgba(155, 89, 182, 0.2);
}

.status-completed {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.status-cancelled {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.order-body-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.order-date-info {
    font-size: 0.85rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 6px;
}

.order-items-preview {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0 10px;
    scrollbar-width: thin;
}

.order-preview-img {
    width: 65px;
    height: 65px;
    border-radius: 12px;
    object-fit: cover;
    background: #f9f9f9;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.order-footer-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px dashed #eee;
}

.order-total-v2 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--color-primary);
}

.order-view-btn {
    color: #888;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- ORDER DETAILS MODAL STYLES --- */
.detail-section {
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #f0f0f0;
}

.detail-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #333;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-item {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f9f9f9;
}

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

.detail-item-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    background: #f5f5f5;
}

.detail-item-info {
    flex: 1;
}

.detail-item-name {
    font-size: 0.85rem;
    font-weight: bold;
    color: #444;
    margin-bottom: 4px;
}

.detail-item-meta {
    font-size: 0.75rem;
    color: #888;
    display: flex;
    justify-content: space-between;
}

.price-summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 8px;
}


.price-summary-row.total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px dashed #eee;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--color-primary);
}

/* --- DONATION BANNER --- */
.donation-banner-section {
    padding: 2rem 0;
    background: var(--color-bg);
}

.donation-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Softer border */
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
    max-width: 800px;
    margin: 0 auto;
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.donation-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

/* New row layout */
.donation-content-row {
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: right;
    /* Ensure text aligns right in RTL */
    margin-bottom: 20px;
}

.donation-icon {
    font-size: 2.8rem;
    color: var(--color-primary);
    background: rgba(99, 77, 74, 0.05);
    /* Light primary bg */
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.donation-text-content {
    flex: 1;
}

.donation-title {
    font-family: 'Amiri', serif;
    font-size: 1.4rem;
    color: var(--color-primary);
    margin: 0 0 5px 0;
    font-weight: 800;
    line-height: 1.3;
}

.donation-text {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.donation-footer-icons {
    margin-top: 0;
    padding-top: 15px;
    border-top: 1px dashed #eee;
    width: 100%;
}

.donation-footer-icons .payment-icons-box {
    background: transparent;
    box-shadow: none;
    border: none;
    margin-top: 0;
    justify-content: center;
    /* Center icons */
    padding: 0;
}

/* Mobile Responsiveness */
@media (max-width: 500px) {
    .donation-content-row {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .donation-icon {
        margin: 0 auto;
        width: 60px;
        height: 60px;
        font-size: 2.2rem;
    }

    .donation-title {
        font-size: 1.3rem;
    }
}

/* --- Order Confirmation Modal --- */
.confirmation-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideUpFade 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-animation {
    margin: 0 auto 20px;
    width: 80px;
    height: 80px;
}

.checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    stroke-width: 2;
    stroke: #fff;
    stroke-miterlimit: 10;
    box-shadow: inset 0px 0px 0px #27ae60;
    animation: fill .4s ease-in-out .4s forwards, scale .3s ease-in-out .9s both;
}

.checkmark__circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #27ae60;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark__check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {

    0%,
    100% {
        transform: none;
    }

    50% {
        transform: scale3d(1.1, 1.1, 1);
    }
}

@keyframes fill {
    100% {
        box-shadow: inset 0px 0px 0px 50px #27ae60;
    }
}

#confirmation-title {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

#confirmation-message {
    color: #7f8c8d;
    margin-bottom: 25px;
    line-height: 1.6;
}

.confirmation-actions .btn-primary {
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius-soft);
    padding: 12px;
    font-size: 1rem;
}