/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

html,
body {
    background-color: #f2f5f2;
    background-image: radial-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 0);
    background-size: 4px 4px;
    color: #111111;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

h1,
h2,
h3 {
    margin-top: 0;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;

    background: #f2f5f2;
    background-image: radial-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 0);
    background-size: 4px 4px;

    color: black;
    position: sticky;
    top: 0;
    z-index: 1000;

    /* This creates a semi-transparent dark tint (70% opacity) */
    background-color: transparent(0, 0, 0, 0.7);

    /* This blurs whatever passes behind the navbar */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* For Safari support */
}

.logo {
    text-decoration: none;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: black;
    transition: color 0.3s ease;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links a {
    text-decoration: none;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: black;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #a3b899;
}

.logBtn {
    background-color: transparent;
    color: black;

    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: black;
    transition: color 0.3s ease;

    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logBtn:hover {
    background-color: #ffffff;
    color: #000000;
}

#login-form {
    display: flex;
    flex-direction: column;
    row-gap: 10px;
}

#signup-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 10px;
}

/* HERO */
.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 75vh;
    padding: 0 8%;
    gap: 4rem;
    background-color: transparent;
    /* Contrast break from the page background */
    border-bottom: 1px solid #eaeaea;
}

.hero-text-side {
    flex: 1;
    max-width: 550px;
}

.hero-text-side h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #000000;
}

.hero-text-side p {
    font-size: 1.15rem;
    color: #666666;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

/* Modern Minimalist Call-To-Action Button */
.shop-button {
    display: inline-block;
    background-color: #000000;
    color: #ffffff;
    padding: 1rem 2.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid #000000;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 12px;
}

.shop-button:hover {
    background-color: #ffffff;
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

/* Structural Accent Block for Hero Right Side */
.hero-right-side {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-right-background {
    width: 100%;
    max-width: 500px;
    height: 500px;
    background: #f0f0f0;
    border: 1px solid #eaeaea;
    position: relative;
    border-radius: 12px;
}

.hero-right-background img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

/* --- BEST SELLERS PRODUCT GRID --- */
.best-sellers {
    padding: 8rem 8% 10rem 8%;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 4rem;
    position: relative;
}

.best-sellers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.5rem;
}

/* Product Cards */
.product-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 12px;
}

.product-card-image {
    width: 100%;
    padding-top: 125%;
    /* Clean 4:5 vertical portrait aspect ratio for print artwork */
    position: relative;
    background-color: #fafafa;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.product-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card-meta {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #ffffff;
    border-top: 1px solid #f5f5f5;
    border-radius: 0 0 12px 12px;
}

.product-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111111;
    margin: 0;
}

.product-card-category {
    font-size: 0.85rem;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.product-card-price {
    font-size: 1rem;
    font-weight: 700;
    color: #000000;
    margin-top: 0.5rem;
}

/* Card Hover Animations */
.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    border-color: #b5b5b5;
}

.product-card:hover .product-card-image-wrapper img {
    transform: scale(1.04);
}

/* --- SHOP PAGE GLOBAL STRUCTURE --- */
.shop-page-wrapper {
    background-color: #f2f5f2;
    min-height: 100vh;
    background-image: radial-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 0);
    background-size: 4px 4px;
    /* Spaces the content down away from navbar */
    padding: 6rem 8% 8rem 8%;
    box-sizing: border-box;
}

/* --- MINIMALIST SEARCH ENGINE BAR --- */
.search-container {
    max-width: 600px;
    margin: 0 auto 5rem auto;
    /* Centers the bar and pushes the products down */
    position: relative;
}

.shop-search-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid #111111;
    /* Clean, high-contrast underline aesthetic */
    padding: 1rem 0;
    font-size: 1.2rem;
    font-weight: 400;
    color: #111111;
    outline: none;
    letter-spacing: 0.02em;
    transition: border-color 0.3s ease;
}

.shop-search-input::placeholder {
    color: #999999;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.shop-search-input:focus {
    border-bottom-color: #888888;
    /* Softens slightly on interaction */
}

/* --- FLOATING AUTO-SUGGESTIONS DROPDOWN --- */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-top: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
}

