/* 
 * BELLA MEDICA - MAIN STYLESHEET
 * Table of Contents:
 * 1. CSS Variables (Color Palette)
 * 2. Base Styles
 * 3. Components
 *    3.1 Buttons
 *    3.2 Navigation
 *    3.3 Hero Sections
 *    3.4 Cards & Content
 *    3.5 Product Components
 *    3.6 Slider Components
 * 4. Page Specific Styles
 *    4.1 Products Page
 *    4.2 About Page
 * 5. Common Sections
 *    5.1 Testimonials
 *    5.2 Newsletter
 *    5.3 CTA
 * 6. Footer
 * 7. Utilities
 * 8. Media Queries
 */

/* 1. CSS Variables (Color Palette) */
:root {
    /* Primary Colors - Deep Wine Inspired */
    --primary-light: #A65C84;
    /* Muted rose, lightened tone of primary */
    --primary-color: #702f4f;
    /* Deep wine (main primary) */
    --primary-medium: #860a46;
    /* Medium plum */
    --primary-dark: #57002e;
    /* Almost black wine */

    /* Neutral Colors */
    --light-color: #FFF5F7;
    /* Soft blush white */
    --gray-light: #F3E4E8;
    /* Blush-tinted light gray */
    --gray-color: #D6C3CB;
    /* Warm muted gray */
    --gray-dark: #B49CA6;
    /* Muted warm dark gray */
    --dark-color: #2C081B;
    /* Matches primary dark for cohesion */

    /* Accent Colors - Warm and Elegant */
    --accent-peach: #F2B6A0;
    /* Elegant peach */
    --accent-beige: #D8B6A0;
    /* Subtle warm beige */
    --accent-brown: #B48874;
    /* Rich soft brown */
    --accent-gold: #D4AF37;
    /* Classic gold */

    /* Text Colors */
    --text-dark: #2A1B1D;
    /* Deep muted black */
    --text-medium: #533542;
    /* Muted plum-gray */
    --text-light: #8A6B76;
    /* Dusty rose-gray */

    /* Additional Variables */
    --white-color: #FFFFFF;
    --secondary-color: var(--text-light);
}

/* 2. Base Styles */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--light-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-dark);
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
    color: var(--primary-dark);
}

a:hover {
    color: var(--primary-medium);
}

/* 3. Components */
/* 3.1 Buttons */
.btn {
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: var(--primary-dark);
    color: white;
    border-color: var(--primary-dark);
}

.btn-primary:hover {
    background-color: var(--primary-medium);
    border-color: var(--primary-medium);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 134, 134, 0.2);
}

.btn-outline-primary {
    color: var(--primary-dark);
    border: 1px solid var(--primary-dark);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* 3.2 Navigation */
header.sticky-top {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    background-color: var(--white-color);
    position: relative;
    z-index: 9999;
    /* Keeps it above other content */
}

.navbar {
    padding: 1rem 0;
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    color: var(--text-dark);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-light) !important;
}

/* Mobile view adjustments */
@media (max-width: 991px) {
    .hero {
        position: relative;
        z-index: 0;
    }

    .navbar-collapse {
        position: relative;
    }

    .navbar-toggler {
        z-index: 1051;
    }

    /* Show dropdown on hover for larger screens, but keep click for mobile */
    .navbar-nav .nav-item.dropdown:hover .dropdown-menu {
        display: block;
    }
}

/* Larger screen adjustments: Hover dropdown */
@media (min-width: 992px) {

    /* Show dropdown on hover for tablets and desktops */
    .navbar-nav .nav-item.dropdown:hover .dropdown-menu {
        display: block;
    }

    /* Optional: Add some delay or smooth transition */
    .navbar-nav .nav-item.dropdown .dropdown-menu {
        display: none;
        transition: opacity 0.3s ease-in-out;
        opacity: 0;
    }

    .navbar-nav .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        opacity: 1;
    }
}

/* Mobile-specific dropdown click */
@media (max-width: 991px) {

    /* Default dropdown menu behavior for small screens (click to open) */
    .navbar-nav .nav-item.dropdown .dropdown-menu {
        display: none;
    }

    .navbar-nav .nav-item.dropdown.show .dropdown-menu {
        display: block;
    }
}

.product-item {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-item:hover {
    background: rgba(255, 255, 255, 0.05);
}



/* 3.3 Hero Sections */
.hero-section {
    position: relative;
    padding: 6rem 1rem;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: var(--text-dark);
    overflow: hidden;
    min-height: 95vh;
    display: flex;
    align-items: center;
    z-index: 0;
}

/* Image overlay */
.hero-section::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: url('../assets/images/hero-bg.png') no-repeat center center / cover;
    opacity: 0.8;
    z-index: 1;
    pointer-events: none;
    transition: all 0.3s ease-in-out;
}

