/* Custom Styles for Jujucamer - Ultra Modern & Professional */

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #ffb929, #e0a020);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #e0a020, #ffb929);
}

/* Hide Scrollbar for Horizontal Scroll */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Header Styles */
header {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 50;
}

/* Navigation */
nav {
    position: relative;
    z-index: 50;
}

/* Account Menu - Always on top */
#account-menu-trigger {
    position: relative;
    z-index: 10005;
}

#account-menu {
    z-index: 10005 !important;
    position: absolute !important;
}

/* Mega Menu - New Implementation */
#mega-menu-overlay {
    z-index: 10000 !important;
}

#mega-menu-container,
#offers-mega-menu-container {
    z-index: 10001 !important;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    /* No transition - instant display */
    transition: none !important;
}

.mega-menu-category {
    transition: transform 0.3s ease;
}

.mega-menu-category:hover {
    transform: translateY(-5px);
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Banner Swiper */
.bannerSwiper {
    height: 400px;
    position: relative;
    z-index: 1 !important;
}

@media (min-width: 640px) {
    .bannerSwiper {
        height: 450px;
    }
}

@media (min-width: 768px) {
    .bannerSwiper {
        height: 550px;
    }
}

@media (min-width: 1024px) {
    .bannerSwiper {
        height: 600px;
    }
}

.bannerSwiper .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.bannerSwiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bannerSwiper .swiper-button-next,
.bannerSwiper .swiper-button-prev {
    color: white !important;
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px);
    width: 56px !important;
    height: 56px !important;
    border-radius: 50% !important;
    transition: all 0.3s;
    margin-top: 0 !important;
}

.bannerSwiper .swiper-button-next:after,
.bannerSwiper .swiper-button-prev:after {
    font-size: 20px !important;
}

.bannerSwiper .swiper-button-next:hover,
.bannerSwiper .swiper-button-prev:hover {
    background: rgba(255, 185, 41, 0.9) !important;
    transform: scale(1.1);
}

.bannerSwiper .swiper-pagination-bullet {
    background: white;
    opacity: 0.5;
    width: 12px;
    height: 12px;
    transition: all 0.3s;
}

.bannerSwiper .swiper-pagination-bullet-active {
    background: #ffb929;
    opacity: 1;
    width: 30px;
    border-radius: 6px;
}

/* Product Cards */
.product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.product-card:hover {
    border-color: #ffb929;
    box-shadow: 0 20px 40px rgba(255, 185, 41, 0.15);
}

.product-card img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Category Cards */
.category-card {
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-8px);
}

.category-card img {
    transition: transform 0.5s ease;
}

/* Cart and Wishlist Sidebars - Highest Priority */
#cart-sidebar,
#wishlist-sidebar {
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    z-index: 10010 !important;
    position: fixed !important;
}

#overlay {
    z-index: 10009 !important;
    position: fixed !important;
}

@media (max-width: 768px) {
    #cart-sidebar,
    #wishlist-sidebar {
        width: 100% !important;
    }
}

/* Button Hover Effects */
button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

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

button:hover::before {
    width: 300px;
    height: 300px;
}

button:hover {
    transform: translateY(-2px);
}

