/* 
 * Stylé et Gourmand - Main Stylesheet
 */

html, body {
    scroll-behavior: smooth !important;
}

:root {
    --primary-pink: #FFC0E0;
    --dark-pink: #FF3399;
    --primary-color: #FFC0E0;
    --secondary-color: #FF3399;
    --dark-color: #2c3e50;
    --light-bg: #f8f9fa;
    --transition-base: all 0.3s ease;
}

/* Base Styles */
body {
    font-family: 'Lora', serif;
    color: var(--dark-color);
    background-color: #fff;
    padding-top: 80px; /* Space for fixed navbar */
    overflow-x: hidden;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Global Button Effects */
.btn {
    transition: var(--transition-base) !important;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn:active {
    transform: translateY(0);
}

/* Tel Button Effects */
a[href^="tel:"].btn:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Ensure content takes available space */
main, .flex-grow-1, section {
    flex-shrink: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.navbar-nav, .btn, .price-tag, .small, .text-muted {
    font-family: 'Montserrat', sans-serif;
}

.font-fancy {
    font-family: 'Dancing Script', cursive;
}

section {
    padding: 100px 0; /* Standard section padding */
}

/* Parallax Effect */
.parallax-window {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 90vh; /* Responsive height */
}

/* Carousel Styles */
#mainCarousel .carousel-item {
    height: 90vh;
    background-color: #000;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.45);
    padding: clamp(20px, 5vw, 40px);
    border-radius: 20px;
    backdrop-filter: blur(8px);
    bottom: 20%;
    width: 80%;
    left: 10%;
}

.carousel-caption h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.8rem, 8vw, 4.5rem);
    margin-bottom: 15px;
    font-weight: 900;
    font-style: italic;
    line-height: 1.1;
}

.carousel-caption p {
    font-family: 'Lora', serif;
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-style: italic;
    margin-bottom: 20px;
}

/* Card Styles & Image Zoom */
.card {
    border: none;
    transition: var(--transition-base);
    overflow: hidden;
}

.card-img-top {
    height: 250px;
    object-fit: cover; /* Prevent image deformation */
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card:hover .card-img-top {
    transform: scale(1.1); /* Zoom-in effect */
}

.hover-lift:hover {
    transform: translateY(-10px);
}

/* Price Tag */
.price-tag {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: var(--dark-pink);
    color: white;
    padding: 5px 15px;
    border-radius: 50px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 2;
}

/* Section Titles */
.section-title {
    margin-bottom: 5rem;
    text-align: center;
}

.section-title h2 {
    position: relative;
    padding-bottom: 15px;
    display: inline-block;
}

.section-title h2::after {
    content: "";
    width: 60px;
    height: 3px;
    background: var(--dark-pink);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

/* Buttons */
.btn-primary {
    background-color: var(--dark-pink);
    border-color: var(--dark-pink);
    padding: 12px 30px;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #e62e8a;
    border-color: #e62e8a;
}

.btn-outline-primary {
    color: var(--dark-pink);
    border-color: var(--dark-pink);
}

.btn-outline-primary:hover {
    background-color: var(--dark-pink);
    border-color: var(--dark-pink);
}

/* Floating Action Buttons */
#btn-call-cta {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366; /* Phone/WhatsApp green */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: var(--transition-base);
    text-decoration: none;
}

#btn-call-cta .pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
    opacity: 0.6;
    animation: btn-pulse 2s infinite;
    z-index: -1;
}

@keyframes btn-pulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.8); opacity: 0; }
}

#btn-cart-cta {
    position: fixed;
    bottom: 30px;
    left: 105px; /* Between Phone (30px) and Right side */
    width: 60px;
    height: 60px;
    background-color: var(--dark-pink);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: var(--transition-base);
    text-decoration: none;
}

#btn-cart-cta .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ffc107;
    color: #000;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 50%;
    border: 2px solid white;
}

#btn-call-cta:hover, #btn-cart-cta:hover {
    transform: scale(1.1);
    color: white;
}

/* Back to Top Button */
#btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--dark-pink);
    border: none;
    color: white;
    border-radius: 50%;
    display: none; /* Controlled by JS as flex */
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: var(--transition-base);
}

