/* ========================
   Butterfly Garden - Main CSS
   Matching reference design
======================== */

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

:root {
    --primary-color: #4B1D4A;
    --secondary-color: #C97B63;
    --bg-color: #FAFAFA;
    --text-color: #333333;
    --border-light: #EEEEEE;
}

* { box-sizing: border-box; }

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    font-size: 15px;
}

/* Arabic Font Rule - Ensuring icons remain intact */
[dir="rtl"], 
[dir="rtl"] body, 
[dir="rtl"] p, 
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4, [dir="rtl"] h5, [dir="rtl"] h6,
[dir="rtl"] a, 
[dir="rtl"] input, 
[dir="rtl"] label, 
[dir="rtl"] li {
    font-family: 'Noto Kufi Arabic', sans-serif !important;
}

[dir="rtl"] .fas, [dir="rtl"] .far, [dir="rtl"] .fab, [dir="rtl"] .fa, 
[dir="rtl"] [class*="fa-"], 
[dir="rtl"] [class*="sicon-"],
[dir="rtl"] i {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "sallaicons", "Font Awesome 5 Free" !important;
}

/* ======================== UTILITIES ======================== */
.text-primary-theme  { color: var(--primary-color) !important; }
.bg-primary-theme    { background-color: var(--primary-color) !important; }
.text-secondary-theme{ color: var(--secondary-color) !important; }
.bg-secondary-theme  { background-color: var(--secondary-color) !important; }

/* ======================== BUTTONS ======================== */
.btn-primary-custom {
    background-color: var(--primary-color);
    color: white;
    border-radius: 30px;
    padding: 8px 24px;
    font-weight: 500;
    font-size: 13px;
    border: 2px solid var(--primary-color);
    transition: all 0.3s;
    display: inline-block;
}
.btn-primary-custom:hover {
    background-color: transparent;
    color: var(--primary-color);
}
.btn-secondary-custom {
    background-color: var(--secondary-color);
    color: white;
    border-radius: 30px;
    padding: 8px 24px;
    font-weight: 500;
    font-size: 13px;
    border: none;
    transition: all 0.3s;
    display: inline-block;
    text-decoration: none;
}
.btn-secondary-custom:hover {
    background-color: #b56a52;
    color: white;
}

/* Disabled/Frozen State */
.disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

/* ======================== HEADER ======================== */
.top-header {
    background-color: var(--primary-color);
    font-size: 13px;
}
.top-header-divider {
    width: 1px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.2);
}
.hover-white:hover {
    color: white !important;
}

/* ======================== TOP BAR TICKER ANIMATIONS ======================== */
.ticker-item {
    display: none;
    width: 100%;
}
.ticker-item.active {
    display: block;
}

