/* ===================================
   GLOBAL STYLES & RESET
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2728267e;
    --dark-bg: #1f2937;
    --light-bg: #f9fafb;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-elegant: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 60px rgba(147, 51, 234, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.font-inter {
    font-family: 'Inter', sans-serif;
}

.font-playfair {
    font-family: 'Playfair Display', serif;
}

/* ===================================
   STICKY TOP BAR ANIMATIONS
   =================================== */
.sticky-top-bar {
    backdrop-filter: blur(10px);
    /* Removed slideDown animation to prevent unwanted opening effect on page reload */
}

.announcement-item {
    animation: fadeInUp 0.8s ease-out;
}

.social-icon {
    display: inline-block;
    transition: var(--transition-smooth);
    position: relative;
}

.social-icon::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

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

.social-icon:hover {
    transform: translateY(-2px);
}

/* ===================================
   HEADER ANIMATIONS
   =================================== */
#mainHeader {
    animation: fadeIn 0.8s ease-out 0.2s both;
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
}

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

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

/* Logo Animation */
.logo-container {
    animation: bounceIn 1s ease-out 0.4s both;
}

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

    50% {
        transform: scale(1.1);
    }

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

.logo-icon {
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Search Bar Animation */
.search-container {
    animation: slideInLeft 0.8s ease-out 0.6s both;
}

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

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

.search-container input {
    transition: var(--transition-smooth);
}

.search-container input:focus {
    transform: translateY(-2px);
}

/* Header Icons Animation */
.header-icons {
    animation: slideInRight 0.8s ease-out 0.6s both;
}

@keyframes slideInRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }

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

.icon-wrapper {
    animation: popIn 0.5s ease-out both;
}

.icon-wrapper:nth-child(1) {
    animation-delay: 0.8s;
}

.icon-wrapper:nth-child(2) {
    animation-delay: 0.9s;
}

.icon-wrapper:nth-child(3) {
    animation-delay: 1s;
}

@keyframes popIn {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.2) rotate(10deg);
    }

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

.icon-circle {
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.icon-circle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.icon-circle:hover::before {
    opacity: 1;
}

.icon-circle:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Badge styling for header icons */
.icon-wrapper span[class*='bg-red-500'],
.icon-wrapper span[class*='bg-yellow-400'] {
    font-size: 0.625rem;
    line-height: 1;
}

/* ===================================
   NAVIGATION MENU STYLES
   =================================== */
#mainNav {
    animation: fadeInDown 1s ease-out 1.2s both;
}

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

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

.nav-item {
    position: relative;
}

.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-purple), var(--primary-pink));
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover::before {
    width: 80%;
}

/* Mega Menu Styles */
.mega-menu {
    transform-origin: top;
}

.mega-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-purple), var(--primary-pink));
}

.subcategory {
    position: relative;
    padding: 1rem;
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.subcategory:hover {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.05), rgba(236, 72, 153, 0.05));
    transform: translateY(-4px);
}

.subcategory h3 {
    position: relative;
    padding-bottom: 0.5rem;
}

.subcategory h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-purple), var(--primary-pink));
}

.child-category {
    display: inline-flex;
    padding: 0.5rem 0;
    transition: var(--transition-smooth);
    position: relative;
}

.child-category::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-purple);
    transform: translateY(-50%);
    transition: width 0.3s ease;
}

.child-category:hover::before {
    width: 20px;
}

.child-category:hover {
    padding-left: 1.5rem;
}

/* ===================================
   HERO SLIDER STYLES
   =================================== */
#heroSlider {
    animation: fadeInUp 1.2s ease-out 1.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

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

.slider-container {
    position: relative;
    max-width: 1900px;
    margin: 0 auto;
}

.slide {
    display: none;
    position: relative;
    overflow: hidden;
}

.slide.active {
    display: block;
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(1.1);
    }

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

.slide-title {
    animation: slideInFromLeft 1s ease-out 0.3s both;
    text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.3);
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }

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

