/* ============================================
   Pasticeri Çelniku – styles
   Bread & bakery color palette + card animations
   ============================================ */

:root {
    --cream: #faf6f0;
    --flour: #2e2820;
    --crust: #d4a574;
    --crust-dark: #b8956a;
    --bread: #c4a484;
    --wheat: #433924;
    --brown: #8b6914;
    --dark-brown: #debbab;
    --chocolate: #3e2723;
    --caramel: #c68642;
    --soft-white: #201f1c;
    --text: #e8d5b7;
    --text-muted: #7a6555;
    --radius: 20px;
    --radius-sm: 14px;
    --shadow: 0 8px 28px rgba(92, 64, 51, 0.12);
    --shadow-hover: 0 12px 36px rgba(92, 64, 51, 0.18);
    --font-mono: "JetBrains Mono", "Courier New", monospace;
    --ink: #2B241D;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /*background: var(--flour); day mode*/
    background: var(--flour);  /*night mode swap*/
    /*color: var(--text); day mode*/
    color: var(--text); /*night mode swap*/
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }

.site-header {
    position: relative;
    background-image: linear-gradient(to bottom, rgba(43, 36, 29, 0.55), rgba(43, 36, 29, 0.8)),
    url('images/header-bg.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #FBF7EF;
    text-align: center;
    padding: 48px 24px;
}
.logo-box {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--wheat);
    border: 3px dashed var(--crust);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: var(--dark-brown);
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    overflow: hidden;
}
.logo-box span { font-size: 1.8rem; margin-bottom: 4px; }
.site-header h1 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    font-weight: 700;
    letter-spacing: 0.02em;
}
.site-header p { margin-top: 6px; opacity: 0.9; font-size: 0.95rem; }

.page-wrap {
    max-width: 100%;
    margin: 0 auto;
    padding: 28px 16px 48px;
    min-width: 0;
    box-sizing: border-box;
    background: #2f2821;
}

.bg-banner {
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: clamp(16px, 3vw, 28px);
    width: 100%;
    aspect-ratio: 3 / 1;
    height: auto;
    min-height: clamp(72px, 18vw, 120px);
    max-height: clamp(100px, 22vw, 180px);
}

.bg-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

@media (max-width: 600px) {
    .bg-banner {
        aspect-ratio: 2.4 / 1;
        min-height: clamp(64px, 22vw, 100px);
        max-height: clamp(80px, 28vw, 130px);
    }
}

@media (min-width: 601px) and (max-width: 1024px) {
    .bg-banner {
        aspect-ratio: 2.8 / 1;
        min-height: clamp(90px, 14vw, 140px);
        max-height: clamp(120px, 18vw, 160px);
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .bg-banner {
        aspect-ratio: 4 / 1;
        min-height: 56px;
        max-height: 96px;
    }
}

.bg-placeholder {
    border-radius: var(--radius);
    background: linear-gradient(160deg, var(--wheat) 0%, var(--crust) 50%, var(--bread) 100%);
    border: 2px dashed var(--crust-dark);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--dark-brown);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 28px;
    padding: 24px;
}
.bg-placeholder .cam { font-size: 2rem; margin-bottom: 8px; }

.main-panel {
    /*background: var(--soft-white); day mode*/
    background: var(--soft-white);  /*night mode*/
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 28px 22px 36px;
    border: 1px solid rgba(196, 164, 132, 0.35);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    width: 100%;
}


@media (min-width: 860px) {
    .content-grid {
        grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
        align-items: start;
    }
}

.content-grid > .products {
    order: -1;
}

@media (min-width: 860px) {
    .content-grid > .products,
    .content-grid > .sidebar-stack {
        order: 0;
    }
}
.sidebar-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sidebar-stack .story-card:nth-child(2) { animation-delay: 0.15s; }
.sidebar-stack .story-card:nth-child(3) { animation-delay: 0.3s; }

