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

body {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* ================================
   GLASSMORPHISM EFFECTS
   ================================ */
.glass-nav {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-nav-dark {
    background: linear-gradient(135deg, rgba(0, 119, 179, 0.95) 0%, rgba(0, 85, 128, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.glass-mega {
    background: rgba(0, 85, 128, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* ================================
   ICON BUTTONS WITH BADGES
   ================================ */
.icon-btn {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.icon-btn:hover {
    background: rgba(0, 153, 230, 0.1);
    transform: translateY(-2px);
}

.badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {

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

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

/* ================================
   MEGA MENU STYLES
   ================================ */
.mega-menu-trigger:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu {
    transform: translateY(-10px);
}

.mega-link {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 1rem;
}

.mega-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #4dc2ff 0%, #1ab0ff 100%);
    transition: width 0.3s ease;
}

.mega-link:hover {
    color: #80d4ff;
    padding-left: 1.5rem;
}

.mega-link:hover::before {
    width: 12px;
}

/* ================================
   NAV LINKS
   ================================ */
.nav-link {
    color: white;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #4dc2ff 0%, #1ab0ff 100%);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #80d4ff;
}

.nav-link:hover::after {
    width: 100%;
}

/* ================================
   MOBILE MENU
   ================================ */
#mobileMenu.active {
    transform: translateX(0);
}

.mobile-category-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem;
    background: #f3f4f6;
    border-radius: 0.75rem;
    font-weight: 600;
    color: #1f2937;
    transition: all 0.3s ease;
}

.mobile-category-btn:hover {
    background: #e5e7eb;
    transform: translateX(4px);
}

.mobile-category.active .mobile-category-btn svg {
    transform: rotate(180deg);
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 1rem;
}

.mobile-category.active .mobile-submenu {
    max-height: 500px;
    margin-top: 0.5rem;
}

.mobile-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #4b5563;
    font-size: 0.9rem;
    border-left: 2px solid #e5e7eb;
    margin-bottom: 0.25rem;
    transition: all 0.3s ease;
}

.mobile-link:hover {
    color: #0077b3;
    border-left-color: #0077b3;
    background: rgba(0, 119, 179, 0.05);
    transform: translateX(4px);
}

/* ================================
   HERO SECTION - THREE.JS CANVAS
   ================================ */
#oceanCanvas {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #001f3f 0%, #003d7a 30%, #0066cc 60%, #004080 100%);
}

#heroSection {
    position: relative;
    background: linear-gradient(135deg, #001f3f 0%, #003d7a 30%, #0066cc 60%, #004080 100%);
}

/* Hero Content Animations */
.hero-title {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.hero-subtitle {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ================================
   LOADING ANIMATION
   ================================ */
.loading-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #001f3f 0%, #003d7a 50%, #0066cc 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* ================================
   WAVE ANIMATION (Fallback)
   ================================ */
@keyframes wave {

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

    25% {
        transform: translateX(-25%) translateY(-5%);
    }

    50% {
        transform: translateX(-50%) translateY(0);
    }

    75% {
        transform: translateX(-25%) translateY(5%);
    }
}

.wave-layer {
    position: absolute;
    width: 200%;
    height: 100%;
    opacity: 0.3;
    animation: wave 20s linear infinite;
}

/* ================================
   PARTICLE EFFECTS
   ================================ */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    pointer-events: none;
}

/* ================================
   SCROLL ANIMATIONS
   ================================ */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* ================================
   RESPONSIVE STYLES
   ================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    #heroSection {
        height: 500px;
    }

    .glass-nav {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .badge {
        font-size: 0.6rem;
        padding: 1px 5px;
    }
}

/* ================================
   UTILITY ANIMATIONS
   ================================ */
@keyframes float {

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

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ================================
   CUSTOM SCROLLBAR
   ================================ */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #0099e6 0%, #0077b3 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #0077b3 0%, #005580 100%);
}

/* ================================
   PERFORMANCE OPTIMIZATIONS
   ================================ */
.gpu-accelerate {
    transform: translateZ(0);
    will-change: transform;
}

/* Smooth scrolling for all browsers */
html {
    scroll-behavior: smooth;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ================================
   FOOTER WATER EFFECT
   ================================ */
@keyframes waterRipple {
    0% {
        background-position: 0% 50%;
    }

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

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

.water-ripple-bg {
    background: linear-gradient(-45deg, #00334d, #005580, #0077b3, #004466);
    background-size: 400% 400%;
    animation: waterRipple 15s ease infinite;
    position: relative;
}

.water-ripple-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.03) 0%, transparent 10%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.03) 0%, transparent 10%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 10%),
        radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 10%);
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 1;
}

/* ================================
   FOOTER BUBBLES ANIMATION
   ================================ */
.footer-bubbles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: rise 10s infinite ease-in;
}

.bubble:nth-child(1) {
    width: 40px;
    height: 40px;
    left: 10%;
    animation-duration: 8s;
}

.bubble:nth-child(2) {
    width: 20px;
    height: 20px;
    left: 20%;
    animation-duration: 5s;
    animation-delay: 1s;
}

.bubble:nth-child(3) {
    width: 50px;
    height: 50px;
    left: 35%;
    animation-duration: 10s;
    animation-delay: 2s;
}

.bubble:nth-child(4) {
    width: 80px;
    height: 80px;
    left: 50%;
    animation-duration: 12s;
    animation-delay: 0s;
}

.bubble:nth-child(5) {
    width: 35px;
    height: 35px;
    left: 55%;
    animation-duration: 6s;
    animation-delay: 1s;
}

.bubble:nth-child(6) {
    width: 45px;
    height: 45px;
    left: 65%;
    animation-duration: 8s;
    animation-delay: 3s;
}

.bubble:nth-child(7) {
    width: 90px;
    height: 90px;
    left: 70%;
    animation-duration: 12s;
    animation-delay: 2s;
}

.bubble:nth-child(8) {
    width: 25px;
    height: 25px;
    left: 80%;
    animation-duration: 6s;
    animation-delay: 2s;
}

.bubble:nth-child(9) {
    width: 15px;
    height: 15px;
    left: 70%;
    animation-duration: 5s;
    animation-delay: 1s;
}

.bubble:nth-child(10) {
    width: 50px;
    height: 50px;
    left: 85%;
    animation-duration: 9s;
    animation-delay: 3s;
}

@keyframes rise {
    0% {
        bottom: -100px;
        transform: translateX(0);
    }

    50% {
        transform: translateX(100px);
    }

    100% {
        bottom: 1000px;
        transform: translateX(-200px);
    }
}

/* ================================
   FLASH SALE SECTION
   ================================ */
#flashSale {
    position: relative;
}

