/* color palette */
:root {
    --coffee-bg-light: #E6D3B3;   /* Light beige background for hero/header sections */
    --coffee-bg-dark: #2B2523;    /* Dark coffee brown for body and footer backgrounds */
    --coffee-brown: #5B3A29;      /* Medium brown for navbar or section dividers */
    --coffee-accent: #B48A64;     /* Accent brown for buttons and highlights */
    --coffee-text: #F0E6D2;       /* Light cream text for dark sections */
    --coffee-heading: #3C2F25;    /* Dark text for light sections (titles/headings) */
    --coffee-btn-light: #F5E9D0;  /* Light button background */
    --coffee-btn-hover: #D8C09A;  /* Button hover effect */

    --font-family: "Poppins", sans-serif;
}

/* all */ 
* {
    /* border: 1px solid red; */
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

/* Body */
body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--coffee-bg-dark);
    overflow-x: hidden;
}

/* Loader */
.loader {
    width: 48px;
    height: 48px;
    border: 3px solid var(--coffee-accent);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
}
.loader::after {
    content: '';  
    box-sizing: border-box;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 3px solid;
    border-color: var(--coffee-bg-light) transparent;
}

@keyframes rotation {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Main-btn */
.link {
    margin-top: 30px;
}

.main-btn {
    padding: 11px 12px;
    text-decoration: none;
    border: 1px solid var(--coffee-accent);
    background-color: var(--coffee-accent);
    color: var(--coffee-bg-dark);
    border-radius: 10px;
    font-size: 18px;
    transition: .5s ease;
}

.main-btn:hover {
    box-shadow: 0 0 8px var(--coffee-bg-light);
    background-color: var(--coffee-btn-hover);
    color: var(--coffee-bg-dark);
    transform: translateY(4px);
}

@media (max-width: 600px) {
    .main-btn {
        font-size: 16px;
        padding: 10px 11px;
    }
}

/* ============================================================== Navbar =========================================================== */
.navbar {
    background-color: #eedac9;
    backdrop-filter: blur(16px);
    padding: 25px 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--coffee-brown);
    font-weight: 700;
    font-size: 2.4rem;
    transition: all 0.3s ease;
}

.logo:hover {
    color: var(--coffee-bg-dark);
    transform: translateY(-2px);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--coffee-brown);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: all 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--coffee-brown), var(--coffee-heading));
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--coffee-bg-dark);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a.active {
    color: var(--coffee-bg-dark);
}

.nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background-color: var(--coffee-bg-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    background-color: var(--coffee-brown);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 1rem 2rem;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.mobile-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu a {
    color: var(--coffee-text);
    text-decoration: none;
    padding: 1rem 0;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-menu a i {
    color: var(--coffee-btn-hover);
    width: 20px;
}

.mobile-menu a:hover {
    color: var(--coffee-btn-hover);
    padding-left: 10px;
}

.mobile-menu a.active {
    color: var(--coffee-bg-light);
    font-weight: 900;
}

/* Responsive Styles */
@media (max-width: 968px) {
    .nav-links {
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .nav-links, .cta-container {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .mobile-menu {
        display: flex;
    }
}

/* ========================================================= Footer ================================================================ */
footer {
    padding: 40px 0;
    background-color: #eedac9;
    color: var(--coffee-bg-dark);
    overflow-x: hidden;
}

.rights .copyright strong {
    color: var(--coffee-bg-dark);
}

.rights .social-links a {
    text-decoration: none;
}

.rights .social-links a {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    color: var(--coffee-btn-light);
    background-color: var(--coffee-bg-dark);
    font-size: 22px;
}

.rights .social-links .facebook,
.rights .social-links .instagram {
    transition: .4s ease;
}

.rights .social-links .facebook:hover,
.rights .social-links .instagram:hover {
    background-color: var(--coffee-accent);
    color: var(--coffee-text);
    transform: translateY(-3px);
    box-shadow: 0 0 15px var(--coffee-accent);
}

@media (max-width: 768px) {
    .rights {
        flex-direction: column;
        flex-wrap: wrap;
        text-align: center;
        gap: 15px;
    }
}

/* ======================================================================= Landing ================================================= */
.landing {
    padding: 40px 0;
    background-image: url("../imgs/bg/coffe-5.jpg");
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing .landing-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--coffee-heading);
    max-width: 600px;
    padding: 20px;
}

.landing-text h1 {
    font-size: 50px;
    font-family: var(--font-family);
    font-weight: bold;
}

.masked-text {
    font-size: 8rem;
    font-weight: bold;
    color: transparent;
    background-image: url('../imgs/boissons-froides/Latte-espagnol.jpg'); 
    background-size: 200%; 
    background-position: 0 50%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: animate-background 7s infinite alternate linear;
}

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

@media (min-width: 992px) {
    .landing {
        justify-content: flex-start;
        padding-left: 10%;
        height: 80vh;
    }

    .landing .landing-text {
        align-items: flex-start;
        text-align: left;
    }
}

/* ============================================================== About =========================================================== */
.about-section {
    color: var(--coffee-text);
    padding: 60px 0;
}

.about-content img {
    max-width: 490px;
    height: auto;
    transition: .7s ease;
}

.about-content img:hover {
    transform: translateX(-3px) scale(1.01);
}

.content-2 {
    padding-top: 50px;
}

.about-text h3 {
    font-size: 28px;
    font-weight: bold;
    color: var(--coffee-bg-light);
    font-family: var(--font-family);
    margin-bottom: 15px;
    transition: .4s ease;
}

.about-text h3:hover {
    text-decoration: underline;
    transform: translateY(-2px);
}

.about-text p {
    font-size: 16px;
    max-width: 80%;
    color: var(--coffee-text);
    opacity: .7;
    line-height: 1.6;
}

/* Mobile & tablet adjustments */
@media (max-width: 991px) {
    .about-content {
        text-align: center;
    }

    .about-content img {
        max-width: 90%;
    }

    .about-text p {
        margin: auto;
    }
}

/* =============================================================== Why Us ======================================================== */
.why-us {
    padding: 40px 0;
    color: var(--coffee-btn-light);
    background-color: #362f2c;
}

.main-title h1 {
    font-family: var(--font-family);
    font-size: 35px;
}

.main-title h1 span {
    text-decoration: underline;
    color: var(--coffee-accent);
}

.main-title p {
    font-size: 16px;
    margin-top: 10px;
    opacity: .6;
}

.why {
    border: 1px solid var(--coffee-bg-dark);
    border-radius: 16px;
    padding: 40px 25px;
    text-align: center;
    overflow: hidden;
    transition: all 0.5s ease;
    position: relative;
}

.why:hover {
    border-color: var(--coffee-accent);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    background-color: var(--coffee-accent);
}

.why .icon {
    height: 60px;
    width: 60px;
    border-radius: 50%;
    background-color: var(--coffee-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    transition: all 0.4s ease;
}

.why:hover .icon {
    background-color: var(--coffee-bg-light);
    color: var(--coffee-heading);
    transform: scale(1.1);
}

.why .icon i {
    font-size: 25px;
    transition: color 0.4s ease;
}

.why:hover .icon i {
    color: var(--coffee-heading);
}

.why h3 {
    font-family: var(--font-family);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--coffee-text);
    transition: color 0.4s ease;
}

.why p {
    opacity: 0.7;
    line-height: 1.6;
    font-weight: 300;
    transition: opacity 0.4s ease;
}

.why:hover h3 {
    color: var(--coffee-bg-dark);
}


.why:hover p {
    opacity: 0.70;
    color: var(--coffee-bg-dark);
}

/* ============================================================ Best Products ====================================================== */
.best-products {
    padding: 40px 0;
    background-color: #362f2c;
    color: var(--coffee-btn-light);
    overflow-x: hidden;
}

.card-body {
    background-color: var(--coffee-bg-dark);
}

.card-text {
    color: white;
    opacity: .7;
}

.coffee-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 16px;
}

.coffee-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15) !important;
}

