/*
Theme Name: Zwierzakowe Opowieści
Theme URI: https://zwierzakoweopowiesci.pl
Author: Zwierzakowe Opowieści
Author URI: https://zwierzakoweopowiesci.pl
Description: Motyw WooCommerce dla sklepu Zwierzakowe Opowieści – ciepły, przyjazny dla dzieci, z pełną integracją Gutenberg i WooCommerce.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.0
WC requires at least: 7.0
WC tested up to: 9.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: zwierzakowe-opowiesci
Tags: woocommerce, gutenberg, e-commerce, children, custom-colors, custom-logo, full-site-editing
*/

/* =============================================
   CSS VARIABLES
   ============================================= */
:root {
	--bg: #fff8ec;
	--cream: #fff4df;
	--pink: #dd3f71;
	--pink-dark: #c92459;
	--text: #211b18;
	--muted: #6b625d;
	--line: #e7d9c6;
	--white: #fff;
	--shadow: 0 18px 45px rgba(95, 65, 45, .13);
	--radius: 26px;
	--font-main: 'Nunito', system-ui, -apple-system, Segoe UI, sans-serif;
	--font-display: 'Fredoka', cursive;
}

/* =============================================
   RESET & BASE
   ============================================= */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	overflow-x: hidden;
}

body {
	margin: 0;
	max-width: 100%;
	overflow-x: hidden;
	font-family: var(--font-main);
	color: var(--text);
	background: linear-gradient(180deg, #fff7e9 0%, #fffaf1 55%, #fff4df 100%);
	background-attachment: fixed;
}

/* Globalne zabezpieczenie overflow */
.site-content,
#content,
.site-main,
.woocommerce,
.woocommerce-page {
	max-width: 100%;
	overflow-x: hidden;
	position: relative;
	box-sizing: border-box;
}

/* WooCommerce główny wrapper – ogranicz szerokość i dodaj padding boczny */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce,
.woocommerce-account .woocommerce,
.woocommerce-page .woocommerce {
	width: min(1080px, calc(100% - 40px));
	margin-inline: auto;
	padding-left: 0;
	padding-right: 0;
	box-sizing: border-box;
}

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

a {
	color: var(--pink);
	text-decoration: none;
}

a:hover {
	color: var(--pink-dark);
}

/* =============================================
   LAYOUT
   ============================================= */
.site {
	min-height: 100vh;
}

.container,
.wp-block-group.alignwide,
.wp-block-group.alignfull > .wp-block-group__inner-container {
	width: min(1080px, calc(100% - 40px));
	margin-inline: auto;
}

/* Treść stron (page) – padding boczny zapobiega wystawaniu za ekran */
.page .entry-content,
.page .wp-block-post-content,
.single .entry-content,
.entry-content {
	padding-left: 4px;
	padding-right: 4px;
	box-sizing: border-box;
	max-width: 100%;
	overflow-x: hidden;
}

/* =============================================
   HEADER
   ============================================= */
.site-header {
	padding: 24px 0 18px;
	background: rgba(255, 248, 236, 0.97);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	z-index: 1000;
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	width: min(1080px, calc(100% - 40px));
	margin-inline: auto;
}

/* Logo */
.site-branding {
	display: flex;
	align-items: center;
	gap: 14px;
	text-decoration: none;
	color: var(--text);
}

.custom-logo-link {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

/* Wymuś stały rozmiar logo na wszystkich stronach – nadpisuje WooCommerce img reset */
.custom-logo,
.site-header .custom-logo,
.site-branding .custom-logo,
header .custom-logo,
.woocommerce .custom-logo,
.woocommerce-page .custom-logo {
	height: 60px !important;
	width: auto !important;
	max-width: none !important;
	max-height: 60px !important;
	min-height: unset !important;
	display: block;
}

.logo-text-wrap {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.site-title {
	font-weight: 800;
	font-size: 22px;
	line-height: 1.05;
	margin: 0;
	color: var(--text);
}

.site-title a {
	color: inherit;
	text-decoration: none;
}

.site-description {
	color: var(--pink);
	font-family: var(--font-display);
	font-size: 24px;
	font-weight: 400;
	margin: 0;
	line-height: 1;
}

/* Nav */
.main-navigation {
	display: flex;
	align-items: center;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 44px;
}

.main-navigation a {
	color: var(--text);
	text-decoration: none;
	font-weight: 800;
	font-size: 15px;
	transition: color .2s;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
	color: var(--pink);
}

/* Mobile menu toggle */
/* Hamburger – domyślnie ukryty na desktop */
.menu-toggle {
	display: none;
	background: none;
	border: 2px solid var(--pink);
	border-radius: 10px;
	padding: 8px 10px;
	cursor: pointer;
	color: var(--pink);
	line-height: 1;
	flex-direction: column;
	gap: 5px;
	width: 42px;
	height: 42px;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.menu-toggle-icon {
	display: flex;
	flex-direction: column;
	gap: 5px;
	width: 20px;
}

.menu-toggle-icon span {
	display: block;
	width: 100%;
	height: 2px;
	background: var(--pink);
	border-radius: 2px;
	transition: transform .25s, opacity .25s;
}

/* Animacja X gdy otwarte */
.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(2) {
	opacity: 0;
}
.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu panel – ukryty domyślnie */
.mobile-menu-panel {
	display: none;
	background: var(--bg);
	border-top: 2px solid var(--line);
	padding: 16px 20px 20px;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 998;
	box-shadow: 0 8px 24px rgba(95,65,45,.12);
}

.mobile-menu-panel.open {
	display: block;
}

.mobile-menu-panel ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.mobile-menu-panel ul li a {
	display: block;
	padding: 12px 16px;
	font-weight: 800;
	font-size: 16px;
	color: var(--text);
	text-decoration: none;
	border-radius: 12px;
	transition: background .15s, color .15s;
}

.mobile-menu-panel ul li a:hover,
.mobile-menu-panel ul li.current-menu-item > a {
	background: var(--cream);
	color: var(--pink);
}

/* Header actions */
.header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.header-socials {
	display: flex;
	gap: 10px;
}

.social-link {
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: var(--pink);
	display: grid;
	place-items: center;
	color: #fff;
	text-decoration: none;
	font-weight: 900;
	font-size: 14px;
	box-shadow: 0 6px 14px rgba(221, 63, 113, .22);
	transition: transform .2s, background .2s;
}

.social-link:hover {
	background: var(--pink-dark);
	color: #fff;
	transform: translateY(-2px);
}

/* Cart icon */
.header-cart-link {
	position: relative;
	display: flex;
	align-items: center;
	gap: 6px;
	color: var(--text);
	font-weight: 800;
	padding: 8px 14px;
	border: 2px solid var(--line);
	border-radius: 999px;
	transition: .2s;
}

.header-cart-link:hover {
	border-color: var(--pink);
	color: var(--pink);
}

.cart-count {
	background: var(--pink);
	color: #fff;
	border-radius: 50%;
	width: 20px;
	height: 20px;
	font-size: 11px;
	font-weight: 900;
	display: grid;
	place-items: center;
}

/* =============================================
   HERO SLIDER
   ============================================= */
.hero-slider {
	position: relative;
	width: 100%;
	overflow: hidden;
}

/* Wszystkie slajdy ukryte domyślnie */
.hero-slide {
	display: none;
	padding: 52px 0 58px;
	position: relative;
	width: 100%;
	box-sizing: border-box;
}

/* CSS fallback – pierwszy slajd widoczny bez JS */
.hero-slide:first-child {
	display: block;
}

/* ── EFEKT: FADE (domyślny) ── */
.hero-slider.effect-fade .hero-slide {
	display: block !important;
	position: absolute;
	top: 0; left: 0;
	width: 100%;
	opacity: 0;
	transition: opacity .6s ease;
	pointer-events: none;
	z-index: 0;
}

.hero-slider.effect-fade .hero-slide.active {
	opacity: 1 !important;
	pointer-events: auto;
	z-index: 1;
	position: relative;
}

/* ── EFEKT: SLIDE ── */
.hero-slider.effect-slide {
	display: flex;
	overflow: hidden;
}

.hero-slider.effect-slide .hero-slide {
	display: none !important;
	width: 100%;
	flex-shrink: 0;
}

.hero-slider.effect-slide .hero-slide.active {
	display: block !important;
	animation: zo-slide-in .45s ease;
}

@keyframes zo-slide-in {
	from { opacity: 0; transform: translateX(40px); }
	to   { opacity: 1; transform: translateX(0); }
}

/* ── FALLBACK gdy brak klasy efektu (bezpośredni display) ── */
.js-slider-ready:not(.effect-fade):not(.effect-slide) .hero-slide { display: none !important; }
.js-slider-ready:not(.effect-fade):not(.effect-slide) .hero-slide.active { display: block !important; }

.hero-grid {
	display: grid;
	grid-template-columns: 1fr 1.12fr;
	gap: 54px;
	align-items: center;
	width: min(1080px, calc(100% - 40px));
	margin-inline: auto;
}

.hero-copy {
	position: relative;
	padding-left: 0;
}

/* hero-copy::before usunięte – kwiatuszki nakładały się na tekst */

.hero-heart {
	color: var(--pink);
	font-size: 30px;
	margin-left: 0;
	line-height: 1;
}

.hero-title {
	font-family: var(--font-display);
	font-size: 45px;
	line-height: 1.06;
	margin: 16px 0 24px;
	font-weight: 400;
	letter-spacing: .2px;
}

.hero-title .highlight {
	color: var(--pink);
}

.hero-lead {
	font-size: 19px;
	line-height: 1.75;
	font-weight: 800;
	margin: 0 0 22px;
	max-width: 420px;
}

.hero-lead .pink {
	color: var(--pink);
}

.hero-features {
	list-style: none;
	padding: 0;
	margin: 0 0 28px;
	display: grid;
	gap: 14px;
	font-size: 18px;
	font-weight: 800;
}

.hero-features li {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.hero-features .icon {
	font-size: 22px;
	line-height: 1.1;
}

/* Slider controls */
.slider-controls {
	position: absolute;
	bottom: 22px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 10px;
	z-index: 10;
}

.slider-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--line);
	border: none;
	cursor: pointer;
	padding: 0;
	transition: background .2s, transform .2s;
}

.slider-dot.active {
	background: var(--pink);
	transform: scale(1.3);
}

.slider-prev,
.slider-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255, 255, 255, .85);
	border: 2px solid var(--line);
	border-radius: 50%;
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	cursor: pointer;
	color: var(--pink);
	font-size: 18px;
	z-index: 10;
	transition: .2s;
}

.slider-prev:hover,
.slider-next:hover {
	background: var(--pink);
	color: #fff;
	border-color: var(--pink);
}

.slider-prev {
	left: 16px;
}

.slider-next {
	right: 16px;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn,
.button,
.wp-block-button__link,
button[type="submit"],
input[type="submit"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 16px 34px;
	border-radius: 999px;
	border: 2px solid var(--pink);
	background: var(--pink);
	color: #fff;
	text-decoration: none;
	font-weight: 900;
	text-transform: uppercase;
	letter-spacing: .4px;
	font-size: 14px;
	box-shadow: 0 10px 22px rgba(221, 63, 113, .2);
	transition: .2s ease;
	cursor: pointer;
	font-family: var(--font-main);
	line-height: 1.2;
}

.btn:hover,
.button:hover,
.wp-block-button__link:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
	transform: translateY(-2px);
	background: var(--pink-dark);
	border-color: var(--pink-dark);
	color: #fff;
}

.btn.outline,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
	background: transparent;
	color: var(--pink);
	box-shadow: none;
	padding: 12px 32px;
}

