/*
Theme Name: akuratnie
Theme URI: https://sklep.rdzany.pl
Author: akuratnie
Description: Motyw sklepu akuratnie — odzież z drugiej ręki z naturalnych materiałów. Motyw blokowy pod WooCommerce.
Version: 1.0.0
Requires at least: 7.0
Tested up to: 7.2
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: akuratnie
*/

/* Większość wyglądu jest w theme.json; tu tylko to, czego theme.json nie umie. */

:root {
	--ak-radius: 14px;
	--ak-radius-lg: 18px;
	--ak-line: var(--wp--preset--color--line);
}

*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; }

/* ---------- Pasek górny i nagłówek ---------- */
.ak-topbar { letter-spacing: 0.02em; }
.ak-header { border-bottom: 1px solid var(--ak-line); }
.ak-header .wp-block-site-title a { text-decoration: none; }
.ak-header .wp-block-navigation a:hover { color: var(--wp--preset--color--accent); }
.ak-header .ak-nav-natural a { color: var(--wp--preset--color--accent); }
.ak-header .wp-block-search__inside-wrapper {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--ak-line);
	border-radius: 999px;
	padding: 0 6px 0 16px;
	min-height: 44px;
}
.ak-header .wp-block-search__input { border: 0; background: transparent; font-size: 15px; }
.ak-header .wp-block-search__button { border-radius: 999px; padding: 8px 14px; }
.ak-header .ak-search { flex: 1 1 220px; max-width: 360px; }
.ak-header .wc-block-mini-cart__badge { background: var(--wp--preset--color--accent); color: #fff; }

/* ---------- Kafelki produktów (Product Collection) ---------- */
.wc-block-product-template { row-gap: 28px !important; column-gap: 18px !important; }
.wc-block-product-template .wc-block-product { text-align: left; display: flex; flex-direction: column; gap: 8px; }
.wc-block-product-template .wc-block-components-product-image,
.wc-block-product-template .wc-block-components-product-image a { position: relative; display: block; }
.wc-block-product-template .wc-block-components-product-image img {
	aspect-ratio: 3 / 4;
	object-fit: cover;
	width: 100%;
	border-radius: var(--ak-radius);
	background: var(--wp--preset--color--sand);
}
.wc-block-product-template .wp-block-post-title { margin: 0; font-family: var(--wp--preset--font-family--body); font-style: normal; font-weight: 500; font-size: 16px; line-height: 1.35; letter-spacing: 0; }
.wc-block-product-template .wp-block-post-title a { text-decoration: none; }
.wc-block-product-template .wc-block-components-product-price { font-weight: 700; font-size: 16px; }
.wc-block-product-template .wp-block-button__link { display: none; }

/* Plakietka „100% naturalne” (wstawia wtyczka akuratnie-core) */
.ak-badge-natural {
	position: absolute; left: 10px; top: 10px; z-index: 2;
	background: #fff; color: var(--wp--preset--color--accent);
	font-size: 12px; font-weight: 600; line-height: 1;
	padding: 6px 10px; border-radius: 999px;
}

/* ---------- Kategoria: sortowanie, nawigacja, układ z filtrami ---------- */
.wc-block-catalog-sorting select,
.woocommerce-ordering select,
.wc-block-components-sort-select__select {
	font: inherit; font-size: 15px; color: var(--wp--preset--color--contrast);
	height: 44px; padding: 0 40px 0 14px;
	border: 1px solid var(--ak-line); border-radius: 10px;
	background: var(--wp--preset--color--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%231F1D1A' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center;
	appearance: none; -webkit-appearance: none; cursor: pointer;
}
.wc-block-catalog-sorting select:hover,
.woocommerce-ordering select:hover { border-color: var(--wp--preset--color--contrast); }
.woocommerce-ordering { margin: 0; }
.ak-cat-nav { margin-top: 6px; }

.ak-shop-layout { align-items: flex-start; }
.ak-shop-sidebar { flex: 1 1 270px; max-width: 320px; }
.ak-shop-main { flex: 999 1 560px; min-width: 0; }
.ak-flat-note {
	background: var(--wp--preset--color--accent-soft);
	color: #2F4332;
	border-radius: 12px;
	padding: 12px 14px;
	font-size: 14px;
	line-height: 1.5;
}
.wc-block-product-filters .wp-block-heading { font-size: 15px; margin-bottom: 10px; }
.wc-block-product-filters > * + * { border-top: 1px solid var(--ak-line); padding-top: 22px; }
.wc-block-product-filters .ak-flat-note { border-top: 0; }
.wc-block-product-filter-chips .wc-block-product-filter-chips__item {
	min-height: 44px; min-width: 48px; border-radius: 999px; font-weight: 600;
}
@media (max-width: 781px) {
	.ak-shop-sidebar { max-width: none; flex-basis: 100%; }
}

/* ---------- Karta produktu ---------- */
.ak-product-gallery .woocommerce-product-gallery__image img,
.ak-product-gallery .wc-block-components-product-image img { border-radius: var(--ak-radius-lg); }
.ak-card {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--ak-line);
	border-radius: var(--ak-radius-lg);
	padding: 22px;
}
.ak-product-info .wc-block-add-to-cart-form .quantity { display: none; }
.ak-product-info .single_add_to_cart_button,
.ak-product-info .wc-block-components-product-button__button {
	width: 100%; min-height: 56px; border-radius: 999px !important; font-size: 16px !important;
}
.ak-product-info .wp-block-post-terms a { color: var(--wp--preset--color--muted); }

/* ---------- Koszyk i kasa ---------- */
.wc-block-cart .wc-block-components-product-metadata,
.wc-block-checkout .wc-block-components-product-metadata { color: var(--wp--preset--color--text-soft); }
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button { border-radius: 999px !important; min-height: 54px; }
.wc-block-components-totals-wrapper,
.wc-block-cart-items,
.wc-block-checkout__main .wc-block-components-checkout-step { border-color: var(--ak-line) !important; }

/* ---------- Stopka ---------- */
.ak-footer a { color: #CFC9BF; }
.ak-footer a:hover { color: #fff; }

/* ---------- Dostępność ---------- */
:where(a, button, input, select):focus-visible { outline: 2px solid var(--wp--preset--color--accent); outline-offset: 3px; }
