/*
 Theme Name:   Chleb i Spółka
 Theme URI:    https://chlebispolka.pl
 Description:  Elegancki motyw dla piekarni rzemieślniczej
 Author:       Chleb i Spółka
 Version:      1.0.0
 Text Domain:  chleb-theme
*/

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

:root {
    --color-bg: #F5F0E8;
    --color-dark: #2C2416;
    --color-accent: #8B7355;
    --color-light: #FFFFFF;
    --color-muted: #6B6B6B;
    --color-cream: #FAF8F5;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Lato', -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-dark);
    background: var(--color-cream);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
}

/* Standard WP accessible-but-invisible utility — visually hidden, still
   reachable by screen readers. Used by the shop search form's <label> and
   the icon-only add-to-cart buttons below. */
.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - Logo right, menu center */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 0;
    background: var(--color-cream);
    transition: box-shadow 0.3s;
}

.site-header .container {
    position: relative;
}

.site-header.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    min-height: 70px;
}

.site-logo {
    z-index: 1001;
}

.main-nav {}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 40px;
    flex-wrap: nowrap;
}

.main-nav a {
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-dark);
    transition: color 0.3s;
    white-space: nowrap;
}

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

.site-logo img {
    height: 70px !important;
    width: auto !important;
    max-height: 70px !important;
    display: block;
}

.header-order-btn {
    padding: 12px 30px;
    background: var(--color-dark);
    color: var(--color-light);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border: none;
    transition: background 0.3s;
}

.header-order-btn:hover {
    background: var(--color-accent);
}

.header-right-buttons {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 25px;
    z-index: 1001;
}

.header-cart-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: transparent;
    color: var(--color-dark);
    border: 1px solid var(--color-dark);
    border-radius: 50%;
    transition: all 0.3s;
}

.header-cart-btn:hover {
    background: var(--color-dark);
    color: var(--color-light);
}

.header-cart-btn .cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--color-accent);
    color: var(--color-light);
    font-size: 11px;
    font-weight: 600;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-right { 
    width: 70px;
}

/* Hero - with background image */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--color-cream);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding-top: 100px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(250, 248, 245, 0.85);
}

.hero-content {
    max-width: 700px;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 13px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 20px;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5.5rem);
    margin-bottom: 30px;
    color: var(--color-dark);
}

.hero-desc {
    font-size: 18px;
    color: var(--color-muted);
    max-width: 550px;
    margin: 0 auto 40px;
}

.hero-hours {
    font-size: 14px;
    color: var(--color-muted);
}

.hero-hours strong {
    display: block;
    margin-bottom: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--color-dark);
}

/* Gallery Section - 8 images (2 rows of 4) */
.gallery-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Section Base */
.section {
    padding: 100px 0;
}

.section-dark {
    background: var(--color-dark);
    color: var(--color-light);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    font-size: 12px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 15px;
}

.section-dark .section-subtitle {
    color: var(--color-accent);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
}

.section-desc {
    max-width: 600px;
    margin: 20px auto 0;
    color: var(--color-muted);
}

.section-dark .section-desc {
    color: rgba(255,255,255,0.7);
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-image img {
    border-radius: 4px;
}

.about-text p {
    color: var(--color-muted);
    margin-bottom: 20px;
}

/* Values */
.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    text-align: center;
}

.value-item { padding: 20px; }

.value-icon {
    font-size: 36px;
    margin-bottom: 20px;
}

.value-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.value-desc {
    font-size: 14px;
    opacity: 0.8;
}

/* Menu/Offer */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.menu-item {
    display: flex;
    gap: 20px;
    padding: 30px;
    background: var(--color-light);
    border-radius: 4px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.menu-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.menu-content h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.menu-content p {
    font-size: 14px;
    color: var(--color-muted);
}

/* CTA */
.cta-section {
    background: var(--color-dark);
    text-align: center;
    color: var(--color-light);
    padding: 80px 20px;
}

.cta-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 20px;
}

.cta-text {
    max-width: 550px;
    margin: 0 auto 30px;
    opacity: 0.85;
}

.btn {
    display: inline-block;
    padding: 15px 45px;
    border: 1px solid var(--color-light);
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s;
}

.btn:hover {
    background: var(--color-light);
    color: var(--color-dark);
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    text-align: center;
}

.contact-info h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 10px;
    color: var(--color-muted);
}

.contact-info a {
    color: var(--color-accent);
}

/* Footer — same "used to be body.home-only" fix as .site-header above:
   this used var(--color-dark)/60px 0 30px everywhere except the homepage,
   which had its own separate body.home override (--bakery-ink, 58px 20px,
   plus dedicated .footer-credit styling the base rule never had at all)
   — visibly inconsistent, confirmed live. Unscoped so every page matches
   the homepage's intended footer instead of the older fallback. */
.site-footer {
    background: var(--bakery-ink);
    color: var(--color-light);
    padding: 58px 20px;
    text-align: center;
}

.footer-logo img {
    height: 50px !important;
    width: auto !important;
    max-height: 50px !important;
    margin-bottom: 25px;
    filter: brightness(0) invert(1);
}

.footer-tagline {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-style: italic;
    opacity: 0.7;
    margin-bottom: 25px;
}

.footer-copy {
    font-size: 12px;
    opacity: 0.5;
}

.footer-credit {
    margin-top: 22px;
    color: rgba(255, 255, 255, .48);
    font-size: 10px;
    line-height: 1.4;
    letter-spacing: .8px;
}

.footer-credit a {
    color: inherit;
    border-bottom: 1px solid rgba(255, 255, 255, .24);
}

.footer-credit a:hover {
    color: #fff;
}