.btn.outline:hover,
.woocommerce a.button.alt:hover {
	background: var(--pink);
	color: #fff;
}

/* =============================================
   WOOCOMMERCE – PRODUCT GRID (SHOP)
   ============================================= */
.woocommerce .products,
.woocommerce ul.products,
.home-products ul.products,
.home-products .products {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr) !important;
	gap: 32px !important;
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
	float: none !important;
	width: 100% !important;
	align-items: stretch !important;
}

/* Resetuj WC domyślne width:70.75% i float na li.product */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.home-products ul.products li.product {
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	position: relative;
	background: var(--white);
	border-radius: var(--radius);
	border: 2px solid var(--line);
	padding: 0 20px 24px;
	text-align: center;
	box-shadow: var(--shadow);
	transition: transform .2s, box-shadow .2s;
	box-sizing: border-box;
	/* Flex column – wyrównuje karty i przypina przycisk do dołu */
	display: flex !important;
	flex-direction: column !important;
}

.woocommerce ul.products li.product:hover {
	transform: translateY(-4px);
	box-shadow: 0 24px 56px rgba(95, 65, 45, .18);
}

.woocommerce ul.products li.product .woocommerce-loop-product__link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.woocommerce ul.products li.product img,
.home-products ul.products li.product img {
	border-radius: 18px 18px 0 0;
	width: calc(100% + 40px) !important;
	margin: 0 -20px !important;
	max-width: none !important;
	height: 220px !important;
	object-fit: contain !important;
	object-position: center center;
	background: var(--cream);
	display: block;
	flex-shrink: 0;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.home-products ul.products li.product .woocommerce-loop-product__title {
	font-size: 18px;
	font-weight: 900;
	text-transform: uppercase;
	margin: 18px 0 12px;
	color: var(--text);
	flex-grow: 1;
}

.woocommerce ul.products li.product .price {
	font-size: 28px;
	font-weight: 900;
	color: var(--pink);
	margin: 0 0 16px;
	display: block;
}

.woocommerce ul.products li.product .price del {
	font-size: 18px;
	color: var(--muted);
	font-weight: 600;
}

.woocommerce ul.products li.product .onsale {
	position: absolute;
	top: 16px;
	left: 16px;
	background: var(--pink);
	color: #fff;
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 900;
	text-transform: uppercase;
	min-height: auto;
	min-width: auto;
	line-height: 1.2;
}

.woocommerce ul.products li.product .added_to_cart {
	display: none;
}

/* =============================================
   WOOCOMMERCE – SINGLE PRODUCT
   ============================================= */
.woocommerce div.product {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 56px;
	align-items: start;
	padding: 48px 0;
}

/* Upewnij że related/upsells są zawsze blokiem pod produktem, nie w gridzie */
.woocommerce div.product + .related.products,
.woocommerce div.product + .upsells.products,
.woocommerce .related.products,
.woocommerce .upsells.products {
	display: block !important;
	width: 100% !important;
	clear: both !important;
	float: none !important;
}

.woocommerce div.product .woocommerce-product-gallery {
	position: sticky;
	top: 100px;
}

.woocommerce div.product .woocommerce-product-gallery__image img {
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}

.woocommerce div.product .product_title {
	font-family: var(--font-display);
	font-size: 38px;
	font-weight: 400;
	margin: 0 0 16px;
	color: var(--text);
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
	font-size: 36px;
	font-weight: 900;
	color: var(--pink);
	margin: 0 0 24px;
	display: block;
}

.woocommerce div.product .woocommerce-product-details__short-description {
	font-size: 17px;
	line-height: 1.7;
	margin-bottom: 24px;
	color: var(--muted);
}

.woocommerce div.product form.cart {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-bottom: 24px;
	max-width: 100%;
	overflow: hidden;
	box-sizing: border-box;
}

.woocommerce div.product .qty {
	width: 70px;
	height: 52px;
	border: 2px solid var(--line);
	border-radius: 14px;
	padding: 0 12px;
	font-family: var(--font-main);
	font-size: 18px;
	font-weight: 800;
	color: var(--text);
	text-align: center;
	background: var(--white);
}

.woocommerce div.product .single_add_to_cart_button {
	flex: 1 1 auto;
	min-width: 0;
	max-width: 100%;
	word-break: break-word;
	white-space: normal;
	box-sizing: border-box;
}

.woocommerce div.product .woocommerce-tabs {
	grid-column: 1 / -1;
	margin-top: 48px;
}

.woocommerce div.product .woocommerce-tabs .tabs {
	list-style: none;
	padding: 0;
	margin: 0 0 32px;
	display: flex;
	gap: 8px;
	border-bottom: 2px solid var(--line);
}

.woocommerce div.product .woocommerce-tabs .tabs li {
	margin: 0;
}

.woocommerce div.product .woocommerce-tabs .tabs li a {
	display: block;
	padding: 12px 24px;
	font-weight: 800;
	color: var(--muted);
	border-radius: 12px 12px 0 0;
	border: 2px solid transparent;
	border-bottom: none;
	transition: .2s;
	text-decoration: none;
}

.woocommerce div.product .woocommerce-tabs .tabs li.active a {
	color: var(--pink);
	border-color: var(--line);
	background: var(--white);
	margin-bottom: -2px;
}

/* =============================================
   WOOCOMMERCE – CART & CHECKOUT
   ============================================= */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
	padding: 48px 0;
}

