/* Custom Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Modern Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateY(-40px) rotate(-5deg);
    }
    75% {
        transform: translateY(-20px) rotate(3deg);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out forwards;
    opacity: 0;
}

@keyframes pulse-slow {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

.animate-pulse-slow {
    animation: pulse-slow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(212, 165, 116, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(212, 165, 116, 0.8);
    }
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Header Scroll Effect */
#header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

/* Navigation Active State */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #5C3D2E;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero-gradient {
    background: linear-gradient(135deg, #2C1810 0%, #5C3D2E 50%, #8B7355 100%);
}

/* Product Card Hover Effect */
.product-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    transform: translateY(-10px);
}

.product-card .product-image {
    overflow: hidden;
    border-radius: 16px;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-card .product-image img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Image Overlay Effect */
.image-overlay {
    position: relative;
    overflow: hidden;
}

.image-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(44, 24, 16, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.image-overlay:hover::before {
    opacity: 1;
}

/* Button Ripple Effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::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;
}

.btn-ripple:hover::before {
    width: 300px;
    height: 300px;
}

/* Coffee Steam Animation */
@keyframes steam {
    0% {
        transform: translateY(0) scaleX(1);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-10px) scaleX(1.1);
        opacity: 0.4;
    }
    100% {
        transform: translateY(-20px) scaleX(1.2);
        opacity: 0;
    }
}

.steam {
    animation: steam 3s ease-in-out infinite;
}

/* Loading Animation */
.loading-spinner {
    border: 3px solid rgba(92, 61, 46, 0.1);
    border-radius: 50%;
    border-top: 3px solid #5C3D2E;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, #2C1810 0%, #8B7355 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #F5E6D3;
}

::-webkit-scrollbar-thumb {
    background: #8B7355;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5C3D2E;
}

/* Feature Card */
.feature-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
}

/* Fade In Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
}

.whatsapp-float a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
}

.whatsapp-float a:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float a i {
    font-size: 30px;
    color: white;
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-float a {
    animation: pulse 2s infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float a {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-float a i {
        font-size: 24px;
    }
}

/* Image Placeholder */
.image-placeholder {
    background: linear-gradient(135deg, #2C1810 0%, #5C3D2E 50%, #8B7355 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #D4A574;
    position: relative;
    overflow: hidden;
}

.image-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(212, 165, 116, 0.1),
        transparent
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: rotate(0deg) translate(-50%, -50%);
    }
    100% {
        transform: rotate(360deg) translate(-50%, -50%);
    }
}

.brand-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

/* Contact Form */
.form-input:focus {
    outline: none;
    border-color: #5C3D2E;
    box-shadow: 0 0 0 3px rgba(92, 61, 46, 0.1);
}

/* Section Divider */
.section-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #2C1810, #D4A574);
    margin: 0 auto;
    border-radius: 2px;
}

/* Line Clamp Utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile Menu Styles */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
}

#mobile-menu:not(.hidden) {
    max-height: 600px;
    opacity: 1;
}

/* Mobile Menu Button Visibility - Force Display on Mobile */
@media (max-width: 768px) {
    /* Prevent horizontal scroll */
    body, html {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    /* Header Container */
    header {
        width: 100vw;
        max-width: 100vw;
        overflow-x: hidden !important;
    }
    
    header .container {
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
        overflow-x: hidden;
    }
    
    /* Navigation */
    nav {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 0.5rem;
    }
    
    /* Logo - Make more compact on mobile */
    nav > a {
        flex-shrink: 1;
        min-width: 0;
    }
    
    #mobile-menu-btn {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative;
        z-index: 9999;
        background: #5C3D2E !important;
        color: white !important;
        box-shadow: 0 4px 12px rgba(92, 61, 46, 0.4) !important;
        flex-shrink: 0 !important;
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
        min-height: 48px !important;
        max-width: 48px !important;
        max-height: 48px !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    #mobile-menu-btn:active {
        transform: scale(0.95);
    }
    
    /* Force hide desktop nav and CTA on mobile */
    nav > ul,
    nav > a[href*="wa.me"] {
        display: none !important;
    }
}

/* General Container Fix for All Screen Sizes */
.container {
    max-width: 100%;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Mobile Optimizations - 540x960 */
@media (max-width: 540px) {
    /* Prevent overflow on all containers */
    .container,
    section,
    div {
        max-width: 100vw !important;
    }
    
    /* Hero Section */
    .hero-gradient h1 {
        font-size: 2.5rem !important;
    }
    
    /* Product Cards - Mobile Optimized */
    .product-card-minimal,
    .product-card {
        margin-bottom: 1.5rem;
        max-width: 100%;
    }
    
    .product-card-minimal > div {
        height: 320px !important;
        padding: 1.5rem !important;
    }
    
    .product-card-minimal h3 {
        font-size: 1.75rem !important;
    }
    
    .product-card-minimal .fas.fa-coffee:first-of-type {
        font-size: 3rem !important;
    }
    
    /* Product Detail Image */
    .product-detail-image {
        max-height: 400px;
        width: 100%;
        object-fit: cover;
    }
    
    /* Adjust padding for mobile */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Font sizes for mobile */
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
    }
    
    /* Button sizes */
    .btn, .button, a[class*="px-"] {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.875rem !important;
    }
    
    /* WhatsApp float button position */
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
}

/* Tablet Optimization - 768px */
@media (min-width: 541px) and (max-width: 768px) {
    .product-card .product-image {
        height: 320px !important;
    }
}

