/* 
 * Vibrant Design System for MTalaat Pharmacy
 * Modern aesthetics, glassmorphism, and micro-animations
 */

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

:root {
    --primary: #1abc9c;
    --primary-dark: #16a085;
    --secondary: #0984e3;
    --accent: #ff7675;
    --price-color: #1abc9c;
    --vibrant-gradient: linear-gradient(135deg, #1abc9c 0%, #0984e3 100%);
    --soft-bg: #f8f9fa;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    background-color: var(--soft-bg);
}

/* ============================================
   GLOBAL COLOR OVERRIDES - Logo Color (#1abc9c)
   ============================================ */

/* Links - all links use logo color */
a:hover {
    color: #1abc9c !important;
}

/* Buttons - all buttons use logo color */
.btn,
.button .btn,
.btn-primary {
    background-color: #1abc9c !important;
    background: var(--vibrant-gradient) !important;
    border-color: #1abc9c !important;
}

.btn:hover,
.button .btn:hover,
.btn-primary:hover {
    background-color: #16a085 !important;
    background: linear-gradient(135deg, #16a085 0%, #0768b8 100%) !important;
    border-color: #16a085 !important;
}

/* Prices - current price uses logo color */
.price span:first-child,
.single-product .price span:first-child,
.product-price,
.current-price {
    color: #1abc9c !important;
}

/* Section title underlines */
.section-title h2::before {
    background-color: #1abc9c !important;
}

/* Navigation hover */
.nav-link:hover,
.nav-item:hover a,
.menu-section a:hover,
.main-menu .navbar .navbar-nav .nav-item a:hover {
    color: #1abc9c !important;
}

/* Active states */
.pagination .pagination-list li.active a,
.pagination .pagination-list li:hover a {
    background: #1abc9c !important;
}

/* Scroll to top button */
.scroll-top {
    background: #1abc9c !important;
}

/* Product card hover */
.single-product .product-info .title a:hover {
    color: #1abc9c !important;
}

/* Category links */
.single-product .product-info .category a:hover {
    color: #1abc9c !important;
}

/* Header Enhancements */
.header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    width: 100%;
}

.header.sticky {
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.98);
}

.navbar-brand img {
    transition: var(--transition);
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

/* Hero Slider Redesign */
.hero-area {
    padding-top: 20px;
}

.single-slider {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
}

.single-slider .sliderimg {
    border-radius: 20px;
}

.single-slider .info {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 2.5rem !important;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
}

.single-slider .info h1 a {
    color: var(--primary);
    font-weight: 800;
    font-size: 2.2rem;
}

.single-slider .btn {
    background: var(--vibrant-gradient);
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 700;
    color: white;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0, 184, 148, 0.3);
}

.single-slider .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 184, 148, 0.5);
    color: white;
}

/* Product Card Redesign */
.single-product {
    background: white;
    border-radius: 16px;
    padding: 10px;
    transition: var(--transition);
    border: 1px solid #eee;
    box-shadow: var(--shadow-sm);
    height: auto;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.single-product::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--vibrant-gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.single-product:hover::before {
    transform: scaleX(1);
}

.single-product:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 184, 148, 0.2);
    border-color: transparent;
}

.single-product .product-image {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    max-height: 180px;
}

.single-product .product-image img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    height: 180px;
    object-fit: contain;
}

.single-product:hover .product-image img {
    transform: scale(1.15) rotate(2deg);
}

.single-product .product-info {
    padding: 8px 5px 3px;
}

.single-product .product-info .title {
    margin-bottom: 4px;
}

.single-product .product-info .title a {
    color: #2d3436;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--transition);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.single-product .product-info .title a:hover {
    color: var(--primary);
}

.single-product .product-info .category a {
    color: #6c757d;
    font-size: 0.85rem;
    transition: var(--transition);
}

.single-product .product-info .category a:hover {
    color: var(--secondary);
}

.single-product .price {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    flex-direction: row;
    justify-content: center;
}

.single-product .price span:first-child {
    color: #1abc9c;
    font-weight: 800;
    font-size: 1.25rem;
}

.single-product .price .discount-price {
    color: #e74c3c !important;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: line-through;
}

/* Sale Tag - Small on Left (Higher specificity to override rtl.css) */
.single-product .product-image .sale-tag,
.single-product .sale-tag {
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    right: auto !important;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%) !important;
    color: white !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    z-index: 10 !important;
    box-shadow: 0 4px 15px rgba(238, 90, 36, 0.4) !important;
    animation: pulse-badge 2s infinite !important;
    float: none !important;
    width: auto !important;
}