/* Make content readable over image */
.hero-section>* {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-section .row {
    height: 100%;
}

.hero-section .col-lg-5 {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Typography */
.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.hero-section p.lead {
    font-size: 1.25rem;
    color: var(--light-color);
    margin-bottom: 2rem;
}

/* 3.4 Cards & Content */
/* Section Styling */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-dark);
}

.section-header p {
    color: var(--text-light);
}

/* 3.5 Product Components */
.product-card {
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    background-color: var(--white-color);
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(255, 182, 182, 0.2);
}

.product-img-container {
    position: relative;
    overflow: hidden;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
}

.product-img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-container img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.price {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 1.1rem;
}

.product-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.product-header {
    padding: 40px 0;
    border-bottom: 1px solid var(--gray-color);
}

.product-main {
    display: flex;
    padding: 40px 0;
    gap: 40px;
}

.product-gallery {
    flex: 1;
}

.main-image {
    width: 100%;
    height: 500px;
    object-fit: contain;
    margin-bottom: 20px;
}

.product-info {
    flex: 1;
    max-width: 500px;
}

.product-title {
    font-size: 28px;
    margin: 0 0 15px;
    font-weight: 600;
}

.product-price {
    font-size: 24px;
    color: var(--primary-color);
    margin: 20px 0;
    font-weight: 600;
}

.product-description {
    margin: 20px 0;
    line-height: 1.8;
}

.product-tabs {
    margin: 40px 0;
}

/* Featured Products Fixes */
#featured-products-container {
    min-height: 500px;
    /* Prevent layout shift */
}

.featured-product-card .card-img-top {
    background: #f8f9fa;
    border-radius: 0.25rem 0.25rem 0 0;
}

.featured-product-card .card-body {
    border-top: 1px solid rgba(0, 0, 0, 0.125);
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid var(--primary-medium);
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    position: relative;
    color: var(--primary-dark);
    outline: none;
}

.tab-btn.active {
    font-weight: 600;
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.tab-btn:focus {
    outline: none;
}

.tab-content {
    display: none;
    padding: 20px 0;
    line-height: 1.8;
}

.tab-content.active {
    display: block;
}

/* 3.6 Slider Components */
.carousel-fade .carousel-inner {
    transition: transform 0.8s ease-in-out;
}

.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    transform: scale(1.03);
}

.carousel-fade .carousel-item.active {
    opacity: 1;
    transform: scale(1);
}

.carousel-fade .carousel-item-start,
.carousel-fade .carousel-item-end {
    opacity: 0;
    transform: scale(1.03);
}

.carousel-fade .active.carousel-item-start,
.carousel-fade .active.carousel-item-end {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0s ease-in-out, transform 0s ease-in-out;
}

.simple-slider {
    overflow: hidden;
}

.slider-container {
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    margin: 40px auto;
}

.slider-track {
    display: flex;
    gap: 1rem;
    animation: slideAuto 20s linear infinite;
    width: max-content;
}

.slider-track .product-item {
    flex: 0 0 auto;
    width: 200px;
    text-align: center;
    border: 1px solid #ddd;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.slider-track .product-item img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 10px;
}

@keyframes slideAuto {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* 4. Page Specific Styles */
.products-hero {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    color: white;
    padding: 6rem 0;
}

.products-hero h1,
.products-hero p {
    color: black;
}

/* Container holds all cards in a horizontal scrollable row */
.category-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem 0;
    justify-content: center;
    scrollbar-width: thin;
}

/* Scrollbar style for WebKit browsers */
/* Container holds all cards in a horizontal scrollable row */
.category-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 1rem;
    padding: 1rem 0;
    justify-content: center;
    scrollbar-width: thin;
}

/* Scrollbar style for WebKit browsers */
.category-container::-webkit-scrollbar {
    height: 6px;
}

.category-container::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

/* Card style */
.category-card {
    flex: 0 0 auto;
    width: 180px;
    background-color: var(--white-color);
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-light);
    box-sizing: border-box;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(255, 182, 182, 0.1);
    border-color: var(--primary-color);
}