.coffee-card .card-img-top {
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.coffee-card:hover .card-img-top {
    transform: scale(1.05);
}

.coffee-card .card-img-overlay {
    background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.7));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.coffee-card:hover .card-img-overlay {
    opacity: 1;
}

.text-coffee-accent {
    color: var(--coffee-accent) !important;
}

.text-coffee-heading {
    font-family: var(--font-family);
    color: var(--coffee-bg-light) !important;
}

.bg-coffee-accent {
    background-color: var(--coffee-btn-hover) !important;
}

.rating {
    font-size: 0.9rem;
}

.btn-coffee-accent {
    background-color: var(--coffee-accent);
    color: white;
    font-family: var(--font-family);
    border: none;
    transition: all 0.3s ease;
}

.btn-coffee-accent:hover {
    background-color: var(--coffee-brown);
    color: var(--coffee-text);
}

.price-badge .badge {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .coffee-card .card-img-overlay {
        opacity: 1;
    }
}

/* ================================================================== Categories ================================================== */
.categories {
    padding: 40px 0;
    color: var(--coffee-bg-light);
}

.category-card {
    border: 1px solid var(--coffee-accent);
    box-shadow: 0 0 20px var(--coffee-accent);
    width: 420px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    border-radius: 16px;
    overflow: hidden;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2) !important;
}

.category-image {
    height: 300px;
    overflow: hidden;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.category-card:hover .category-image img {
    transform: scale(1.1);
}

.category-overlay {
    background: linear-gradient(to bottom, transparent 0%, rgba(43, 37, 35, 0.9) 80%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.overlay-content {
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.category-card:hover .overlay-content {
    transform: translateY(0);
}

.btn-coffee-light {
    background-color: var(--coffee-btn-light);
    color: var(--coffee-heading);
    border: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-coffee-light:hover {
    background-color: var(--coffee-accent);
    transform: translateX(5px);
}

.btn-coffee-accent {
    background-color: var(--coffee-accent);
    color: white;
    border: none;
    transition: all 0.3s ease;
}

.btn-coffee-accent:hover {
    background-color: var(--coffee-brown);
    color: var(--coffee-text);
}

.text-coffee-accent {
    color: var(--coffee-accent) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .category-card {
        width: 400px;
        margin: auto;
    }

    .category-overlay {
        opacity: 1;
    }
    
    .overlay-content {
        transform: translateY(0);
    }
    
    .category-image {
        height: 250px;
    }
}

/* ============================================================== Our Products ==================================================== */
.our-products {
    padding: 45px 0;
    color: var(--coffee-bg-light);
}

.product-card {
    background: linear-gradient(145deg, #3a332f, #2b2523);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 10px rgba(180, 138, 100, 0.2);
}

.card-image-container {
    height: 220px;
    border-radius: 16px 16px 0 0;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .card-img {
    transform: scale(1.08);
}

.price-badge .badge-price {
    background: linear-gradient(135deg, var(--coffee-accent), var(--coffee-brown));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(180, 138, 100, 0.3);
    transition: all 0.3s ease;
}

.product-card:hover .badge-price {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(180, 138, 100, 0.4);
}

.card-title {
    color: var(--coffee-btn-hover);
    text-decoration: underline;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.card-text {
    color: var(--coffee-text);
    opacity: 0.9;
    line-height: 1.5;
}

.product-meta .product-category {
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.product-features {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.feature-tag {
    background: rgba(180, 138, 100, 0.2);
    color: var(--coffee-accent);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    border: 1px solid rgba(180, 138, 100, 0.3);
}

.text-coffee-accent {
    color: var(--coffee-accent) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-overlay {
        opacity: 1;
    }
    
    .btn-order {
        transform: translateY(0);
        opacity: 1;
    }
    
    .card-image-container {
        height: 200px;
    }
}