/* Individual suggestion row */
.suggestion-item {
    padding: 0.9rem 1.2rem;
    font-size: 0.95rem;
    color: #111111;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
    border-bottom: 1px solid #f9f9f9;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: #f4f4f2;
    /* Highlights with your warm canvas color */
}

/* Category label inside the suggestion row */
.suggestion-category {
    font-size: 0.75rem;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- THE GRAND SHOP WALL GRID --- */
.shop-grid {
    display: grid;
    /* Creates an auto-fitting layout. On Mac it balances 3-4 cards per row, on mobile it drops to 1-2 */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 3rem 2.5rem;
    /* Generous breathing room between columns and rows */
}

/* Clean, Premium Product Card Architecture (Matching Home Page) */
.shop-card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 12px;
}

.shop-card-image-wrapper {
    width: 100%;
    padding-top: 110%;
    /* Subtle vertical frame orientation */
    position: relative;
    background-color: #fafafa;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
}

.shop-card-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    border-radius: 12px 12px 0 0;
}

.shop-card-meta {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: #ffffff;
    border-radius: 12px;
}

.shop-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111111;
    margin: 0;
}

.shop-card-category {
    font-size: 0.8rem;
    color: #888888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.shop-card-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: #000000;
    margin-top: 0.4rem;
}

/* Hover Physics for Grid Cards */
.shop-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.04);
    border-color: #b5b5b5;
}

.shop-card:hover .shop-card-image-wrapper img {
    transform: scale(1.03);
}

/* PRODUCT PAGES */

.product-page {
    display: flex;
    align-items: top;
    justify-content: left;
    margin-top: 0px;
    margin-left: 0px;
    gap: 60px;
    background-color: #f2f5f2;
    background-image: radial-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 0);
    background-size: 4px 4px;

    min-height: 100vh;
    padding: 40px;
}

.product-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 50px;
    height: 100vh;

    padding: 20px;
}

.carousel-track img {
    width: 100%;
    height: 70vh;
    object-fit: cover;
    flex-shrink: 0;
    scroll-snap-align: start;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* 1. THE MAIN CONTAINER */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 70vh;
    margin: 0 auto;
    /* Remove overflow:hidden from here so it doesn't break scrolling */
}

/* 2. THE SCROLL TRACK */
.carousel-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;

    /* Modern cross-browser scrollbar removal */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    /* Forces mobile touch engines to track scrolling instantly */
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
}

/* Hide scrollbars for Chrome/Safari/Brave */
.carousel-track::-webkit-scrollbar {
    display: none;
}

/* 3. THE IMAGES */
.carousel-track img {
    width: 100%;
    flex-shrink: 0;
    scroll-snap-align: start;
    object-fit: cover;
    border-radius: 12px;

    /* CRITICAL: Giving it a set aspect ratio forces Mac and Mobile 
     to calculate heights identically instantly */
    aspect-ratio: 4 / 5;
    pointer-events: none;
    /* Disables image dragging/holding glitches */
    user-select: none;
    /* Prevents text/image selection highlight */
    -webkit-user-drag: none;
    /* Specific to Safari mobile */
}

/* 4. THE DOTS CONTAINER */
.carousel-dots {
    position: absolute;

    /* Change this from 'bottom' to a negative transform or a safe target */
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    gap: 8px;

    /* CRITICAL: Forces dots to stay on top of the image plane */
    z-index: 999;
    /* CRITICAL: Prevents clicks from falling through or misfiring */
    pointer-events: auto;
}

/* 5. INDIVIDUAL DOTS */
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
}

.dot.active {
    background-color: #ffffff;
    transform: scale(1.2);
}

.product-name {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: #111111;
    margin-bottom: 24px;
}

.product-info {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #444444;
    max-width: 450px;
    margin-bottom: 32px;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111111;
    margin-bottom: 16px;
    display: block;
}

.close {
    cursor: pointer;
    font-size: 24px;
    align-self: flex-end;
}

.back-link {
    display: inline-block;
    color: #666666;
    text-decoration: none;
    font-size: 0.95rem;
    margin-top: 24px;
    transition: color 0.3s ease;
}

