@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100;400;600;900&display=swap');

/* ORIGINAL VARIABLES - Keeping for compatibility */
:root {
    --text-color: #737373;
    --primary-color: #2e3240;
    --orange: rgb(255, 100, 0);
    --dark-orange: rgb(204, 82, 0);
    --light-orange: rgb(255, 148, 77);
    --light-gray: rgb(238, 238, 238);
    --blue: #009dff;

    /* NEW MODERN VARIABLES */
    --modern-bg: #f8f9fa;
    --modern-white: #ffffff;
    --modern-text: #2c2c2c;
    --modern-text-light: #6c757d;
    --modern-accent: #007bff;
    --modern-success: #28a745;
    --modern-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --modern-shadow-sm: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.075);
    --modern-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --modern-radius: 0.375rem;
    --modern-radius-lg: 0.75rem;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* BASE STYLES - Updated for modern look */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    background-color: var(--modern-bg);
    color: var(--modern-text);
    line-height: 1.6;
}

/* IMAGE LOADING OPTIMIZATIONS */
img {
    max-width: 100%;
    height: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
    /* display: block; */
}

sup {
    font-size: medium;
}

ul,
ol,
li,
p,
h1,
h2,
h3,
h4 {
    margin: 0;
    padding: 0;
}

p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.navbar ul {
    list-style-type: none;
}

.main-header {
    color: var(--text-color);
}

#main {
    min-height: 100vh;
    padding-top: 75px;
    background-color: white;
    box-sizing: border-box;
    position: relative;
}

a,
a:visited,
a:hover,
a:active {
    text-decoration: none;
}

.Hide {
    display: none !important;
}

/* UTILITY CLASSES */
.flex {
    display: flex;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.centered {
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ORIGINAL NAVBAR STYLES - PRESERVED */
nav {
    background-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    height: 75px;
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99;
}

.navbar-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-menu li {
    margin: 0 10px;
}

.navbar-menu a {
    color: white;
    text-decoration: none;
    padding: 25px;
    font-size: 1.3rem;
}

.navbar a:hover,
.navbar-menu a.active {
    color: var(--orange);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 900;
    color: var(--text-color);
}

#perfect-zero,
#theory168,
#perfect-zero-dropdown,
#theory168-dropdown {
    font-family: 'EB Garamond', serif;
    font-size: 1.5rem;
}

.toggle-bar {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text-color);
    margin: 4px 0;
}

.menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    list-style: none;
    padding: 10px;
    z-index: 999;
    text-align: center;
}

.menu-dropdown li {
    margin-bottom: 10px;
}

.menu-dropdown a {
    color: var(--text-color);
    text-decoration: none;
}

#cart {
    padding: 0;
    display: flex;
    align-items: center;
    position: relative;
}

#cart span:nth-child(2) {
    padding-right: 5px;
}

#cart img {
    width: 30px;
}

#cart-img-hover {
    display: none;
}

#cart:hover #cart-img {
    display: none !important;
}

#cart:hover #cart-img-hover {
    display: block !important;
}

#cart-counter {
    position: absolute;
    top: -6px;
    right: 3%;
    transform: translateX(50%);
    background-color: var(--orange);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
}

#cart-counter-dropdown {
    font-weight: 600;
    color: var(--orange);
}

#product-name {
    font-size: smaller;
    color: white;
}

/* BANNER SECTION - Original main.css style */
.banner {
    position: relative;
    height: 60vh;
    overflow: hidden;
}

.banner img,
.banner video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 70%;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    text-align: left;
}

.banner-overlay h1 {
    color: #fff;
    font-size: 2.5rem;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.5;
}

/* MODERN CARDS CONTAINER */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    position: relative;
    padding: 4rem 1rem;
}

.card {
    background: var(--modern-white);
    border-radius: var(--modern-radius-lg);
    overflow: hidden;
    box-shadow: var(--modern-shadow);
    transition: var(--transition);
    position: relative;
    transform: translateY(0);
    border: 1px solid rgba(0, 0, 0, 0.05);
    min-width: 200px;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--modern-shadow-lg);
}