/* Footer Styles */
footer {
    background: linear-gradient(135deg, #111b1e 0%, #000000 100%);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #ffb929, transparent);
}

/* Responsive Design */
@media (max-width: 640px) {
    .bannerSwiper h2 {
        font-size: 1.75rem !important;
    }
    
    .bannerSwiper p {
        font-size: 0.875rem !important;
    }
    
    .bannerSwiper button {
        font-size: 0.875rem !important;
        padding: 0.75rem 1.5rem !important;
    }
    
    nav ul li .mega-menu {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: 0 !important;
        border-radius: 0 !important;
        z-index: 100 !important;
    }
    
    .mega-menu .container {
        grid-template-columns: 1fr !important;
        padding: 1rem !important;
    }
    
    .mega-menu-category img {
        height: 120px !important;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    nav ul li .mega-menu {
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: 90vw !important;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Material Icons Customization */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    user-select: none;
}

/* Countdown Timer Styles */
#countdown-blackfriday,
#countdown-christmas,
#countdown-newyear {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

#countdown-blackfriday > div,
#countdown-christmas > div,
#countdown-newyear > div {
    min-width: 60px;
    text-align: center;
    transition: transform 0.3s ease;
}

#countdown-blackfriday > div:hover,
#countdown-christmas > div:hover,
#countdown-newyear > div:hover {
    transform: scale(1.05);
}

@media (max-width: 640px) {
    #countdown-blackfriday,
    #countdown-christmas,
    #countdown-newyear {
        gap: 6px;
    }
    
    #countdown-blackfriday > div,
    #countdown-christmas > div,
    #countdown-newyear > div {
        min-width: 55px;
        padding: 10px 12px !important;
    }
    
    #countdown-blackfriday > div > div:first-child,
    #countdown-christmas > div > div:first-child,
    #countdown-newyear > div > div:first-child {
        font-size: 1.5rem !important;
    }
    
    #countdown-blackfriday > div > div:last-child,
    #countdown-christmas > div > div:last-child,
    #countdown-newyear > div > div:last-child {
        font-size: 0.625rem !important;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    #countdown-blackfriday > div,
    #countdown-christmas > div,
    #countdown-newyear > div {
        min-width: 65px;
        padding: 14px 18px !important;
    }
    
    #countdown-blackfriday > div > div:first-child,
    #countdown-christmas > div > div:first-child,
    #countdown-newyear > div > div:first-child {
        font-size: 2.5rem !important;
    }
}

/* Search Bar Focus */
input:focus {
    outline: none;
    border-color: #ffb929 !important;
    box-shadow: 0 0 0 4px rgba(255, 185, 41, 0.1);
}

/* Newsletter Input */
footer input[type="email"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 185, 41, 0.3);
}

/* Wishlist Icon Animation */
.wishlist-btn {
    transition: all 0.3s ease;
}

.wishlist-btn:hover {
    transform: scale(1.15) rotate(5deg);
}

.wishlist-btn.text-red-500 {
    animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(1);
    }
    75% {
        transform: scale(1.15);
    }
}

/* Cart Count Badge Animation */
#cart-count,
#wishlist-count {
    animation: bounce 0.5s ease;
    box-shadow: 0 2px 8px rgba(255, 185, 41, 0.4);
}

@keyframes bounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Custom Selection */
::selection {
    background: #ffb929;
    color: #000;
}

::-moz-selection {
    background: #ffb929;
    color: #000;
}

/* Line Clamp Utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Testimonials */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

/* Brands Swiper */
.brandsSwiper .swiper-slide {
    transition: transform 0.3s ease;
}

.brandsSwiper .swiper-slide:hover {
    transform: scale(1.05);
}

/* Back to Top Button */
#back-to-top {
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 185, 41, 0.4);
}

#back-to-top:hover {
    box-shadow: 0 6px 20px rgba(255, 185, 41, 0.6);
}

/* Quick View Modal */
.quick-view-modal {
    animation: fadeIn 0.3s ease;
}

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

/* Notification */
.notification {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Product Grid Responsive */
@media (max-width: 480px) {
    #products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-card img {
        height: 200px !important;
    }
}

@media (min-width: 481px) and (max-width: 640px) {
    #products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .product-card img {
        height: 220px !important;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    #products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    
    .product-card img {
        height: 240px !important;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .product-card img {
        height: 250px !important;
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    #products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    
    .product-card img {
        height: 256px !important;
    }
}

@media (min-width: 1281px) {
    #products-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 1.5rem;
    }
}

/* Category Grid Responsive */
@media (max-width: 480px) {
    .grid.grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .category-card img {
        height: 100px !important;
    }
}

@media (min-width: 481px) and (max-width: 640px) {
    .grid.grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .grid.grid-cols-2 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid.grid-cols-2 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Mega Menu Responsive */
@media (max-width: 1024px) {
    nav ul li .mega-menu {
        max-width: 100vw;
    }
}

/* Mega Menu Styles */
#mega-menu-container {
    border-top: 4px solid #ffb929;
}

#mega-menu-container .mega-menu-category {
    transition: transform 0.3s ease;
}

