/* ============================================= */
/* 1. RESET & BASE STYLES */
/* ============================================= */
:root {
    --color-primary: #4a3728;
    --color-accent: #8b5e34;
    --color-bg: #faf7f2;
    --color-text: #2b2b2b;
    --color-primary-hover: #6b5340;
    --cards-per-view: 3;
    --card-gap: 1.5rem;

    /* Typography scale: h1 > h2 > h3 > h4 for consistent hierarchy */
    --text-h1: 2rem;
    --text-h2: 1.75rem;
    --text-h3: 1.5rem;
    --text-h4: 1.25rem;
}
html {
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
}

/* Visually hidden until focused; first tab stop for keyboard users */
.skip-link {
    position: absolute;
    top: -3rem;
    left: 0;
    background: var(--color-primary);
    color: #fff;
    padding: 0.75rem 1.25rem;
    z-index: 1001;
    text-decoration: none;
    font-weight: 600;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* ============================================= */
/* 2. FONT CHANGE */
/* ============================================= */
body {
    font-family: 'Cormorant Garamond', serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
    overflow-y: auto;
}


/* Targeting .brand h1 specifically (not all h1s) keeps this scoped —
   same "separation of concerns" idea you're already using: HTML says
   WHAT the content is (a heading), CSS says HOW it looks. We didn't
   touch the HTML at all to make it italic. */
.brand h1 {
    font-style: italic;
    font-weight: 600; /* semibold italic reads nicer than regular-weight italic for a wordmark */
    font-size: var(--text-h1);
}

/* ============================================= */
/* 3. HEADER & FOOTER */
/* ============================================= */
header, footer {
    text-align: center;
    padding: 2rem 1rem;
    background-color: var(--color-primary); /* deep brass-brown */
    color: #fff;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap; /* logo and title can stack if the screen is too narrow */
}

.logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 50%;
}

/* ============================================= */
/* 4. THE CATALOGUE SLIDER */
/* ============================================= */

.slider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    position: relative; /* creates a coordinate system for the absolute arrow buttons */
}

/* THE WINDOW — the only element allowed to clip content */
.slider-viewport {
    overflow: hidden;
    flex: 1;   /* fill all space between the two buttons */
}

/* THE CONVEYOR BELT — every card sits in one long horizontal row now */
.product-grid {
    display: flex;
    gap: var(--card-gap);
    transition: transform 0.4s ease;
    /* We animate `transform`, not `margin-left` or `left`. Transform is
       handled by the GPU and doesn't force the browser to recalculate
       page layout on every frame — it's just cheaper. */
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    min-width: 0; /* allow the card to shrink below the image's intrinsic width */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    /* flex: <grow> <shrink> <basis>
       0 0 = "don't grow, don't shrink, just be exactly this width."
       The width is calculated so exactly --cards-per-view cards fit
       per "page", accounting for the gaps between them. */
    flex: 0 0 calc(
        (100% - (var(--cards-per-view) - 1) * var(--card-gap)) / var(--cards-per-view)
    );
}

.slider-btn {
    flex-shrink: 0;
    width: 3rem;        /* ~48px, above 44px minimum */
    height: 3rem;
    border-radius: 50%;
    border: none;
    background: var(--color-primary);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

.slider-btn:hover {
    background: var(--color-primary-hover);
}

/* Styling for when JS disables a button at the start/end of the list */
.slider-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ============================================= */
/* The dots                                      */
/* ============================================= */
.dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.dot {
    /* Buttons come with browser-default border/background/padding —
       reset all of it so it looks like your plain circle again. */
    border: none;
    padding: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #5a5a5a;
    cursor: pointer;
}

.dot.active {
    background: #fff;
}

/* ============================================= */
/* CATALOGUE-SPECIFIC OVERRIDES (dark bg)        */
/* ============================================= */
#catalogue .slider-btn {
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-primary);
}

#catalogue .slider-btn:hover {
    background: #fff;
}