.woocommerce table.shop_table {
	width: 100%;
	border-collapse: collapse;
	font-size: 16px;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	padding: 18px 16px;
	border-bottom: 1px solid var(--line);
	text-align: left;
}

.woocommerce table.shop_table th {
	font-weight: 900;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: var(--muted);
}

.woocommerce #payment {
	background: var(--cream);
	border-radius: var(--radius);
	padding: 28px;
}

.woocommerce .cart_totals,
.woocommerce .order-total {
	background: var(--cream);
	border-radius: var(--radius);
	padding: 28px;
}

.woocommerce .cart_totals h2,
.woocommerce .cross-sells h2 {
	font-family: var(--font-display);
	font-size: 28px;
	font-weight: 400;
	margin: 0 0 20px;
}

/* =============================================
   WOOCOMMERCE – NOTICES
   ============================================= */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
	border-radius: 14px;
	padding: 16px 24px;
	margin-bottom: 24px;
	display: flex;
	align-items: center;
	gap: 12px;
	font-weight: 700;
}

.woocommerce-message {
	background: #f0fdf4;
	border-left: 4px solid #22c55e;
	color: #166534;
}

.woocommerce-error {
	background: #fef2f2;
	border-left: 4px solid var(--pink);
	color: #991b1b;
}

.woocommerce-info {
	background: #eff6ff;
	border-left: 4px solid #3b82f6;
	color: #1e40af;
}