.story-card {
    background: linear-gradient(180deg, #25221d 0%, #353022 50%, #433a26 100%););
    border-radius: var(--radius-sm);
    padding: 24px 20px;
    border: 1px solid rgba(184, 149, 106, 0.4);
    box-shadow: var(--shadow);
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    animation: fadeInUp 0.7s ease-out both;
}
.story-card h2 {
    font-family: Georgia, serif;
    font-size: 1.35rem;
    color: var(--dark-brown);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--crust);
}
.story-card p {
    font-size: 0.95rem;
    /*color: var(--text-muted);*/
    color: rgba(232, 213, 183, 0.75);
    margin-bottom: 12px;
}
.story-card p:last-of-type { margin-bottom: 0; }
.story-highlight {
    margin-top: 16px;
    padding: 12px 14px;
    background: var(--soft-white);
    border-radius: 10px;
    border-left: 4px solid var(--caramel);
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
}

.products {
    display: flex;
    flex-direction: column;
    gap: 22px;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.product-card {
    /*background: var(--cream);   day view mode */
    background: #24211d; /*night view mode */
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid rgba(196, 164, 132, 0.35);
    box-shadow: var(--shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    animation: fadeInUp 0.65s ease-out both;
    opacity: 0;
}
.product-card:nth-child(1) { animation-delay: 0.1s; }
.product-card:nth-child(2) { animation-delay: 0.22s; }
.product-card:nth-child(3) { animation-delay: 0.34s; }
.product-card:nth-child(4) { animation-delay: 0.46s; }

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}
.product-card:hover .product-visual { animation: none; transform: scale(1.04); }
.product-card:hover .product-tags span {
    background: var(--crust);
    color: var(--soft-white);
    transform: translateY(-1px);
}
.product-card:hover .product-body h3 { color: var(--caramel); }

/* Single, final .product-visual definition — this is the clickable gallery-open button */
.product-visual {
    height: 180px;
    aspect-ratio: 16 / 9;
    max-height: 220px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    border: none;
    cursor: pointer;
    padding: 0;
    font: inherit;
    transition: transform 0.45s ease;
}

.product-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    pointer-events: none;
}

.product-visual .pic-label {
    position: relative;
    z-index: 1;
    background: rgba(62, 39, 35, 0.55);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
    letter-spacing: 0.03em;
}