/* Responsive */
@media (max-width: 992px) {
    .header-inner {
        grid-template-columns: 1fr 1fr;
    }
    .header-left { display: none; }
    .main-nav { justify-self: start; }
    
    .gallery-section { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .values-grid { grid-template-columns: repeat(2, 1fr); }
    .menu-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .main-nav { display: none; }
    .site-logo { justify-self: center; }
    .header-inner { grid-template-columns: 1fr; }
    
    .gallery-section { grid-template-columns: 1fr 1fr; }
    .values-grid { grid-template-columns: 1fr; }
    .section { padding: 60px 0; }
}


/* WooCommerce */
.woocommerce-wrapper {
    padding: 120px 0 60px;
    min-height: 100vh;
    background: var(--color-cream);
}

.woocommerce ul.products {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    list-style: none;
    padding: 0 !important;
    margin: 40px 0 0 0 !important;
}

.bakery-ordering-disabled-notice {
    background: var(--color-dark);
    color: var(--color-light);
    padding: 14px 20px;
    margin: 16px 0 30px 0;
    text-align: center;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Product page — breadcrumb, weight subtitle, availability/stationary cards,
   description+ingredients section. */

.woocommerce-breadcrumb {
    font-size: 12px;
    color: var(--color-muted);
    margin: 24px 0 18px;
}

.woocommerce-breadcrumb a {
    color: var(--color-muted);
    text-decoration: none;
}

.woocommerce-breadcrumb a:hover {
    color: var(--color-accent);
}

.summary .price {
    display: block !important;
    margin: 4px 0 0 !important;
    font-size: 30px !important;
    font-weight: 600 !important;
    color: var(--bakery-yellow) !important;
}

.bakery-product-weight {
    margin: 2px 0 0;
    color: var(--color-muted);
    font-size: 14px;
}

.woocommerce-product-gallery__image {
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.woocommerce-product-gallery__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.flex-control-thumbs li img {
    border-radius: 10px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.flex-control-thumbs {
    margin-top: 12px !important;
}

.flex-control-thumbs li {
    margin-right: 10px !important;
}

.bakery-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--color-light);
    border: 1px solid #E4DDD0;
    border-radius: 10px;
    padding: 18px 20px;
    margin: 22px 0;
}

.bakery-card--muted {
    background: var(--color-cream);
    border-color: #E9E2D4;
}

.bakery-card--link {
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, background 0.2s;
}

.bakery-card--link:hover {
    border-color: var(--color-accent);
    background: var(--color-light);
}

.bakery-card__icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
}

.bakery-card__icon svg {
    width: 22px;
    height: 22px;
}

.bakery-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

.bakery-card__body > strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.bakery-card__body > p {
    margin: 0;
    font-size: 13px;
    color: var(--color-muted);
}

.bakery-card__body > p.bakery-pickup-code {
    margin-top: 10px;
    font-size: 13px;
    color: var(--color-dark);
}

.bakery-pickup-code strong {
    font-size: 17px;
    letter-spacing: 1px;
    color: var(--color-accent);
}

.bakery-availability-picker label {
    display: block;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-accent);
}

/* .bakery-schedule-tabs/.bakery-product-card__readiness (reused directly
   in the template, see availability-picker.php) already supply the tab
   and readiness-pill styling — this just fits them into the narrower
   .bakery-card__body context and styles the brief loading placeholder. */
.bakery-availability-tabs {
    margin-bottom: 12px;
}

.bakery-availability-loading {
    margin: 0;
    font-size: 13px;
    color: var(--color-muted);
}

.bakery-availability-readiness {
    margin-bottom: 14px;
}

.bakery-card__body > p.bakery-availability-note {
    max-width: 360px;
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-muted);
}

.bakery-availability-results {
    margin-top: 10px;
    font-size: 13px;
    color: var(--color-muted);
}

.bakery-availability-results:empty {
    margin-top: 0;
}

.summary .woocommerce-product-details__short-description {
    margin: 14px 0 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--color-dark);
}

.bakery-divider {
    width: 60px;
    margin: 16px 0 0;
    border: 0;
    border-top: 1px solid #E9E2D4;
}

.bakery-full-divider {
    clear: both;
    width: 100%;
    margin: 50px 0 0;
    border: 0;
    border-top: 1px solid #E9E2D4;
}

.bakery-product-details {
    /* No max-width/centering/padding here on purpose — .images/.summary
       above are unpadded 48%/48% floats spanning the full product width,
       so matching that exactly (48% / gap / 48%) is what keeps this
       section's two columns aligned under the columns above them. */
    display: flex;
    flex-wrap: wrap;
    gap: 4%;
    margin-top: 40px;
    padding-bottom: 40px;
}

.bakery-product-details__description {
    flex: 0 1 48%;
    min-width: 260px;
}

.bakery-product-details__facts {
    flex: 0 1 48%;
    min-width: 200px;
}

.bakery-product-details h2 {
    font-size: 22px;
    margin: 0 0 14px;
}

.bakery-product-details__description p {
    font-size: 15px;
    line-height: 1.65;
    color: var(--color-dark);
}

.bakery-product-details__facts h3 {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-accent);
    margin: 22px 0 8px;
}

.bakery-product-details__facts h3:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.bakery-product-details__facts h3:not(:first-child) {
    padding-top: 16px;
    border-top: 1px solid #E9E2D4;
}

.bakery-product-details__facts p {
    margin: 0;
    font-size: 16px;
    line-height: 1.55;
}

@media (max-width: 782px) {
    .bakery-product-details {
        gap: 28px;
    }
    .bakery-product-details__description,
    .bakery-product-details__facts {
        flex-basis: 100%;
    }
}

/* Same card language as .bakery-shop-products (the shop page's own
   photo-led cards) everywhere WooCommerce renders its own default product
   loop — category archives, related products, search results, up-sells.
   Previously only .related.products (single-product page) got this
   treatment and everything else fell back to WooCommerce's stock centered
   card with a wide uppercase button that overflowed on narrower cards;
   one shared rule now covers all of it. */
.woocommerce ul.products {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    list-style: none;
    padding: 0 !important;
    margin: 40px 0 0 0 !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important;
}

.woocommerce ul.products li.product {
    /* flex-grow:0 — with only 1-2 products in a row (e.g. related
       products), a growing flex-basis stretched a lone card to fill the
       entire row width. */
    flex: 0 1 340px;
    display: grid;
    grid-template-columns: 84px 1fr;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 4px;
    align-items: center;
    text-align: left;
    min-width: 0;
    max-width: none;
    background: var(--color-light);
    border: 1px solid #E4DDD0;
    border-radius: 8px;
    padding: 12px;
    transition: border-color 0.2s;
}

.woocommerce ul.products li.product:hover {
    border-color: var(--color-accent);
}

.woocommerce ul.products li.product img,
.woocommerce ul.products li.product .attachment-woocommerce_thumbnail {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 84px !important;
    height: 84px !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1rem;
}

.woocommerce ul.products li.product .price {
    grid-column: 2;
    grid-row: 2;
    display: inline-block;
    margin-top: 0;
    padding-top: 6px;
    border-top: 1px solid var(--color-accent);
    color: var(--color-accent);
    font-size: 0.95rem;
    font-weight: 600;
}

/* Icon-only add-to-cart (see functions.php's woocommerce_loop_add_to_cart_link
   filter) — a full-text uppercase button never fit this card's 84px-image
   layout at any width without overflowing or wrapping mid-word; the label
   stays for screen readers via .screen-reader-text. Absolutely positioned
   in the card's own corner rather than a 3rd grid row, so it doesn't push
   title/price around. */
.woocommerce ul.products li.product {
    position: relative;
}

/* !important throughout: the universal .woocommerce a/button/input.button
   rule below (also !important) otherwise wins on padding/border-radius —
   a plain override loses to an !important one regardless of specificity —
   which was silently inflating this fixed 32x32 circular icon button out
   to ~82x56px (12px/25px padding added on top of content-box width/height)
   and squaring off its corners. Confirmed against the installed CSS, not
   yet reported live since these product-loop cards (category archives,
   search results, related products) see little traffic. */
