/*
 * Damian Zaborowski — Base Layer
 * Reset, typography defaults, link/img defaults.
 * Bazuje na dz-tokens.css.
 */

/* === Self-hosted fonts (zamiast Google Fonts CDN — eliminuje ~800ms blocking) === */

/* Metric-matched fallback fonts — wyglądają jak final font ZANIM się załaduje.
   Eliminuje FOUT mignięcie + CLS layout shift.
   Wartości size-adjust/ascent-override wymierzone na bazie real font metrics. */
@font-face {
    font-family: 'Cormorant Fallback';
    src: local('Georgia'), local('Times New Roman'), local('Times');
    size-adjust: 96%;
    ascent-override: 91%;
    descent-override: 26%;
    line-gap-override: 0%;
}
@font-face {
    font-family: 'Inter Fallback';
    src: local('Arial'), local('Helvetica Neue'), local('Helvetica');
    size-adjust: 107%;
    ascent-override: 90%;
    descent-override: 22%;
    line-gap-override: 0%;
}

/* Cormorant Garamond — 4 warianty (normal/italic × latin/latin-ext).
   latin = ascii + zachodnie (basic). latin-ext = polskie ąęłńóśźż + środkowoeuropejskie.
   Nie pobieramy cyrillic/vietnamese — nie używamy. */
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url('../fonts/cormorant-normal-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url('../fonts/cormorant-normal-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 400 500;
    font-display: swap;
    src: url('../fonts/cormorant-italic-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Cormorant Garamond';
    font-style: italic;
    font-weight: 400 500;
    font-display: swap;
    src: url('../fonts/cormorant-italic-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url('../fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
    src: url('../fonts/inter-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

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

html, body {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--dz-cream);
    color: var(--dz-ink);
    font-family: var(--dz-font-sans);
    font-size: var(--dz-step-0);
    line-height: 1.6;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* === Linki === */
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--dz-duration) var(--dz-ease);
}
a:focus-visible {
    outline: 2px solid var(--dz-gold);
    outline-offset: 3px;
}

/* === Media === */
img, video, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* === Headings — bez UPPERCASE, font Cormorant === */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--dz-font-serif);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--dz-ink);
    text-wrap: balance;
}

h1 { font-size: var(--dz-step-4); line-height: 0.98; }
h2 { font-size: var(--dz-step-3); line-height: 1.05; letter-spacing: -0.015em; }
h3 { font-size: var(--dz-step-2); line-height: 1.15; letter-spacing: -0.01em; }
h4 { font-size: var(--dz-step-1); line-height: 1.25; letter-spacing: 0; }

em, i { font-style: italic; }
strong, b { font-weight: 500; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

/* === Blockquote (default) === */
blockquote {
    font-family: var(--dz-font-serif);
    font-style: italic;
    font-weight: 400;
    margin: 0;
}

/* === Lists (reset, projekty per-component) === */
ul, ol {
    margin: 0;
    padding: 0;
}

/* === Selection === */
::selection {
    background: var(--dz-gold);
    color: #0a0a0a;
}

/* === Scrollbar (subtelny) === */
@media (pointer: fine) {
    ::-webkit-scrollbar { width: 10px; height: 10px; }
    ::-webkit-scrollbar-track { background: var(--dz-cream); }
    ::-webkit-scrollbar-thumb { background: var(--dz-rule); border-radius: 0; }
    ::-webkit-scrollbar-thumb:hover { background: var(--dz-gold-soft); }
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* === Hide visually but keep accessible === */
.dz-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* === Cookie Notice plugin — przeskinujemy pod nasz design === */
#cookie-notice {
    background: var(--dz-paper) !important;
    border-top: 1px solid var(--dz-gold-faint) !important;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5) !important;
    color: var(--dz-ink) !important;
    font-family: var(--dz-font-sans) !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
}
#cookie-notice .cn-text-container,
#cookie-notice .cookie-notice-container {
    color: var(--dz-ink-soft) !important;
    font-family: var(--dz-font-sans) !important;
}
#cookie-notice .cn-text-container a,
#cookie-notice .cookie-notice-container a {
    color: var(--dz-gold) !important;
    border-bottom: 1px solid var(--dz-gold-faint);
    text-decoration: none !important;
}
#cookie-notice .cn-button,
#cookie-notice a.cn-button {
    font-family: var(--dz-font-sans) !important;
    font-size: 11px !important;
    letter-spacing: 0.22em !important;
    text-transform: uppercase !important;
    font-weight: 500 !important;
    padding: 12px 22px !important;
    border-radius: 0 !important;
    transition: background 200ms ease, color 200ms ease, border-color 200ms ease !important;
    line-height: 1 !important;
    text-shadow: none !important;
    box-shadow: none !important;
}
/* Główny CTA „Akceptuję wszystkie" — gold solid */
#cookie-notice .cn-button.bootstrap.button-primary,
#cookie-notice a.cn-button.cn-accept-all,
#cookie-notice a.cn-button[data-cookie-set="accept"] {
    background: var(--dz-gold) !important;
    color: #0a0a0a !important;
    border: 1px solid var(--dz-gold) !important;
}
#cookie-notice .cn-button.bootstrap.button-primary:hover,
#cookie-notice a.cn-button.cn-accept-all:hover {
    background: transparent !important;
    color: var(--dz-gold) !important;
}
/* Drugi „Tylko niezbędne" / „Odrzucam" — ghost */
#cookie-notice a.cn-button.cn-refuse,
#cookie-notice a.cn-button[data-cookie-set="refuse"] {
    background: transparent !important;
    color: var(--dz-ink) !important;
    border: 1px solid rgba(244, 236, 216, 0.35) !important;
}
#cookie-notice a.cn-button.cn-refuse:hover {
    border-color: var(--dz-gold) !important;
    color: var(--dz-gold) !important;
}