@keyframes pulse-badge {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(238, 90, 36, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(238, 90, 36, 0.6);
    }
}

/* Product Card Entry Animation */
.single-product.animated {
    opacity: 0;
    animation: cardFadeIn 0.6s ease forwards;
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

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

/* Staggered animation for product grid */
.col-lg-3:nth-child(1) .single-product {
    animation-delay: 0.1s;
}

.col-lg-3:nth-child(2) .single-product {
    animation-delay: 0.2s;
}

.col-lg-3:nth-child(3) .single-product {
    animation-delay: 0.3s;
}

.col-lg-3:nth-child(4) .single-product {
    animation-delay: 0.4s;
}

.col-lg-3:nth-child(5) .single-product {
    animation-delay: 0.5s;
}

.col-lg-3:nth-child(6) .single-product {
    animation-delay: 0.6s;
}

.col-lg-3:nth-child(7) .single-product {
    animation-delay: 0.7s;
}

.col-lg-3:nth-child(8) .single-product {
    animation-delay: 0.8s;
}

/* Category Slider */
.brand-logo {
    text-align: center;
    transition: var(--transition);
}

.brand-logo:hover {
    transform: translateY(-5px);
}

.brand-logo img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
    margin-bottom: 10px;
}

.brand-logo p {
    font-weight: 700;
    color: #2d3436;
}

/* Shipping Info */
.shipping-info {
    background: var(--vibrant-gradient);
    padding: 50px 0;
    color: white;
    border-radius: 25px;
    margin: 40px auto;
}

.shipping-info ul li {
    display: flex;
    align-items: center;
    justify-content: center;
}

.shipping-info .media-icon {
    font-size: 2.5rem;
    margin-right: 15px;
    background: rgba(255, 255, 255, 0.2);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
}

.shipping-info .media-body h5 {
    font-weight: 800;
    margin-bottom: 0;
}

/* Section Titles - Modern Premium Design */
.section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.section-title h2 {
    font-weight: 800;
    font-size: 2rem;
    position: relative;
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, #2d3436 0%, #00b894 50%, #0984e3 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientText 4s ease infinite;
}

@keyframes gradientText {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.section-title h2::before,
.section-title h2::after {
    display: none;
}

.section-title h2::before {
    display: none;
}

.section-title h2::after {
    display: none;
}

@keyframes lineSlideRight {

    0%,
    100% {
        width: 50px;
        opacity: 1;
    }

    50% {
        width: 80px;
        opacity: 0.7;
    }
}

@keyframes lineSlideLeft {

    0%,
    100% {
        width: 50px;
        opacity: 1;
    }

    50% {
        width: 80px;
        opacity: 0.7;
    }
}

/* Decorative dots around title */
.section-title::before,
.section-title::after {
    content: '✦';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--primary);
    animation: sparkle 1.5s ease-in-out infinite;
}

.section-title::before {
    right: calc(50% + 130px);
}

.section-title::after {
    left: calc(50% + 130px);
    animation-delay: 0.75s;
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 0.3;
        transform: translateY(-50%) scale(0.8);
    }

    50% {
        opacity: 1;
        transform: translateY(-50%) scale(1.2);
    }
}

/* Bottom decoration line */
.section-title .section-line {
    display: block;
    width: 100px;
    height: 4px;
    background: var(--vibrant-gradient);
    margin: 15px auto 0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.section-title .section-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        left: 100%;
    }
}