.woocommerce ul.products li.product .button {
    position: absolute;
    right: 10px;
    bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0 !important;
    background: var(--color-dark) !important;
    color: var(--color-light) !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer;
    transition: background 0.3s;
}

.woocommerce ul.products li.product .button:hover {
    background: var(--color-accent);
}

.woocommerce ul.products li.product .button svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.woocommerce-products-header__title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
}

/* Related products, single-product page only — section-level spacing,
   the cards themselves now share the same rule as every other product
   loop above. */
.related.products {
    /* Clears the floated .images/.summary columns above it, in case
       .bakery-product-details renders nothing (no description/
       ingredients/allergens set yet) and this becomes the first sibling
       right after them. No max-width/centering/padding here either, for
       the same reason as .bakery-product-details — keeps this section's
       left edge aligned with Opis produktu/the .images column above
       instead of independently centered/inset. */
    clear: both;
    margin: 40px 0 60px;
    padding-top: 40px;
    border-top: 1px solid #E9E2D4;
}

.related.products > h2 {
    font-size: 26px;
    margin-bottom: 24px;
}

.woocommerce-products-header__title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 40px;
}

.woocommerce-result-count,
.woocommerce-ordering {
    display: none;
}


/* Cart Page */
.woocommerce-cart table.cart {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce-cart table.cart th,
.woocommerce-cart table.cart td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.woocommerce-cart table.cart img {
    width: 80px;
    height: auto;
}

/* cart-suggestions.js wraps this native input in a .bakery-qty-stepper
   (+/- buttons) on load, which already has its own complete styling —
   this just hides the native spin arrows underneath so nothing shows
   through before/if that JS runs. */
.woocommerce-cart table.cart .quantity {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.bakery-cart-item-stock {
    font-size: 12px;
    color: var(--color-muted);
}

.bakery-cart-item-stock.is-low {
    color: var(--color-accent);
    font-weight: 700;
}

.woocommerce-cart table.cart .quantity .qty {
    -moz-appearance: textfield;
}

.woocommerce-cart table.cart .quantity .qty::-webkit-outer-spin-button,
.woocommerce-cart table.cart .quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.woocommerce-cart .cart_totals {
    background: var(--color-light);
    padding: 30px;
    border-radius: 4px;
    margin-top: 30px;
}

/* Universal WooCommerce button style — was border-radius: 0 (flat/square),
   inconsistent with every other CTA on the site (.bakery-add-to-cart-btn,
   .btn, etc. are all rounded); this is the one rule every WC-rendered
   button goes through (place_order, mini-cart view/checkout links,
   coupon apply, ...), so fixing it here fixes all of them at once instead
   of chasing each `.button`-classed element individually. */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
    background: var(--color-dark) !important;
    color: var(--color-light) !important;
    padding: 12px 25px !important;
    font-size: 12px !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer;
    transition: background 0.3s !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background: var(--color-accent) !important;
}

/* Checkout Page */
.woocommerce-checkout .woocommerce-form-row input,
.woocommerce-checkout .woocommerce-form-row select,
.woocommerce-checkout .form-row input,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.woocommerce-checkout .form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.woocommerce-checkout #order_review {
    background: var(--color-light);
    padding: 30px;
    border-radius: 4px;
}

.woocommerce-checkout #payment {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
}

/* Order-flow step nav — Koszyk/Podsumowanie/Potwierdzenie + a permanent
   way back to the shop, shared across cart/checkout/order-received (see
   Checkout_Customizations::render_order_flow_nav). Also fixes the
   centered .page-title cart/checkout/koszyk inherit from page.php's
   generic template — everything else on the site reads left-aligned. */
body.woocommerce-cart .page-title,
body.woocommerce-checkout .page-title,
body.woocommerce-order-received .page-title {
    text-align: left;
    margin-bottom: 4px;
}

.bakery-order-flow {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E9E2D4;
}

.bakery-order-flow__back {
    font-size: 13px;
    color: var(--color-muted);
    text-decoration: none;
}

.bakery-order-flow__back:hover {
    color: var(--color-accent);
}

.bakery-order-flow__steps {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 13px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: #C9BBA4;
}

.bakery-order-flow__steps li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bakery-order-flow__steps li:not(:last-child)::after {
    content: "\2192";
    color: #C9BBA4;
}

.bakery-order-flow__steps li.is-active {
    color: var(--color-accent);
    font-weight: 700;
}

.bakery-order-flow__steps li.is-done {
    color: var(--color-dark);
}

.bakery-order-flow__steps li.is-done a:hover {
    color: var(--color-accent);
}

/* Placeholder — see Checkout_Customizations::render_receipt_choice's own
   doc comment for why this isn't wired to real fiscal logic yet. */
.bakery-receipt-choice {
    margin: 20px 0;
    padding: 16px 18px;
    background: var(--color-light);
    border: 1px solid #E4DDD0;
    border-radius: 8px;
}

.bakery-receipt-choice.woocommerce-invalid {
    border-color: #c00;
}

.bakery-receipt-choice__label {
    margin: 0 0 10px;
    font-weight: 600;
    font-size: 14px;
}

.bakery-receipt-choice__option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 8px 0;
}

.bakery-receipt-choice__option + .bakery-receipt-choice__option {
    border-top: 1px solid #E9E2D4;
}

.bakery-receipt-choice__option input[type="radio"] {
    margin-top: 4px;
    flex-shrink: 0;
}

.bakery-receipt-choice__option span {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    color: var(--color-muted);
    line-height: 1.5;
}

.bakery-receipt-choice__option strong {
    color: var(--color-dark);
    font-weight: 600;
    font-size: 14px;
}

.bakery-terms-consent {
    margin: 16px 0;
}

/* !important on display/gap: WooCommerce's own checkout CSS applies a
   competing label rule inside #order_review that otherwise wins (not
   specificity — a floated/block label stacking the checkbox above the
   text instead of beside it, confirmed live). */
.bakery-terms-consent label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px !important;
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-muted);
    cursor: pointer;
}

.bakery-terms-consent input[type="checkbox"] {
    margin: 3px 0 0 !important;
    flex-shrink: 0;
    width: auto;
}

.bakery-terms-consent a {
    color: var(--color-dark);
    text-decoration: underline;
}

.bakery-legal-modal {
    /* The browser's own UA stylesheet already centers dialog:modal via
       margin: auto — but this theme's sitewide "*, *::before, *::after
       { margin: 0 }" reset is an author rule, which always outranks a
       normal UA-origin rule regardless of specificity (confirmed live:
       the modal opened pinned to the top-left instead of centered).
       Restoring it here just for this element. */
    margin: auto;
    width: min(600px, 90vw);
    max-height: 80vh;
    padding: 0;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(44, 36, 22, 0.2);
}