#mega-menu-container .mega-menu-category:hover {
    transform: translateY(-5px);
}

/* Make sure nothing overlaps the mega menu */
section {
    position: relative;
    z-index: 1;
}

.bannerSwiper,
.bannerSwiper .swiper-wrapper,
.bannerSwiper .swiper-slide {
    z-index: 1;
}

/* Header Responsive */
@media (max-width: 640px) {
    header .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Ensure icons are always visible */
    nav ul li a .material-icons {
        display: inline-block !important;
    }
    
    /* Navigation icons always visible */
    nav ul li {
        min-width: auto;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    header .flex-1 {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 1024px) {
    nav ul {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Ensure navigation icons are always visible */
    nav ul li a .material-icons {
        display: inline-block !important;
        flex-shrink: 0;
    }
}

/* Mobile Sidebar */
#mobile-sidebar {
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.2);
}

@media (max-width: 640px) {
    #mobile-sidebar {
        width: 100%;
        max-width: 320px;
    }
}

/* Ensure all icons in navigation are visible */
nav ul li a .material-icons {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex-shrink: 0;
}

/* Desktop Navigation - Always show icons */
@media (min-width: 768px) {
    nav ul li a .material-icons {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: auto;
        height: auto;
    }
}

/* Mobile Sidebar - Hidden on desktop */
@media (min-width: 768px) {
    #mobile-sidebar {
        display: none !important;
    }
}

/* Desktop Navigation - Hidden on mobile */
@media (max-width: 767px) {
    nav.bg-gradient-to-r {
        display: none !important;
    }
}

/* Footer Responsive */
@media (max-width: 640px) {
    footer .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    footer h3 {
        font-size: 1rem !important;
    }
    
    footer ul li a {
        font-size: 0.875rem !important;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    footer .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Testimonials Responsive */
@media (max-width: 640px) {
    .testimonial-card {
        padding: 1rem !important;
    }
}

/* Features Section Responsive */
@media (max-width: 640px) {
    .features-section .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Brands Swiper Responsive */
@media (max-width: 640px) {
    .brandsSwiper .swiper-slide {
        padding: 0.5rem;
    }
}

/* Smooth Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: slideUp 0.5s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.2s; }
.product-card:nth-child(3) { animation-delay: 0.3s; }
.product-card:nth-child(4) { animation-delay: 0.4s; }
.product-card:nth-child(5) { animation-delay: 0.5s; }

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

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

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid #ffb929;
    outline-offset: 2px;
}

/* Floating Advertisement Toast */
#floating-ad-toast {
    animation: slideInLeft 0.5s ease;
    border: 2px solid #ffb929;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-120%);
    }
    to {
        transform: translateX(0);
    }
}

#floating-ad-toast:hover {
    transform: translateX(0) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#ad-badge {
    animation: pulse 2s infinite;
}

/* Responsive Floating Ad */
@media (max-width: 768px) {
    #floating-ad-toast {
        width: calc(100% - 2rem);
        left: 1rem;
        right: 1rem;
        max-width: 350px;
    }
}

/* Language Switcher Active State with Hover */
#lang-fr, #lang-en {
    transition: all 0.3s ease;
}

#lang-fr:hover, #lang-en:hover {
    color: #ffb929 !important;
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Mobile Language Switcher Active State with Hover */
#lang-fr-mobile, #lang-en-mobile {
    transition: all 0.3s ease;
}

#lang-fr-mobile:hover, #lang-en-mobile:hover {
    color: #ffb929 !important;
    background-color: rgba(255, 185, 41, 0.15) !important;
    transform: scale(1.05);
}

/* Print Styles */
@media print {
    header, footer, #cart-sidebar, #wishlist-sidebar, #back-to-top, #floating-ad-toast {
        display: none;
    }
}
