@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display&family=Work+Sans:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Work+Sans:wght@100;400;700&display=swap');

:root {
    --primary-color: #A0522D;
    --secondary-color: #D2B48C;
    --accent-color: #CD853F;
    --text-dark: #5C4033;
    --text-light: #F5F5DC;
    --background-light: #FAF8F1;
}

@keyframes imageCarousel {
    0%       { background-image: url(../../assets/cjp-landing1.jpg); transform: scale(1); }
    24.99%   { background-image: url(../../assets/cjp-landing1.jpg); transform: scale(1.1); }
    25%      { background-image: url(../../assets/cjp-landing2.webp); transform: scale(1); }
    49.99%   { background-image: url(../../assets/cjp-landing2.webp); transform: scale(1.1); }
    50%      { background-image: url(../../assets/cjp-landing3.jpg); transform: scale(1); }
    74.99%   { background-image: url(../../assets/cjp-landing3.jpg); transform: scale(1.1); }
    75%      { background-image: url(../../assets/cjp-landing4.jpg); transform: scale(1); }
    100%     { background-image: url(../../assets/cjp-landing4.jpg); transform: scale(1.1); }
}
@keyframes textFillZoom { 0%, 25%, 50%, 75% { background-size: 150%; } 24.99%, 49.99%, 74.99%, 100% { background-size: 165%; } }
@keyframes textImageSwitch {
    0%       { background-image: url(../../assets/cjp-landing1.jpg); }
    25%      { background-image: url(../../assets/cjp-landing2.webp); }
    50%      { background-image: url(../../assets/cjp-landing3.jpg); }
    75%      { background-image: url(../../assets/cjp-landing4.jpg); }
    100%     { background-image: url(../../assets/cjp-landing1.jpg); }
}
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInLeft { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* --- Basic Setup --- */
html { scroll-behavior: smooth; }
body { padding: 0; margin: 0; background-color: var(--background-light); font-family: 'Work Sans', sans-serif; overflow-x: hidden; }

/* --- Navbar --- */
.home-navbar { background-color: transparent; display: flex; align-items: center; justify-content: space-between; padding: 0.8rem 5%; position: fixed; top: 0; left: 0; width: 100%; box-sizing: border-box; z-index: 1000; transition: background-color 0.4s ease, box-shadow 0.4s ease; }
.home-navbar.scrolled { background-color: var(--secondary-color); box-shadow: 0 0.5vw 2vw rgba(92, 64, 51, 0.2); }
.navbar-logo { height: auto; width: clamp(100px, 20vw, 180px); z-index: 1001; }
.nav-links { display: flex; gap: clamp(1rem, 2.5vw, 2.5rem); }
.nav-links a { text-decoration: none; color: #F5F5DC; font-weight: 500; font-size: clamp(0.9rem, 1.2vw, 1.1rem); white-space: nowrap; transition: color 0.4s ease; }
.home-navbar.scrolled .nav-links a { color: var(--text-dark); }
.hamburger-menu { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; background-color: #F5F5DC; transition: all 0.3s ease-in-out; }
.home-navbar.scrolled .bar { background-color: var(--text-dark); }

/* --- Landing Page --- */
.landing-page-container { display: flex; align-items: center; justify-content: center; text-align: center; color: #F5F5DC; position: relative; z-index: 1; overflow: hidden; min-height: 100vh; padding: 0 5%; margin: 0; }
.landing-page-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* CORRECTED: Changed from transparent brown to transparent black */
    background-color: rgba(0, 0, 0, 0.7);
    z-index: -1;
}
.landing-page-container::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; animation: imageCarousel 20s linear infinite; background-size: cover; background-position: center; z-index: -2; }
.text-group { max-width: 100%; font-size: clamp(1.5rem, 4vw, 2.5rem); font-family: 'Work Sans', sans-serif; }
.landing-page-container span { font-family: 'DM Serif Display', sans-serif; font-size: clamp(4rem, 10vw, 9rem); line-height: 1; background-position: center; -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; animation: textImageSwitch 20s steps(1, end) infinite, textFillZoom 20s linear infinite; }
.button-row { display: flex; gap: 1rem; margin-top: 1.5rem; justify-content: center; }
.learn-more-button, .buy-now-button { display: inline-block; padding: clamp(0.6rem, 1vw, 0.8rem) clamp(1.5rem, 2vw, 2rem); border-radius: 50px; font-size: clamp(0.8rem, 1.5vw, 1.1rem); font-weight: 500; text-align: center; cursor: pointer; transition: all 0.2s ease-out; text-decoration: none; }
.learn-more-button { background-color: var(--secondary-color); color: var(--text-dark); }
.buy-now-button { background-color: var(--accent-color); color: var(--text-light); }
.learn-more-button:hover { background-color: #c5a982; transform: scale(1.05); }
.buy-now-button:hover { background-color: var(--primary-color); transform: scale(1.05); }

/* --- Video Section --- */
.video-title { font-family: 'Work Sans', sans-serif; font-size: clamp(1.5rem, 3vw, 2.5rem); line-height: 1.2; text-align: center; margin: 3vw 6vw -2vw 6vw; color: var(--text-dark); }
.video-title span { font-family: 'DM Serif Display', sans-serif; font-size: clamp(2rem, 5vw, 4.5rem); color: var(--primary-color); }
.video-section { width: calc(100% - 4rem); max-width: 1200px; margin: 2rem auto; border: 1px solid var(--text-dark); border-radius: 1.5rem; overflow: hidden; position: relative; aspect-ratio: 16 / 9; }
.video-section video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- About Section --- */
.about-container { background-color: var(--secondary-color); color: var(--text-dark); padding: 5%; }
.about { display: flex; align-items: center; gap: 3rem; }
.title-wrap { font-family: 'Work Sans', sans-serif; font-size: clamp(1.5rem, 3vw, 2.5rem); line-height: 1.2; }
.title-wrap span { font-family: 'DM Serif Display', sans-serif; font-size: clamp(3rem, 5vw, 4.5rem); color: var(--primary-color); }
.about-left { flex: 1.5; }
.about-right { flex: 1; }
.about-right img { width: 100%; height: auto; border-radius: 1rem; }
.about-separator { height: 2px; background-color: var(--text-dark); margin: 1.5rem 0; width: 90%; }
.about-desc, .about-desc2 { font-weight: 400; font-size: clamp(0.9rem, 1.5vw, 1.1rem); line-height: 1.6; max-width: 90%; }
.about-desc span, .about-desc2 span { font-weight: bold; }
.about-separator2 { height: 2px; background-color: var(--text-dark); margin: 3rem 0; }
.about-closing { font-family: 'DM Serif Display', sans-serif; font-size: clamp(1.5rem, 3vw, 2.5rem); text-align: center; margin-top: -4.5rem; background-color: var(--secondary-color); width: 70%; margin-left: auto; margin-right: auto; }

/* --- Creations Section --- */
.creations-wrapper { padding: 5% 0; }
.creations-container { border: 1px solid var(--primary-color); padding: 4rem 5%; margin: 0 5%; border-radius: 1.5rem; position: relative; }
.creations-title { font-family: 'Work Sans', sans-serif; font-weight: 100; font-size: clamp(3rem, 8vw, 6rem); text-align: center; background-color: var(--background-light); padding: 0 2rem; position: absolute; top: clamp(-4vw, -4vw, -4rem); left: 0; right: 0; margin-left: auto; margin-right: auto; width: fit-content; color: var(--text-dark); }
.creations-cards { background-color: var(--primary-color); border-radius: 1.5rem; padding: 3rem; color: var(--text-light); }
.creations-cards:not(:last-child) { margin-bottom: 3rem; }
.creations-heading { font-family: 'DM Serif Display', serif; font-size: clamp(2rem, 4vw, 3.5rem); color: var(--secondary-color); font-style: italic; margin-bottom: 1.5rem; }
.creations-content { display: flex; align-items: center; gap: 3rem; }
.creations-content.reverse { flex-direction: row-reverse; }
.creations-text { flex: 1.5; font-size: clamp(0.9rem, 1.5vw, 1.1rem); line-height: 1.6; text-align: left; }
.creations-text p, .creations-text ul { margin-top: 0.5rem; }
.creations-text ul { padding-left: 1.2rem; }
.creations-image { flex: 1; }
.creations-image img { width: 100%; border-radius: 1rem; object-fit: cover; }
.expandable-creations { max-height: 0; overflow: hidden; transition: max-height 0.7s ease-in-out; }
.expandable-creations.expanded { max-height: 2000px; }
.view-more-button { display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: fit-content; margin: 2rem auto 0; padding: 0.75rem 1.5rem; border: 1px solid var(--text-dark); border-radius: 50px; cursor: pointer; font-size: clamp(0.9rem, 1.5vw, 1.1rem); color: var(--text-dark); transition: background-color 0.3s, color 0.3s; }
.view-more-button:hover { background-color: var(--text-dark); color: var(--text-light); }
.view-more-button svg { width: 20px; height: 20px; stroke: currentColor; transition: transform 0.4s ease; }
.view-more-button.expanded svg { transform: rotate(180deg); }

/* --- Catalogue Section --- */
.catalogue-container { background-color: var(--secondary-color); padding: 5%; color: var(--text-dark); display: flex; flex-direction: column; align-items: center; text-align: center; }
.catalogue-title { font-family: 'DM Serif Display', sans-serif; font-size: clamp(2.5rem, 6vw, 4rem); line-height: 1; margin: 0 0 1rem 0; }
.catalogue-image-wrapper { max-width: 400px; width: 100%; margin-bottom: 2rem; }
.catalogue-image-wrapper img { width: 100%; height: auto; border-radius: 1.5rem; }
.product-weights-text { margin-top: 1rem; }
.catalogue-container span { font-family: 'Work Sans', sans-serif; font-size: clamp(1rem, 2vw, 1.5rem); }
.catalogue-container button { background-color: var(--accent-color); color: var(--text-light); font-family: 'Work Sans', sans-serif; border: none; border-radius: 50px; cursor: pointer; transition: all 0.3s ease-out; }
.catalogue-container button:hover { background-color: var(--primary-color); transform: scale(1.05); }
.button-container { margin: 1rem 0 1rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
.button-container button { padding: 0.7rem 1.5rem; font-size: clamp(0.8rem, 1.2vw, 1rem); }
#product-description-container { font-family: 'Work Sans', sans-serif; background-color: rgba(92, 64, 51, 0.1); border-radius: 0.5rem; padding: 1rem; margin-bottom: 2rem; opacity: 0; max-height: 0; overflow: hidden; transition: all 0.5s ease-in-out; width: 100%; max-width: 600px; box-sizing: border-box; }
#product-description-container.visible { opacity: 1; max-height: 500px; }
#description-title { display: block; font-family: 'DM Serif Display', serif; font-size: clamp(1.1rem, 1.8vw, 1.3rem); font-weight: 700; color: var(--text-dark); line-height: 1.2; margin-bottom: 0.5rem; }
#description-text { font-size: clamp(0.85rem, 1.2vw, 1rem); line-height: 1.6; color: var(--primary-color); margin-top: 0; }
.catalogue-actions { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; }
.get-now-button { text-decoration: none; font-family: 'Work Sans', sans-serif; font-weight: 500; color: var(--text-light); padding: 0.8rem 2rem; font-size: clamp(0.9rem, 1.5vw, 1.2rem); background-color: var(--primary-color); border-radius: 50px; transition: background-color 0.3s ease-out; display: inline-block; }
.get-now-button:hover { background-color: #7d401a; }
.contact-us-button { text-decoration: none; font-family: 'Work Sans', sans-serif; font-weight: 500; color: var(--text-dark); padding: 0.8rem 2rem; font-size: clamp(0.9rem, 1.5vw, 1.2rem); background-color: transparent; border: 2px solid var(--text-dark); border-radius: 50px; transition: all 0.3s ease-out; display: inline-block; }
.contact-us-button:hover { background-color: var(--text-dark); color: var(--text-light); }
.shelf { font-family: 'Work Sans', sans-serif; font-size: clamp(0.9rem, 1.5vw, 1.1rem); margin-top: 1rem; }
.button-container button.selected { background-color: var(--primary-color); color: var(--text-light); transform: scale(1.05); }

/* --- Floating Button & Popup --- */
.floating-buy-button { position: fixed; bottom: 2rem; right: 2rem; background-color: var(--accent-color); color: var(--text-light); padding: 1rem 1.5rem; border-radius: 50px; text-decoration: none; font-family: 'Work Sans', sans-serif; font-weight: 700; font-size: clamp(0.9rem, 1.5vw, 1.1rem); box-shadow: 0 4px 15px rgba(0,0,0,0.2); z-index: 999; transition: all 0.3s ease-out; }
.floating-buy-button:hover { background-color: var(--primary-color); transform: translateY(-5px); }
.popup-overlay { visibility: hidden; opacity: 0; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.7); z-index: 2000; display: flex; justify-content: center; align-items: center; padding: 1rem; box-sizing: border-box; transition: opacity 0.3s ease, visibility 0.3s ease; }
.popup-overlay.visible { visibility: visible; opacity: 1; }
.popup-content { background-color: var(--primary-color); color: var(--text-light); padding: 2rem; border-radius: 1.5rem; text-align: center; position: relative; width: 90%; max-width: 400px; transform: scale(0.9); transition: transform 0.3s ease; }
.popup-overlay.visible .popup-content { transform: scale(1); }
.close-popup { position: absolute; top: 1rem; right: 1.5rem; font-size: 2rem; font-weight: bold; cursor: pointer; color: var(--text-light); }
#popup-title { font-family: 'DM Serif Display', serif; margin: 0; font-size: 2rem; }
#popup-product-name, #popup-product-weight { font-family: 'Work Sans', sans-serif; margin: 0.25rem 0; font-size: 1.2rem; }
#popup-product-weight { font-weight: 700; margin-bottom: 1rem; }
#popup-product-image { width: 80%; max-width: 250px; height: auto; border-radius: 1rem; margin-bottom: 1rem; }
.popup-marketplace-title { font-size: 1rem; margin: 1.5rem 0 1rem; }
.popup-content .marketplace-logos { padding: 0; display: flex; justify-content: center; gap: 1rem; }
.popup-content .marketplace-logos img { width: 60px; height: 60px; }
.popup-instagram { margin-top: 1.5rem; font-size: 1.1rem; font-weight: 700; }

/* --- Best Sellers Section --- */
.best-sellers { padding: 4rem 5%; background-color: var(--background-light); }
.section-title { font-family: 'DM Serif Display', serif; font-size: clamp(2.5rem, 5vw, 3.5rem); text-align: center; color: var(--primary-color); margin-bottom: 2.5rem; }
.best-sellers-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; max-width: 800px; margin: 0 auto; }
.product-card { background-color: #fff; border-radius: 1rem; overflow: hidden; text-decoration: none; color: var(--text-dark); box-shadow: 0 4px 15px rgba(92, 64, 51, 0.05); transition: all 0.3s ease-out; }
.product-card:hover { transform: translateY(-10px); box-shadow: 0 10px 25px rgba(92, 64, 51, 0.1); }
.product-card img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.product-card .product-info { padding: 1.5rem; text-align: center; }
.product-card h3 { margin: 0; font-family: 'Work Sans', sans-serif; font-size: 1.25rem; font-weight: 700; }

/* --- Footer --- */
.main-footer { background-color: var(--text-dark); color: var(--text-light); text-align: center; padding: 1.5rem; font-size: 0.9rem; }

/* --- Animation & Responsive --- */
.animated-section { opacity: 0; transition: opacity 0.5s ease-out; }
.animated-section.visible { opacity: 1; }
.anim-fade-in-up, .anim-fade-in-left, .anim-fade-in-right { opacity: 0; }
.animated-section.visible .anim-fade-in-up { animation: fadeInUp 1s ease forwards; }
.animated-section.visible .anim-fade-in-left { animation: fadeInLeft 1s ease forwards; }
.animated-section.visible .anim-fade-in-right { animation: fadeInRight 1s ease forwards; }
.animated-section.visible .delay-1 { animation-delay: 0.2s; }
.animated-section.visible .delay-2 { animation-delay: 0.4s; }
.animated-section.visible .delay-3 { animation-delay: 0.6s; }

@media (max-width: 992px) {
    .about { flex-direction: column; text-align: center; }
    .about-left, .about-right { max-width: 100%; }
    .about-right img { margin-top: 2rem; }
    .about-separator, .about-separator2 { width: 100%; margin-left: auto; margin-right: auto; }
    .about-desc, .about-desc2 { max-width: 100%; }
    .creations-content, .creations-content.reverse { flex-direction: column; gap: 1rem; }
    .creations-text { text-align: center; }
    .creations-image { margin-top: 0; }
    .creations-content.reverse .creations-image { order: -1; }
    .button-container { justify-content: center; }
    .catalogue-actions { justify-content: center; }
}

@media (max-width: 768px) {
    .hamburger-menu { display: block; z-index: 1001; }
    .hamburger-menu.active .bar:nth-child(2) { opacity: 0; }
    .hamburger-menu.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger-menu.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    .nav-links { position: fixed; left: 100%; top: 0; gap: 0; flex-direction: column; background-color: rgba(92, 64, 51, 0.95); width: 100%; height: 100vh; text-align: center; transition: 0.3s; justify-content: center; }
    .nav-links.active { left: 0; }
    .nav-links a { color: var(--text-light); font-size: 1.5rem; padding: 1.5rem 0; }
    .home-navbar.scrolled .nav-links a { color: var(--text-light); }
    .creations-container { margin-top: 10vw; }
    .best-sellers-grid { grid-template-columns: 1fr; }
}

/* Style for unavailable marketplace logos in the popup */
.marketplace-logos a.disabled {
    filter: grayscale(100%); /* Makes the image black and white */
    opacity: 0.5;            /* Makes it semi-transparent */
    cursor: default;         /* Changes the cursor to show it's not a primary action */
    transition: all 0.2s ease;
}

.marketplace-logos a.disabled:hover {
    transform: scale(1); /* Prevents the icon from scaling on hover */
    opacity: 0.6;        /* Slightly increase opacity on hover for feedback */
}