.bakery-legal-modal::backdrop {
    background: rgba(44, 36, 22, 0.5);
}

.bakery-legal-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    border-bottom: 1px solid #E9E2D4;
}

.bakery-legal-modal__header h2 {
    margin: 0;
    font-size: 18px;
}

.bakery-legal-modal__close {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--color-cream);
    color: var(--color-dark);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.bakery-legal-modal__close:hover {
    background: var(--color-accent);
    color: var(--color-light);
}

.bakery-legal-modal__body {
    padding: 22px;
    overflow-y: auto;
    max-height: calc(80vh - 70px);
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-dark);
}

/* Inline per-field errors (functions.php's checkout_error handler) — moved
   here from the top-of-page notice list, right under the field they
   actually belong to. */
.form-row.woocommerce-invalid input,
.form-row.woocommerce-invalid select {
    border-color: #c00 !important;
}

.bakery-terms-consent.woocommerce-invalid {
    border: 1px solid #c00;
    border-radius: 6px;
    padding: 10px 12px;
    margin: 12px 0;
}

.bakery-field-error {
    margin: 4px 0 0;
    font-size: 12px;
    color: #c00;
}

/* Messages — WooCommerce renders these as a <ul class="woocommerce-message">
   with the text in an <li>, not a plain <div>; without an explicit
   list-style/padding/margin reset here the browser's own default bullet +
   ~40px indent showed through (confirmed live: "Usunięto: X. Cofnij?"
   rendered with a visible bullet point, unlike every other message-style
   element on the site), and the flat 4px hard border read as a different
   design language from the site's own rounded .bakery-card component. */
/* WooCommerce's own core CSS draws a checkmark/cross icon via ::before,
   position: absolute; top: 1em; left: 1.5em — sized for its own default
   padding: 1em 2em 1em 3.5em. Our uniform 14px 18px above dropped that
   reserved-for-the-icon left space entirely, so the icon (still absolutely
   positioned, untouched by this override) landed directly on top of the
   message text instead of beside it (confirmed live: "Koszyk
   zaktualizowany" and "Chleb X usunięto. Cofnij?" both rendered with the
   icon overlapping the first word). padding-left restores enough room for
   it without reverting to core's own bulkier padding everywhere else. */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    list-style: none;
    margin: 0 0 20px;
    padding: 14px 18px 14px 44px;
    background: var(--color-light);
    border: 1px solid #E4DDD0;
    border-left: 4px solid var(--color-accent);
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.woocommerce-error {
    background: #FBF0EE;
    border-color: #EAD4D0;
    border-left-color: #c00;
}

.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a {
    color: var(--color-dark);
    text-decoration: underline;
}

/* Page Template */
.page-wrapper {
    padding: 120px 0 60px;
    min-height: 100vh;
    background: var(--color-cream);
}

.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
}

.page-content {
    max-width: 900px;
    margin: 0 auto;
}


/* WooCommerce Blocks */
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
    max-width: 1200px;
    margin: 0 auto;
}

.wc-block-cart__main,
.wc-block-checkout__main {
    background: var(--color-light);
    padding: 30px;
    border-radius: 4px;
}

.wc-block-components-button {
    background: var(--color-dark) !important;
    color: var(--color-light) !important;
    border: none !important;
    padding: 15px 30px !important;
    font-size: 13px !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
}

.wc-block-components-button:hover {
    background: var(--color-accent) !important;
}

.wc-block-cart-item__image img {
    width: 100px !important;
    height: auto !important;
}


/* Empty Cart Styling */
.wc-block-cart__empty-cart__title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--color-dark);
    margin-bottom: 30px;
}

.wp-block-woocommerce-empty-cart-block {
    text-align: center;
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.wp-block-woocommerce-empty-cart-block .wp-block-separator {
    margin: 30px auto;
    max-width: 100px;
}

.wp-block-woocommerce-empty-cart-block .wp-block-button__link,
.wp-block-woocommerce-empty-cart-block a.wp-block-button__link {
    background: var(--color-dark) !important;
    color: var(--color-light) !important;
}

/* Product cards in empty cart (New in store) */
.wp-block-woocommerce-empty-cart-block .wc-block-grid__products,
.wp-block-woocommerce-empty-cart-block .wp-block-woocommerce-product-new {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    padding: 0 20px;
}

.wp-block-woocommerce-empty-cart-block .wc-block-grid__product {
    background: var(--color-light);
    padding: 20px;
    border-radius: 4px;
    text-align: center;
    max-width: 280px;
    flex: 0 1 280px;
}

.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-image {
    margin-bottom: 15px;
}

.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-image img {
    border-radius: 4px;
    width: 100%;
    height: auto;
}

.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-price {
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 15px;
}

.wp-block-woocommerce-empty-cart-block .wc-block-grid__product .wp-block-button__link,
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product .add_to_cart_button {
    display: inline-block;
    padding: 10px 20px !important;
    background: var(--color-dark) !important;
    color: var(--color-light) !important;
    font-size: 12px !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none !important;
    border-radius: 0 !important;
}

.wp-block-woocommerce-empty-cart-block .wc-block-grid__product .wp-block-button__link:hover,
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product .add_to_cart_button:hover {
    background: var(--color-accent) !important;
}


/* WooCommerce Product Blocks (Bestsellers, New, etc.) */
.wc-block-grid__products {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    list-style: none;
    padding: 0;
    margin: 40px 0;
}

.wc-block-grid__product {
    background: var(--color-light);
    padding: 25px;
    border-radius: 4px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    flex: 0 1 350px;
    max-width: 350px;
    min-width: 280px;
}

.wc-block-grid__product:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.wc-block-grid__product-image {
    margin-bottom: 15px;
}

.wc-block-grid__product-image img {
    width: 100%;
    height: auto;
    min-height: 200px;
    max-height: 300px;
    object-fit: cover;
    border-radius: 4px;
}

.wc-block-grid__product-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin: 15px 0 10px;
    color: var(--color-dark);
}

.wc-block-grid__product-title a {
    color: inherit;
    text-decoration: none;
}