#catalogue .dot {
    background: rgba(255, 255, 255, 0.4);
}

#catalogue .dot.active {
    background: #fff;
}

/* ============================================= */
/* 5. THE CATALOGUE GRID — the important part */
/* ============================================= */
#catalogue {
    padding: 4rem 2rem;

    background-image:
        linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
        url('images/JBC_suzen.jpg');
    background-size: cover;
    background-position: center;
    /* Parallax on desktop: the background stays still while content scrolls. */
    background-attachment: fixed;
}

/* Phones and tablets often choke on background-attachment: fixed.
   On touch devices, let the background scroll naturally with the page. */
@media (hover: none) and (pointer: coarse) {
    #catalogue {
        background-attachment: scroll;
    }
}

/* Scoped to just the h2 inside #catalogue's container, so we don't
   accidentally whiten text inside the cards too — same "don't let one
   fix leak into unrelated elements" principle as before. */
#catalogue h2 {
    font-size: var(--text-h2);
    color: #fff;
}

/* Quiet global sizing note at the top of the shop — says it once, stays
   easy to find, doesn't compete with the product cards. */
.sizing-note {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9rem;
    font-style: italic;
    margin: 0.25rem 0 2rem;
    padding: 0.5rem 0.75rem;
    border-left: 2px solid rgba(255, 255, 255, 0.25);
    max-width: 32rem;
}

.sizing-note a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.category {
    margin-bottom: 3rem;
}

.category:last-child {
    margin-bottom: 0;   /* no trailing gap after the final category */
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.product-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    display: block;
}

/* Any image that opens the lightbox gets the zoom-in cursor */
.lightbox-trigger {
    cursor: zoom-in;
}

.product-card h3,
.product-card .price,
.product-card .lore {
    padding: 0 1rem;
}

.product-card h3 {
    font-size: var(--text-h4);
    margin-top: 0.75rem;
}

.price {
    font-weight: bold;
    color: var(--color-accent);
}

.lore {
    padding-bottom: 1rem;
    font-size: 1rem;
    color: #555;
}

/* ============================================= */
/* Click to see full image */
/* ============================================= */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox.hidden {
    display: none;
}

.lightbox img {
    max-width: 80%;
    max-height: 80%;
    border-radius: 8px;
}

.lightbox img:focus {
    outline: none;
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--color-primary);
    z-index: 10;
}

.lightbox-close svg {
    display: block;
    width: 1.1rem;
    height: 1.1rem;
}

.lightbox-close:hover {
    background: #fff;
}

/* ============================================= */
/* 6. ABOUT SECTION */
/* ============================================= */
#about {
    padding: 2rem 0;
}

#about h2 {
    font-size: var(--text-h2);
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-primary);
}

.contact-block {
    margin-top: 3rem;
    padding: 0 1rem;
}

.contact-card {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid rgba(139, 94, 52, 0.2);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(74, 55, 40, 0.08);
}

