/*
Theme Name: Teraz BAzja
Theme URI: https://terazbazja.pl/
Author: ECOMGO
Description: Dedykowany motyw WooCommerce dla marki BAzja.
Version: 0.4.0
Requires at least: 6.5
Requires PHP: 8.3
Text Domain: terazbazja
*/

:root {
    --bazja-color-ink: #111111;
    --bazja-color-muted: #666666;
    --bazja-color-line: #dedede;
    --bazja-color-soft: #f5f5f3;
    --bazja-color-paper: #ffffff;
    --bazja-font-body: "Figtree", Arial, sans-serif;
    --bazja-font-heading: "Newsreader", Georgia, serif;
    --bazja-content-width: 1360px;
    --bazja-ease: cubic-bezier(.22, 1, .36, 1);
    --bazja-radius-flat: 0;
    --bazja-radius-control: 4px;
    --bazja-radius-panel: 8px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--bazja-color-ink);
    background: var(--bazja-color-paper);
    font-family: var(--bazja-font-body);
    font-size: 16px;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.has-bazja-overlay {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Shared WooCommerce feedback. Cart-add success is handled by the side cart. */
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-info,
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-message,
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-error,
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-warning {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .7rem 1.25rem;
    min-height: 64px;
    margin: 0 0 1rem;
    border: 1px solid #dce2da;
    border-left: 4px solid #47644d;
    border-radius: var(--bazja-radius-panel);
    background: #f5f8f3;
    color: #26382c;
    padding: 1rem 1.2rem 1rem 3.3rem;
    box-shadow: none;
    font-size: .9rem;
    line-height: 1.5;
    list-style: none;
}
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-info { border-color: #dce3e5; border-left-color: #547782; background: #f4f8f8; color: #304d55; }
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-warning { border-color: #f0e5cf; border-left-color: #af7f33; background: #fffaf0; color: #725321; }
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-error { display: block; border-color: #eedbd6; border-left-color: #ad5145; background: #fff6f3; color: #7b3029; }
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-error li { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.25rem; margin: 0; padding: 0; }
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-error li + li { margin-top: .5rem; }
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-info::before,
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-message::before,
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-error::before,
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-warning::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 1.15rem;
    display: block;
    width: 20px;
    height: 20px;
    border: 0;
    border-radius: 0;
    background: currentColor;
    -webkit-mask: url('assets/icons/circle-check.svg') center / contain no-repeat;
    mask: url('assets/icons/circle-check.svg') center / contain no-repeat;
    transform: translateY(-50%);
}
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-info::before { -webkit-mask-image: url('assets/icons/info.svg'); mask-image: url('assets/icons/info.svg'); }
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-error::before,
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-warning::before { -webkit-mask-image: url('assets/icons/circle-alert.svg'); mask-image: url('assets/icons/circle-alert.svg'); }
/* Woo focuses notices programmatically; their semantic border already marks them visually. */
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) :is(.woocommerce-info, .woocommerce-message, .woocommerce-error, .woocommerce-warning):focus-visible { outline: none; }
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) :is(.woocommerce-info, .woocommerce-message, .woocommerce-warning, .woocommerce-error) a.button { order: 2; float: none; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; min-height: 42px; margin: 0 0 0 auto; border: 1px solid #34483d; border-radius: var(--bazja-radius-control); background: #34483d; box-shadow: none; color: white; padding: .6rem 1rem; font-size: .78rem; font-weight: 700; line-height: 1.2; text-decoration: none; }
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) :is(.woocommerce-info, .woocommerce-message, .woocommerce-warning, .woocommerce-error) a.button:hover { border-color: #26372b; background: #26372b; color: white; }
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-error a.button { border-color: #7b3029; background: #7b3029; }
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-error a.button:hover { border-color: #62231d; background: #62231d; }
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-warning a.button { border-color: #725321; background: #725321; }
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-warning a.button:hover { border-color: #574018; background: #574018; }
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-info a:not(.button),
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-message a:not(.button),
:is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-error a:not(.button) { color: inherit; border-bottom: 1px solid currentColor; text-decoration: none; }
body a.added_to_cart.wc-forward { display: none; }

body .wc-block-components-notice-banner { border: 1px solid #dce2da; border-left: 4px solid #47644d; border-radius: var(--bazja-radius-panel); background: #f5f8f3; color: #26382c; padding: 1rem 1.2rem; font-size: .9rem; line-height: 1.5; }
body .wc-block-components-notice-banner.is-info { border-color: #dce3e5; border-left-color: #547782; background: #f4f8f8; color: #304d55; }
body .wc-block-components-notice-banner.is-warning { border-color: #f0e5cf; border-left-color: #af7f33; background: #fffaf0; color: #725321; }
body .wc-block-components-notice-banner.is-error { border-color: #eedbd6; border-left-color: #ad5145; background: #fff6f3; color: #7b3029; }
body .wc-block-components-notice-banner > svg { display: none; }
body .wc-block-components-notice-banner::before {
    content: '';
    display: block;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    margin-right: .5rem;
    background: currentColor;
    -webkit-mask: url('assets/icons/circle-check.svg') center / contain no-repeat;
    mask: url('assets/icons/circle-check.svg') center / contain no-repeat;
}
body .wc-block-components-notice-banner.is-info::before { -webkit-mask-image: url('assets/icons/info.svg'); mask-image: url('assets/icons/info.svg'); }
body .wc-block-components-notice-banner.is-error::before,
body .wc-block-components-notice-banner.is-warning::before { -webkit-mask-image: url('assets/icons/circle-alert.svg'); mask-image: url('assets/icons/circle-alert.svg'); }
body .wc-block-components-notice-banner a { color: inherit; text-decoration: none; border-bottom: 1px solid currentColor; }
body .wc-block-components-notice-banner .wc-block-components-notice-banner__dismiss { border: 0; }

button,
input,
select,
textarea {
    font: inherit;
}

/* Lucide v1.59.0: one decorative icon system, colour follows context. */
.bazja-icon {
    display: inline-block;
    width: 1em;
    height: 1em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -.125em;
}

/* Low-specificity defaults; component styles may keep icon-only buttons circular. */
:where(button, input[type="button"], input[type="submit"], input[type="reset"], a.button, .wp-block-button__link, .wc-block-components-button, input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) {
    border-radius: var(--bazja-radius-control);
}

img {
    border-radius: var(--bazja-radius-flat);
}

h1,
h2,
h3,
h4,
h5,
h6,
.woocommerce-products-header__title,
.product_title {
    font-family: var(--bazja-font-heading);
    font-weight: 200;
    line-height: 1.08;
    letter-spacing: -.025em;
}

h1 { font-size: clamp(2.6rem, 7vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.75rem); }
h3 { font-size: clamp(1.5rem, 2.5vw, 2.25rem); }

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

.site-shell {
    width: min(calc(100% - 3rem), var(--bazja-content-width));
    margin-inline: auto;
}

.site-main {
    min-height: 60vh;
    padding-block: clamp(2.5rem, 5vw, 5rem) 6rem;
}

.bazja-promotions-page__header {
    max-width: 780px;
    margin: 0 auto clamp(2rem, 4vw, 3.5rem);
    text-align: center;
}

.bazja-promotions-page__header h1 {
    margin: .2em 0;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    line-height: 1.1;
}

.bazja-promotions-page__header > p:last-child {
    max-width: 620px;
    margin-inline: auto;
    color: var(--bazja-color-muted);
    font-size: 1rem;
    line-height: 1.6;
}

.bazja-promotions-page__eyebrow {
    margin: 0;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.bazja-promotions-page__empty {
    max-width: 680px;
    margin: 0 auto;
    padding: clamp(2rem, 4vw, 3rem);
    border: 1px solid #dadcd4;
    background: var(--bazja-color-soft);
    text-align: center;
}

.bazja-promotions-page__empty h2 {
    margin-top: 0;
    font-size: clamp(1.6rem, 2.6vw, 2.25rem);
}

.bazja-promotions-page__empty .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    margin-top: 1rem;
    padding: .85rem 1.4rem;
    color: #fff;
    background: #34483d;
    border-radius: var(--bazja-radius-control);
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
}

.bazja-promotions-page__empty .button:hover { color: #fff; background: #26372b; }
.bazja-promotions-page__empty .button:focus-visible { outline: 2px solid #34483d; outline-offset: 3px; }

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    z-index: 100000;
    top: 1rem;
    left: 1rem;
    width: auto;
    height: auto;
    padding: .75rem 1rem;
    clip: auto;
    background: #fff;
    color: #111;
}

:focus-visible {
    outline: 2px solid #111;
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .site-shell {
        width: min(calc(100% - 2rem), var(--bazja-content-width));
    }
    :is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-info,
    :is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-message,
    :is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-warning { display: block; }
    :is(body.woocommerce, body.woocommerce-page, body .woocommerce) :is(.woocommerce-info, .woocommerce-message, .woocommerce-warning, .woocommerce-error) a.button { width: 100%; margin: .8rem 0 0; }
    :is(body.woocommerce, body.woocommerce-page, body .woocommerce) .woocommerce-error a.button { margin-top: 0; }
    :is(body.woocommerce, body.woocommerce-page, body .woocommerce) :is(.woocommerce-info, .woocommerce-message, .woocommerce-warning, .woocommerce-error)::before { top: 1.25rem; transform: none; }
}

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