.wc-block-grid__product-price {
    color: var(--color-accent);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.wc-block-grid__product-add-to-cart .wp-block-button__link,
.wc-block-grid__product .add_to_cart_button,
.wc-block-grid__product .wp-block-button__link {
    display: inline-block;
    margin-top: 10px;
    padding: 12px 25px !important;
    background: var(--color-dark) !important;
    color: var(--color-light) !important;
    font-size: 12px !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer;
    transition: background 0.3s !important;
}

.wc-block-grid__product-add-to-cart .wp-block-button__link:hover,
.wc-block-grid__product .add_to_cart_button:hover,
.wc-block-grid__product .wp-block-button__link:hover {
    background: var(--color-accent) !important;
}

/* Product Collection Block */
.wp-block-woocommerce-product-collection .wc-block-product-template {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
}

.wp-block-woocommerce-product-collection .wc-block-product {
    background: var(--color-light);
    padding: 25px;
    border-radius: 4px;
    text-align: center;
    flex: 0 1 350px;
    max-width: 350px;
}

/* 2026 front-page refresh */
:root {
    --bakery-ink: #171714;
    --bakery-paper: #f2eee6;
    --bakery-yellow: #f2bd38;
    --bakery-coral: #d7684d;
    --bakery-rule: rgba(23, 23, 20, 0.22);
}

body.home {
    background: var(--bakery-paper);
    color: var(--bakery-ink);
}

/* Header styling used to be body.home-only, leaving every other page (shop
   included) on the plain fallback header (centered nav, no dot separators,
   dark button) - visibly inconsistent with the homepage. Unscoped so every
   page gets the same, intended header. body.home keeps only what's
   actually homepage-specific (page background, hero overflow clipping). */
.site-header {
    padding: 0;
    background: var(--bakery-paper);
    border-bottom: 1px solid var(--bakery-rule);
}

.site-header .container { max-width: none; padding: 0 36px; }
.header-inner { justify-content: flex-start; min-height: 76px; gap: 54px; }
.site-logo img { height: 46px !important; max-height: 46px !important; }
.site-title { font: 600 22px/1 var(--font-heading); }
.main-nav ul { gap: 16px; }
.main-nav li { display: flex; align-items: center; gap: 16px; }
.main-nav li + li::before { content: "·"; color: var(--bakery-coral); font-size: 16px; line-height: 1; }
.main-nav a { font-size: 13px; letter-spacing: 1.4px; }
.header-right-buttons { right: 36px; gap: 10px; }
.header-socials { display: flex; align-items: center; gap: 4px; }
.header-socials a { width: 38px; height: 38px; display: grid; place-items: center; color: var(--bakery-ink); }
.header-socials a:hover { color: var(--bakery-coral); }
.header-socials svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.header-socials .social-icon-fill { fill: currentColor; stroke: none; }
.header-order-btn { background: var(--bakery-yellow); color: var(--bakery-ink); padding: 13px 22px; }
.header-order-btn:hover { background: var(--bakery-coral); }
body.home .site-main { overflow: hidden; }

.bakery-hero {
    position: relative;
    height: min(820px, calc(100vh - 76px));
    min-height: 620px;
    margin-top: 76px;
    color: #fff;
    overflow: hidden;
}

.bakery-hero__image,
.bakery-hero__shade { position: absolute; inset: 0; width: 100%; height: 100%; }
.bakery-hero__image { object-fit: cover; object-position: center 38%; }
.bakery-hero__shade { background: linear-gradient(90deg, rgba(18,14,10,.66) 0%, rgba(18,14,10,.16) 65%, rgba(18,14,10,.04) 100%); }
.bakery-hero__topline { position: absolute; top: 28px; left: 36px; right: 36px; display: flex; justify-content: space-between; font-size: 11px; text-transform: uppercase; letter-spacing: 1.8px; }
.bakery-hero__content { position: absolute; left: clamp(28px, 7vw, 112px); bottom: clamp(46px, 9vh, 100px); width: min(680px, calc(100% - 56px)); }
.bakery-kicker { margin-bottom: 18px; font-size: 11px; line-height: 1.2; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; }
.bakery-hero__logo-field {
    display: inline-flex;
    align-items: center;
}

.bakery-hero__logo {
    display: block;
    width: clamp(240px, 29vw, 420px);
    max-height: 220px;
    object-fit: contain;
    object-position: left center;
}
.bakery-hero__intro { max-width: 500px; margin: 38px 0 26px; font-size: clamp(17px, 1.5vw, 22px); line-height: 1.45; }
.bakery-link { display: inline-flex; gap: 20px; align-items: center; padding: 9px 0; border-bottom: 1px solid currentColor; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.3px; }
.bakery-link span { font-size: 17px; }
.bakery-link--light { color: #fff; }

.bakery-bread { display: grid; grid-template-columns: 1.3fr .7fr; min-height: 560px; background: var(--bakery-paper); }
.bakery-bread, .bakery-cafe, .bakery-visit, .bakery-hours { scroll-margin-top: 92px; }
.bakery-bread__image { overflow: hidden; }
.bakery-bread__image img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
.bakery-bread__content { display: flex; flex-direction: column; justify-content: center; padding: 52px clamp(30px, 4vw, 62px); }
.bakery-bread__content h2 { font-size: clamp(36px, 3.5vw, 52px); line-height: .98; letter-spacing: 0; }
.bakery-visit h2 { font-size: clamp(58px, 8vw, 118px); line-height: .91; letter-spacing: 0; }
.bakery-bread__content h2::first-line { color: var(--bakery-coral); }
.bakery-bread__content > p:not(.bakery-kicker) { margin-top: 30px; font-size: 17px; line-height: 1.6; }

.bakery-cafe { display: grid; grid-template-columns: .7fr 1.3fr; min-height: 680px; }
.bakery-cafe__image { grid-column: 2; grid-row: 1; overflow: hidden; }
.bakery-cafe__image img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: center; }
.bakery-cafe__content { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; justify-content: center; padding: 72px clamp(32px, 5vw, 78px); background: var(--bakery-paper); color: var(--bakery-ink); }
.bakery-cafe__content h2 { font-size: clamp(58px, 6vw, 92px); line-height: .95; letter-spacing: 0; }
.bakery-cafe__content > p:not(.bakery-kicker) { margin-top: 42px; font-size: 18px; line-height: 1.65; }
.bakery-cafe__note { margin-top: 58px; padding-top: 18px; border-top: 1px solid var(--bakery-rule); color: var(--bakery-coral); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; }

.bakery-visit { display: grid; grid-template-columns: .9fr 1.1fr; gap: 8vw; padding: 140px clamp(28px, 7vw, 112px); background: #fff; }
.bakery-map {
    position: relative;
    width: min(100%, 480px);
    aspect-ratio: 1;
    margin-top: 52px;
    overflow: hidden;
    background: #dedbd3;
}
.bakery-map iframe { width: 100%; height: 100%; border: 0; display: block; pointer-events: none; }
.bakery-map__label {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 10px 12px;
    background: var(--bakery-yellow);
    color: var(--bakery-ink);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.bakery-map a {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 10px 12px;
    background: var(--bakery-ink);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.bakery-visit__details { display: grid; align-content: end; gap: 64px; }
.bakery-detail { border-top: 1px solid var(--bakery-rule); padding-top: 18px; }
.bakery-detail h3 { margin-bottom: 25px; font: 700 11px/1 var(--font-body); text-transform: uppercase; letter-spacing: 1.8px; }
.bakery-detail address { font: 400 clamp(25px, 3vw, 43px)/1.2 var(--font-heading); }
.bakery-hours dl { margin: 0; }
.bakery-hours dl div { display: grid; grid-template-columns: 1fr auto; gap: 20px; padding: 9px 0; border-bottom: 1px solid rgba(23,23,20,.09); }
.bakery-hours dt, .bakery-hours dd { margin: 0; font-size: 15px; }
.bakery-hours dd { font-weight: 700; }

.bakery-mural { position: relative; height: min(780px, 75vw); min-height: 520px; overflow: hidden; background: var(--bakery-ink); }
.bakery-mural img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; opacity: .86; }
.bakery-mural p { position: absolute; left: clamp(28px, 7vw, 112px); bottom: 60px; color: #fff; font: italic 400 clamp(50px, 7vw, 105px)/.95 var(--font-heading); }

@media (max-width: 760px) {
    .site-header .container { padding: 0 18px; }
    .header-inner { min-height: 64px; gap: 0; }
    .site-logo img { height: 38px !important; max-height: 38px !important; }
    .main-nav { display: none; }
    .header-right-buttons { right: 18px; }
    .header-socials { gap: 0; }
    .header-socials a { width: 34px; height: 34px; }
    .header-socials svg { width: 18px; height: 18px; }
    .header-order-btn { padding: 11px 12px; font-size: 10px; }
    .bakery-hero { margin-top: 64px; height: calc(100svh - 64px); min-height: 600px; }
    .bakery-hero__shade { background: linear-gradient(0deg, rgba(18,14,10,.72), rgba(18,14,10,.05) 75%); }
    .bakery-hero__image { object-position: 56% center; }
    .bakery-hero__topline { top: 20px; left: 20px; right: 20px; }
    .bakery-hero__topline span:last-child { display: none; }
    .bakery-hero__content { left: 22px; bottom: 42px; width: calc(100% - 44px); }
    .bakery-hero__logo { width: min(68vw, 310px); max-height: 170px; }
    .bakery-hero__intro { margin-top: 30px; font-size: 17px; }
    .bakery-bread { grid-template-columns: 1fr; min-height: 0; }
    .bakery-bread__image { aspect-ratio: 1.25; }
    .bakery-bread__content { min-height: 420px; padding: 56px 22px; }
    .bakery-bread__content h2 { font-size: clamp(40px, 12vw, 56px); }
    .bakery-visit h2 { font-size: clamp(52px, 16vw, 76px); }
    .bakery-bread__content > p:not(.bakery-kicker) { margin-top: 38px; font-size: 17px; }
    .bakery-cafe { grid-template-columns: 1fr; min-height: 0; }
    .bakery-cafe__image { grid-column: 1; grid-row: 2; aspect-ratio: 1.2; }
    .bakery-cafe__content { grid-column: 1; grid-row: 1; min-height: 470px; padding: 70px 22px; }
    .bakery-cafe__content h2 { font-size: clamp(54px, 17vw, 76px); }
    .bakery-cafe__content > p:not(.bakery-kicker) { margin-top: 34px; font-size: 17px; }
    .bakery-visit { grid-template-columns: 1fr; gap: 80px; padding: 90px 22px; }
    .bakery-hours { scroll-margin-top: 86px; }
    .bakery-visit__details { gap: 50px; }
    .bakery-hours dl div { gap: 12px; }
    .bakery-hours dt, .bakery-hours dd { font-size: 14px; }
    .bakery-mural { height: 115vw; min-height: 500px; }
    .bakery-mural img { object-position: center; }
    .bakery-mural p { left: 22px; bottom: 38px; }
}

/* Shop landing intro (Sklep page, before the product grid) */

.bakery-shop-header {
    max-width: 720px;
    margin: 24px auto 32px;
    text-align: center;
}

.bakery-shop-header .bakery-kicker {
    margin-bottom: 10px;
}

.bakery-shop-header h1 {
    font-size: clamp(30px, 4vw, 42px);
    margin: 0 0 14px;
}

.bakery-shop-header__lead {
    max-width: 540px;
    margin: 0 auto 18px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-muted);
}

.bakery-shop-header__steps {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    font-size: 13px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--color-accent);
}

.bakery-shop-header__steps span {
    color: #C9BBA4;
}

.bakery-shop-search {
    display: flex;
    align-items: center;
    max-width: 360px;
    margin: 20px auto 0;
    border: 1px solid #E4DDD0;
    border-radius: 999px;
    background: var(--color-light);
    padding: 4px 4px 4px 16px;
}

.bakery-shop-search input[type="search"] {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 8px 4px;
    font-size: 14px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.bakery-shop-search button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--color-dark);
    color: var(--color-light);
    cursor: pointer;
    transition: background 0.2s;
}

.bakery-shop-search button:hover {
    background: var(--color-accent);
}

.bakery-shop-search button.bakery-shop-search__clear {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    background: var(--color-cream);
    color: var(--color-muted);
}

.bakery-shop-search button.bakery-shop-search__clear:hover {
    background: var(--color-cream);
    color: var(--color-dark);
}

/* Shop page: main column (header/date-picker/product grid) + a persistent
   mini-cart aside — stacks below the main column once there isn't enough
   width for both to sit comfortably side by side. */
.bakery-shop-layout {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Widened alongside body.bakery-shop-wide's .container below — the sidebar
   needs 320px (280px + gap) that the site's standard 1200px page width
   doesn't have room for on top of a 3-card grid row (see .bakery-product-grid
   below); this element's own max-width would otherwise re-cap it back down
   to 1200px regardless of the wider .container. */
body.bakery-shop-wide .bakery-shop-layout {
    max-width: 1500px;
}

/* Shop page only (see chleb_is_plain_shop()'s body_class filter) — the
   standard site-wide 1200px .container leaves only ~840px for the product
   grid once the 280px mini-cart sidebar + 40px gap are subtracted, not
   enough for three 340px cards plus gaps (needs ~1084px): confirmed live,
   the third card was wrapping to its own row instead of sitting alongside
   the other two. */
body.bakery-shop-wide .container {
    max-width: 1500px;
}

.bakery-shop-layout__main {
    flex: 1 1 auto;
    min-width: 0;
}

.bakery-shop-layout__sidebar {
    flex: 0 0 280px;
    position: sticky;
    /* .site-header is position:fixed at ~77px tall (.header-inner's
       min-height: 76px + its 1px border-bottom) — top: 24px alone stuck
       the sidebar's own top edge under/behind the header while scrolling,
       truncating it instead of the header sitting cleanly above it. */
    top: 100px;
}

@media (max-width: 900px) {
    .bakery-shop-layout {
        flex-direction: column;
    }

    .bakery-shop-layout__sidebar {
        width: 100%;
        position: static;
    }
}

.bakery-mini-cart {
    background: var(--color-light);
    border: 1px solid #E4DDD0;
    border-radius: 10px;
    padding: 20px;
}

.bakery-mini-cart h2 {
    font-size: 18px;
    margin: 0 0 14px;
}

.bakery-mini-cart__empty {
    color: var(--color-muted);
    font-size: 14px;
    margin: 0;
}

.bakery-mini-cart__pickup {
    margin: 0 0 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #E9E2D4;
    font-size: 13px;
    color: var(--color-muted);
}

.bakery-mini-cart__items {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bakery-mini-cart__items li {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 10px;
}

.bakery-mini-cart__items img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}

.bakery-mini-cart__item-text {
    display: flex;
    flex-direction: column;
    font-size: 13px;
    min-width: 0;
}

.bakery-mini-cart__item-text strong {
    font-weight: 600;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bakery-mini-cart__item-text span {
    color: var(--color-muted);
}

.bakery-mini-cart__remove {
    color: var(--color-muted);
    font-size: 20px;
    line-height: 1;
    text-decoration: none;
    padding: 4px;
}

.bakery-mini-cart__remove:hover {
    color: #c00;
}

/* Compact stepper variant for the mini-cart's own narrow row — the
   product-card .bakery-qty-stepper (schedule.js) is sized for a 340px card,
   far too tall/wide for a 48px-image sidebar row. */
.bakery-mini-cart__qty {
    margin-top: 4px;
}

.bakery-mini-cart__qty .bakery-qty-stepper {
    display: inline-flex;
}

.bakery-mini-cart__qty .bakery-qty-stepper button {
    width: 24px;
    height: 26px;
    font-size: 13px;
}

.bakery-mini-cart__qty .bakery-qty-stepper input {
    width: 28px;
    height: 26px;
    font-size: 13px;
}

/* Buttons are disabled while an update request is in flight (mini-cart.js)
   — the stepper's own :disabled styling already dims them, this just keeps
   the whole row from looking interactive mid-request. */
.bakery-mini-cart__item:has(.bakery-qty-stepper button:disabled) {
    opacity: 0.6;
}

.bakery-mini-cart__subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #E4DDD0;
    margin: 0 0 16px;
    font-size: 14px;
}

.bakery-mini-cart__subtotal strong {
    color: var(--color-accent);
    font-size: 16px;
}

.bakery-mini-cart__view,
.bakery-mini-cart__checkout {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    margin-bottom: 8px !important;
}

.bakery-mini-cart__view {
    background: transparent !important;
    color: var(--color-dark) !important;
    border: 1px solid var(--color-dark) !important;
}

.bakery-mini-cart__checkout {
    margin-bottom: 0 !important;
}

.bakery-shop-products {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0 0 40px;
}

.bakery-shop-products li {
    display: flex;
    flex-direction: column;
    flex: 0 1 280px;
}

/* Cart-page suggestion cards only (.bakery-shop-products is reused
   plain — no controls row — for "Podobne produkty" etc.): the card
   border/background moves from the <a> up to the whole <li> so the
   stepper+add-button row below the image/text reads as part of the same
   card instead of floating separately underneath it. */
.bakery-cart-suggestions .bakery-shop-products li {
    padding: 12px;
    background: var(--color-light);
    border: 1px solid #E4DDD0;
    border-radius: 8px;
    transition: border-color 0.2s;
}

.bakery-cart-suggestions .bakery-shop-products li:hover {
    border-color: var(--color-accent);
}

.bakery-cart-suggestions .bakery-shop-products a {
    padding: 0;
    background: none;
    border: none;
}

.bakery-suggestion-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.bakery-suggestion-controls__stock {
    flex: 1 1 100%;
    font-size: 12px;
    color: var(--color-muted);
}

.bakery-suggestion-controls__stock.is-low {
    color: var(--color-accent);
    font-weight: 700;
}

.bakery-suggestion-add[aria-busy="true"],
.bakery-suggestion-add:disabled {
    opacity: 0.65;
    cursor: default;
}

/* Same card language as "Podobne produkty" on the product page (see
   .related.products rules above): square image on the left, title/price
   stacked on the right with a gold divider between them. */
.bakery-shop-products a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background: var(--color-light);
    border: 1px solid #E4DDD0;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s;
}