.back-link .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    /* Preps the arrow for moving */
}

/* When hover over link slide arrow left */
.back-link:hover {
    color: #111111;
}

.back-link:hover .arrow {
    transform: translateX(-4px);
    /* Shifts arrow left */
}

/* BUY BUTTON */
#buyBtn {
    height: 75px;
    padding: 12px 20px;
    background: #1e392a;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

#buyBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.modal {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;

    background-color: rgba(0, 0, 0, 0.5);

    justify-content: center;
    align-items: center;

    cursor: pointer;
}

.modal-content {
    color: black;
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-family: Arial, sans-serif;
    max-height: 90vh;
    overflow-y: auto;

    cursor: default;
}

.modal-content input {
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.modal-content button {
    background: black;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
}

#buy-now-form {
    display: flex;
    flex-direction: column;
    row-gap: 10px;
}

#emailField {
    width: 100%;
}

#emailField input {
    width: 100%;
    box-sizing: border-box;
    /* Ensures padding doesn't make it overflow */
}

.receipt-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.hidden {
    display: none !important;
}

/* FOOTER */
.footer {
    text-align: center;
    padding: 20px;
    background: #111;
    color: white;
}

/* --- MOBILE STYLES --- */
@media (max-width: 768px) {

    /* 1. Global Reset: Prevents any element from stretching the page sideways */
    html,
    body {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .hero-container,
    .best-sellers-section,
    footer {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* 2. Balance the Hero Text Padding */
    .hero-container {
        display: block;
        /* Changes from flex columns to a straightforward stacked block */
        padding: 3rem 6% !important;
        /* Forces equal spacing on both the left and right sides */
        min-height: auto;
        text-align: left;
        /* Keeps your organic left-aligned look but bounds it to the screen */
    }

    .hero-text-side {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0;
        padding: 0;
    }

    /* Adjust typography scaling so long words don't push past the screen boundary */
    .hero-text-side h1 {
        font-size: 2.4rem !important;
        line-height: 1.2;
    }

    .hero-text-side p {
        font-size: 1.05rem !important;
        margin-bottom: 2rem;
    }

    /* 3. Hide the graphic side completely on mobile to match your preference */
    .hero-right-side,
    .hero-right-background {
        display: none !important;
    }

    /* 4. Balance the Best Sellers Grid spacing */
    .best-sellers-section {
        padding: 4rem 6% 6rem 6% !important;
        /* Perfectly mirrors the hero container padding */
    }


    body {
        overflow-x: hidden;
    }

    img {
        max-width: 100%;
        height: auto;
    }

    .product-page {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 15px;
        box-sizing: border-box;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .hide-on-mobile {
        display: none;
    }

    .product-grid,
    .products {
        width: 100%;
        box-sizing: border-box;
        padding-left: 0;
        padding-right: 0;
        margin: 0;
    }

    .products {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        /* Adds space between multiple products */
    }

    /* Fix invisible box */
    .product {
        display: block;
        /* Forces the 'a' tag to act like a normal, solid box */
        width: 90%;
        max-width: 350px;
        box-sizing: border-box;
        margin: 0 auto;
    }

    /* 4. Fix margins on the title */
    .product-title {
        margin: 0;
        text-align: center;
    }

    .nav-links a {
        text-decoration: none;
        font-family: 'Helvetica Neue', Arial, sans-serif;
        font-size: 14px;
        font-weight: 400;
        letter-spacing: none;
        text-transform: uppercase;
        color: black;
        transition: color 0.3s ease;
    }

    .nav-links {
        list-style: none;
        display: flex;
        gap: 10px;
    }

    .logo {
        font-size: 16px;
    }

    .logBtn {
        margin-left: -20px;
    }

    .shop-page-wrapper {
        padding: 5rem 6% 6rem 6%;
        /* Mirrors our tailored home page container parameters */
    }

    .search-container {
        margin-bottom: 3.5rem;
    }

    .shop-grid {
        gap: 2rem 1.5rem;
        /* Tightens up slightly for standard mobile glass dimensions */
    }
}