.product-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    min-height: 280px; /* Ensure minimum height on mobile */
}

.product-card>div {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card .p-3 {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card .btn-fish {
    margin-top: auto;
}

.product-card h3 {
    min-height: 2.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-6px);
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .product-card {
        min-height: 320px; /* Larger minimum height for mobile */
    }
    
    .product-card h3 {
        min-height: 2.5rem;
        font-size: 0.9rem;
    }
}

.product-slider {
    transition: all 0.4s ease;
}

/* Mobile Slider */
@media (max-width: 1279px) {
    .product-slider {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 1.5rem;
        padding-bottom: 1rem;
    }

    .product-slider::-webkit-scrollbar {
        display: none;
    }

    .product-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }
}

@media (min-width: 640px) and (max-width: 1279px) {
    .product-card {
        flex: 0 0 45%;
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    .product-card {
        flex: 0 0 30%;
    }
}

.slider-dot {
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    width: 2rem;
    border-radius: 0.25rem;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 1280px) {
    .product-slider {
        display: grid !important;
    }
}

/* ================================
   CATEGORY TABS
   ================================ */
.category-tab {
    background: #f3f4f6;
    color: #4b5563;
    border: 2px solid transparent;
}

.category-tab:hover {
    background: #e5e7eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-tab.active {
    background: linear-gradient(135deg, #0099e6 0%, #0077b3 100%);
    color: white;
    border-color: #0077b3;
    box-shadow: 0 4px 16px rgba(0, 153, 230, 0.3);
}