.bakery-shop-products a:hover {
    border-color: var(--color-accent);
}

.bakery-shop-products img {
    width: 84px;
    height: 84px;
    flex: 0 0 84px;
    object-fit: cover;
    border-radius: 6px;
}

.bakery-shop-products__text {
    display: flex;
    flex-direction: column;
}

.bakery-shop-products strong {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 16px;
}

.bakery-shop-products .price {
    display: inline-block;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--color-accent);
    font-size: 14px;
    color: var(--color-accent);
}

/* Sklep is a curated, date-led landing (header, date tabs, photo grid,
   FAQ) — the raw product-type archive grid it would otherwise render is
   redundant with the date-led grid above it. Full browsing happens via
   category pages instead (e.g. /product-category/chleb/), whose own grid
   is untouched — this only targets the shop page's own body class.
   A product search also carries body.woocommerce-shop (WooCommerce treats
   ?s=...&post_type=product as the shop archive too — see
   chleb_is_plain_shop() in functions.php) but genuinely needs its grid
   visible, since that's the actual search results; .search-results
   excludes it from this rule. */
body.woocommerce-shop:not(.search-results) ul.products,
body.woocommerce-shop:not(.search-results) .woocommerce-pagination {
    display: none;
}

.bakery-schedule {
    max-width: 1200px;
    /* Last section on the page now that "Jak działa odbiór?"/FAQ were
       removed — needs real closing space before the footer, not the 8px
       that made sense when another section followed directly after. */
    margin: 0 auto 64px;
}