/* Mobile responsive for section titles */
@media (max-width: 768px) {
    .section-title h2 {
        font-size: 1.4rem;
        padding: 10px 20px;
    }

    .section-title h2::before,
    .section-title h2::after {
        width: 30px;
    }

    .section-title::before,
    .section-title::after {
        display: none;
    }

    @keyframes lineSlideRight {

        0%,
        100% {
            width: 30px;
        }

        50% {
            width: 50px;
        }
    }

    @keyframes lineSlideLeft {

        0%,
        100% {
            width: 30px;
        }

        50% {
            width: 50px;
        }
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.animated {
    animation: fadeInUp 0.6s ease forwards;
}

/* ============================================
   MOBILE HOMEPAGE REDESIGN - MODERN & ANIMATED
   ============================================ */

/* Mobile Base Styles */
@media (max-width: 768px) {

    /* Animated Gradient Background for Mobile */
    body {
        background: linear-gradient(135deg, #f8f9fa 0%, #e8f4f0 50%, #f0f8ff 100%);
        background-size: 400% 400%;
        animation: gradientShift 15s ease infinite;
    }

    @keyframes gradientShift {

        0%,
        100% {
            background-position: 0% 50%;
        }

        50% {
            background-position: 100% 50%;
        }
    }

    /* Mobile Hero Slider Enhancement */
    .hero-area {
        padding: 10px 0 20px;
        position: relative;
        overflow: hidden;
    }

    .hero-area::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(0, 184, 148, 0.08) 0%, transparent 70%);
        animation: floatingGlow 6s ease-in-out infinite;
        pointer-events: none;
    }

    @keyframes floatingGlow {

        0%,
        100% {
            transform: translate(0, 0) scale(1);
        }

        50% {
            transform: translate(-5%, 5%) scale(1.1);
        }
    }

    .single-slider {
        border-radius: 16px;
        margin: 0 5px;
        transform: scale(0.98);
        transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .single-slider.tns-slide-active {
        transform: scale(1);
    }

    .single-slider .sliderimg {
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(0, 184, 148, 0.2);
    }

    /* Mobile Slider Section - Keep as SLIDER not grid */
    .mobileslider {
        padding: 0;
        margin: 0 -15px;
        display: block !important;
        overflow: hidden;
    }

    .mobileslider .brands-logo-wrapper {
        padding: 0;
        margin: 0;
        overflow: hidden;
    }

    .mobileslider .mobile_slider {
        display: flex !important;
        flex-wrap: nowrap !important;
        /* Removed transform override to allow tiny-slider animation */
    }

    .mobileslider .mobile_slider.tns-slider {
        display: flex !important;
    }

    .mobileslider .brand-logo {
        display: block !important;
        float: none !important;
        width: auto !important;
        flex-shrink: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .mobileslider .sliderimg {
        width: 90vw !important;
        max-width: 100vw !important;
        height: auto !important;
        border-radius: 0 !important;
    }

    /* Protect menu from animations */
    .menu-section,
    .menu-section * {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .mobileslider .brand-logo:nth-child(1) {
        animation-delay: 0.1s;
    }

    .mobileslider .brand-logo:nth-child(2) {
        animation-delay: 0.2s;
    }

    .mobileslider .brand-logo:nth-child(3) {
        animation-delay: 0.3s;
    }

    @keyframes slideInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }

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

    /* Section Title Animation */
    .section-title {
        position: relative;
    }

    .section-title h2 {
        font-size: 1.4rem;
        animation: titleReveal 0.8s ease forwards;
        position: relative;
    }

    @keyframes titleReveal {
        from {
            opacity: 0;
            transform: translateX(30px);
        }

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

    .section-title h2::after {
        animation: lineGrow 0.6s 0.3s ease forwards;
        transform: scaleX(0);
        transform-origin: right;
    }

    @keyframes lineGrow {
        to {
            transform: scaleX(1);
        }
    }

    /* Mobile Product Cards - 2 Column Grid Layout */
    .trending-product {
        padding: 20px 0 !important;
        overflow: hidden !important;
    }

    .trending-product .container {
        padding: 0 15px !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .trending-product .row {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 0 !important;
        margin: 0 !important;
        overflow: hidden !important;
        width: 100% !important;
    }

    .trending-product .row>[class*="col-"] {
        flex: none !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .single-product {
        opacity: 1;
        transform: none;
        animation: none;
        border-radius: 16px;
        background: white;
        border: 1px solid rgba(0, 184, 148, 0.15);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        margin-bottom: 0;
        position: relative;
        overflow: hidden;
        padding: 10px;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        transition: all 0.25s ease;
    }

    .single-product:active {
        transform: scale(0.98);
        box-shadow: 0 3px 12px rgba(0, 184, 148, 0.25);
        border-color: rgba(0, 184, 148, 0.4);
    }

    .single-product .product-image {
        border-radius: 12px;
        overflow: hidden;
        position: relative;
        background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
        aspect-ratio: 1;
        max-height: none;
        min-height: 120px;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .single-product .product-image a {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 100% !important;
    }

    .single-product .product-image img {
        width: auto !important;
        height: auto !important;
        max-width: 85% !important;
        max-height: 85% !important;
        object-fit: contain;
        transition: transform 0.35s ease;
        display: block !important;
        margin: 0 auto !important;
    }

    .single-product .product-info {
        padding: 10px 8px 6px;
        flex: 1;
        display: flex;
        flex-direction: column;
        text-align: center;
        width: 100% !important;
        overflow: visible !important;
    }

    .single-product .product-info .title {
        margin-bottom: 6px;
        text-align: center;
        width: 100% !important;
        overflow: visible !important;
    }

    .single-product .product-info .title a {
        font-size: 0.78rem;
        font-weight: 600;
        line-height: 1.4;
        color: #2d3436;
        word-break: break-word !important;
        display: block !important;
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: unset !important;
        -webkit-line-clamp: unset !important;
    }

    .single-product .product-info .category {
        font-size: 0.72rem;
        margin-bottom: 6px;
        color: #888;
        text-align: center;
    }

    .single-product .price {
        margin-top: auto;
        display: flex;
        flex-wrap: nowrap;
        flex-direction: row;
        gap: 8px;
        align-items: center;
        justify-content: center;
    }

    .single-product .price span:first-child {
        font-size: 1rem;
        font-weight: 800;
        color: #1abc9c;
    }

    .single-product .price .discount-price {
        font-size: 0.8rem;
        color: #e74c3c !important;
        text-decoration: line-through;
    }

    /* Sale Tag Mobile - Small & Compact */
    .single-product .sale-tag {
        position: absolute !important;
        top: 8px !important;
        left: 8px !important;
        right: auto !important;
        padding: 3px 7px !important;
        font-size: 0.58rem !important;
        font-weight: 700 !important;
        border-radius: 5px !important;
        background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%) !important;
        color: white !important;
        box-shadow: 0 2px 6px rgba(238, 90, 36, 0.35) !important;
        z-index: 5 !important;
        animation: none !important;
    }

    /* Staggered animation for grid items */
    .trending-product .row>[class*="col-"]:nth-child(1) .single-product,
    .trending-product .row>[class*="col-"]:nth-child(2) .single-product {
        animation: fadeInUp 0.4s ease forwards;
    }

    .trending-product .row>[class*="col-"]:nth-child(3) .single-product,
    .trending-product .row>[class*="col-"]:nth-child(4) .single-product {
        animation: fadeInUp 0.4s 0.1s ease forwards;
    }

    .trending-product .row>[class*="col-"]:nth-child(5) .single-product,
    .trending-product .row>[class*="col-"]:nth-child(6) .single-product {
        animation: fadeInUp 0.4s 0.2s ease forwards;
    }

    .trending-product .row>[class*="col-"]:nth-child(7) .single-product,
    .trending-product .row>[class*="col-"]:nth-child(8) .single-product {
        animation: fadeInUp 0.4s 0.3s ease forwards;
    }

    /* Categories Section Mobile - Compact Grid Layout */
    .brands {
        padding: 15px 8px;
        position: relative;
        background: linear-gradient(135deg, rgba(0, 184, 148, 0.04) 0%, rgba(9, 132, 227, 0.04) 100%);
        border-radius: 16px;
        margin: 10px 8px;
    }

    .brands .container {
        padding: 0;
    }

    .brands-logo-wrapper {
        overflow: visible;
    }

    /* Override tiny-slider on mobile for grid layout */
    .brands .tns-outer,
    .brands .tns-ovh,
    .brands .tns-inner {
        overflow: visible !important;
        width: 100% !important;
    }

    /* Disable Tiny Slider completely on mobile */
    .brands .tns-outer {
        display: none !important;
    }

    .brands .tns-slider,
    .brands-logo-carousel {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        transform: none !important;
        white-space: normal !important;
        width: 100% !important;
        transition: none !important;
    }

    /* Hide Tiny Slider cloned items to prevent duplicates */
    .brands .tns-item.tns-slide-cloned,
    .brands-logo-carousel .tns-item.tns-slide-cloned {
        display: none !important;
    }

    .brands .tns-item,
    .brand-logo {
        display: block !important;
        float: none !important;
        width: 100% !important;
        text-align: center;
        transition: all 0.25s ease;
        padding: 12px 6px;
        background: white;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(0, 184, 148, 0.08);
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .brand-logo:active {
        transform: scale(0.95);
        box-shadow: 0 2px 6px rgba(0, 184, 148, 0.15);
        border-color: rgba(0, 184, 148, 0.2);
    }

    .brand-logo a {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
    }

    .brand-logo img {
        width: 48px !important;
        height: 48px !important;
        border-radius: 50%;
        box-shadow: 0 3px 10px rgba(0, 184, 148, 0.15);
        border: 2px solid #00b894;
        transition: all 0.25s ease;
        animation: none !important;
        object-fit: cover;
    }

    .brand-logo:active img {
        transform: scale(1.08);
        border-color: #0984e3;
    }

    .brand-logo p {
        font-size: 0.65rem;
        font-weight: 600;
        margin-top: 6px;
        color: #2d3436;
        line-height: 1.2;
        text-align: center;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Mobile Categories Grid */
    .categories-mobile-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        padding: 0 5px;
    }

    .categories-mobile-grid .category-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        padding: 12px 6px;
        background: white;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(0, 184, 148, 0.08);
        transition: all 0.25s ease;
    }

    .categories-mobile-grid .category-card:active {
        transform: scale(0.95);
        box-shadow: 0 2px 6px rgba(0, 184, 148, 0.15);
        border-color: rgba(0, 184, 148, 0.2);
    }

    .categories-mobile-grid .category-image {
        width: 48px;
        height: 48px;
        margin-bottom: 8px;
    }

    .categories-mobile-grid .category-image img {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        box-shadow: 0 3px 10px rgba(0, 184, 148, 0.15);
        border: 2px solid #00b894;
        object-fit: cover;
    }

    .categories-mobile-grid .category-name {
        font-size: 11px;
        font-weight: 600;
        color: #2d3436;
        text-align: center;
        margin: 0;
        line-height: 1.3;
    }

    /* Shipping Info Mobile - Compact Design */
    .shipping-info {
        display: block !important;
        padding: 20px 12px;
        margin: 15px 8px;
        border-radius: 16px;
        background: linear-gradient(135deg, #00b894 0%, #0984e3 50%, #00b894 100%);
        background-size: 200% 200%;
        animation: shippingGradient 5s ease infinite;
        position: relative;
        overflow: hidden;
    }

    @keyframes shippingGradient {

        0%,
        100% {
            background-position: 0% 50%;
        }

        50% {
            background-position: 100% 50%;
        }
    }

    .shipping-info::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
        opacity: 0.3;
    }

    .shipping-info ul {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 0;
        margin: 0;
        list-style: none;
    }

    .shipping-info ul li {
        flex-direction: column;
        text-align: center;
        padding: 12px 8px;
        background: rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(10px);
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        opacity: 1;
        transform: none;
        animation: none;
    }

    .shipping-info .media-icon {
        font-size: 1.5rem;
        margin: 0 0 8px 0;
        width: 42px;
        height: 42px;
        border-radius: 10px;
        animation: none;
    }

    .shipping-info .media-body h5 {
        font-size: 0.78rem;
        margin-bottom: 2px;
    }

    .shipping-info .media-body span {
        font-size: 0.65rem;
        opacity: 0.9;
    }
}

/* Floating Action Buttons */
.mobile-fab-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-fab {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: fabEntrance 0.6s ease forwards, fabBounce 2s ease-in-out infinite 1s;
    opacity: 0;
    transform: scale(0);
}

.mobile-fab:nth-child(1) {
    animation-delay: 0.2s, 1.2s;
}

.mobile-fab:nth-child(2) {
    animation-delay: 0.4s, 1.4s;
}

@keyframes fabEntrance {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fabBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.mobile-fab.whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.mobile-fab.call {
    background: linear-gradient(135deg, #0984e3, #0652DD);
}

.mobile-fab:active {
    transform: scale(0.9);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

/* Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}

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

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Scroll Animation Classes (Controlled by JS) */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Pull Indicator Animation */
.pull-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--vibrant-gradient);
    transform: scaleX(0);
    transform-origin: left;
    z-index: 9999;
    transition: transform 0.3s ease;
}

/* Skeleton Loading Animation */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s infinite;
    border-radius: 8px;
}

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

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

/* Extra Small Devices */
@media (max-width: 480px) {
    .trending-product .row>[class*="col-"] {
        flex: 0 0 85%;
        max-width: 85%;
    }

    .shipping-info ul {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .mobile-fab-container {
        bottom: 15px;
        left: 15px;
    }

    .mobile-fab {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
}

/* Smooth Scrolling */
@media (max-width: 768px) {
    html {
        scroll-behavior: smooth;
    }

    * {
        -webkit-tap-highlight-color: transparent;
    }
}

/* =============================================
   DESKTOP HEADER RTL LAYOUT
   ============================================= */

@media (min-width: 993px) {

    /* Hide mobile-only icons on desktop */
    .mobile-header-icons {
        display: none !important;
    }

    /* Header wrapper - RTL direction for proper right-to-left ordering */
    .header .wrapper {
        display: flex !important;
        direction: rtl !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 20px;
    }

    /* Logo - First on right */
    .header-item-left {
        direction: ltr;
        flex: 0 0 auto;
    }

    /* Menu Navigation - Second */
    .header-item-center {
        direction: ltr;
        flex: 0 0 auto;
        display: flex;
        justify-content: flex-start;
    }

    /* Social Icons - Third */
    .header .nav-social {
        direction: ltr;
        flex: 0 0 auto;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .header .nav-social ul {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    /* Cart - Fourth (left side) */
    .header .navbar-cart {
        direction: ltr;
        flex: 0 0 auto;
        margin-right: auto;
    }

    /* Menu items RTL */
    .header .menu>ul {
        direction: rtl;
        display: flex;
        justify-content: flex-start;
    }

    .header .menu>ul>li {
        margin-left: 0;
        margin-right: 1.5rem;
    }

    /* Submenu positioning for RTL */
    .header .menu>ul>li .menu-subs.menu-column-1 {
        right: 0;
        left: auto;
    }
}

/* =============================================
   MOBILE BURGER MENU FIX - Complete Override
   ============================================= */

@media only screen and (max-width: 992px) {

    /* Header Layout Fix - RTL Order: Logo (right) - Search - Cart - Menu (left) */
    .header .wrapper {
        padding: 10px 15px;
        position: relative;
        display: flex !important;
        flex-wrap: nowrap !important;
        flex-direction: row-reverse !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    /* Logo - Right Side (first in RTL) */
    .header-item-left {
        flex: 0 0 auto;
        z-index: 1100;
    }

    .header-item-left img {
        max-height: 105px;
        width: auto;
    }

    /* Mobile Icons Container - row-reverse for RTL: Menu far left, Search after logo */
    .mobile-header-icons {
        display: flex !important;
        align-items: center !important;
        flex-direction: row-reverse !important;
        gap: 0 !important;
        flex: 1 1 auto;
        justify-content: space-between !important;
        z-index: 1100;
        margin: 0 10px;
    }

    /* All icons base styling */
    .mobile-header-icons>* {
        flex-shrink: 0 !important;
    }

    /* All icon buttons - transparent background like reference */
    .mobile-header-icons .mobile-icon-btn {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        border-radius: 50%;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
        background: transparent !important;
        box-shadow: none;
        padding: 0 !important;
        text-decoration: none !important;
    }

    .mobile-header-icons .mobile-icon-btn i {
        font-size: 1.3rem;
        color: #555;
        transition: all 0.3s ease;
    }

    .mobile-header-icons .mobile-icon-btn:hover i,
    .mobile-header-icons .mobile-icon-btn:active i {
        color: #00b894;
    }

    /* Social Links specific styling */
    .mobile-header-icons .mobile-social-link i {
        font-size: 1.2rem;
        color: #666;
    }

    /* Cart Icon Container - Matching desktop style */
    .mobile-header-icons .mobile-cart-icon {
        position: relative;
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        flex-shrink: 0 !important;
    }

    .mobile-header-icons .mobile-cart-icon .cart-items {
        width: 40px !important;
        height: 40px !important;
        border-radius: 50%;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: transparent;
        transition: all 0.3s ease;
        padding: 0 !important;
        text-decoration: none !important;
        margin-top: 0 !important;
    }

    .mobile-header-icons .mobile-cart-icon .cart-items .main-btn {
        height: 35px !important;
        width: 35px !important;
        line-height: 35px !important;
        display: inline-block !important;
        border-radius: 50% !important;
        border: 1px solid #eee !important;
        color: #555 !important;
        font-size: 18px !important;
        text-align: center !important;
        position: relative !important;
        background: #fff !important;
        transition: all 0.3s ease !important;
    }

    .mobile-header-icons .mobile-cart-icon .cart-items .main-btn:hover {
        color: #fff !important;
        background-color: #0167F3 !important;
        border-color: transparent !important;
    }

    .mobile-header-icons .mobile-cart-icon .cart-items .main-btn i {
        font-size: 18px !important;
        color: inherit !important;
    }

    /* Hide cart text on mobile */
    .mobile-header-icons .mobile-cart-icon .cart-items span:not(.total-items) {
        display: none !important;
    }

    .mobile-header-icons .mobile-cart-icon .cart-items .total-items {
        position: absolute !important;
        left: -6px !important;
        top: -5px !important;
        height: 19px !important;
        width: 19px !important;
        line-height: 19px !important;
        background-color: #081828 !important;
        color: #fff !important;
        font-size: 12px !important;
        font-weight: 500 !important;
        text-align: center !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 !important;
    }

    /* Enable cart dropdown on mobile - positioned from left to stay in viewport */
    .mobile-header-icons .mobile-cart-icon .shopping-item {
        display: block !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none;
        position: absolute !important;
        top: 50px !important;
        left: 0 !important;
        right: auto !important;
        width: 280px !important;
        max-width: calc(100vw - 20px) !important;
        background: #fff !important;
        padding: 15px !important;
        border-radius: 12px !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
        z-index: 9999 !important;
        transition: all 0.3s ease !important;
    }

    /* Show dropdown on hover (desktop) or click toggle (mobile) */
    .mobile-header-icons .mobile-cart-icon:hover .shopping-item,
    .mobile-header-icons .mobile-cart-icon .cart-items:hover .shopping-item,
    .mobile-header-icons .mobile-cart-icon .cart-items.dropdown-open .shopping-item {
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    .mobile-header-icons .mobile-cart-icon .shopping-item .dropdown-cart-header,
    .mobile-header-icons .mobile-cart-icon .shopping-item .shopping-list,
    .mobile-header-icons .mobile-cart-icon .shopping-item .bottom {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: static !important;
        left: auto !important;
        pointer-events: auto !important;
    }

    /* Hide navbar-cart and nav-social on mobile */
    .header .navbar-cart,
    .header .nav-social {
        display: none !important;
    }

    .header-item-center {
        position: static;
        flex: 1;
        order: 3;
    }

    /* Hide header-item-right on mobile */
    .header-item-right {
        display: none !important;
    }

    /* Hide social icons on mobile to prevent overlap */
    .header .nav-social {
        display: none !important;
    }

    /* Mobile Menu Panel - Full Styling */
    .header .menu {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        width: 280px !important;
        height: 100vh !important;
        background: #ffffff !important;
        z-index: 9999 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        transform: translateX(100%) !important;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15) !important;
        padding-top: 0 !important;
    }

    .header .menu.active {
        transform: translateX(0%) !important;
    }

    /* Menu Header Styling */
    .header .menu .menu-mobile-header {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 15px 20px !important;
        background: linear-gradient(135deg, #00b894 0%, #0984e3 100%) !important;
        color: white !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
    }

    .header .menu .menu-mobile-header .menu-mobile-title {
        color: white !important;
        font-size: 1.1rem !important;
        font-weight: 700 !important;
    }

    .header .menu .menu-mobile-header .menu-mobile-close {
        color: white !important;
        font-size: 1.8rem !important;
        background: rgba(255, 255, 255, 0.2) !important;
        border-radius: 50% !important;
        width: 40px !important;
        height: 40px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: all 0.3s ease !important;
    }

    .header .menu .menu-mobile-header .menu-mobile-close:hover,
    .header .menu .menu-mobile-header .menu-mobile-close:active {
        background: rgba(255, 255, 255, 0.3) !important;
        transform: rotate(90deg) !important;
    }

    /* Menu Section */
    .header .menu .menu-section {
        padding: 0 !important;
        height: calc(100vh - 70px) !important;
        overflow-y: auto !important;
        background: #ffffff !important;
    }

    /* Menu Items */
    .header .menu>ul>li {
        display: block !important;
        margin: 0 !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }

    .header .menu>ul>li>a {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 18px 20px !important;
        color: #2d3436 !important;
        font-size: 1.05rem !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        transition: all 0.3s ease !important;
        border-bottom: none !important;
        position: relative !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        line-height: 1.4 !important;
        height: auto !important;
    }

    .header .menu>ul>li>a::before {
        content: '' !important;
        position: absolute !important;
        right: 0 !important;
        top: 0 !important;
        height: 100% !important;
        width: 4px !important;
        background: linear-gradient(to bottom, #00b894, #0984e3) !important;
        transform: scaleY(0) !important;
        transition: transform 0.3s ease !important;
        border-radius: 0 2px 2px 0 !important;
    }

    .header .menu>ul>li>a:hover,
    .header .menu>ul>li>a:active {
        background: linear-gradient(90deg, rgba(0, 184, 148, 0.08), transparent) !important;
        color: #00b894 !important;
        padding-right: 25px !important;
    }

    .header .menu>ul>li>a:hover::before,
    .header .menu>ul>li>a:active::before {
        transform: scaleY(1) !important;
    }

    .header .menu>ul>li>a i {
        margin-left: 10px !important;
        opacity: 0.5 !important;
        font-size: 0.85rem !important;
        position: relative !important;
        top: 0 !important;
        transform: rotate(0deg) !important;
        transition: all 0.3s ease !important;
    }

    .header .menu>ul>li.menu-item-has-children>a i {
        transform: rotate(-90deg) !important;
    }

    .header .menu>ul>li.menu-item-has-children.active>a i {
        transform: rotate(0deg) !important;
        color: #00b894 !important;
    }

    /* Submenu Styling */
    .header .menu>ul>li .menu-subs {
        position: relative !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: none !important;
        background: linear-gradient(135deg, #f8f9fa, #ffffff) !important;
        margin: 0 !important;
        padding: 10px 0 !important;
        border: none !important;
        box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05) !important;
        border-radius: 0 !important;
        border-top: none !important;
        max-width: 100% !important;
        width: 100% !important;
        min-width: auto !important;
        left: 0 !important;
        top: auto !important;
        height: auto !important;
        padding-top: 10px !important;
        overflow: visible !important;
    }

    .header .menu>ul>li .menu-subs.active {
        display: block !important;
    }

    .header .menu>ul>li .menu-subs>ul {
        padding: 0 !important;
        margin: 0 !important;
    }

    .header .menu>ul>li .menu-subs>ul>li {
        display: block !important;
        margin: 0 !important;
    }

    .header .menu>ul>li .menu-subs>ul>li>a {
        display: flex !important;
        align-items: center !important;
        padding: 14px 30px !important;
        font-size: 0.95rem !important;
        font-weight: 500 !important;
        color: #636e72 !important;
        text-decoration: none !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        transition: all 0.3s ease !important;
        position: relative !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.03) !important;
    }

    .header .menu>ul>li .menu-subs>ul>li>a::before {
        content: '◀' !important;
        font-size: 0.6rem !important;
        margin-left: 10px !important;
        color: #00b894 !important;
        opacity: 0 !important;
        transform: translateX(-10px) !important;
        transition: all 0.3s ease !important;
    }

    .header .menu>ul>li .menu-subs>ul>li>a:hover,
    .header .menu>ul>li .menu-subs>ul>li>a:active {
        color: #00b894 !important;
        background: rgba(0, 184, 148, 0.08) !important;
        padding-right: 35px !important;
    }

    .header .menu>ul>li .menu-subs>ul>li>a:hover::before {
        opacity: 1 !important;
        transform: translateX(0) !important;
    }

    .header .menu>ul>li .menu-subs>ul>li>a i {
        margin-left: 8px !important;
        font-size: 1rem !important;
        color: #00b894 !important;
    }

    /* Overlay */
    .overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background: rgba(0, 0, 0, 0.5) !important;
        z-index: 9998 !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: all 0.35s ease !important;
    }

    .overlay.active {
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Mobile Trigger Button - Simple 3-line hamburger like reference */
    .header .menu-mobile-trigger {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        width: 40px !important;
        height: 40px !important;
        padding: 8px !important;
        cursor: pointer !important;
        z-index: 9999 !important;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        transition: all 0.3s ease !important;
        margin-left: 0 !important;
        position: relative !important;
    }

    .header .menu-mobile-trigger:active {
        transform: scale(0.95) !important;
    }

    .header .menu-mobile-trigger span {
        display: block !important;
        width: 24px !important;
        height: 2px !important;
        background: #333 !important;
        border-radius: 2px !important;
        transition: all 0.3s ease !important;
        position: relative !important;
        left: 0 !important;
    }

    .header .menu-mobile-trigger span+span {
        margin-top: 5px !important;
    }

    /* Trigger Animation when Menu is Open */
    .header .menu-mobile-trigger.active {
        background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%) !important;
    }

    .header .menu-mobile-trigger.active span:nth-child(1) {
        transform: rotate(45deg) translateY(7px) translateX(2px) !important;
    }

    .header .menu-mobile-trigger.active span:nth-child(2),
    .header .menu-mobile-trigger.active span:nth-child(3) {
        opacity: 0 !important;
    }

    .header .menu-mobile-trigger.active span:nth-child(4) {
        transform: rotate(-45deg) translateY(-7px) translateX(2px) !important;
    }

    /* Protect menu from vibrant-design animations */
    .header .menu,
    .header .menu *,
    .menu-section,
    .menu-section * {
        animation: none !important;
    }
}

/* Extra small screens */
@media only screen and (max-width: 480px) {
    .header .menu {
        width: 100% !important;
    }

    .header-item-left img {
        max-width: 120px !important;
    }
}