#btn-back-to-top:hover {
    transform: scale(1.1);
}

/* Custom Close Button for Alerts */
.btn-close-pink {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23FF3399'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
    opacity: 0.8;
}

.btn-close-pink:hover {
    opacity: 1;
}

.hover-primary:hover {
    color: var(--dark-pink) !important;
    transition: var(--transition-base);
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-qty {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background-color: var(--dark-pink);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition-base);
}

.btn-qty:hover {
    transform: scale(1.1);
    background-color: var(--primary-pink);
}

.qty-input {
    width: 45px;
    text-align: center;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-weight: bold;
    color: var(--dark-pink);
}

/* Utils */
.text-primary { color: var(--dark-pink) !important; }
.bg-light { background-color: var(--light-bg) !important; }

/* Logo Animation */
.navbar-brand img {
    animation: logo-zoom 4s ease-in-out infinite;
}

@keyframes logo-zoom {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* Flashing Badge */
.badge-flashing {
    animation: badge-pulse 1.5s infinite;
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
}

@keyframes badge-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Mobile Navigation */
.mobile-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 70px;
    z-index: 2050 !important;
    background-color: #fff !important;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1) !important;
    margin: 0 !important;
    padding: 0 !important;
}

.mobile-bottom-nav .container-fluid {
    padding: 0 10px;
    height: 100%;
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    color: #888 !important;
    font-size: 0.65rem;
    font-weight: 600;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
    height: 100%;
}

.mobile-nav-link i {
    font-size: 1.3rem;
    margin-bottom: 2px;
}

.mobile-nav-link.active {
    color: var(--secondary-color) !important;
}

/* Footer Fixes */
footer.fixed-bottom {
    z-index: 1040; /* Lower than mobile nav */
}

/* Fullscreen Menu */
.mobile-full-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--secondary-color);
    z-index: 2100;
    display: none;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-full-menu.active {
    display: flex;
}

.font-fancy { font-family: 'Dancing Script', cursive; }

/* Menu Category Cards */
.category-card {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 1/1;
    position: relative;
    overflow: hidden;
    border-radius: 1rem !important;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

.category-card-img-wrapper {
    height: 100%;
    width: 100%;
}

.category-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover .category-card-img {
    transform: scale(1.1);
}

.category-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 50%, rgba(0,0,0,0) 100%);
    color: white;
}

/* Product Cards inside Popup */
.product-card {
    border: none;
    border-radius: 20px;
    transition: transform 0.3s ease;
    background: white;
}

.product-card:hover {
    transform: scale(1.02);
}

.product-price {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-pink);
    font-weight: 800;
    font-size: 1.1rem;
}

.modal-fullscreen .modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.product-card-anim {
    animation: fadeInUp 0.4s ease forwards;
}

/* Interaction Hub Styles */
.interaction-card {
    min-height: 500px;
    transition: all 0.5s ease;
}

.reason-option {
    border: 2px solid #f8f9fa;
    background: #f8f9fa;
}

.reason-option:hover {
    border-color: var(--primary-color);
    background: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255,192,224,0.2);
}

.reason-option.selected {
    border-color: var(--secondary-color);
    background: white;
    box-shadow: 0 10px 20px rgba(255,51,153,0.1);
}

.step-content {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.cursor-pointer { cursor: pointer; }
.transition-all { transition: all 0.3s ease; }

/* Modal Overrides for Mobile Nav compatibility */
.modal { z-index: 3000 !important; }
.modal-backdrop { z-index: 2950 !important; }

@media (max-width: 768px) {
    .modal-footer {
        padding-bottom: 20px !important; /* Ensure space for safe areas */
    }
    
    /* If bottom nav is still visible or we want to avoid overlap even with higher z-index */
    .modal-dialog-centered {
        margin-bottom: 20px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    #btn-call-cta, #btn-cart-cta, #btn-back-to-top { bottom: 100px !important; }
    footer { padding-bottom: 90px !important; }
    section { padding: 60px 0; }
    .carousel-caption h2 { font-size: 2rem; }
    .parallax-window, #mainCarousel .carousel-item { height: 60vh; background-attachment: scroll; }
    .carousel-caption { padding: 20px; bottom: 15%; }
}
