/*
Theme Name: Top Pościel
Theme URI: https://top-posciel.pl/
Author: eCommerce Manager
Description: Motyw sklepu z tekstyliami domowymi (pościel, zasłony, ręczniki, dekoracje). Klasyczny motyw pod WooCommerce z ciepłą, spokojną kolorystyką.
Version: 1.0.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: top-posciel
Tags: e-commerce, custom-menu, featured-images, translation-ready
*/

/* ==========================================================================
   1. Zmienne i reset
   ========================================================================== */

:root {
	--ink: #22262b;
	--ink-soft: #3a4048;
	--muted: #6f7680;
	--bg: #ffffff;
	--soft: #f7f4f0;
	--soft-2: #efe9e2;
	--line: #e6e1db;
	--accent: #b07d5c;
	--accent-dark: #8f6446;
	--sale: #b3453f;
	--ok: #4a7c59;

	--radius: 6px;
	--shadow: 0 1px 3px rgba(34, 38, 43, .07), 0 8px 24px rgba(34, 38, 43, .05);
	--wrap: 1280px;
	--font-head: Georgia, "Times New Roman", serif;
	--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

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

img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
	font-family: var(--font-head);
	font-weight: 600;
	line-height: 1.25;
	color: var(--ink);
	margin: 0 0 .6em;
}

h1 { font-size: clamp(28px, 4vw, 42px); }
h2 { font-size: clamp(24px, 3vw, 32px); }
h3 { font-size: 20px; }

.tp-wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ==========================================================================
   2. Przyciski
   ========================================================================== */

.tp-btn,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt {
	display: inline-block;
	background: var(--ink);
	color: #fff;
	border: 0;
	border-radius: var(--radius);
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: .02em;
	cursor: pointer;
	transition: background .18s ease;
	text-align: center;
}

.tp-btn:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
	background: var(--accent);
	color: #fff;
}

.tp-btn--ghost {
	background: transparent;
	color: var(--ink);
	border: 1px solid var(--ink);
}
.tp-btn--ghost:hover { background: var(--ink); color: #fff; }

.tp-btn--accent { background: var(--accent); }
.tp-btn--accent:hover { background: var(--accent-dark); }

/* ==========================================================================
   3. Górny pasek korzyści
   ========================================================================== */

.tp-topbar {
	background: var(--soft);
	border-bottom: 1px solid var(--line);
	font-size: 13px;
	color: var(--ink-soft);
}

.tp-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 40px;
	flex-wrap: wrap;
}