.contact-card h3 {
    font-size: var(--text-h3);
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.contact-lead {
    color: #555;
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.contact-list {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    list-style: none;
    margin-bottom: 1.5rem;
}

.contact-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--color-primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.2s, transform 0.2s;
}

.contact-list a svg {
    width: 1.1em;
    height: 1.1em;
    fill: currentColor;
}

.contact-list a:hover,
.contact-list a:focus-visible {
    background-color: var(--color-primary-hover);
    transform: translateY(-2px);
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.contact-phone {
    color: #555;
    font-size: 0.95rem;
}

.contact-phone a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.contact-phone a:hover {
    border-color: var(--color-accent);
}

.story-block {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: flex-start;
}

.story-text {
    flex: 1 1 300px;
}

.story-images {
    flex: 1 1 250px;
    display: flex;
    justify-content: center;
}

.story-images figure {
    /* flex: 0 1 320px  —  grow:0 is the key change. It tells this
       figure "don't expand just because you're the only child with
       no sibling competing for space." Cap it at a natural 320px
       instead of ballooning to fill the whole row. */
    flex: 0 1 320px;
    min-width: 0; /* allow it to shrink below the image's intrinsic width */
    margin: 0;
}

.story-images img {
    width: 100%;
    min-width: 0;
    height: 380px;
    object-fit: cover;
    /* object-position is like sliding a photo under a fixed frame.
       50% 25% = centered horizontally, cropped 25% down from the top.
       Increase the second number to show more of her face.
       Decrease it to show more of the top of the photo. */
    object-position: 100% 80%; /*I kinda want the picture to go a little bit right and up but I think i reached the max*/
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: block;
}

.story-images figcaption {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #555;
    text-align: center;
}

/* ============================================= */
/* SHORTCUT NAVIGATION */
/* ============================================= */
.shortcut-nav {
    position: sticky;
    top: 0;        /* "stick" once its top edge reaches the very top of the viewport */
    z-index: 100;  /* stack this ABOVE other content when it starts overlapping
                      during scroll — without this, a section below it in the
                      HTML could visually paint over it. Python analogy: think
                      of z-index like sort priority in a list of overlapping
                      layers — higher number draws "in front." */

    background-color: var(--color-primary);
    display: flex;
    justify-content: center;
}

.shortcut-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;   /* kill the default bullet points — this is a nav, not a bulleted list */
    flex-wrap: wrap;    /* links step onto a new row instead of forcing a scrollbar */
}

.shortcut-nav a {
    display: block;         /* makes the WHOLE padded box clickable, not just the text glyphs — bigger, easier tap target on mobile */
    padding: 1rem 0.5rem;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.shortcut-nav a:hover {
    color: var(--color-accent);
}

section {
    scroll-margin-top: 4.5rem;  /* roughly your nav's rendered height —
                                    open DevTools, inspect .shortcut-nav,
                                    check its actual height, adjust this
                                    number to match exactly */
}

/* ============================================= */
/* GALLERY SECTION                               */
/* ============================================= */
#gallery {
    padding: 4rem 2rem;
    background-color: var(--color-bg);
}

#gallery h2 {
    text-align: center;
    font-size: var(--text-h2);
    margin-bottom: 2rem;
    color: var(--color-primary);
}

.gallery-subsection {
    margin-bottom: 3rem;
}

.gallery-subsection:last-child {
    margin-bottom: 0;
}

.gallery-subsection h3 {
    font-size: var(--text-h3);
    color: var(--color-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* minmax(0,1fr) lets columns shrink */
    gap: 1.5rem;
}

.gallery-grid img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: block;
}

/*
    Gallery mosaic — visually distinct from the uniform #What-we-sell grid.
    A 4-column track with tiles spanning varied rows/columns gives a
    staggered, "interesting to stumble through" layout. Captions fade in
    on hover (and remain visible on touch devices via :focus-within), so
    the default view is image-led while detail is one interaction away.
*/
.gallery-mosaic {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 120px;
    grid-auto-flow: dense;
    gap: 1rem;
}

.gallery-item {
    position: relative;
    grid-row: span 3;
    margin: 0;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.10);
}

.gallery-item--tall { grid-row: span 4; }
.gallery-item--wide { grid-column: span 2; grid-row: span 3; }
.gallery-item--big  { grid-column: span 2; grid-row: span 4; }

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    transition: transform 0.5s ease, filter 0.3s ease;
}

.gallery-item figcaption {
    position: absolute;
    inset: auto 0 0 0;
    margin: 0;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    font-style: italic;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0,0,0,0.6);
    background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
    opacity: 0;
    transform: translateY(8%);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.gallery-item:hover img,
.gallery-item:focus-within img {
    transform: scale(1.04);
}

.gallery-item:hover figcaption,
.gallery-item:focus-within figcaption {
    opacity: 1;
    transform: translateY(0);
}