/* Fallback gradient backgrounds for any card without a real photo yet */
.pic-breads {
    background:
            linear-gradient(135deg, rgba(212, 165, 116, 0.85), rgba(139, 105, 20, 0.7)),
            repeating-linear-gradient(45deg, #e8d5b7 0 12px, #d4a574 12px 24px);
}
.pic-tarts {
    background:
            linear-gradient(135deg, rgba(198, 134, 66, 0.8), rgba(92, 64, 51, 0.65)),
            repeating-linear-gradient(-30deg, #f5ebe0 0 10px, #c4a484 10px 20px);
}
.pic-cookies {
    background:
            linear-gradient(135deg, rgba(184, 149, 106, 0.85), rgba(62, 39, 35, 0.6)),
            radial-gradient(circle at 30% 40%, #e8d5b7 0 8%, transparent 9%),
            radial-gradient(circle at 70% 60%, #d4a574 0 6%, transparent 7%),
            #c4a484;
}
.pic-icecream {
    background:
            linear-gradient(160deg, rgba(250, 246, 240, 0.9), rgba(212, 165, 116, 0.75)),
            linear-gradient(90deg, #faf6f0, #e8d5b7, #d4a574);
}

.product-body { padding: 18px 20px 22px; }
.product-body h3 {
    font-family: Georgia, serif;
    font-size: 1.25rem;
    color: var(--dark-brown);
    margin-bottom: 8px;
    transition: color 0.25s ease;

}
.product-body p {
    font-size: 0.92rem;
    /*color: var(--text-muted);*/
    color: rgba(232, 213, 183, 0.75);
    margin-bottom: 12px;

}
.product-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.product-tags span {
    /*background: var(--wheat);*/
    background: var(--wheat); /*changes made to adopt to color picker for night mode style*/
    color: var(--dark-brown); /*changes made to adopt to color picker for night mode style*/
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(184, 149, 106, 0.45);
    transition: background 0.25s ease, transform 0.25s ease, color 0.25s ease;
}

/*.site-footer {*/
/*    margin-top: 36px;*/
/*    background: var(--chocolate);*/
/*    color: rgba(255, 253, 249, 0.92);*/
/*    border-radius: var(--radius);*/
/*    padding: 32px 24px 28px;*/
/*    box-shadow: var(--shadow);*/
/*    animation: fadeInUp 0.7s ease-out 0.35s both;*/
/*}*/
.site-footer {
    margin-top: 36px;
    overflow: hidden;
    background-image:
            linear-gradient(to bottom, rgba(62, 39, 35, 0.45), rgba(62, 39, 35, 0.6)),
            url('images/footbackground.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: rgba(255, 253, 249, 0.92);
    border-radius: var(--radius);
    padding: 32px 24px 28px;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.7s ease-out 0.35s both;
}

.site-footer * {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.site-credit {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 70px 0 32px;
    border-top: 1px solid rgba(43, 36, 29, 0.1);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}
@media (min-width: 700px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-block h3 {
    font-family: Georgia, serif;
    font-size: 1.15rem;
    margin-bottom: 12px;
    /*color: var(--wheat);*/
    color: #e2ddd9;
}
.footer-block p, .footer-block a {
    font-size: 0.92rem;
    color: rgba(255, 253, 249, 0.85);
    text-decoration: none;
}
.footer-block a:hover { color: var(--crust); }
.address-lines { line-height: 1.7; }

.social-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}
.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--chocolate);
    background: var(--wheat);
    transition: transform 0.2s ease, background 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}
.social-btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); }
.social-btn:active { transform: translateY(0) scale(0.98); }
.social-btn .icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}
/*.social-btn.fb { background: #1877f2; color: #fff; }*/
/*.social-btn.fb:hover { background: #0d65d9; color: #fff; }*/
/*.social-btn.ig {*/
/*    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);*/
/*    color: #fff;*/
/*}*/
/*.social-btn.ig:hover { filter: brightness(1.08); color: #fff; }*/
/*.social-btn.maps { background: #34a853; color: #fff; }*/
/*.social-btn.maps:hover { background: #2d8f47; color: #fff; }*/
/*.social-btn.rate { background: #fbbc04; color: #3c4043; }*/
/*.social-btn.rate:hover { background: #f9ab00; }*/

.google-profile-img-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;      /* Your existing fixed height */
    width: auto;
    background-color: transparent; /* Ensures transparent background */
    text-decoration: none;
    padding: 0 6px;
    box-sizing: border-box;
    transition: transform 0.2s ease, filter 0.2s ease;
}
.google-profile-img-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}
.google-profile-img-btn .google-rating-icon {
    width:50px;               /* Scaled down to match standard social icon size */
    height: 50px;
    flex-shrink: 0;
}

/* Compact text content */
.google-profile-img-btn .google-text-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    line-height: 1.1;
    margin-top: 4px;
}

.google-profile-img-btn .score {
    font-weight: 700;
    font-size: 14px;            /* Smaller font keeps height low */
    color: inherit;
}

.google-profile-img-btn .subtext {
    font-size: 11px;             /* Compact subtext */
    font-weight: 500;
    opacity: 0.85;
    color: inherit;
    margin-top: 1px;
}
.gpb-brand {
    color: #4285F4;
}
.map-box {
    margin-top: 14px;
    border-radius: var(--radius-sm);
    min-height: 160px;
    overflow: hidden;
    max-width: 280px;
    width: 100%;
}

.map-box iframe {
    display: block;
    width: 100%;
    height: 220px;
    border: 0;
    border-radius: var(--radius-sm);
}
.map-box strong { display: block; margin-bottom: 6px; font-size: 1rem; }
.map-box small { opacity: 0.75; font-size: 0.8rem; }

.dev-credit {
    font-family: var(--font-mono, "Courier New", monospace), serif;
    font-size: 12px;
    /*color: rgba(255, 253, 249, 0.65); !* light — matches footer's own text tone *!*/
    color: #e2ddd9;
    margin: 0;
}
.dev-credit a { color: inherit; text-decoration: underline; }
.dev-credit a:hover { color: var(--crust); }

.hours {
    margin-top: 10px;
    font-size: 0.88rem;
    opacity: 0.9;
}

/* ===== Card animations ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.bg-placeholder { animation: fadeIn 0.8s ease-out both; }
.main-panel { animation: fadeInUp 0.55s ease-out both; }

@media (prefers-reduced-motion: reduce) {
    .story-card,
    .product-card,
    .bg-placeholder,
    .main-panel,
    .site-footer {
        animation: none !important;
        opacity: 1 !important;
    }
    .product-card:hover,
    .product-card:hover .product-visual,
    .product-card:hover .product-tags span {
        transform: none;
    }
}

/* ===== Postcard gallery modal ===== */
.gallery-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 16px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.gallery-modal[hidden] {
    display: none !important;
}