/* =============================================
   WOOCOMMERCE – STAR RATINGS
   ============================================= */
.star-rating {
	color: #fbbf24;
	font-size: 18px;
}

.star-rating::before {
	color: #fbbf24;
}

/* =============================================
   PAGE HERO (strony wewnętrzne)
   ============================================= */
.page-hero {
	background: linear-gradient(135deg, var(--cream) 0%, #fff0d8 100%);
	padding: 52px 0;
	text-align: center;
	border-bottom: 1px solid var(--line);
}

.page-hero h1 {
	font-family: var(--font-display);
	font-size: 44px;
	font-weight: 400;
	margin: 0 0 12px;
}

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

.page-hero .breadcrumb a {
	color: var(--muted);
}

/* =============================================
   SECTION HEADERS
   ============================================= */
.section-title {
	font-family: var(--font-display);
	font-size: 42px;
	font-weight: 400;
	margin: 0 0 40px;
	text-align: center;
}

.section-title span {
	color: var(--pink);
}

/* =============================================
   HOME PAGE SECTIONS (Gutenberg edytowalne)
   ============================================= */
.section-padding {
	padding: 56px 0;
}

.home-intro {
	background: var(--cream);
	border-radius: var(--radius);
	padding: 40px;
	text-align: center;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
	background: var(--cream);
	border-top: 2px solid var(--line);
	padding: 36px 0 24px;
}

.footer-inner {
	width: min(1080px, calc(100% - 40px));
	margin-inline: auto;
}

.footer-grid {
	display: grid;
	grid-template-columns: 1fr 1.2fr 1fr;
	gap: 44px;
	align-items: start;
	margin-bottom: 28px;
}

.footer-col h4 {
	font-size: 18px;
	margin: 0 0 14px;
	font-weight: 900;
}

.footer-contact-link {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--text);
	font-weight: 700;
	text-decoration: none;
	transition: color .2s;
}