.tp-perks { display: flex; gap: 26px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.tp-perks li { display: flex; align-items: center; gap: 7px; }
.tp-perks svg { width: 16px; height: 16px; flex: none; color: var(--accent); }
.tp-topbar__contact { display: flex; gap: 18px; flex-wrap: wrap; }
.tp-topbar__contact a { color: var(--ink-soft); font-weight: 600; }

/* ==========================================================================
   4. Nagłówek
   ========================================================================== */

.tp-header { background: var(--bg); border-bottom: 1px solid var(--line); }

.tp-header__inner {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 30px;
	padding: 18px 20px;
}

.tp-logo { font-family: var(--font-head); font-size: 26px; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; }
.tp-logo span { color: var(--accent); }
.tp-logo__tagline { display: block; font-family: var(--font-body); font-size: 10px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }

.tp-search { position: relative; max-width: 520px; width: 100%; justify-self: center; }
.tp-search input[type="search"] {
	width: 100%;
	border: 1px solid var(--line);
	border-radius: 40px;
	padding: 11px 46px 11px 18px;
	font-size: 14px;
	font-family: inherit;
	background: var(--soft);
	color: var(--ink);
}
.tp-search input[type="search"]:focus { outline: 2px solid var(--accent); outline-offset: -1px; background: #fff; }
.tp-search button {
	position: absolute; right: 4px; top: 4px;
	width: 36px; height: 36px;
	border: 0; border-radius: 50%;
	background: transparent; color: var(--ink-soft);
	cursor: pointer; display: grid; place-items: center;
}
.tp-search button:hover { color: var(--accent); }

.tp-actions { display: flex; align-items: center; gap: 6px; }
.tp-actions a { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--ink); }
.tp-actions a:hover { background: var(--soft); color: var(--accent); }
.tp-actions svg { width: 21px; height: 21px; }
.tp-cart__count {
	position: absolute; top: 4px; right: 3px;
	min-width: 18px; height: 18px; padding: 0 5px;
	background: var(--accent); color: #fff;
	border-radius: 9px; font-size: 11px; font-weight: 700;
	display: grid; place-items: center; line-height: 1;
}

.tp-burger { display: none; width: 42px; height: 42px; border: 0; background: transparent; cursor: pointer; color: var(--ink); }

/* ==========================================================================
   5. Nawigacja kategorii
   ========================================================================== */

.tp-nav { background: var(--ink); position: sticky; top: 0; z-index: 40; }
.tp-nav__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
.tp-nav__list a {
	display: block; padding: 13px 15px;
	color: #e9e6e1; font-size: 14px; font-weight: 500;
	transition: background .15s ease, color .15s ease;
}
.tp-nav__list a:hover,
.tp-nav__list .current-menu-item > a { background: rgba(255, 255, 255, .1); color: #fff; }

.tp-nav__list li { position: relative; }
.tp-nav__list .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 230px;
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	box-shadow: var(--shadow); padding: 6px; margin: 0; list-style: none;
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .16s ease, transform .16s ease, visibility .16s;
	z-index: 50;
}
.tp-nav__list li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.tp-nav__list .sub-menu a { color: var(--ink); padding: 9px 14px; border-radius: 4px; font-size: 14px; }
.tp-nav__list .sub-menu a:hover { background: var(--soft); color: var(--accent); }

/* ==========================================================================
   6. Strona główna
   ========================================================================== */

.tp-hero {
	background:
		linear-gradient(105deg, rgba(34, 38, 43, .82) 0%, rgba(34, 38, 43, .45) 55%, rgba(34, 38, 43, .18) 100%),
		linear-gradient(135deg, #b8a894 0%, #cdbfae 45%, #a9917c 100%);
	color: #fff;
	background-size: cover;
	background-position: center;
}
.tp-hero__inner { padding: clamp(56px, 9vw, 118px) 20px; max-width: var(--wrap); margin: 0 auto; }
.tp-hero__box { max-width: 620px; }
.tp-hero h1 { color: #fff; margin-bottom: 16px; font-size: clamp(30px, 5vw, 52px); }
.tp-hero p { font-size: clamp(15px, 1.6vw, 18px); color: rgba(255, 255, 255, .92); margin: 0 0 28px; max-width: 520px; }
.tp-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.tp-hero .tp-btn { background: #fff; color: var(--ink); }
.tp-hero .tp-btn:hover { background: var(--accent); color: #fff; }
.tp-hero .tp-btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .65); }
.tp-hero .tp-btn--ghost:hover { background: #fff; color: var(--ink); }

.tp-section { padding: clamp(44px, 6vw, 76px) 0; }
.tp-section--soft { background: var(--soft); }
.tp-section__head { text-align: center; max-width: 660px; margin: 0 auto clamp(28px, 4vw, 46px); }
.tp-section__head p { color: var(--muted); margin: 0; }
.tp-eyebrow { display: block; font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }

/* Kafle kategorii */
.tp-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.tp-cat {
	position: relative; display: block; overflow: hidden;
	border-radius: var(--radius); background: var(--soft-2);
	aspect-ratio: 4 / 3;
}
.tp-cat img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tp-cat:hover img { transform: scale(1.05); }
.tp-cat__label {
	position: absolute; inset: auto 0 0 0;
	background: linear-gradient(to top, rgba(34, 38, 43, .85), rgba(34, 38, 43, 0));
	color: #fff; padding: 34px 16px 14px;
}
.tp-cat__label strong { display: block; font-family: var(--font-head); font-size: 18px; font-weight: 600; }
.tp-cat__label span { font-size: 12px; opacity: .82; }

/* Pasek zaufania */
.tp-trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 22px; }
.tp-trust__item { text-align: center; padding: 8px; }
.tp-trust__item svg { width: 30px; height: 30px; color: var(--accent); margin: 0 auto 12px; }
.tp-trust__item strong { display: block; font-size: 15px; margin-bottom: 4px; }
.tp-trust__item span { font-size: 13px; color: var(--muted); }

/* Blok tekstowy */
.tp-about { max-width: 800px; margin: 0 auto; text-align: center; color: var(--ink-soft); }
.tp-about p { margin: 0 0 14px; }

/* ==========================================================================
   7. WooCommerce
   ========================================================================== */

.woocommerce-page .tp-main,
.tp-main { padding: clamp(28px, 4vw, 44px) 0 clamp(44px, 6vw, 72px); }

.woocommerce .woocommerce-breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.woocommerce .woocommerce-breadcrumb a { color: var(--muted); }
.woocommerce .woocommerce-breadcrumb a:hover { color: var(--accent); }

.woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
}
.woocommerce ul.products::before,
.woocommerce ul.products::after { content: none; }

.woocommerce ul.products li.product {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow .2s ease, border-color .2s ease;
	text-align: center;
	padding: 0 0 16px;
}
.woocommerce ul.products li.product:hover { box-shadow: var(--shadow); border-color: var(--soft-2); }

.woocommerce ul.products li.product a img { margin: 0 0 14px; aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--font-body);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.45;
	padding: 0 14px;
	margin: 0 0 8px;
}
.woocommerce ul.products li.product .price {
	display: block;
	color: var(--ink);
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 12px;
	padding: 0 14px;
}
.woocommerce ul.products li.product .price del { color: var(--muted); font-weight: 400; font-size: 14px; margin-right: 6px; }
.woocommerce ul.products li.product .price ins { text-decoration: none; color: var(--sale); }
.woocommerce ul.products li.product .button { margin: auto 14px 0; }

.woocommerce span.onsale {
	background: var(--sale);
	color: #fff;
	border-radius: 3px;
	min-height: auto;
	min-width: auto;
	line-height: 1;
	padding: 6px 10px;
	font-size: 12px;
	font-weight: 700;
	top: 10px;
	left: 10px;
	right: auto;
	margin: 0;
}

/* Karta produktu */
.woocommerce div.product .product_title { font-size: clamp(22px, 3vw, 30px); }
.woocommerce div.product p.price { color: var(--ink); font-size: 26px; font-weight: 700; }
.woocommerce div.product p.price del { color: var(--muted); font-size: 18px; font-weight: 400; }
.woocommerce div.product p.price ins { text-decoration: none; color: var(--sale); }
.woocommerce div.product form.cart { margin-bottom: 26px; }
.woocommerce div.product .woocommerce-tabs ul.tabs { padding-left: 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs::before { border-color: var(--line); }
.woocommerce div.product .woocommerce-tabs ul.tabs li { border-color: var(--line); background: var(--soft); border-radius: var(--radius) var(--radius) 0 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: #fff; }

.woocommerce table.variations { margin-bottom: 16px; }
.woocommerce table.variations td, .woocommerce table.variations th { padding: 6px 0; vertical-align: middle; }
.woocommerce table.variations select {
	padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius);
	background: #fff; font-family: inherit; font-size: 14px; min-width: 200px;
}

.woocommerce .quantity .qty {
	padding: 11px 8px; border: 1px solid var(--line); border-radius: var(--radius);
	font-family: inherit; width: 74px; text-align: center;
}

/* Komunikaty */
.woocommerce-message, .woocommerce-info, .woocommerce-error {
	border-top-color: var(--accent);
	background: var(--soft);
	border-radius: var(--radius);
}
.woocommerce-message::before, .woocommerce-info::before { color: var(--accent); }

/* Sortowanie i paginacja */
.woocommerce .woocommerce-ordering select {
	padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius);
	background: #fff; font-family: inherit; font-size: 14px;
}
.woocommerce nav.woocommerce-pagination ul { border: 0; gap: 6px; display: flex; justify-content: center; }
.woocommerce nav.woocommerce-pagination ul li { border: 0; }
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
	border: 1px solid var(--line); border-radius: var(--radius);
	padding: 9px 14px; min-width: 42px;
}
.woocommerce nav.woocommerce-pagination ul li span.current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* Sidebar sklepu */
.tp-shop { display: grid; grid-template-columns: 250px 1fr; gap: 36px; align-items: start; }
.tp-shop__side { position: sticky; top: 76px; }
.tp-shop__side .widget { margin-bottom: 26px; }
.tp-shop__side .widget-title { font-family: var(--font-body); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.tp-shop__side ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.tp-shop__side ul li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.tp-shop__side ul li:last-child { border-bottom: 0; }
.tp-shop__side .count { color: var(--muted); font-size: 12px; }

/* ==========================================================================
   8. Stopka
   ========================================================================== */

.tp-footer { background: var(--ink); color: #c9ccd1; margin-top: auto; }
.tp-footer a { color: #c9ccd1; }
.tp-footer a:hover { color: #fff; }
.tp-footer__cols {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
	gap: 34px;
	padding: clamp(38px, 5vw, 60px) 0;
}
.tp-footer h4 { color: #fff; font-family: var(--font-body); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 14px; }
.tp-footer ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.tp-footer ul li { padding: 4px 0; }
.tp-footer p { font-size: 14px; margin: 0 0 10px; }
.tp-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, .1);
	padding: 18px 0;
	font-size: 13px;
	display: flex;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	color: #8d949d;
}

body { display: flex; flex-direction: column; min-height: 100vh; }
.tp-site { flex: 1 0 auto; }

/* ==========================================================================
   9. Responsywność
   ========================================================================== */

@media (max-width: 980px) {
	.tp-shop { grid-template-columns: 1fr; }
	.tp-shop__side { position: static; }
	.tp-header__inner { grid-template-columns: auto 1fr; gap: 14px; }
	.tp-search { grid-column: 1 / -1; order: 3; max-width: none; }
	.tp-burger { display: grid; place-items: center; }
	.tp-nav__list {
		display: none;
		flex-direction: column;
		align-items: stretch;
		padding: 8px 0;
	}
	.tp-nav__list.is-open { display: flex; }
	.tp-nav__list .sub-menu {
		position: static; opacity: 1; visibility: visible; transform: none;
		box-shadow: none; border: 0; background: transparent; padding-left: 14px;
	}
	.tp-nav__list .sub-menu a { color: #c9ccd1; }
	.tp-topbar__contact { display: none; }
}

@media (max-width: 640px) {
	.tp-perks li:nth-child(n+2) { display: none; }
	.woocommerce ul.products { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
	.tp-cats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