.gallery-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(62, 39, 35, 0.65);
    backdrop-filter: blur(4px);
}

.gallery-postcard {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    margin: auto 0;
    /*background: #fffdf9;*/
    background: #1e1d1a;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    padding: 20px 18px 18px;
    border: 1px solid rgba(196, 164, 132, 0.45);
}

.gallery-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: #5c4033;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-close:hover {
    background: #c68642;
}

.gallery-title {
    font-family: Georgia, serif;
    font-size: 1.2rem;
    /*color: #5c4033;*/
    color: #e2ddd9;
    margin: 0 36px 14px 0;
}

/* Stage = the box the photo must fill */
.gallery-stage {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #1a120e;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    max-height: min(58vh, 520px);
    touch-action: none;
}

/* Fill the stage completely (no small image in the middle) */
.gallery-image,
#gallery-image {
    width: 100%;
    height: 100%;
    object-fit: contain;      /* full picture, no crop */
    object-position: center;
    display: block;
    transform-origin: center center;
    pointer-events: none;
    transition: transform 0.05s ease-out;
    will-change: transform;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(62, 39, 35, 0.75);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    z-index: 2;
}

.gallery-nav:hover {
    background: rgba(198, 134, 66, 0.95);
}

.gallery-prev {
    left: 8px;
}

.gallery-next {
    right: 8px;
}

.gallery-counter {
    text-align: center;
    font-size: 0.85rem;
    /*color: #7a6555;*/
    color: rgba(226, 221, 217, 0.65);
    margin: 10px 0 12px;
}

.gallery-social {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 28px;
    margin-top: 4px;
}

.gallery-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    text-decoration: none;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.gallery-social-btn svg {
    width: 34px;
    height: 34px;
}

.gallery-social-btn.fb svg circle {
    stroke: rgba(0, 0, 0, 0.08);
    stroke-width: 0.5;
}

.gallery-social-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
}

body.gallery-open {
    overflow: hidden;
}

/* Landscape / short screens: wide stage, photo still fills it.
   FIX: .gallery-social's opening brace had been commented out here
   while its body/closing brace were not, which corrupted parsing of
   everything after it in the file (including .floating-actions).
   This version is clean — every rule below has a real, matching brace. */
@media (max-height: 500px),
(orientation: landscape) and (max-width: 950px) {
    .gallery-modal {
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    }

    .gallery-postcard {
        width: min(96vw, 900px);
        margin: 8px auto 16px;
        padding: 12px 12px 14px;
    }

    .gallery-stage {
        aspect-ratio: 2.2 / 1;
        max-height: min(52vh, 280px);
        width: 100%;
        height: auto;
    }

    .gallery-social {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* ===== Floating WhatsApp / Call buttons ===== */
.floating-actions {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px)); /* clears iPhone home-bar */
    z-index: 1500; /* above page content, below the gallery modal's z-index: 2000 */
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fab svg {
    width: 26px;
    height: 26px;
}

.fab:hover,
.fab:active {
    transform: scale(1.06);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.fab-whatsapp { background: #25d366; }
.fab-call { background: var(--caramel, #c68642); }

/* Hide the floating buttons while the photo gallery is open, so they
   don't sit on top of the postcard/close button */
body.gallery-open .floating-actions {
    display: none;
}

@media (min-width: 860px) {
    .floating-actions {
        right: 24px;
        bottom: 24px;
    }
}

/* ===== Layout width fixes (mobile overflow + desktop centering) ===== */
@media (max-width: 859px) {
    .page-wrap {
        padding-left: 12px;
        padding-right: 12px;
    }
    .main-panel {
        padding: 20px 14px 28px;
    }
    .story-card {
        padding: 18px 14px;
    }
}

@media (min-width: 860px) {
    .page-wrap {
        max-width: 1120px;
        margin: 0 auto;
        padding-left: 24px;
        padding-right: 24px;
    }
    .content-grid {
        grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
        gap: 32px;
    }
}