/* Fade Effect */
.enter-fade { animation: fadeIn 0.6s ease-out forwards; }
.exit-fade { animation: fadeOut 0.6s ease-in forwards; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* Swipe Top Effect */
.enter-swipe-top { animation: swipeTopIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards; }
.exit-swipe-top { animation: swipeTopOut 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards; }

@keyframes swipeTopIn { 
    from { opacity: 0; transform: translateY(15px); } 
    to { opacity: 1; transform: translateY(0); } 
}
@keyframes swipeTopOut { 
    from { opacity: 1; transform: translateY(0); } 
    to { opacity: 0; transform: translateY(-15px); } 
}

/* Swipe Bottom Effect */
.enter-swipe-bottom { animation: swipeBottomIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards; }
.exit-swipe-bottom { animation: swipeBottomOut 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards; }

@keyframes swipeBottomIn { 
    from { opacity: 0; transform: translateY(-15px); } 
    to { opacity: 1; transform: translateY(0); } 
}
@keyframes swipeBottomOut { 
    from { opacity: 1; transform: translateY(0); } 
    to { opacity: 0; transform: translateY(15px); } 
}

/* Zoom Effect */
.enter-zoom { animation: zoomInEffect 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.exit-zoom { animation: zoomOutEffect 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

@keyframes zoomInEffect { 
    from { opacity: 0; transform: scale(0.85); filter: blur(2px); } 
    to { opacity: 1; transform: scale(1); filter: blur(0); } 
}
@keyframes zoomOutEffect { 
    from { opacity: 1; transform: scale(1); filter: blur(0); } 
    to { opacity: 0; transform: scale(1.15); filter: blur(2px); } 
}

/* Blur Effect */
.enter-blur { animation: blurIn 0.6s ease-out forwards; }
.exit-blur { animation: blurOut 0.6s ease-in forwards; }

@keyframes blurIn { 
    from { opacity: 0; filter: blur(10px); } 
    to { opacity: 1; filter: blur(0); } 
}
@keyframes blurOut { 
    from { opacity: 1; filter: blur(0); } 
    to { opacity: 0; filter: blur(10px); } 
}

.main-header {
    transition: all 0.4s ease;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    z-index: 1001;
}

.header-inner {
    min-height: 80px;
}

/* ======================== SEARCH EXPANDABLE ======================== */
.search-bar-expandable {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 70px;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    z-index: 1000;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.search-bar-expandable.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
.search-bar-expandable.border-top {
    border-top: 1px solid #f0f0f0 !important;
}

.search-input-fancy {
    border: none;
    outline: none;
    font-size: 1.2rem;
    padding: 10px 0;
    width: 100%;
    color: var(--primary-color);
}
.search-btn-fancy {
    border: none;
    background: transparent;
    color: var(--primary-color);
    font-size: 1.2rem;
    padding: 0 15px;
}
.search-close-btn {
    font-size: 1.4rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}
.search-close-btn:hover { color: var(--primary-color); }

.header-main-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* Responsive Header Tweaks */
@media (max-width: 991px) {
    .header-inner {
        min-height: 65px;
    }
    .header-logo-section {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
    .header-main-logo {
        height: 45px;
    }
    .header-right-side {
        min-width: auto;
    }
    .mobile-nav-wrapper {
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
        z-index: 999;
    }
    .mobile-nav-wrapper .nav-link {
        font-size: 14px;
        font-weight: 600;
        color: var(--primary-color) !important;
        letter-spacing: 0.5px;
    }
    .border-bottom-light {
        border-bottom: 1px solid #f8f8f8;
    }
}
@media (max-width: 576px) {
    .main-header .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    .header-actions {
        gap: 12px !important;
    }
}


.header-logo-section {
    flex-shrink: 0;
}
.logo-icon-box {
    box-shadow: 0 4px 15px rgba(75, 29, 74, 0.15);
}

.navbar-nav .nav-link {
    font-size: 13px;
    font-weight: 700;
    color: var(--primary-color) !important;
    letter-spacing: 0.8px;
    position: relative;
    padding: 10px 0 !important;
    transition: all 0.3s ease;
}
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active-nav::after {
    width: 100%;
}

.header-right-side {
    min-width: 280px;
}

.search-form-premium .form-control {
    background-color: #F8F8F8 !important;
    border: 1px solid transparent !important;
    font-size: 13px;
}
.search-form-premium .form-control:focus {
    background-color: white !important;
    border-color: rgba(75, 29, 74, 0.1) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
}

.action-btn {
    color: #444;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.action-btn:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.user-name-small {
    display: block;
    max-width: 65px;
    font-size: 10px;
    color: #666;
    margin-top: 2px;
    font-weight: 500;
}

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

.cart-action-btn-new {
    border: 1px solid #eee;
    transition: all 0.3s ease;
}
.cart-action-btn-new:hover {
    background-color: #fff !important;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* ======================== HERO SLIDER ======================== */
.hero-slider-wrap {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    height: 400px;
    background: #EDE8F0;
}
.hero-slider {
    width: 100%;
    height: 100%;
    position: relative;
}
.hero-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}
/* Full background layout: image fills container, text overlays on left */
.slide-inner {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    padding: 0 60px;
    position: relative;
    overflow: hidden;
}
[dir="rtl"] .slide-inner {
    flex-direction: row-reverse !important;
}
.slide-text-overlay {
    z-index: 2;
    max-width: 55%;
    text-align: left;
}
.slide-title {
    font-size: 2.3rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 8px;
}
.slide-price {
    font-size: 1.95rem;
    color: var(--primary-color);
}
.hero-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;  /* show flower tops */
    display: block;
}
/* Slider arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
    z-index: 10;
    transition: all 0.2s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.slider-arrow:hover { background: var(--primary-color); color: white; }
.slider-arrow-left  { left: 14px; }
.slider-arrow-right { right: 14px; }
/* Slider dots */
.slider-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.slider-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: rgba(255,255,255,0.55);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s;
}
.slider-dot.active {
    background: white;
    width: 24px;
    border-radius: 5px;
}
/* Legacy hero-card (kept for other pages) */
.hero-card {
    background-color: #EDE8F0;
    border-radius: 16px;
    padding: 40px;
    height: 100%;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
}
.hero-text { flex: 0 0 50%; z-index: 1; }
.hero-card h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 8px;
}
.hero-card h1 span { font-size: 1.8rem; }
.hero-img {
    flex: 0 0 50%;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}
.hero-img img {
    max-height: 260px;
    object-fit: contain;
    border-radius: 12px;
}

/* Right Promo Cards with Background Images */
.promo-small {
    border-radius: 14px;
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 190px;
}
.promo-green  { 
    background-image: url('../images/slider/slider__right_top.png'); 
    background-color: #D9EFE6; /* fallback */
}
.promo-peach  { 
    background-image: url('../images/slider/slider__right_bottom.png'); 
    background-color: #F4E0D8; /* fallback */
    color: white !important;
}
.promo-peach .promo-text-overlay h5,
.promo-peach .promo-text-overlay p {
    color: white !important;
}
.promo-text-overlay { 
    position: relative;
    z-index: 2;
    max-width: 100%;
    text-align: left;
}
.promo-text-overlay h5 { font-size: 1.4rem; margin-bottom: 6px; color: #222; text-align: left; }
.promo-text-overlay p  { font-size: 0.88rem; color: #444; margin-bottom: 15px !important; text-align: left; }

/* ======================== FEATURES BAR ======================== */
.features-bar {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 24px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.feature-item-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: center;
}
.feature-item-wrap:first-child { justify-content: flex-start; }
.feature-item-wrap:last-child  { justify-content: flex-end; }
.feature-icon {
    font-size: 1.6rem;
    color: var(--text-color);
    min-width: 32px;
    text-align: center;
}
.feature-item-wrap h6  { font-size: 1rem; margin-bottom: 3px; }
.feature-item-wrap p   { font-size: 0.85rem; }
.feature-divider {
    width: 1px;
    height: 40px;
    background: #e8e8e8;
    margin: 0 8px;
}

/* ======================== 3 PROMO CARDS ======================== */
.promo-card-dark {
    border-radius: 14px;
    height: 215px;
    overflow: hidden;
}
.promo-card-bg-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.promo-card-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(30, 10, 30, 0.55);
}
.promo-card-content {
    position: relative;
    z-index: 2;
    padding: 28px;
    text-align: left !important;
}
.promo-card-content h5  { font-size: 1.4rem; line-height: 1.3; text-align: left !important; }
.promo-card-content p   { font-size: 0.8rem; text-align: left !important; }

.promo-card-light {
    border-radius: 14px;
    height: 200px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 20px;
}
[dir="rtl"] .promo-card-light {
    flex-direction: row-reverse !important;
}
.promo-card-light-text { flex: 1; text-align: left !important; }
.promo-card-light-text h5 { font-size: 1.3rem; line-height: 1.4; text-align: left !important; }
.promo-card-light-text p  { font-size: 0.9rem; text-align: left !important; }
.promo-card-light-img { flex: 0 0 110px; }
.promo-card-light-img img {
    width: 110px;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
}

/* ======================== TOP CATEGORIES (Redesigned) ======================== */
.category-pill-item {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    border: 5px solid #DDB8A6; 
    border-radius: 100px;
    padding: 20px 10px;
    background: white;
    transition: all 0.3s ease;
    width: 180px;            /* Updated width */
    height: 230px;           /* Updated height */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.category-pill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(221, 184, 166, 0.25);
    border-color: var(--secondary-color);
}
.category-icon-circle {
    width: 135px;            /* Updated width */
    height: 135px;           /* Updated height */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    background: radial-gradient(circle, rgba(221, 184, 166, 0.15) 0%, rgba(255, 255, 255, 0.5) 100%);
    position: relative;
}
/* Multiple gradient variations if needed */
.bg-soft-peach { background: radial-gradient(circle, rgba(221, 184, 166, 0.25) 0%, rgba(255, 255, 255, 0.8) 100%); }
.bg-soft-blue  { background: radial-gradient(circle, rgba(166, 184, 221, 0.2) 0%, rgba(255, 255, 255, 0.8) 100%); }

.category-icon-circle i {
    font-size: 2.5rem;       /* Updated font-size */
    color: #444; /* Darker line art look */
}
.category-icon-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}
.category-pill-item span {
    font-weight: 700;
    font-size: 0.9rem;
    color: #222;
}

.cat-nav-btn {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 1px solid #DDB8A6;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    color: #DDB8A6;
    transition: all 0.2s;
}
.cat-nav-btn.active {
    background: #DDB8A6;
    color: white;
}
.cat-nav-btn:hover:not(.active) {
    background: rgba(221, 184, 166, 0.1);
}

/* ======================== PRODUCT TABS ======================== */
.product-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #eee;
}
.product-tab-btn {
    border: none;
    background: transparent;
    color: #999;
    font-weight: 500;
    font-size: .9rem;
    padding: 8px 14px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.product-tab-btn.active,
.product-tab-btn:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* ======================== PRODUCT CARDS ======================== */
.product-card {
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    transition: transform 0.3s, box-shadow 0.3s;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.product-img {
    height: 230px;
    object-fit: cover;
    width: 100%;
    display: block;
}
.card-cat-label { 
    font-size: 10px; 
    color: var(--secondary-color); 
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(201, 123, 99, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 5px !important;
}
.rating { color: #FFC107; font-size: 0.7rem; }
.price { font-weight: 700; font-size: 1.05rem; color: var(--text-color); display: inline-flex; align-items: center; gap: 4px; }
.price-old { font-size: 0.78rem; color: #999; text-decoration: line-through; display: inline-flex; align-items: center; gap: 2px; }
.discount-badge { color: #27AE60; background: #EBF7EE; font-size: 0.72rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-left: 5px; }


.product-card-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
}

@media (max-width: 576px) {
    .product-card-action {
        flex-direction: column !important;
        justify-content: center !important;
        gap: 5px;
    }
}

.add-to-cart-icon-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}
@media (max-width: 576px) {
    .add-to-cart-icon-btn {
        width: 100% !important;
        border-radius: 8px !important;
        height: 42px !important;
        background: var(--primary-color) !important;
        color: white !important;
        font-size: 0.85rem !important;
        font-weight: 600;
    }
    .add-to-cart-icon-btn::after {
        content: " ADD TO CART";
        margin-left: 8px;
    }
}
.add-to-cart-icon-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* Cart Item Badge (Rounded Square) */
.cart-item-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #27AE60;
    color: white;
    font-size: 12px;
    font-weight: 800;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    z-index: 30;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.cart-item-badge.active {
    transform: scale(1);
}
.add-to-cart {
    position: relative !important;
}


/* Product badges */
.product-badge {
    position: absolute;
    top: 8px; left: 8px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    z-index: 1;
}
.badge-new  { background: var(--primary-color); color: white; }
.badge-sale { background: #E44235; color: white; }

/* Product slider arrow buttons */
.product-slider-arrow {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    color: #555;
    z-index: 10;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.product-slider-arrow.left { left: -17px; }
.product-slider-arrow.right { right: -17px; }
.product-slider-arrow:hover { background: var(--primary-color); color: white; border-color: var(--primary-color); }

/* ======================== PROMO WIDE BANNERS ======================== */
.promo-wide-banner {
    border-radius: 14px;
    height: 260px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}
[dir="rtl"] .promo-wide-banner {
    justify-content: flex-end !important;
}
.promo-banner-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.promo-banner-dark .promo-banner-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(20, 8, 20, 0.6);
}
.promo-banner-light { background-color: #F7F0EA; }
.promo-banner-light .promo-banner-overlay-light {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(247, 240, 234, 0.75);
}

.promo-banner-content,
.promo-banner-content-right {
    position: relative;
    z-index: 2;
    padding: 24px;
    text-align: left !important;
}
.promo-banner-content h4     { font-size: 1.8rem; text-align: left !important; }
.promo-banner-content p      { font-size: 0.85rem; text-align: left !important; }
.promo-banner-content-right h4 { font-size: 1.8rem; text-align: left !important; }
.promo-banner-content-right p  { font-size: 0.9rem; text-align: left !important; }

/* ======================== DEAL OF THE WEEK ======================== */
.deal-section-wrap {
    background: white;
    border-radius: 16px;
    padding: 30px;
    border: 1px solid #eee;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}
.timer-box {
    background-color: #F8EDEA;
    border-radius: 8px;
    padding: 8px 10px;
    text-align: center;
    min-width: 48px;
}
.timer-val {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}
.timer-label { font-size: 0.65rem; color: #888; margin-top: 2px; }
.timer-sep { font-size: 1.2rem; font-weight: 700; color: var(--primary-color); padding: 0 2px; }

@media (max-width: 576px) {
    .timer-box {
        padding: 5px 8px;
        min-width: 40px;
    }
    .timer-val {
        font-size: 1rem;
    }
    .timer-label {
        font-size: 0.6rem;
    }
}

/* ======================== FOOTER ======================== */
.footer {
    background-color: var(--primary-color);
    color: white;
    border-top: 4px solid var(--secondary-color);
}
.footer-brand .logo {
    letter-spacing: -0.5px;
}
.footer-desc {
    font-size: 14px;
    line-height: 1.6;
}
.footer-heading {
    font-size: 18px;
    font-weight: 600;
    position: relative;
    padding-bottom: 12px;
}
.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--secondary-color);
}
.footer-links li {
    margin-bottom: 12px;
}
.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
}
.footer-links a:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}
.social-icons a {
    width: 38px;
    height: 38px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    transition: all 0.3s ease;
}
.social-icons a:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
}
.newsletter-form .form-control {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 30px 0 0 30px;
    padding: 10px 20px;
    font-size: 14px;
}
.newsletter-form .form-control:focus {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: none;
    color: white;
}
.newsletter-form .btn {
    border-radius: 0 30px 30px 0;
    padding: 10px 25px;
    font-weight: 600;
    font-size: 14px;
    background-color: var(--secondary-color);
    border: none;
    color: white;
}
.border-white-10 {
    border-color: rgba(255, 255, 255, 0.08) !important;
}
.footer-bottom-nav a {
    transition: color 0.3s ease;
}
.footer-bottom-nav a:hover {
    color: white !important;
}

/* ======================== RTL OVERRIDES ======================== */
[dir="rtl"] .footer-heading::after {
    left: auto;
    right: 0;
}
[dir="rtl"] .footer-links a:hover {
    transform: translateX(-5px);
}
[dir="rtl"] .newsletter-form .form-control {
    border-radius: 0 30px 30px 0;
}
[dir="rtl"] .newsletter-form .btn {
    border-radius: 30px 0 0 30px;
}
[dir="rtl"] .footer {
    text-align: right;
}
[dir="rtl"] .ps-lg-5 {
    padding-right: 3rem !important; /* Fix for ps-lg-5 in RTL */
    padding-left: 0 !important;
}
[dir="rtl"] .text-md-start {
    text-align: right !important;
}
[dir="rtl"] .text-md-end {
    text-align: left !important;
}



/* ======================== BLOOM BOX BANNER ======================== */
.bloom-box-banner {
    border-radius: 16px;
    height: 380px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    background-color: #f7f3f0;
}
[dir="rtl"] .bloom-box-banner {
    justify-content: flex-end !important;
}
.bloom-box-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
}
.bloom-box-content {
    position: relative;
    z-index: 2;
    padding: 60px;
    max-width: 50%;
    text-align: left !important;
}
.bloom-box-content h2 {
    font-size: 2.8rem;
    color: #1a1a1a;
    line-height: 1.1;
}
.bloom-box-content .subtitle-text {
    font-size: 1.1rem;
    color: #666;
}

/* ======================== RESPONSIVE ======================== */

@media (max-width: 992px) {
    .features-bar {
        flex-wrap: wrap;
        gap: 12px;
    }
    .feature-divider { display: none; }
    .feature-item-wrap { flex: 0 0 45%; justify-content: flex-start; }

    .product-slider-arrow { display: none; }
}

@media (max-width: 768px) {
    .hero-slider-wrap { height: 200px; }
    .slide-inner { padding: 20px 24px; }
    .slide-title { font-size: 1.25rem; }
    .slide-price { font-size: 1.1rem; }
    .slide-image { display: none; }
    .slide-text { flex: 0 0 100%; }
    .hero-card { padding: 24px; flex-direction: column; }
    .hero-card h1 { font-size: 1.6rem; }
    .hero-img { display: none; }
    .hero-text { flex: 0 0 100%; }

    /* Slider arrows reduction */
    .slider-arrow { width: 26px; height: 26px; font-size: 0.65rem; }
    .slider-arrow-left { left: 4px; }
    .slider-arrow-right { right: 4px; }

    .promo-card-dark,
    .promo-card-light { height: 165px; margin-bottom: 0px; }
    .promo-card-content { padding: 23px; }
    .promo-card-content h5 { font-size: 1.4rem !important; margin-bottom: 3px !important; line-height: 1.2 !important; }
    .promo-card-content p { font-size: 0.8rem !important; margin-bottom: 8px !important; }
    .promo-card-content .btn-sm, .promo-card-content .btn-light { 
        font-size: 0.65rem !important; 
        padding: 4px 12px !important; 
        min-height: auto !important; 
        border-radius: 20px !important;
    }

    /* Deal of the week spacing adjustments */
    .deal-section-wrap { padding: 15px; margin-bottom: 1.5rem !important; border-radius: 12px; }
    .deal-section-wrap h3 { font-size: 1.15rem; }
    .deal-section-wrap .p-small { font-size: 0.7rem; }

    /* Bloom Box / Subscriptions Banner revisions */
	
    .bloom-box-banner { 
        min-height: 160px !important; 
		height: 260px !important;
        padding: 15px !important; 
        justify-content: flex-start !important; 
        text-align: left !important;
        display: flex !important;
        align-items: center !important;
    }
    .bloom-box-content { 
        padding: 0 !important; 
        max-width: 65% !important; 
        text-align: left !important;
        margin: 0 !important;
    }
	 
    .bloom-box-content h2 { font-size: 2rem !important; margin-bottom: 4px !important; line-height: 1.1 !important; text-align: left !important; }
    .bloom-box-content .subtitle-text { font-size: 0.85rem !important; margin-bottom: 10px !important; line-height: 1.3 !important; text-align: left !important; }
    .bloom-box-content .btn { font-size: 0.75rem !important; padding: 5px 18px !important; border-radius: 20px !important; margin-left: 0 !important; display: inline-block !important; }


    [style*="max-width: 20%"],
    .col-5-custom {
        flex: 0 0 25% !important;
        max-width: 25% !important;
    }


    @media (max-width: 576px) {
        .col-5-custom {
            flex: 0 0 50% !important;
            max-width: 50% !important;
        }
        /* Mobile Price Layout: Stack current price on top, old price & badge below in a row */
        .price-wrap, .price-premium {
            display: flex !important;
            flex-direction: column !important;
            align-items: center !important;
            gap: 2px !important;
        }
        .price-details-row {
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            gap: 8px !important;
            width: 100% !important;
        }
        .price-old {
            margin-right: 0 !important;
        }
    }

    /* Hide items 9 and 10 on screens <= 768px - moved to 1400px breakpoint */

    .category-pill-item {
        width: 100%;
        max-width: 145px;
        height: 180px; /* Slightly shorter on mobile */
        padding: 10px 5px;
    }
    .category-icon-circle {
        width: 80px;
        height: 80px;
    }
    .category-icon-circle i {
        font-size: 1.8rem;
    }
    .category-pill-item span {
        font-size: 0.75rem;
    }
    
    .footer-brand, .footer-heading {
        margin-top: 15px;
    }
    .footer-desc {
        margin-bottom: 25px !important;
    }
}

/* ======================== NEW UPDATES ======================== */
@media (min-width: 1401px) {
    .col-5-custom {
        flex: 0 0 20% !important;
        max-width: 20% !important;
    }
}

@media (min-width: 769px) and (max-width: 1400px) {
    .col-5-custom {
        flex: 0 0 25% !important;
        max-width: 25% !important;
    }
    .category-pill-item {
        width: 155px;
        height: 195px;
        padding: 15px 10px;
    }
    .category-icon-circle {
        width: 105px;
        height: 105px;
        margin-bottom: 10px;
    }
    .category-icon-img {
        width: 55px;
        height: 55px;
    }
    .category-pill-item span {
        font-size: 0.8rem;
    }
}

@media (max-width: 1400px) {
    /* Limit products to 8 (2 rows of 4) for 4-per-row layout */
    .tab-pane .row > div:nth-child(n+9) {
        display: none !important;
    }
}

/* Horizontal scroll for Deal of the Week */
.deal-scroll-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 16px;
    padding-bottom: 10px;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
    align-items: stretch; /* Enforce equal height */
}
.deal-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}
.deal-scroll-item {
    flex: 0 0 calc(25% - 12px);
    max-width: calc(25% - 12px);
    display: flex;
}
.deal-card {
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    width: 100%;
}
.deal-card .p-3 {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.deal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.deal-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.deal-old-price {
    font-size: 0.78rem;
    font-weight: 500;
    color: #333;
    display: block;
}
.deal-new-price {
    font-size: 0.72rem;
    color: #888;
    text-decoration: line-through;
}
.deal-discount {
    color: #27AE60;
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 992px) {
    .deal-scroll-item {
        flex: 0 0 calc(50% - 8px);
        max-width: calc(50% - 8px);
    }
}
@media (max-width: 576px) {
    .deal-scroll-item {
        flex: 0 0 calc(100% - 0px);
        max-width: 100%;
    }
}

/* Deal nav arrows */
.deal-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    color: #555;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.deal-nav-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ======================== CURRENCY SYMBOL ======================== */
[class^=sicon-], [class*=" sicon-"] {
  font-family: "sallaicons" !important;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: inline-block;
  vertical-align: middle;
}

.sicon-sar:before {
  content: "\e9bc";
}

.currency-symbol {
    font-size: 1em; /* Matching price amount size exactly */
    vertical-align: baseline;
    position: relative;
    top: 0;
}

/* ======================== BRAND COLOR REFINEMENTS ======================== */
:root {
    --floward-teal: var(--primary-color); /* Sync with primary theme */
    --brand-primary: var(--primary-color);
    --brand-secondary: var(--secondary-color);
    --floward-light-blue: #f3f9fc;
    --floward-grey-bg: #f8f8f8;
}

.product-details-wrap { padding-top: 2rem; padding-bottom: 4rem; }

/* Image Gallery Layout */
.gallery-layout { display: flex; gap: 15px; }
.vertical-thumbs { width: 110px; display: flex; flex-direction: column; gap: 10px; }
.vertical-thumb { width: 100px; height: 100px; border-radius: 8px; border: 1px solid #eee; cursor: pointer; object-fit: cover; transition: all 0.2s; }
.vertical-thumb:hover, .vertical-thumb.active { border-color: var(--brand-primary); opacity: 0.8; }

.main-image-wrap { flex: 1; border-radius: 12px; overflow: hidden; position: relative; background: #fff; border: 1px solid #eee; display: flex; align-items: flex-start; justify-content: center; transition: all 0.3s ease; }
.main-product-img { width: 100%; height: auto; object-fit: cover; display: block; }

/* Action Overlays */
.action-overlay { position: absolute; top: 15px; right: 15px; display: flex; flex-direction: column; gap: 10px; z-index: 5; }
.floating-icon { width: 40px; height: 40px; background: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,0.1); border: none; font-size: 1.1rem; color: #444; transition: all 0.2s; }
.floating-icon:hover { background: #f5f5f5; transform: scale(1.05); }
.floating-icon .fa-heart.active { color: #e44235; }
.expand-icon { position: absolute; bottom: 15px; right: 15px; cursor: pointer; }

/* Info Section Styling */
.price-tag-large { font-size: 2rem; font-weight: 700; color: #1a1a1a; margin-bottom: 0.5rem; display: flex; align-items: baseline; gap: 5px; line-height: 1; }
.price-tag-large .currency-symbol { font-size: 2rem; font-weight: 700; display: inline-block; vertical-align: baseline; }

/* Small Currency for Old Price */
.price-old { font-size: .8rem; color: #999; text-decoration: line-through; display: inline-flex; align-items: baseline; gap: 2px; }
.price-old .currency-symbol { font-size: 0.9rem; font-weight: 500; }

.discount-perc { font-size: 1rem; color: #28a745 !important; font-weight: 600; background: #e8f5e9; padding: 2px 8px; border-radius: 6px; margin-left: 10px; }

.product-title-large { font-size: 1.7rem; font-weight: 700; color: #333; margin-bottom: 1.5rem; line-height: 1.3; }

.delivery-badge-banner { background-color: var(--floward-light-blue); color: var(--brand-primary); padding: 12px 20px; border-radius: 8px; margin-bottom: 2rem; display: flex; align-items: center; gap: 10px; font-weight: 500; font-size: 0.95rem; }

.btn-floward { background-color: var(--brand-primary); color: white; border: none; flex: 1; padding: 13px; border-radius: 8px; font-size: .95rem; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; transition: background 0.3s; }
.btn-floward:hover { background-color: #3a1639; color: white; opacity: 0.95; }

.btn-buy-now { background-color: white; color: var(--brand-primary); border: 2px solid var(--brand-primary); flex: 1; padding: 13px; border-radius: 8px; font-size: .95rem; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.3s; }
.btn-buy-now:hover { background-color: var(--brand-primary); color: white; }

/* Product Badges Global */
.product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 5;
    pointer-events: none;
}
.badge-item {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 4px;
    text-transform: uppercase;
    margin-bottom: 5px;
    display: block;
    width: fit-content;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.badge-new-item { background: var(--primary-color); color: white; }
.badge-out-stock { background: #dc3545; color: white; }
.badge-sale-new { background: #e74c3c; color: white; }


/* Value Props Grid */
.value-props-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; background: #fafafa; padding: 20px; border-radius: 12px; margin-bottom: 2rem; border: 1px solid #f0f0f0; }
.value-prop-item { display: flex; align-items: center; gap: 10px; }
.value-prop-text { font-size: 0.85rem; color: #555; font-weight: 500; }

/* Payment Section Styling */
.payment-section { border-top: 1px solid #eee; padding-top: 1.5rem; margin-top: 3rem; }
.payment-title { font-size: 0.9rem; font-weight: 700; color: #333; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.5px; }
.payment-icons { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.pay-icon { height: 26px; width: auto; object-fit: contain; filter: grayscale(1); opacity: 0.6; transition: all 0.3s; cursor: pointer; }
.pay-icon:hover { filter: grayscale(0); opacity: 1; transform: scale(1.1); }

/* Fullscreen Modal Image Styling */
#fullscreenImageModal .modal-content { background: transparent; border: none; }
#fullscreenImageModal .modal-body { padding: 0; display: flex; align-items: center; justify-content: center; height: 90vh; }
.modal-fullscreen-img { max-width: 95vw; max-height: 85vh; object-fit: contain; border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,0.3); }

/* Cart Wishlist Section */
.cart-wishlist-section { border-top: 1px solid #eee; padding-top: 3rem; margin-top: 4rem; }
.wishlist-item-small { border: 1px solid #eee; border-radius: 12px; padding: 10px; transition: all 0.3s; background: white; text-align: center; height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.wishlist-item-small:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.05); transform: translateY(-3px); }
.wishlist-img-small { width: 100%; height: 170px; object-fit: cover; border-radius: 8px; margin-bottom: 10px; }
.wishlist-item-small h6 { font-size: 0.85rem; font-weight: 600; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #333; }
.wishlist-item-small .price-small { font-size: 0.8rem; margin-bottom: 10px; }

/* Responsive Adjustments */
@media (max-width: 991px) {
    .gallery-layout { flex-direction: column-reverse; }
    .vertical-thumbs { width: 100%; flex-direction: row; justify-content: center; overflow-x: auto; padding-bottom: 5px; }
    .vertical-thumb { width: 60px; height: 60px; }
    .main-image-wrap { aspect-ratio: 1/1; }
    .price-tag-large { font-size: 1.9rem; }
    .price-tag-large .currency-symbol { font-size: 1.5rem; }
    .product-title-large { font-size: 1.4rem; }
    .btn-floward, .btn-buy-now { font-size: 0.95rem; padding: 14px; }
}
@media (max-width: 576px) {
    .value-props-grid { grid-template-columns: 1fr; }
    .product-cta-container { flex-direction: column; gap: 10px; }
    .btn-floward, .btn-buy-now { width: 100%; }
}

/* Saudi Phone Input Group Styling */
.saudi-phone-input-group {
    display: flex;
}
.saudi-flag-badge {
    background-color: #fff;
    border: 1px solid #eee;
    border-right: none;
    padding: 0 12px;
    display: flex;
    align-items: center;
    border-top-left-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
    font-size: 1.2rem;
}
.saudi-code-badge {
    background-color: #f1f1f1;
    border: 1px solid #eee;
    border-right: none;
    font-size: 14px;
    font-weight: 700;
    color: #444;
    padding: 0 12px;
    display: flex;
    align-items: center;
}
.saudi-phone-input {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}
.phone-error-msg {
    color: #dc3545;
    font-size: 11px;
    margin-top: 5px;
    font-weight: 500;
    display: none;
}
.saudi-phone-input.is-invalid {
    border-color: #dc3545;
}
.saudi-phone-input.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}



/* ======================== FLOATING ACTIONS ======================== */
.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9999;
}

.whatsapp-float {
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    transition: all 0.3s ease;
    animation: whatsapp-pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: white;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.scroll-to-top {
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.scroll-to-top.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-5px);
}

@keyframes whatsapp-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

@media (max-width: 768px) {
    .floating-actions {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 26px;
    }
    .scroll-to-top {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}