.footer-contact-link:hover {
	color: var(--pink);
}

.footer-contact-link .icon {
	color: var(--pink);
	font-size: 18px;
}

.footer-socials {
	display: flex;
	gap: 10px;
}

.footer-menu {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 8px;
}

.footer-menu a {
	color: var(--muted);
	text-decoration: none;
	font-size: 15px;
	transition: color .2s;
}

.footer-menu a:hover {
	color: var(--pink);
}

.footer-bottom {
	border-top: 1px solid var(--line);
	padding-top: 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.copyright {
	color: var(--muted);
	font-size: 13px;
}

/* =============================================
   GUTENBERG / BLOCK EDITOR STYLES
   ============================================= */
.wp-block-separator {
	border: none;
	border-top: 2px solid var(--line);
	margin: 48px 0;
}

.wp-block-quote {
	border-left: 4px solid var(--pink);
	padding: 16px 24px;
	background: var(--cream);
	border-radius: 0 14px 14px 0;
	margin: 32px 0;
}

.wp-block-pullquote {
	border-top: 4px solid var(--pink);
	border-bottom: 4px solid var(--pink);
	padding: 32px;
	text-align: center;
}

.wp-block-cover {
	border-radius: var(--radius);
	overflow: hidden;
}

.wp-block-image img {
	border-radius: 18px;
}

.wp-block-columns {
	gap: 32px;
}

/* =============================================
   SEARCH FORM
   ============================================= */
.search-form {
	display: flex;
	gap: 8px;
	max-width: 480px;
}

.search-field {
	flex: 1;
	padding: 12px 20px;
	border: 2px solid var(--line);
	border-radius: 999px;
	font-family: var(--font-main);
	font-size: 15px;
	color: var(--text);
	background: var(--white);
}

.search-field:focus {
	outline: none;
	border-color: var(--pink);
}

.search-submit {
	padding: 12px 24px;
}

/* =============================================
   PAGINATION
   ============================================= */
.woocommerce-pagination,
.pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin: 48px 0;
}

.woocommerce-pagination a,
.woocommerce-pagination span,
.page-numbers {
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border-radius: 12px;
	border: 2px solid var(--line);
	color: var(--text);
	font-weight: 800;
	text-decoration: none;
	transition: .2s;
}

.woocommerce-pagination .current,
.page-numbers.current {
	background: var(--pink);
	border-color: var(--pink);
	color: #fff;
}

.woocommerce-pagination a:hover,
.page-numbers:hover {
	border-color: var(--pink);
	color: var(--pink);
}

/* =============================================
   WIDGET SIDEBAR (sidebar ukryty, zostaje na stronach wewnętrznych)
   ============================================= */
.widget-area {
	display: none; /* Boczne paski ukryte zgodnie z wymaganiami */
}

