/**
 * Base styles – Reset & Typography
 */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--color-text-dark);
    background-color: var(--color-white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--duration) var(--ease-out);
}

a:hover {
    color: var(--color-primary-hover);
}

button,
[type="button"],
[type="submit"],
[type="reset"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
}

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

ul,
ol {
    list-style: none;
}

/* ─── Typography ─────────────────────────────────────── */

/* Override Elementor Kit font-family (specificity 0,1,1 > .elementor-kit-N 0,1,0) */
body.elementor-default,
body.elementor-page {
    font-family: var(--font-body);
}

body.elementor-default h1,
body.elementor-default h2,
body.elementor-default h3,
body.elementor-default h4,
body.elementor-default h5,
body.elementor-default h6,
body.elementor-page h1,
body.elementor-page h2,
body.elementor-page h3,
body.elementor-page h4,
body.elementor-page h5,
body.elementor-page h6 {
    font-family: var(--font-heading);
    font-style: normal;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--color-text-dark);
}

/* Global heading scale — subpages (shop, account, articles, single product) */
h1 { font-size: var(--text-5-5xl); }  /* 56px */
h2 { font-size: var(--text-4xl); }    /* 40px */
h3 { font-size: var(--text-3xl); }    /* 32px */
h4 { font-size: var(--text-2xl); }    /* 24px */
h5 { font-size: var(--text-xl); }     /* 22px */
h6 { font-size: var(--text-lg); }     /* 20px */

@media (max-width: 768px) {
    h1 { font-size: var(--text-5xl); }  /* 48px */
    h2 { font-size: var(--text-3xl); }  /* 32px */
    h3 { font-size: var(--text-2xl); }  /* 24px */
}

p {
    margin-bottom: var(--space-4);
}

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

strong, b {
    font-weight: var(--weight-semibold);
}

small {
    font-size: var(--text-sm);
}

/* ─── Prose (article content + Elementor text widgets) ── */
.prose {
    font-size: var(--text-xl);
    line-height: var(--leading-relaxed);
}

@media (max-width: 767px) {
    .prose {
        font-size: var(--text-base);
    }
}

.prose h2 { margin: var(--space-10) 0 var(--space-4); }
.prose h3 { margin: var(--space-8) 0 var(--space-3); }
.prose h4 { margin: var(--space-6) 0 var(--space-3); }

.prose p,
.prose ul,
.prose ol,
.prose blockquote {
    margin-bottom: var(--space-5);
}

.prose ul { list-style: disc inside; }
.prose ol { list-style: decimal inside; }

.prose li {
    margin-bottom: var(--space-2);
}

.prose blockquote {
    border-left: 3px solid var(--color-primary);
    padding: var(--space-4) var(--space-6);
    background: var(--color-gray-50);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
}

.prose img {
    border-radius: var(--radius-md);
    margin: var(--space-6) 0;
}

.prose a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose figure {
    margin: var(--space-8) 0;
}

.prose figcaption {
    font-size: var(--text-sm);
    color: var(--color-gray-500);
    margin-top: var(--space-2);
    text-align: center;
}

/* ─── Layout ─────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: calc(var(--container-xl) + var(--container-padding) * 2);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

/* Elementor boxed containers — match .container edge padding */
.e-con-boxed > .e-con-inner {
    padding-inline: var(--container-padding);
}

.container--narrow {
    max-width: var(--container-md);
}

.container--wide {
    max-width: var(--container-2xl);
}

/* ─── Default page template ─────────────────────────── */
.page-default {
    padding-block: var(--space-16);
}

.page-default__title {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-8);
}

@media (max-width: 768px) {
    .page-default__title {
        font-size: var(--text-3xl);
    }
}

/* ─── Footer ─────────────────────────────────────────── */
#footer,
#footer p,
#footer .elementor-heading-title {
    color: var(--color-white);
}

#footer a,
#footer .elementor-widget-text-editor a {
    color: var(--color-white);
    text-decoration: none;
}

#footer a:hover,
#footer .elementor-widget-text-editor a:hover {
    color: var(--color-primary);
}

/* ─── Buttons ───────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-semibold);
    line-height: 1;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: var(--text-base) var(--space-8);
    border: none;
    border-radius: 0;
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--duration) var(--ease-out),
                border-color var(--duration) var(--ease-out),
                color var(--duration) var(--ease-out);
}

/* Primary — filled red */
.btn--primary {
    background: var(--color-primary);
    color: var(--color-white);
}

a.btn--primary:hover,
button.btn--primary:hover {
    background: var(--color-primary-hover);
    color: var(--color-white);
}

/* Outline — border, transparent bg */
.btn--outline {
    background: transparent;
    border: 1px solid var(--color-text-dark);
    color: var(--color-text-dark);
}

a.btn--outline:hover,
button.btn--outline:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

/* ─── Elementor: dodaj klasę "btn-ao" do widgetu Button → Advanced → CSS Classes ── */
.btn-ao .elementor-button {
    font-family: var(--font-body) !important;
    font-size: var(--text-base) !important;
    font-weight: var(--weight-semibold) !important;
    line-height: 1 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase;
    border-radius: 0 !important;
    padding: var(--text-base) var(--space-8) !important;
    transition: background-color var(--duration) var(--ease-out),
                border-color var(--duration) var(--ease-out),
                color var(--duration) var(--ease-out) !important;
}

.btn-ao .elementor-button:hover {
    background-color: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: var(--color-white) !important;
}

/* ─── Selection ──────────────────────────────────────── */
::selection {
    background-color: var(--color-primary-light);
    color: var(--color-text-dark);
}

/* ─── Focus ──────────────────────────────────────────── */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ─── Screen reader only ─────────────────────────────── */
.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;
}