.card a {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
    /* Improve image loading performance */
    will-change: transform;
    backface-visibility: hidden;
    /* Prevent layout shift */
    background-color: var(--light-gray);
}

.card:hover img {
    transform: scale(1.05);
}

.card h3 {
    padding: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    background: var(--modern-white);
    color: var(--modern-text);
    margin: 0;
    position: relative;
    z-index: 2;
    border-top: 3px solid var(--orange);
}

/* MODERN CONTENT SECTIONS */
.card-content {
    padding: 3rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card-content.content-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.card-content.colored {
    background: var(--modern-white);
    margin: 2rem auto;
    border-radius: var(--modern-radius-lg);
    box-shadow: var(--modern-shadow);
    position: relative;
    overflow: hidden;
    border-left: 4px solid var(--orange);
}

.content-header {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--modern-text);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.content-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--modern-text-light);
    margin-bottom: 1.5rem;
}

.content-media {
    position: relative;
}

.content-media img {
    width: 100%;
    height: auto;
    border-radius: var(--modern-radius);
    box-shadow: var(--modern-shadow);
    transition: var(--transition);
}

.content-media img:hover {
    transform: scale(1.02);
    box-shadow: var(--modern-shadow-lg);
}

.overlay-text {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 1.5rem;
    border-radius: var(--modern-radius);
    backdrop-filter: blur(10px);
    font-weight: 500;
    line-height: 1.6;
}

/* MODERN SLIDESHOW */
.slideshow,
.slideshow-container {
    position: relative;
    max-width: 100%;
    margin: auto;
    border-radius: var(--modern-radius-lg);
    overflow: hidden;
    box-shadow: var(--modern-shadow);
    background: var(--modern-white);
    height: 500px;
    /* Fixed height to prevent layout shifts */
}

/* Ensure slideshow containers inside content sections maintain proper button positioning */
.content-media .slideshow,
.content-media .slideshow-container {
    width: 100%;
    max-width: 600px;
    /* Limit max width for better button positioning */
}

.slide,
.how-it-works-slide,
.auto-focus-camera,
.micro-camera-image {
    position: relative;
    height: 100%;
    /* Fill the parent slideshow container */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hide class for JavaScript control */
.slide.Hide,
.how-it-works-slide.Hide,
.auto-focus-camera.Hide,
.micro-camera-image.Hide {
    display: none !important;
}

/* Show first slide by default */
.slide:first-child,
.how-it-works-slide:first-child,
.auto-focus-camera:first-child,
.micro-camera-image:first-child {
    display: block;
}

/* Show active slides */
.slide.active,
.how-it-works-slide.active,
.auto-focus-camera.active,
.micro-camera-image.active {
    display: block !important;
}

.slide video,
.slide img,
.how-it-works-slide video,
.how-it-works-slide img,
.auto-focus-camera video,
.auto-focus-camera img,
.micro-camera-image video,
.micro-camera-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* This ensures full images are visible without cropping */
    border-radius: var(--modern-radius);
    /* Improve rendering performance */
    will-change: transform;
    backface-visibility: hidden;
    /* Placeholder background while loading */
    background-color: var(--light-gray);
}

.circle-button,
.prev-button,
.next-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: var(--modern-text);
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: var(--modern-shadow);
    z-index: 10;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-button:hover,
.prev-button:hover,
.next-button:hover {
    background: var(--orange);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.prev-button {
    left: 10px;
}

.next-button {
    right: 10px;
}

/* Special positioning for content media slideshows */
.content-media .prev-button {
    left: 5px;
}

.content-media .next-button {
    right: 5px;
}

.slideshow-controllers {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: auto;
}

.dot.active {
    background: var(--orange);
    transform: scale(1.2);
    border-color: white;
}

/* MODERN COOKIE CONSENT */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--modern-white);
    color: var(--modern-text);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    z-index: 1000;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--orange);
}

#cookie-consent-banner button {
    background: var(--orange);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--modern-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

#cookie-consent-banner button:hover {
    background: var(--dark-orange);
    transform: translateY(-2px);
}