.sidebar-layout .widget-area {
	display: block;
}

/* =============================================
   COMMENTS / REVIEWS
   ============================================= */
.comment-list {
	list-style: none;
	padding: 0;
	margin: 0 0 40px;
	display: grid;
	gap: 24px;
}

.comment-body,
.review {
	background: var(--cream);
	border-radius: 18px;
	padding: 24px;
}

.comment-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.comment-author img {
	border-radius: 50%;
}

.comment-author b,
.reviewer {
	font-weight: 900;
}

/* =============================================
   ACCESSIBILITY
   ============================================= */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link:focus {
	clip: auto !important;
	clip-path: none;
	height: auto;
	left: 6px;
	top: 7px;
	width: auto;
	z-index: 100000;
	background: var(--pink);
	color: #fff;
	padding: 10px 20px;
	border-radius: 0 0 8px 8px;
}


/* =============================================
   GLOBAL OVERFLOW PREVENTION
   ============================================= */

html, body {
	overflow-x: hidden;
	max-width: 100%;
}

img, video, iframe, embed, object {
	max-width: 100%;
}

/* =============================================
   RESPONSIVE – TABLET (≤ 980px)
   ============================================= */
@media (max-width: 980px) {

	/* Ukryj desktop nav, pokaż hamburger */
	.main-navigation { display: none !important; }
	.menu-toggle { display: flex !important; }

	.header-inner { flex-wrap: wrap; gap: 12px; }

	.hero-grid { grid-template-columns: 1fr; gap: 24px; }
	.hero-copy { padding-left: 16px; order: 1; }
	.hero-visual { order: 0; }

	.woocommerce ul.products,
	.woocommerce .products {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 20px !important;
	}

	.woocommerce div.product { grid-template-columns: 1fr; gap: 24px; }
	.woocommerce div.product .woocommerce-product-gallery { position: static; }

	.footer-grid { grid-template-columns: 1fr; gap: 24px; text-align: center; }
	.footer-contact-link { justify-content: center; }
	.footer-socials { justify-content: center; }
	.footer-bottom { flex-direction: column; align-items: center; text-align: center; }
}

/* =============================================
   RESPONSIVE – MOBILE (≤ 640px)
   ============================================= */
@media (max-width: 640px) {

	.container,
	.footer-inner {
		width: calc(100% - 32px);
	}

	/* HEADER */
	.site-header { padding: 12px 0; }

	.header-inner {
		display: grid;
		grid-template-columns: 1fr auto auto;
		align-items: center;
		gap: 10px;
		width: calc(100% - 32px);
	}

	.site-title { font-size: 16px; }
	.site-description { font-size: 17px; }
	.custom-logo,
	.site-header .custom-logo,
	.woocommerce .custom-logo,
	.woocommerce-page .custom-logo { height: 40px !important; max-height: 40px !important; width: auto !important; max-width: none !important; }
	.header-socials { display: none; }

	/* HERO */
	.hero-slide { padding: 24px 0 32px; }
	.hero-title { font-size: 26px; margin: 8px 0 12px; }
	.hero-lead { font-size: 14px; margin-bottom: 14px; }
	.hero-features { font-size: 13px; gap: 8px; }
	.hero-heart { margin-left: 0; font-size: 20px; }
	.hero-visual {
		display: block;
		width: 100%;
		max-width: 360px;
		margin: 0 auto 8px;
	}
	.hero-image {
		display: block;
		width: 100%;
		height: auto;
		object-fit: contain;
	}

	/* BUTTONS – full width on mobile */
	.btn,
	.woocommerce a.button,
	.woocommerce button.button,
	.woocommerce input.button,
	.woocommerce #respond input#submit,
	.woocommerce .single_add_to_cart_button {
		width: 100%;
		justify-content: center;
		box-sizing: border-box;
		padding: 14px 16px;
		font-size: 13px;
	}

	/* SHOP GRID */
	.woocommerce ul.products,
	.woocommerce .products {
		grid-template-columns: 1fr !important;
		gap: 16px !important;
	}

	/* SINGLE PRODUCT */
	.woocommerce div.product form.cart {
		flex-direction: column;
		align-items: stretch;
	}
	.woocommerce div.product form.cart .qty { width: 100%; }
	.woocommerce div.product form.cart .single_add_to_cart_button { width: 100%; }

	/* SECTION TITLES */
	.section-title { font-size: 26px; margin-bottom: 20px; }
	.page-hero h1 { font-size: 28px; }

	/* FOOTER */
	.site-footer { padding: 24px 0 12px; }

	/* NOTICES */
	.woocommerce-message,
	.woocommerce-error,
	.woocommerce-info {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		font-size: 14px;
		padding: 12px 16px;
	}
	.woocommerce-message .button,
	.woocommerce-message a.button {
		align-self: stretch;
		text-align: center;
	}

	/* SEARCH */
	.search-form { flex-direction: column; max-width: 100%; }
	.search-submit { width: 100%; }

	/* PAGINATION */
	.woocommerce-pagination, .pagination { flex-wrap: wrap; gap: 6px; }
	.page-numbers { width: 36px; height: 36px; font-size: 13px; }
}

