/* Tailwind CSS Directives */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* Custom CSS for Terry Esthetics - Modern Enhanced Version */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

/* Base Styles */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    position: relative;
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(to bottom, #f8fafc, #e2e8f0);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #FFD700, #DAA520);
    border-radius: 10px;
    transition: all 0.3s ease;
}

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

/* Custom Colors */
:root {
    --color-gold: #DAA520;
    --color-gold-light: #B8860B;
    --color-gold-dark: #B8860B;
    --color-champagne: #F7E7CE;
    --color-cream: #FFF8DC;
    --color-bronze: #CD7F32;
    --color-charcoal: #2a2a2a;
    --color-charcoal-light: #444444;
    --color-soft-gray: #F8F8F8;
}

/* Modern Component Styles */

/* Enhanced Category Cards */
.category-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.category-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 32px 64px -12px rgba(255, 215, 0, 0.4),
        0 0 0 1px rgba(255, 215, 0, 0.1);
}

.category-card:hover::before {
    opacity: 1;
}

/* Enhanced Product Cards */
.product-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* Consistent Image Container Styling */
.product-card .h-48 {
    height: 192px !important;
    position: relative;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .h-48::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 1;
}

.product-card:hover .h-48::before {
    opacity: 1;
}

/* Ensure images always fill container properly */
.product-card .h-48 img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    position: relative;
    z-index: 1;
}

/* Fallback for missing/empty images */
.product-card .h-48:not(:has(img)) {
    background: linear-gradient(135deg, #f1f5f9 0%, #cbd5e1 100%);
}

.product-card .h-48:not(:has(img))::after {
    content: "📷";
    font-size: 48px;
    opacity: 0.3;
    z-index: 1;
}

/* Handle broken/empty image files - Universal approach */
.product-card .h-48 img {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%);
}

.product-card .h-48 img[src*="quencher-tumbler.jpg"] {
    opacity: 0;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%);
}

.product-card .h-48 img[src*="quencher-tumbler.jpg"] + ::after {
    content: "🥤";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    opacity: 0.4;
    z-index: 2;
}

/* Alternative universal fallback */
.product-card[data-has-empty-image] .h-48::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #cbd5e1 100%);
    z-index: 1;
}

.product-card[data-has-empty-image] .h-48::after {
    content: "🥤";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    opacity: 0.4;
    z-index: 2;
}

.product-card[data-has-empty-image] .h-48 img {
    opacity: 0;
}