@media (hover: none) and (pointer: coarse) {
    /* On touch, captions can't rely on hover — show them gently by default. */
    .gallery-item figcaption {
        opacity: 0.95;
        transform: none;
    }
}

/* ============================================= */
/* TEXT SIZE FIXES                               */
/* ============================================= */
.story-text {
    line-height: 1.7;  /* more breathing room for long paragraphs */
}

.story-text p {
    font-size: 1.05rem;  /* slightly larger than default body text */
    margin-bottom: 1rem;   /* clear separation between paragraphs */
}

.story-text p:last-child {
    margin-bottom: 0;  /* no trailing gap after final paragraph */
}

/* ============================================= */
/* REDUCED MOTION PREFERENCES                    */
/* ============================================= */
@media (prefers-reduced-motion: reduce) {
    .product-grid {
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* Tablets show 2 cards per page; phones drop to 1 below 700px. */
@media (max-width: 1000px) {
    :root {
        --cards-per-view: 2;
    }

    /* Mosaic eases from 4 to 3 columns on narrower screens. */
    .gallery-mosaic {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================= */
/* MOBILE OVERRIDES                              */
/* ============================================= */
@media (max-width: 700px) {
    :root {
        --cards-per-view: 1;
    }

    .shortcut-nav ul {
        gap: 0.75rem;
    }
    .shortcut-nav a {
        padding: 0.75rem 0.4rem;
        font-size: 0.95rem;
    }

    /* Arrows sit in the side gutters, NOT on top of the card */
    .slider {
        gap: 0;
    }
    .slider-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.85rem;
        z-index: 5;
    }
    .slider-prev { left: -1.25rem; }
    .slider-next { right: -1.25rem; }

    /* Bigger logo on small screens */
    .logo {
        width: 100px;
        height: 100px;
    }

    /* Frosted-glass cards so the scrolling background peeks through */
    .product-card {
        background: rgba(255, 255, 255, 0.85);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
    }

    /* Plain gallery grids drop to 1 column; the mosaic drops to 2 so the
       staggered variety still reads on a phone. */
    .gallery-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .gallery-mosaic {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 100px;
    }
    .gallery-item--wide,
    .gallery-item--big {
        grid-column: span 2;
    }

    .story-text {
        padding: 0 0.5rem;   /* small side padding so text doesn't touch screen edge */
    }

    #about {
        padding: 2rem 1rem;  /* slightly reduce from 2rem 0 to give breathing room */
    }
}

/* ============================================= */
/* DISCLAIMER                                    */
/* ============================================= */
.disclaimer {
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

/* Feedback link in the footer — a courtesy, not a CTA. Subtle, low-key. */
.feedback-note {
    margin-top: 0.75rem;
    margin-bottom: 0.5rem;
}

.feedback-link {
    color: #fff;
    font-size: 0.9rem;
    font-style: italic;
    opacity: 0.7;
    text-decoration: none;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.4);
    transition: opacity 0.2s, border-color 0.2s;
}

.feedback-link:hover,
.feedback-link:focus-visible {
    opacity: 1;
    border-bottom-color: #fff;
    outline: none;
}

/* ============================================= */
/* VERSION MARKER                                */
/* ============================================= */
.version-note {
    font-size: 0.75rem;
    opacity: 0.5;
    margin-top: 0.25rem;
}

/* ============================================= */
/* FEEDBACK PROMPT                               */
/* ============================================= */
.feedback-prompt {
    position: fixed;
    bottom: 24px;
    right: 24px;
    max-width: 280px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1e293b;
    z-index: 9999;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    pointer-events: none;
}

.feedback-prompt.visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.feedback-prompt p {
    margin: 0 0 10px 0;
}

.feedback-prompt .feedback-link {
    display: inline-block;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
}

.feedback-prompt .feedback-link:hover {
    text-decoration: underline;
}

.feedback-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.feedback-close:hover {
    background: #f1f5f9;
    color: #64748b;
}

@media (max-width: 480px) {
    .feedback-prompt {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
    }
}