/* Floating „Cookie settings" button (revoke consent) — dyskretny w prawym dolnym */
#cn-revoke-cookie,
.cn-revoke-cookie {
    background: var(--dz-paper) !important;
    color: var(--dz-gold) !important;
    border: 1px solid var(--dz-gold-faint) !important;
    border-radius: 0 !important;
    padding: 8px 14px !important;
    font-family: var(--dz-font-sans) !important;
    font-size: 10px !important;
    letter-spacing: 0.2em !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    transition: border-color 200ms ease, color 200ms ease !important;
    opacity: 0.75;
}
#cn-revoke-cookie:hover,
.cn-revoke-cookie:hover {
    border-color: var(--dz-gold) !important;
    opacity: 1;
}

/* ============================================================
   WooCommerce notices (globalne — działają na wszystkich stronach,
   nie tylko cart/checkout). Override default Blocksy + WC defaults.
   ============================================================ */

.woocommerce-notices-wrapper {
    margin: 0 0 24px;
}

.dz-template .woocommerce-message,
.dz-template .woocommerce-info,
.dz-template .woocommerce-error,
.dz-template ul.woocommerce-error,
body.dz-template .woocommerce-NoticeGroup {
    font-family: var(--dz-font-serif) !important;
    font-size: 16px !important;
    line-height: 1.55 !important;
    color: var(--dz-ink) !important;
    background: var(--dz-paper) !important;
    border: 1px solid var(--dz-gold-faint) !important;
    border-left: 3px solid var(--dz-gold) !important;
    border-radius: 0 !important;
    padding: 16px 20px 16px 56px !important;
    margin: 0 0 14px !important;
    list-style: none !important;
    box-shadow: none !important;
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 24px;
}

/* Ikona po lewej */
.dz-template .woocommerce-message::before,
.dz-template .woocommerce-info::before,
.dz-template .woocommerce-error::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    flex-shrink: 0;
}

/* SUCCESS (zielony ✓ na gold tle) — np. „Dodano do koszyka" */
.dz-template .woocommerce-message::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D4AF37' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
}

/* INFO (i na blue) */
.dz-template .woocommerce-info {
    border-left-color: var(--dz-blue, #4A90E2) !important;
}
.dz-template .woocommerce-info::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A90E2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><line x1='12' y1='16' x2='12' y2='12'/><line x1='12' y1='8' x2='12.01' y2='8'/></svg>");
}

/* ERROR (czerwony ✗) */
.dz-template .woocommerce-error,
.dz-template ul.woocommerce-error {
    background: rgba(197, 99, 74, 0.06) !important;
    border-color: rgba(197, 99, 74, 0.3) !important;
    border-left-color: #c5634a !important;
}
.dz-template .woocommerce-error::before,
.dz-template ul.woocommerce-error::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c5634a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><line x1='15' y1='9' x2='9' y2='15'/><line x1='9' y1='9' x2='15' y2='15'/></svg>");
}

/* Linki i przyciski wewnątrz notice */
.dz-template .woocommerce-message a:not(.button),
.dz-template .woocommerce-info a:not(.button),
.dz-template .woocommerce-error a:not(.button) {
    color: var(--dz-gold);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 500;
}

/* Przycisk "Wyświetl koszyk →" w notice — nasz gold button styling */
.dz-template .woocommerce-message .button,
.dz-template .woocommerce-message a.wc-forward,
.dz-template .woocommerce-message a.restore-item {
    display: inline-block;
    padding: 10px 22px;
    background: var(--dz-gold);
    color: #0a0a0a !important;
    border: 1px solid var(--dz-gold);
    border-radius: 0;
    font-family: var(--dz-font-sans);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 180ms ease, color 180ms ease;
    margin-left: auto;
    text-shadow: none;
    box-shadow: none;
}
.dz-template .woocommerce-message .button:hover,
.dz-template .woocommerce-message a.wc-forward:hover {
    background: transparent;
    color: var(--dz-gold) !important;
}

/* Element listy ul.woocommerce-error (multiple errors) */
.dz-template ul.woocommerce-error li {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Animacja fade-in */
.dz-template .woocommerce-message,
.dz-template .woocommerce-info,
.dz-template .woocommerce-error {
    animation: dz-notice-in 250ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes dz-notice-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Mobile — przycisk na nowej linii */
@media (max-width: 600px) {
    .dz-template .woocommerce-message,
    .dz-template .woocommerce-info,
    .dz-template .woocommerce-error {
        padding: 14px 18px 14px 52px !important;
        font-size: 15px !important;
    }
    .dz-template .woocommerce-message::before,
    .dz-template .woocommerce-info::before,
    .dz-template .woocommerce-error::before {
        left: 18px;
        width: 20px;
        height: 20px;
    }
    .dz-template .woocommerce-message .button,
    .dz-template .woocommerce-message a.wc-forward {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}
