/* Custom styles to supplement Tailwind */

/* Custom Animations */
@keyframes pulse-slow {
    0%, 100% { opacity: 0.2; transform: scale(1.05) rotate(3deg); }
    50% { opacity: 0.3; transform: scale(1.08) rotate(4deg); }
}

@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

.animate-pulse-slow {
    animation: pulse-slow 8s infinite ease-in-out;
}

.animate-bounce-slow {
    animation: bounce-slow 4s infinite ease-in-out;
}

.animate-fade-in-up {
    animation: fade-in-up 0.6s ease-out forwards;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1; 
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; 
}

/* Hide scrollbar for cart items but allow scroll */
#cart-items-container::-webkit-scrollbar {
    width: 4px;
}

/* Utility classes */
.glass-effect {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Product Card Hover Effects */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.product-card .add-to-cart-btn {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.product-card:hover .add-to-cart-btn {
    opacity: 1;
    transform: translateY(0);
}

/* Notification Toast */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #C8A84E;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════════════════════ */
/* Responsive — Mobile-first fixes                                          */
/* ══════════════════════════════════════════════════════════════════════════ */

/* Ensure images and media never overflow */
img, video, svg, iframe {
    max-width: 100%;
    height: auto;
}

/* Prevent horizontal overflow */
body {
    overflow-x: hidden;
}

/* Touch-friendly tap targets */
@media (max-width: 768px) {
    /* Toast notification */
    .toast-notification {
        left: 16px;
        right: 16px;
        bottom: 16px;
        width: auto;
    }

    /* Product card show add-to-cart on mobile (no hover) */
    .product-card .add-to-cart-btn {
        opacity: 1;
        transform: translateY(0);
    }

    /* Disable hover transform on mobile */
    .product-card:hover {
        transform: none;
    }

    /* Tables responsive scroll */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Tabs scroll horizontal on mobile */
    .tab-btn {
        padding: 10px 14px;
        font-size: 13px;
        white-space: nowrap;
    }

    /* Extra bottom padding for mobile bottom nav */
    body {
        padding-bottom: 56px;
    }

    /* Toast above bottom nav */
    .toast-notification {
        bottom: 72px !important;
    }
}

@media (max-width: 480px) {
    /* Smaller text for very small screens */
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.35rem !important; }

    /* Gallery nav buttons smaller */
    .gallery-nav {
        width: 32px;
        height: 32px;
    }

    /* Quantity button larger for touch */
    .qty-btn {
        width: 40px;
        height: 40px;
    }
}