/* =============================================
   WOOCOMMERCE CART – KOMPLETNY FIX
   ============================================= */

/* Zapobiegaj overflow */
.woocommerce, .woocommerce-page { overflow-x: hidden; }

/* Tabela koszyka */
.woocommerce table.cart,
.woocommerce-page table.cart,
.woocommerce table.shop_table {
	width: 99%;
	max-width: 99%;
	border-collapse: collapse;
	table-layout: fixed;
	box-sizing: border-box;
}

.woocommerce table.cart th,
.woocommerce table.cart td,
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	padding: 14px 10px;
	border-bottom: 1px solid var(--line);
	vertical-align: middle;
	overflow: hidden;
	word-break: break-word;
}

/* Miniatury */
.woocommerce table.cart img,
.woocommerce-page table.cart img {
	width: 64px !important;
	height: 64px !important;
	min-width: 64px;
	object-fit: cover;
	border-radius: 10px;
	display: block;
}

/* Szerokości kolumn */
.woocommerce table.cart td.product-remove   { width: 40px; text-align: center; }
.woocommerce table.cart td.product-thumbnail{ width: 84px; }
.woocommerce table.cart td.product-name     { width: auto; }
.woocommerce table.cart td.product-price    { width: 100px; white-space: nowrap; }
.woocommerce table.cart td.product-quantity { width: 100px; }
.woocommerce table.cart td.product-subtotal { width: 100px; white-space: nowrap; font-weight: 900; color: var(--pink); }

.woocommerce table.cart td.product-name a {
	color: var(--text);
	font-weight: 800;
	text-decoration: none;
	display: block;
}
.woocommerce table.cart td.product-name a:hover { color: var(--pink); }

/* Ilość w koszyku */
.woocommerce table.cart td.product-quantity .qty,
.woocommerce div.product .quantity .qty {
	width: 64px;
	padding: 8px;
	text-align: center;
	border: 2px solid var(--line);
	border-radius: 10px;
	font-weight: 800;
	font-size: 15px;
	-moz-appearance: textfield;
}
.woocommerce table.cart td.product-quantity .qty::-webkit-outer-spin-button,
.woocommerce table.cart td.product-quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Sekcja akcji */
.woocommerce table.cart .actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	padding: 16px 10px;
	border-bottom: none;
}

/* Kupon */
.woocommerce .coupon {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	flex: 1 1 auto;
}
.woocommerce .coupon input#coupon_code {
	flex: 1 1 120px;
	max-width: 200px;
	padding: 12px 16px;
	border: 2px solid var(--line);
	border-radius: 999px;
	font-family: var(--font-main);
	font-size: 14px;
}
.woocommerce .coupon input#coupon_code:focus { outline: none; border-color: var(--pink); }

/* Cart totals */
.woocommerce .cart-collaterals {
	width: 99%;
	max-width: 99%;
	overflow: hidden;
	display: flex;
	justify-content: flex-end;
	margin-top: 24px;
	box-sizing: border-box;
}

.woocommerce .cart-collaterals .cart_totals {
	width: 100%;
	max-width: 420px;
	background: var(--cream);
	border-radius: var(--radius);
	padding: 24px;
	box-sizing: border-box;
}

/* Tabela zamówień (shop/order) */
.woocommerce table.woocommerce-checkout-review-order-table,
.woocommerce table.order_details,
.woocommerce-order-details table {
	width: 99% !important;
	max-width: 99% !important;
	box-sizing: border-box !important;
	border-collapse: collapse;
	table-layout: auto;
}

.woocommerce .cart_totals table {
	width: 100%;
	border-collapse: collapse;
	table-layout: auto;
}

.woocommerce .cart_totals table th,
.woocommerce .cart_totals table td {
	padding: 10px 0;
	border-bottom: 1px solid var(--line);
	width: auto;
	white-space: normal;
}

.woocommerce .cart_totals .order-total td,
.woocommerce .cart_totals .order-total th {
	font-weight: 900;
	font-size: 20px;
	color: var(--pink);
	border-bottom: none;
}