.slide-subtitle {
    animation: slideInFromLeft 1s ease-out 0.5s both;
    text-shadow: 1px 1px 10px rgba(0, 0, 0, 0.2);
}

.animate-fadeInUp {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.slide.active .animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out forwards;
}

.slide:not(.active) .animate-fadeInUp {
    animation: none;
    opacity: 0;
}

.slide-button {
    animation: slideInFromLeft 1s ease-out 0.7s both;
    position: relative;
    overflow: hidden;
}

.slide-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(147, 51, 234, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.slide-button:hover::before {
    width: 300px;
    height: 300px;
}

.slide-button i {
    display: inline-block;
    transition: transform 0.3s ease;
}

.slide-button:hover i {
    transform: translateX(5px);
}

/* Slider Controls */
#prevSlide,
#nextSlide {
    transition: var(--transition-smooth);
}

#prevSlide:hover,
#nextSlide:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

#prevSlide:active,
#nextSlide:active {
    transform: translateY(-50%) scale(0.95);
}

/* Slider Indicators */
.slider-indicator {
    transition: var(--transition-smooth);
    cursor: pointer;
}

.slider-indicator:hover {
    transform: scale(1.3);
    background: white !important;
}

.slider-indicator.active {
    width: 2rem;
    background: white !important;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 1024px) {
    .mega-menu {
        max-width: 90vw;
    }
}

@media (max-width: 768px) {
    .slide-title {
        font-size: 2rem;
    }

    .slide-subtitle {
        font-size: 1.125rem;
    }

    .slide-button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* ===================================
   UTILITY ANIMATIONS
   =================================== */
.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

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

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

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(147, 51, 234, 0.5);
    }

    50% {
        box-shadow: 0 0 40px rgba(236, 72, 153, 0.8);
    }
}



/* ===================================
   LOADING ANIMATIONS
   =================================== */
.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;
    }
}

/* ===================================
   GLASSMORPHISM EFFECTS
   =================================== */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* ===================================
   GRADIENT TEXT
   =================================== */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===================================
   HOVER EFFECTS
   =================================== */
.hover-lift {
    transition: var(--transition-smooth);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.hover-scale {
    transition: var(--transition-smooth);
}

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

/* ===================================
   MOBILE MENU ANIMATION
   =================================== */
#mobileNav {
    animation: slideDownMobile 0.4s ease-out;
}

@keyframes slideDownMobile {
    from {
        opacity: 0;
        max-height: 0;
    }

    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* ===================================
   PERFORMANCE OPTIMIZATIONS
   =================================== */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* ===================================
   ACCESSIBILITY
   =================================== */
.focus-visible:focus {
    outline: 2px solid var(--primary-purple);
    outline-offset: 2px;
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {

    .sticky-top-bar,
    #mainNav,
    .slider-indicator,
    #prevSlide,
    #nextSlide {
        display: none;
    }
}



@keyframes squareBorderTrace {
    0% {
        border-color: transparent transparent transparent #000;
        border-width: 2px 2px 2px 2px;
        /* Left side only */
    }

    20% {
        border-color: #000 transparent transparent #000;
        border-width: 2px 2px 2px 2px;
        /* Left and top */
    }

    40% {
        border-color: #000 #000 transparent #000;
        border-width: 2px 2px 2px 2px;
        /* Left, top, and right */
    }

    60% {
        border-color: #000 #000 #000 #000;
        border-width: 2px 2px 2px 2px;
        /* Full square - completed */
    }

    80% {
        border-color: #000 #000 #000 #000;
        border-width: 3px 3px 3px 3px;
        /* Slightly thicker for emphasis */
    }

    100% {
        border-color: #000 #000 #000 #000;
        border-width: 2px 2px 2px 2px;
        /* Final stable square */
    }
}

/* Ensure card content stays on top */
.product-card>* {
    position: relative;
    z-index: 1;
}

/* ===================================
   SCROLLBAR HIDE UTILITY
   =================================== */
.scrollbar-hide {
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}