.bakery-schedule h2 {
    font-size: 20px;
    margin-bottom: 18px;
}

.bakery-schedule-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.bakery-schedule-top-row .bakery-schedule-heading {
    margin-bottom: 0;
}

/* Same 20s poll wypiekOS's own staff dashboard already uses for orders —
   consistent behavior across both apps, not a new convention. */
.bakery-schedule-refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: 1px solid #E4DDD0;
    border-radius: 50%;
    background: var(--color-light);
    color: var(--color-dark);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.bakery-schedule-refresh:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.bakery-schedule-refresh.is-loading svg {
    animation: bakery-spin 0.8s linear infinite;
}

@keyframes bakery-spin {
    to { transform: rotate(360deg); }
}

.bakery-schedule-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.bakery-schedule-tabs button {
    padding: 14px 22px;
    border: 2px solid #E4DDD0;
    border-radius: 10px;
    background: var(--color-light);
    color: var(--color-dark);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.bakery-schedule-tabs button:hover {
    border-color: var(--color-accent);
}

.bakery-schedule-tabs button.is-active {
    border-color: var(--color-accent);
    background: var(--color-cream);
}

.bakery-schedule-reassurance {
    margin: 0 0 32px;
    font-size: 14px;
    color: var(--color-muted);
}

.bakery-schedule-empty {
    /* Content is a .bakery-card now (see schedule.js's renderEmptyState) —
       this wrapper just needs the bottom spacing the section's other
       states (tabs/grid/reassurance) already carry. */
    margin-bottom: 40px;
}

/* Photo-led product grid — the shop page's actual point of sale.
   Photography deliberately dominates: an edge-to-edge 4:3 image, no heavy
   card border, everything else compact underneath. */
/* Flexbox, not CSS Grid — deliberately. A fixed 3-column grid left dead
   empty tracks on any day with fewer than 3 products (the common case
   here — the catalog is thin). Grid's auto-fit fixes a single-row case
   but a *shared column template across every row* means any trailing
   partial row (e.g. 3 products = one full row of 2 + a lone 3rd) still
   sits left-aligned in its own row, because grid can't re-center content
   per row independently. Flexbox's wrapping + justify-content centers
   every row on its own, complete or partial, including the single-card
   case this exists to fix. */
/* flex-start, not center: a trailing partial row (e.g. 19 products = 6
   rows of 3 + a lone 19th) should sit at the start of the row, in the
   same reading-order position it would occupy if the row were full, not
   float alone in the middle. .bakery-product-grid--few (1-2 products
   total) overrides back to centered below — no established grid pattern
   exists yet to "continue" in that case. */
.bakery-product-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 32px;
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
}