/* Consistent Content Padding */
.product-card .p-6,
.product-card .p-4 {
    padding: 24px !important;
    position: relative;
    z-index: 2;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

/* Consistent Title Styling */
.product-card h3 {
    color: #1f2937 !important;
    font-weight: 600 !important;
    font-size: 18px !important;
    line-height: 1.4 !important;
    margin-bottom: 8px !important;
    transition: color 0.3s ease;
    min-height: 50px;
    display: flex;
    align-items: center;
}

.product-card:hover h3 {
    color: #FFD700;
}

/* Consistent Description Styling */
.product-card p {
    color: #6b7280 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    margin-bottom: 12px !important;
    min-height: 42px;
    display: flex;
    align-items: flex-start;
}

/* Consistent Rating Container */
.product-card .flex.justify-end.items-center.mb-4 {
    justify-content: flex-end !important;
    align-items: center !important;
    margin-bottom: 16px !important;
    min-height: 32px;
}

/* Consistent Rating Styling */
.product-card .flex.items-center.text-yellow-500 {
    gap: 4px !important;
    padding: 8px 12px !important;
    background: rgba(251, 191, 36, 0.1) !important;
    border-radius: 20px !important;
    margin-bottom: 0 !important;
    width: fit-content !important;
    margin-left: auto !important;
    align-items: center !important;
    line-height: 1 !important;
    min-height: 32px;
    display: flex !important;
}

.product-card .flex.items-center.text-yellow-500 i {
    font-size: 14px !important;
    line-height: 1 !important;
    vertical-align: baseline !important;
    color: #eab308 !important;
}

.product-card .flex.items-center.text-yellow-500 span {
    font-size: 14px !important;
    line-height: 1 !important;
    vertical-align: baseline !important;
    color: #6b7280 !important;
}

/* Consistent Button Container */
.product-card .flex.gap-2 {
    gap: 12px !important;
    margin-top: auto !important;
    align-items: center !important;
}

/* Consistent Button Styling */
.product-card button {
    border-radius: 12px !important;
    font-weight: 600 !important;
    letter-spacing: 0.25px !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    position: relative;
    overflow: hidden;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.product-card .flex-1 {
    flex: 1 !important;
}

/* Consistent Wishlist Button Position */
.wishlist-btn {
    position: absolute !important;
    top: 12px !important;
    left: 12px !important;
    width: 36px !important;
    height: 36px !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #6b7280 !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(8px) !important;
    z-index: 4 !important;
    opacity: 0;
    transform: scale(0.8);
}

.product-card:hover .wishlist-btn {
    opacity: 1 !important;
    transform: scale(1) !important;
}

.wishlist-btn:hover {
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
    transform: scale(1.1);
}

.wishlist-btn.active {
    background: #FFD700;
    color: white;
}

.wishlist-btn.active:hover {
    background: #DAA520;
}

/* Badge variations */
.product-card.bestseller::before {
    content: 'Bestseller';
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.product-card.popular::before {
    content: 'Popular';
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.product-card.trending::before {
    content: 'Trending';
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

/* Stock status indicators */
.stock-indicator {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
}

.stock-indicator.in-stock {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.stock-indicator.low-stock {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.stock-indicator.out-of-stock {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Product card loading skeleton */
.product-card.loading .p-6 * {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
    color: transparent;
}

/* Quick view modal styling */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-view-modal.active {
    opacity: 1;
    visibility: visible;
}

.quick-view-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 32px;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.quick-view-modal.active .quick-view-content {
    transform: scale(1) translateY(0);
}

/* Modern Button Animations */
.btn-hover {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.btn-hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

.btn-hover:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.1),
        0 3px 10px rgba(0, 0, 0, 0.1);
}

.btn-hover:hover::before {
    left: 100%;
}

.btn-hover:active {
    transform: translateY(0) scale(0.98);
}

/* Modern Navigation Styles */
.mobile-menu {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
}

.mobile-menu.hidden {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px) scale(0.95);
    pointer-events: none;
}

.mobile-menu:not(.hidden) {
    display: block !important;
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.mobile-menu.animate-fade-in {
    animation: mobileMenuFadeIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes mobileMenuFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
        display: block;
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        display: block;
    }
}

/* Mobile Menu Button Animation */
.mobile-menu-btn {
    transition: all 0.3s ease;
    position: relative;
    z-index: 1000;
}

.mobile-menu-btn:hover {
    transform: scale(1.1);
    color: #FFD700;
}

.mobile-menu-btn i {
    transition: all 0.3s ease;
}

.mobile-menu-btn:hover i {
    transform: rotate(90deg);
}

/* Navigation Links Animation */
nav a {
    position: relative;
    transition: all 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #FFD700, #CD7F32);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav a:hover::after {
    width: 100%;
}

/* Modern Form Styles */
.form-input {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 215, 0, 0.1);
}

.form-input:focus {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 15px 35px -5px rgba(255, 215, 0, 0.4),
        0 0 0 3px rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    background: rgba(255, 255, 255, 0.95);
}

.form-input:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 215, 0, 0.2);
}

/* Newsletter Form */
.newsletter-form input:focus {
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.5);
}

/* Category Filter Buttons */
.category-filter-btn.active {
    background-color: #FFD700;
    color: black;
    border-color: #FFD700;
}

.category-filter-btn:not(.active):hover {
    border-color: #FFD700;
    color: #FFD700;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Fade In Animation */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

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

/* Modern Hero Section Animations */
.hero-animate {
    animation: heroSlideUp 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes heroSlideUp {
    0% {
        opacity: 0;
        transform: translateY(60px) scale(0.9);
    }
    50% {
        opacity: 0.8;
        transform: translateY(20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #FFD700, #DAA520, #CD7F32);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

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

/* Floating Elements Animation */
.floating-element {
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(2deg);
    }
    66% {
        transform: translateY(10px) rotate(-1deg);
    }
}

/* Modern Background Patterns */
.modern-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 215, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(218, 165, 32, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(205, 127, 50, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Glassmorphism Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 8px 32px 0 rgba(31, 38, 135, 0.37),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Modern Micro-Interactions */

/* Pulse Animation for CTAs */
.pulse-on-hover:hover {
    animation: gentlePulse 2s infinite;
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(255, 215, 0, 0);
    }
}

/* Magnetic Button Effect */
.magnetic-btn {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.magnetic-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.magnetic-btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Stagger Animation for Lists */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
    animation: staggerIn 0.6s ease forwards;
}

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

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

/* Message Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    animation: slideIn 0.3s ease;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

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

/* Hover Effects for Social Icons */
.social-icon {
    transition: all 0.3s ease;
}

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

/* Product Image Hover */
.product-image {
    transition: all 0.3s ease;
}

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

/* Star Rating */
.star-rating {
    display: flex;
    align-items: center;
}

.star {
    color: #fbbf24;
}

/* Quick View Button */
.quick-view-btn {
    transition: all 0.3s ease;
}

.quick-view-btn:hover {
    background-color: #374151;
}

/* Section Fade In */
.section-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.section-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design Helpers */
@media (max-width: 768px) {
    .hero-text {
        font-size: 2.5rem;
    }
    
    .category-card {
        margin-bottom: 1rem;
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 640px) {
    .hero-text {
        font-size: 2rem;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Product Grid Centering */
.product-category .grid {
    justify-content: center;
    justify-items: center;
}

/* When there are few products, center them beautifully */
.product-category .grid .product-card {
    width: 100%;
    max-width: 320px;
}

/* Ensure grid centering works across all screen sizes */
@media (min-width: 768px) {
    .product-category .grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        justify-content: center;
        gap: 1.5rem;
        max-width: 1200px;
        margin: 0 auto;
    }
}

@media (min-width: 1024px) {
    .product-category .grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        max-width: 1400px;
    }
}

/* Center products when filtered to small numbers */
.product-category .grid:has(.product-card[style*="display: block"]) {
    justify-content: center;
}

/* Alternative approach for browsers that don't support :has() */
.products-centered {
    justify-content: center !important;
    justify-items: center !important;
}

/* Print Styles */
@media print {
    .no-print {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .page-break {
        page-break-before: always;
    }
}

/* Focus Styles for Accessibility */
.focus-visible:focus {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .category-card {
        border: 2px solid;
    }
    
    .product-card {
        border: 2px solid;
    }
}

/* Custom Cursor */
.custom-cursor {
    width: 10px;
    height: 10px;
    background: linear-gradient(45deg, #FFD700, #CD7F32);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: all 0.1s ease;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.custom-cursor.cursor-hover {
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, #DAA520, #CD7F32);
}

.cursor-follower.cursor-hover {
    width: 60px;
    height: 60px;
    border-color: rgba(255, 215, 0, 0.6);
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: rippleEffect 0.6s linear;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

/* Modern Button Enhancements */
button, .btn-hover {
    position: relative;
    overflow: hidden;
}

/* Loading Skeleton Animation */
.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;
    }
}

/* Modern Focus States */
*:focus-visible {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Enhanced Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: -0.025em;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .floating-element,
    .custom-cursor,
    .cursor-follower {
        animation: none !important;
    }
}

/* Enhanced button alignment for all product card variations */
.product-card .p-4,
.product-card .p-6 {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Ensure buttons stay at bottom for both button layouts */
.product-card .flex.gap-2,
.product-card .flex.flex-col.space-y-2 {
    margin-top: auto;
}

/* Force equal height for all cards in a row */
.grid .product-card {
    height: 100%;
}

/* Override any conflicting styles */
.product-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* Final consistency overrides for all product cards */
.product-card * {
    box-sizing: border-box !important;
}

/* Ensure consistent spacing and alignment */
.product-category .grid {
    align-items: stretch !important;
}

.product-category .grid > * {
    height: 100% !important;
}

/* Force consistent image container behavior */
.product-card > div:first-of-type {
    height: 192px !important;
    position: relative !important;
    overflow: hidden !important;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
}

.product-card > div:first-of-type img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    position: relative !important;
    z-index: 1 !important;
}

/* Ensure consistent content spacing */
.product-card > div:last-of-type {
    padding: 24px !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

/* Final button alignment override */
.product-card .flex:last-child {
    margin-top: auto !important;
}

/* ============================================
   COMPREHENSIVE PRODUCT CARD CONSISTENCY FIX
   ============================================ */

/* STEP 1: Force uniform structure for ALL product cards */
.product-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    position: relative !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

/* STEP 2: Force consistent image containers for ALL variations */
.product-card > div:first-child,
.product-card .h-48,
.product-card > div[class*="h-48"],
.product-card [class*="bg-gradient"],
.product-card [class*="relative"] {
    width: 100% !important;
    height: 192px !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 20px 20px 0 0 !important;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

/* STEP 3: Force ALL images to fill containers completely */
.product-card img,
.product-card .h-48 img,
.product-card > div:first-child img,
.product-card [class*="relative"] img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 3 !important;
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
    border-radius: 0 !important;
}

/* STEP 4: Override ALL pseudo-element interference */
.product-card > div:first-child::before,
.product-card .h-48::before,
.product-card [data-has-empty-image] .h-48::before {
    display: none !important;
}

.product-card > div:first-child::after,
.product-card .h-48::after,
.product-card [data-has-empty-image] .h-48::after {
    display: none !important;
}

/* STEP 5: Force consistent content area structure */
.product-card > div:last-child,
.product-card .p-4,
.product-card .p-6 {
    padding: 24px !important;
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    background: white !important;
    border-radius: 0 0 20px 20px !important;
}

/* STEP 6: Ensure titles are consistent */
.product-card h3 {
    font-size: 18px !important;
    line-height: 1.4 !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
    margin: 0 0 8px 0 !important;
    min-height: 50px !important;
    display: flex !important;
    align-items: flex-start !important;
}

/* STEP 7: Ensure descriptions are consistent */
.product-card p {
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #6b7280 !important;
    margin: 0 0 12px 0 !important;
    min-height: 42px !important;
    display: flex !important;
    align-items: flex-start !important;
    flex-grow: 1 !important;
}

/* STEP 8: Force rating alignment consistency */
.product-card .flex.justify-end.items-center.mb-4 {
    margin: 0 0 16px 0 !important;
    justify-content: flex-end !important;
    align-items: center !important;
    height: 20px !important;
}

.product-card .flex.items-center.text-yellow-500 {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.product-card .flex.items-center.text-yellow-500 i {
    font-size: 14px !important;
    color: #eab308 !important;
}

.product-card .flex.items-center.text-yellow-500 span {
    font-size: 14px !important;
    line-height: 1 !important;
    color: #6b7280 !important;
}

/* STEP 9: Force button alignment to bottom */
.product-card .flex.gap-2 {
    margin-top: auto !important;
    display: flex !important;
    gap: 8px !important;
    align-items: stretch !important;
}

/* STEP 10: Ensure wishlist buttons are consistent */
.product-card .wishlist-btn {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    width: 40px !important;
    height: 40px !important;
    z-index: 10 !important;
    background: rgba(255, 255, 255, 0.9) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* STEP 11: Handle SVG files properly */
.product-card img[src$=".svg"] {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* STEP 12: Force grid layout consistency */
.product-category .grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 24px !important;
    align-items: stretch !important;
}

.product-category .grid .product-card {
    height: 100% !important;
    min-height: 420px !important;
}

/* STEP 13: Handle empty/broken images with fallback */
.product-card img[src*="quencher-tumbler.jpg"],
.product-card img[src=""],
.product-card img:not([src]) {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%) !important;
}

/* STEP 14: Force consistency for mobile responsiveness */
@media (max-width: 768px) {
    .product-category .grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
        gap: 16px !important;
    }
    
    .product-card > div:first-child,
    .product-card .h-48 {
        height: 180px !important;
    }
    
    .product-card > div:last-child,
    .product-card .p-4,
    .product-card .p-6 {
        padding: 20px !important;
    }
}

/* STEP 15: Final override for any remaining inconsistencies */
.product-card * {
    box-sizing: border-box !important;
}

/* Ensure no floating or centering on images */
.product-card .floating-element {
    position: static !important;
    animation: none !important;
    transform: none !important;
}

/* Remove any remaining gradient backgrounds on image containers */
.product-card [class*="bg-gradient"] {
    background: none !important;
}

/* Force all images to be absolutely positioned within their containers */
.product-card div[class*="h-"] {
    position: relative !important;
}

.product-card div[class*="h-"] img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* ============================================
   ENHANCED HOVER EFFECTS FOR PRODUCT CARDS
   ============================================ */

/* Main card hover effect */
.product-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    cursor: pointer !important;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 20px 40px -12px rgba(236, 72, 153, 0.3),
        0 0 0 1px rgba(236, 72, 153, 0.1) !important;
    z-index: 10 !important;
}

/* Image hover effects */
.product-card > div:first-child,
.product-card .h-48,
.product-card > div[class*="h-48"] {
    overflow: hidden !important;
    position: relative !important;
}

.product-card > div:first-child::before,
.product-card .h-48::before,
.product-card > div[class*="h-48"]::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%) !important;
    opacity: 0 !important;
    transition: opacity 0.6s ease !important;
    z-index: 5 !important;
    display: block !important;
}

.product-card:hover > div:first-child::before,
.product-card:hover .h-48::before,
.product-card:hover > div[class*="h-48"]::before {
    opacity: 1 !important;
}

/* Image zoom effect on hover */
.product-card img {
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

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

/* Title hover effect */
.product-card h3 {
    transition: color 0.3s ease !important;
}

.product-card:hover h3 {
    color: #FFD700 !important;
}

/* Description hover effect */
.product-card p {
    transition: color 0.3s ease !important;
}

.product-card:hover p {
    color: #374151 !important;
}

/* Button hover enhancements */
.product-card button {
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

.product-card button::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: -100% !important;
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent) !important;
    transition: left 0.5s ease !important;
    z-index: 1 !important;
}

.product-card:hover button::before {
    left: 100% !important;
}

.product-card button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4) !important;
}

/* Add to Cart button specific hover */
.product-card button.bg-gold:hover {
    background: linear-gradient(135deg, #FFD700, #DAA520) !important;
}

/* Quick view button hover */
.product-card button.bg-gray-200:hover {
    background: #e5e7eb !important;
    transform: translateY(-2px) scale(1.05) !important;
}

/* Wishlist button hover enhancement */
.product-card .wishlist-btn {
    transition: all 0.3s ease !important;
}

.product-card .wishlist-btn:hover {
    transform: scale(1.1) !important;
    background: rgba(255, 215, 0, 0.1) !important;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3) !important;
}

.product-card .wishlist-btn.active:hover {
    background: rgba(218, 165, 32, 0.1) !important;
}

/* Rating hover effect */
.product-card .flex.items-center.text-yellow-500 {
    transition: transform 0.3s ease !important;
}

.product-card:hover .flex.items-center.text-yellow-500 {
    transform: scale(1.05) !important;
}

/* Subtle glow effect on card edges */
.product-card::after {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    border-radius: 20px !important;
    opacity: 0 !important;
    background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.1), transparent) !important;
    transition: opacity 0.4s ease !important;
    pointer-events: none !important;
    z-index: 1 !important;
}

.product-card:hover::after {
    opacity: 1 !important;
}

/* Smooth stagger animation for multiple cards */
.product-card:nth-child(1) { transition-delay: 0s !important; }
.product-card:nth-child(2) { transition-delay: 0.05s !important; }
.product-card:nth-child(3) { transition-delay: 0.1s !important; }
.product-card:nth-child(4) { transition-delay: 0.15s !important; }
.product-card:nth-child(5) { transition-delay: 0.2s !important; }
.product-card:nth-child(6) { transition-delay: 0.25s !important; }

/* Mobile hover effects (touch devices) */
@media (hover: none) and (pointer: coarse) {
    .product-card:hover {
        transform: none !important;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    }
    
    .product-card:hover img {
        transform: none !important;
    }
    
    .product-card:active {
        transform: scale(0.98) !important;
    }
}

/* Accessibility: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .product-card,
    .product-card img,
    .product-card button,
    .product-card .wishlist-btn {
        transition: none !important;
    }
    
    .product-card:hover {
        transform: none !important;
    }
    
    .product-card:hover img {
        transform: none !important;
    }
} 

/* ============================================
   LAZY LOADING ENHANCEMENTS
   ============================================ */

/* Loading state for images - ensure all images are visible by default */
img[loading="lazy"] {
    opacity: 1;
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* JS-controlled lazy loading - only hide specific images when JS is managing them */
img[loading="lazy"].js-lazy-loading:not(.loaded) {
    opacity: 0;
}

/* Loaded state */
img[loading="lazy"].loaded {
    opacity: 1;
}

/* Fallback for browsers that don't support loading attribute */
img[data-loading="lazy"] {
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

img[data-loading="lazy"].loaded {
    opacity: 1;
}

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

.image-container.loaded {
    background: none;
    animation: none;
}

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

/* Image placeholder styling */
img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

/* Hide placeholder when image loads */
img.loaded::before {
    display: none;
}

/* Progressive image loading with blur effect */
.progressive-image {
    filter: blur(5px);
    transition: filter 0.6s ease;
}

.progressive-image.loaded {
    filter: blur(0);
}

/* Intersection Observer loading indicator */
.lazy-loading {
    position: relative;
}

.lazy-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 2px solid #FFD700;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0.7;
}

.lazy-loading.loaded::after {
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth reveal animation for lazy loaded images */
.fade-in-image {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in-image.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Performance optimizations for images */
img {
    content-visibility: auto;
    contain-intrinsic-size: 200px 200px;
}

/* Reduce layout shift by setting aspect ratios */
.product-card img {
    aspect-ratio: 1;
    object-fit: cover;
}

/* Critical images should load immediately */
img[loading="eager"] {
    opacity: 1;
    transition: none;
}

/* WebP support detection for better performance */
@supports (image-set(url('image.webp') type('image/webp'))) {
    .product-card img {
        image-rendering: crisp-edges;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    img[loading="lazy"],
    img[data-loading="lazy"],
    .progressive-image,
    .fade-in-image {
        transition: none;
        animation: none;
    }
    
    .image-container {
        animation: none;
    }
}

/* Connection-aware loading for slow connections */
@media (prefers-reduced-data: reduce) {
    img[loading="lazy"] {
        transition-duration: 0.2s;
    }
}

/* ============================================
   ENHANCED PRODUCT CARD LOADING STATES
   ============================================ */

/* Product card loading state */
.product-card.loading {
    pointer-events: none;
}

.product-card.loading .h-48 {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

.product-card.loading img {
    opacity: 0;
}

/* Staggered loading animation for multiple cards */
.product-card:nth-child(1) img { transition-delay: 0.1s; }
.product-card:nth-child(2) img { transition-delay: 0.2s; }
.product-card:nth-child(3) img { transition-delay: 0.3s; }
.product-card:nth-child(4) img { transition-delay: 0.4s; }
.product-card:nth-child(5) img { transition-delay: 0.5s; }
.product-card:nth-child(6) img { transition-delay: 0.6s; }
.product-card:nth-child(7) img { transition-delay: 0.7s; }
.product-card:nth-child(8) img { transition-delay: 0.8s; } 

/* ============================================
   CRITICAL VISIBILITY OVERRIDES - SAFETY
   ============================================ */

/* Ensure all product cards are visible by default */
.product-card {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: all 0.3s ease;
}

/* Ensure product sections are visible by default */
.product-category {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Only hide when explicitly filtered */
.product-card[style*="display: none"] {
    display: none !important;
}

.product-category[style*="display: none"] {
    display: none !important;
}

/* Ensure about page sections are visible */
body[class*="about"] section,
.about-page section {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Filter button active states */
.category-filter-btn.active {
    background-color: #FFD700 !important;
    color: black !important;
    border-color: #FFD700 !important;
}

/* Ensure fade-in animations don't interfere with functionality */
.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Critical image visibility override */
img {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Only allow JS-controlled hiding for specific loading states */
img.js-lazy-loading:not(.loaded) {
    opacity: 0 !important;
}

/* Force visibility for any hidden sections on about page */
.about-page .section-fade {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
} 

/* ====== EMERGENCY VISIBILITY OVERRIDES ====== */
/* Force all critical content to be visible with maximum specificity */

/* Force all sections to be visible */
section,
section.section-fade,
section.stagger-item {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Force all product cards to be visible */
.product-card,
.product-card.stagger-item,
.product-card.loading {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Force all images to be visible */
img,
img[loading="lazy"],
img.js-lazy-loading {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Force all filter buttons to be functional */
.category-filter-btn {
    pointer-events: auto !important;
    cursor: pointer !important;
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.category-filter-btn:hover {
    background-color: #FFD700 !important;
    color: black !important;
    border-color: #FFD700 !important;
}

.category-filter-btn.active {
    background-color: #FFD700 !important;
    color: black !important;
    border-color: #FFD700 !important;
}

/* Force Our Story section to be visible */
section:nth-of-type(2) {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Emergency override for any hidden elements */
.hidden[data-emergency-show="true"] {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Force grid layouts to be visible */
.grid {
    display: grid !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Force lazy loading containers to be visible */
.lazy-loading-container,
.lazy-loading-placeholder {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Product grid centering when filtered */
.products-centered {
    justify-items: center !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    max-width: 800px !important;
    margin: 0 auto !important;
}

/* ====== DYNAMIC GRID LAYOUTS FOR SMALL CATEGORIES ====== */

/* Single product - centered */
.grid-single {
    display: flex !important;
    justify-content: center !important;
    align-items: stretch !important;
    max-width: 400px !important;
    margin: 0 auto !important;
}

.grid-single .product-card {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 350px !important;
}

/* Two products - centered in same row */
.grid-double {
    display: flex !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 2rem !important;
    max-width: 800px !important;
    margin: 0 auto !important;
    flex-wrap: wrap !important;
}

.grid-double .product-card {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 350px !important;
}

/* Three products - centered in same row */
.grid-triple {
    display: flex !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 1.5rem !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    flex-wrap: wrap !important;
}

.grid-triple .product-card {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-width: 350px !important;
}

/* Responsive behavior for small grids */
@media (max-width: 768px) {
    .grid-double .product-card,
    .grid-triple .product-card {
        max-width: 280px !important;
    }
}

@media (max-width: 640px) {
    .grid-double,
    .grid-triple {
        flex-direction: column !important;
        align-items: center !important;
        max-width: 350px !important;
    }
    
    .grid-double .product-card,
    .grid-triple .product-card {
        max-width: 320px !important;
    }
}

/* ====== END DYNAMIC GRID LAYOUTS ====== */

/* ====== END EMERGENCY OVERRIDES ====== */ 