/* Przejdź do kasy */
.woocommerce .wc-proceed-to-checkout { margin-top: 16px; }
.woocommerce .wc-proceed-to-checkout a.checkout-button {
	display: block;
	width: 99%;
	max-width: 100%;
	text-align: center;
	padding: 16px;
	box-sizing: border-box;
}

/* =============================================
   CART MOBILE (≤ 640px) – widok kart
   ============================================= */
@media (max-width: 640px) {

	.woocommerce table.cart thead { display: none; }

	.woocommerce table.cart,
	.woocommerce table.cart tbody { display: block; width: 100%; }

	.woocommerce table.cart tr.cart_item {
		display: grid;
		grid-template-columns: 68px 1fr 36px;
		grid-template-areas:
			"img name   remove"
			"img price  price"
			"img qty    subtotal";
		gap: 4px 10px;
		align-items: center;
		padding: 14px;
		border: 2px solid var(--line);
		border-radius: 16px;
		margin-bottom: 10px;
		background: var(--white);
		width: 100%;
		box-sizing: border-box;
	}

	.woocommerce table.cart tr.cart_item td {
		display: block;
		border: none;
		padding: 0;
		max-width: none;
		overflow: visible;
		word-break: break-word;
	}

	.woocommerce table.cart td.product-remove   { grid-area: remove; text-align: right; }
	.woocommerce table.cart td.product-thumbnail{ grid-area: img; }
	.woocommerce table.cart td.product-name     { grid-area: name; font-size: 14px; }
	.woocommerce table.cart td.product-price    { grid-area: price; font-size: 13px; color: var(--muted); }
	.woocommerce table.cart td.product-quantity { grid-area: qty; }
	.woocommerce table.cart td.product-subtotal { grid-area: subtotal; font-size: 16px; font-weight: 900; color: var(--pink); text-align: right; }

	.woocommerce table.cart tr.actions {
		display: flex;
		flex-direction: column;
		gap: 10px;
		padding: 16px 0;
	}

	.woocommerce table.cart tr.actions td { display: block; width: 100%; border: none; padding: 0; max-width: none; }

	.woocommerce .coupon { flex-direction: column; width: 100%; }
	.woocommerce .coupon input#coupon_code { max-width: 100%; width: 100%; }
	.woocommerce .coupon button,
	.woocommerce button[name="update_cart"] { width: 100%; }

	.woocommerce .cart-collaterals { justify-content: stretch; }
	.woocommerce .cart-collaterals .cart_totals { max-width: 100%; }

	.woocommerce .cross-sells ul.products {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

/* Przycisk "Dodaj do koszyka" – zawsze przyklejony do dołu karty */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart,
.home-products ul.products li.product .button {
	margin-top: auto !important;
	align-self: center;
	width: 100%;
}

/* Cena – nie rośnie */
.woocommerce ul.products li.product .price,
.home-products ul.products li.product .price {
	margin: 0 0 12px;
}

/* =============================================
   HOME MOBILE POLISH
   Keeps the homepage layout closer to subpages on phones.
   ============================================= */
@media (max-width: 980px) {
	.home .hero-copy {
		order: 0;
		padding-left: 0;
	}

	.home .hero-visual {
		order: 1;
	}
}

@media (max-width: 640px) {
	.home .hero-slider {
		overflow: visible;
	}

	.home .hero-slide {
		padding: 18px 0 28px;
	}

	.home .hero-grid,
	.home .hero-grid.container {
		width: calc(100% - 32px);
		gap: 18px;
		text-align: center;
	}

	.home .hero-copy {
		padding-left: 0;
	}

	.home .hero-heart {
		font-size: 18px;
		margin-bottom: 4px;
	}

	.home .hero-title {
		font-size: 30px;
		line-height: 1.08;
		margin: 6px 0 12px;
	}

	.home .hero-lead {
		max-width: none;
		font-size: 15px;
		line-height: 1.6;
		margin-bottom: 16px;
	}

	.home .hero-features {
		max-width: 340px;
		margin: 0 auto 20px;
		text-align: left;
	}

	.home .hero-copy .btn,
	.home .home-cta .btn {
		width: auto;
		max-width: 100%;
		min-width: 220px;
	}

	.home .hero-visual {
		max-width: 290px;
		margin: 8px auto 0;
	}

	.home .hero-image {
		max-height: 300px;
		object-fit: contain;
	}

	.home .book-scene {
		min-height: 300px;
		transform: scale(.78);
		transform-origin: top center;
	}

	.home-products.section-padding {
		padding: 34px 0;
	}

	.home-products .section-title {
		font-size: 28px;
		margin-bottom: 22px;
	}

	.home-products ul.products li.product img {
		height: 180px !important;
	}

	.home .home-cta {
		padding-bottom: 36px !important;
	}
}