/* No-search-results message (schedule.js's renderNoMatches) — full width,
   not the fixed 340px .bakery-product-card basis, and margin reset since
   the grid's own gap already spaces it from... nothing, being the only
   child, but .bakery-card's default 22px 0 margin would otherwise still
   push the tabs above it away from the grid's top edge. */
.bakery-product-grid__no-match {
    flex: 1 1 100%;
}

.bakery-product-grid__no-match .bakery-card {
    margin: 0;
}

.bakery-product-grid--few {
    justify-content: center;
}

/* No flex-grow by default — a fixed basis so every card in a multi-row
   grid stays the same size, including a trailing partial row (e.g. 19
   products wrapping to a lone 19th card). Growth is opt-in via
   .bakery-product-grid--few (set in schedule.js when a day has only 1-2
   products total), where a lone/near-lone card should look deliberately
   prominent instead of matching a grid pattern that doesn't really exist
   yet. */
.bakery-product-card {
    display: flex;
    flex: 0 1 340px;
    flex-direction: column;
    background: var(--color-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(44, 36, 22, 0.1);
}

.bakery-product-grid--few .bakery-product-card {
    flex: 1 1 340px;
    max-width: 480px;
}

.bakery-product-card__media {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--color-cream);
}

.bakery-product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.bakery-product-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px 22px 22px;
}

.bakery-product-card__eyebrow {
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--color-accent);
}

.bakery-product-card__heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.bakery-product-card__heading h3 {
    font-size: 22px;
    margin: 0;
}

.bakery-product-card__price {
    flex: 0 0 auto;
    font-size: 17px;
    color: var(--color-accent);
    white-space: nowrap;
}

.bakery-product-card__desc {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-muted);
}

.bakery-product-card__body > .bakery-divider {
    width: 100%;
    margin: 16px 0;
}

.bakery-product-card__readiness {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--color-dark);
}

.bakery-product-card__readiness svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--color-accent);
}

.bakery-product-card__readiness-qty {
    font-size: 13px;
    color: var(--color-muted);
}

.bakery-product-card__readiness-qty.is-low {
    color: var(--color-accent);
    font-weight: 700;
}

.bakery-product-card__batches {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bakery-product-card__batches button {
    padding: 5px 12px;
    border: 1px solid #E4DDD0;
    border-radius: 999px;
    background: var(--color-light);
    color: var(--color-dark);
    font-size: 13px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.bakery-product-card__batches button.is-active {
    border-color: var(--color-accent);
    background: var(--color-cream);
    font-weight: 700;
}

.bakery-product-card__actions {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-top: auto;
}

.bakery-qty-stepper {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    border: 1px solid #E4DDD0;
    border-radius: 8px;
    overflow: hidden;
}

.bakery-qty-stepper button {
    width: 36px;
    height: 44px;
    border: 0;
    background: var(--color-cream);
    color: var(--color-dark);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}

.bakery-qty-stepper button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.bakery-qty-stepper input {
    width: 34px;
    height: 44px;
    border: 0;
    border-left: 1px solid #E4DDD0;
    border-right: 1px solid #E4DDD0;
    text-align: center;
    font-size: 15px;
    font-family: var(--font-body);
    color: var(--color-dark);
    background: var(--color-light);
    -moz-appearance: textfield;
}

.bakery-qty-stepper input::-webkit-outer-spin-button,
.bakery-qty-stepper input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.bakery-add-to-cart-btn {
    flex: 1;
    border: 0;
    border-radius: 8px;
    background: var(--color-dark);
    color: var(--color-light);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}

.bakery-add-to-cart-btn:hover {
    background: var(--color-accent);
}

.bakery-add-to-cart-btn:disabled {
    opacity: 0.65;
    cursor: default;
}

.bakery-add-to-cart-feedback {
    margin: 10px 0 0;
    font-size: 13px;
}

.bakery-add-to-cart-feedback.is-success {
    color: #3D7A4E;
}

.bakery-add-to-cart-feedback.is-error {
    color: #B3413B;
}

.bakery-add-to-cart-feedback a {
    margin-left: 6px;
    color: inherit;
    text-decoration: underline;
}

@media (max-width: 640px) {
    /* auto-fit already reflows the grid itself at this width — this just
       makes narrow-screen date tabs fill the row instead of wrapping
       awkwardly. */
    .bakery-schedule-tabs button {
        flex: 1 1 auto;
        text-align: center;
    }
}

.bakery-cart-pickup-summary {
    margin-bottom: 28px;
}

.bakery-cart-suggestions {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid #E9E2D4;
}

.bakery-cart-suggestions h2 {
    font-size: 20px;
    margin-bottom: 16px;
}

.bakery-checkout-note {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-muted);
    margin-bottom: 20px;
}

/* Large and impossible to scroll past unnoticed — per the owner, the
   pickup time is the one thing on this page that most needs to actually
   register before the customer commits to the order. */
.bakery-checkout-pickup-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 22px;
    margin-bottom: 28px;
    background: var(--color-dark);
    color: var(--color-light);
    border-radius: 10px;
}

.bakery-checkout-pickup-banner svg {
    flex: 0 0 auto;
    color: var(--color-accent);
}

.bakery-checkout-pickup-banner p {
    margin: 0;
    font-size: 15px;
}

.bakery-checkout-pickup-banner strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 400;
    line-height: 1.3;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