#reject-cookies {
    background: transparent !important;
    border: 2px solid var(--modern-text-light) !important;
    color: var(--modern-text-light) !important;
}

#reject-cookies:hover {
    background: var(--modern-text-light) !important;
    color: white !important;
}

/* FOOTER STYLES - FROM MAIN.CSS */
/* FOOTER */
footer {
    background-color: var(--primary-color);
    color: white;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    bottom: 0;
    left: 0;
    right: 0;
    order: initial;
    /* Reset the order property to its default value */
}

footer p {
    text-align: center;
    font-size: 14px;
    margin: 0;
}

.footer-img {
    width: 20px;
    height: auto;
    max-width: 20px;
    object-fit: contain;
}

.footer-img:hover {
    cursor: pointer;
}

img.FooterIcon {
    width: 8%;
    min-width: 100px;
    padding: 0 10px;
}

.footer-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
}

.footer-item span {
    margin-right: 5px;
    text-decoration: none;
    color: white;
}

.footer-item span:hover {
    color: var(--orange);
}


.footer-item a:hover {
    cursor: pointer;
}

.social {
    padding: 2px;
}

.social a {
    margin-right: 20px;
}

.footer-item .active {
    color: var(--orange);
}

/* END OF FOOTER */

/* RESPONSIVE DESIGN */
@media screen and (max-width: 1135px) {
    .navbar-menu {
        display: none;
    }

    .navbar-toggle {
        display: flex;
        flex-direction: column;
    }
}

@media screen and (max-width: 980px) {
    .banner {
        height: 60vh;
        min-height: 400px;
    }

    .banner-overlay {
        padding: 2rem;
        margin: 0 1rem;
    }

    .cards-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 400px;
    }

    .card-content {
        padding: 2rem 1rem;
    }

    .card-content.content-box {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .card-content.colored {
        margin: 3rem 1rem;
    }

    .content-text {
        order: 2;
    }

    .content-media {
        order: 1;
    }

    footer {
        height: 200px;
        flex-direction: column;
    }

    footer p,
    footer span {
        font-size: 0.9rem;
    }

    .footer-item:nth-child(4) {
        order: -1;
        /* Move the copyright to the top */
    }
}

@media screen and (max-width: 850px) {
    #cookie-consent-banner {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .circle-button {
        width: 40px;
        height: 40px;
        padding: 0.5rem;
        font-size: 1rem;
    }

    .prev-button {
        left: 5px;
    }

    .next-button {
        right: 5px;
    }

    /* Responsive slideshow height */
    .slideshow,
    .slideshow-container {
        height: 300px;
    }

    /* Smaller buttons for content media slideshows */
    .content-media .circle-button {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .content-media .prev-button {
        left: 3px;
    }

    .content-media .next-button {
        right: 3px;
    }
}

@media screen and (max-width: 640px) {
    .banner-overlay h1 {
        font-size: 1.75rem;
    }

    .content-header {
        font-size: 1.5rem;
    }

    .content-text p {
        font-size: 1rem;
    }

    .card h3 {
        font-size: 1rem;
        padding: 1rem;
    }

    .overlay-text {
        font-size: 0.9rem;
        padding: 1rem;
    }

    /* Smaller slideshow height for mobile */
    /* .slideshow,
    .slideshow-container {
        height: 250px;
    } */
}

/* Footer responsive styles from main.css */
@media screen and (max-width: 1038px) {

    footer,
    #footer {
        font-size: xx-small !important;
    }
}

/* ANIMATIONS */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.card-content {
    animation: fadeInUp 0.8s ease-out;
}

.card {
    animation: slideIn 0.6s ease-out;
}

.card:nth-child(2) {
    animation-delay: 0.1s;
}

.card:nth-child(3) {
    animation-delay: 0.2s;
}

.card:nth-child(4) {
    animation-delay: 0.3s;
}

/* ACCESSIBILITY */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .banner img {
        transform: none !important;
    }

    .card:hover {
        transform: none !important;
    }
}

a:focus,
button:focus,
.dot:focus {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}