.category-card .icon {
    color: var(--primary-dark);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Responsive tweaks for small screens */
@media (max-width: 576px) {
    .category-card {
        width: 150px;
        padding: 0.75rem;
    }

    .category-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Hide the entire product categories section on mobile */
    .product-categories {
        display: none;
    }
}

.product-section {
    padding: 3rem 0;
    border-bottom: 1px solid var(--gray-light);
}

.product-section:last-child {
    border-bottom: none;
}

.benefits-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1rem;
}

.benefits-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: flex-start;
}

.benefits-list i {
    color: var(--primary-dark);
    margin-right: 0.5rem;
    margin-top: 0.2rem;
}

@media (max-width: 576px) {
    .benefits-list li {
        flex-direction: column;
        gap: 0.3rem;
    }

    .benefits-list i {
        margin-top: 0;
        margin-right: 0;
    }
}

.ingredients-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1rem;
}

.ingredients-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: flex-start;
}

.ingredients-list i {
    color: var(--primary-dark);
    margin-right: 0.5rem;
    margin-top: 0.2rem;
}

@media (max-width: 576px) {
    .ingredients-list li {
        flex-direction: column;
        gap: 0.3rem;
    }

    .ingredients-list i {
        margin-top: 0;
        margin-right: 0;
    }
}

.benefits-list li,
.ingredients-list li {
    padding: 0.25rem 0;
    /* Reduced from 0.5rem */
    margin-bottom: 0.25rem;
    /* Optional: adds consistent spacing between items */
    display: flex;
    align-items: flex-start;
}

@media (max-width: 576px) {

    .benefits-list li,
    .ingredients-list li {
        flex-direction: column;
        gap: 0.15rem;
        /* Reduce from 0.3rem */
    }
}

/* 4.2 About Page */
.about-hero {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    color: white;
    padding: 6rem 0;
}

.about-hero h1,
.about-hero p {
    color: black;
}

.mission-stats {
    margin-top: 2rem;
}

.mission-stats .stat-number {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 2rem;
}

.mission-stats .stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.science-card {
    background-color: var(--white-color);
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    padding: 2rem;
    height: 100%;
    border: 1px solid var(--gray-light);
}

.science-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 182, 182, 0.1);
    border-color: var(--primary-color);
}

.science-card .icon {
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

.team-card {
    text-align: center;
    margin-bottom: 2rem;
}

.team-card img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
    margin-bottom: 1rem;
}

/* 5. Common Sections */
/* 5.1 Testimonials */
.testimonial-card {
    background-color: var(--white-color);
    border-radius: 0.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    padding: 2rem;
}

.testimonial-img img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    border-radius: 50%;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-medium);
}

.rating {
    color: var(--accent-gold);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

/* 5.2 Newsletter */
.bg-primary {
    background-color: var(--primary-color) !important;
}

/* 5.3 CTA */
.cta-section {
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: white;
    padding: 4rem 0;
    text-align: center;
    overflow: hidden;
}

.cta-section h2,
.cta-section p {
    color: white;
}

.cta-section .btn {
    margin-top: 1rem;
}

/* Separate intro and form sections */
.section-intro {
    padding-top: 4rem;
    padding-bottom: 2rem;
}

.section-contact-form {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

@media (max-width: 768px) {

    .section-intro,
    .section-contact-form {
        padding-top: 3rem;
        padding-bottom: 2rem;
    }

    .section-contact-form {
        margin-top: 2rem;
    }
}

.card-title {
    color: var(--primary-color);
}

.card-text a {
    color: var(--primary-color);
    text-decoration: none;
}

.card-text a:hover {
    text-decoration: underline;
}

/* 6. Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 4rem 0 2rem;
}

footer h5 {
    color: var(--white-color);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--white-color);
    padding-left: 5px;
}

.social-icons {
    margin-top: 1rem;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    margin-right: 0.5rem;
    color: white;
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* 7. Utilities */
/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-dark);
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(168, 1, 79, 0.1);
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-light);
    color: var(--white-color);
    transform: translateY(-3px);
}

/* 8. Media Queries */
@media (min-width: 992px) {
    .hero-section {
        padding: 8rem 2rem;
    }

    .hero-section h1 {
        font-size: 3.5rem;
    }
}

@media (max-width: 991px) {
    .hero-section::after {
        width: 100%;
        left: 0;
        right: auto;
        background-position: center;
        background-size: cover;
        opacity: 0.2;
    }

    .hero-section {
        text-align: center;
        padding: 4rem 1rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p.lead {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .product-main {
        flex-direction: column;
    }

    .main-image {
        height: 300px;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        text-align: center;
        padding: 4rem 0;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p.lead {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    footer .col-md-6 {
        margin-bottom: 2rem;
    }
}