/*
 * KrokoDent — shop-category.css
 * Style dla szablonu taxonomy-product_cat.php (kategorie produktów WooCommerce).
 * Ładowane warunkowo na is_product_category().
 */


/* ════════════════════════════════════════════════════════════════
   HERO KATEGORII
═══════════════════════════════════════════════════════════════════ */

.kd-cat-hero {
	position: relative;
	min-height: 52vh;
	display: flex;
	align-items: center;
	padding: var(--space-8, 96px) 0 var(--space-7, 64px);
	background: #0a180c;
	overflow: hidden;
}

.kd-cat-hero .hero-bg { position: absolute; inset: 0; z-index: 0; }
.kd-cat-hero .hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }

.kd-cat-hero::after {
	content: '';
	position: absolute; inset: 0;
	background: linear-gradient(135deg, rgba(8,24,12,.82) 0%, rgba(10,28,15,.62) 55%, rgba(8,24,12,.78) 100%);
	z-index: 1;
}

.kd-cat-hero::before {
	content: '';
	position: absolute; top: -50%; right: -20%;
	width: 80%; height: 150%;
	background: radial-gradient(circle, rgba(45,122,58,.18) 0%, transparent 70%);
	pointer-events: none;
	animation: kdCatHeroGlow 8s ease-in-out infinite;
	z-index: 1;
}

@keyframes kdCatHeroGlow { 0%, 100% { opacity: .6; } 50% { opacity: 1; } }

.kd-cat-hero .container       { position: relative; z-index: 2; }
.kd-cat-hero .hero-content    { max-width: 740px; }
.kd-cat-hero .breadcrumb-list { list-style: none; padding: 0; margin: 0 0 var(--space-4, 24px); display: flex; align-items: center; flex-wrap: wrap; gap: 0; }
.kd-cat-hero .breadcrumb-list li { font-size: 13px; color: rgba(255,255,255,.58); display: flex; align-items: center; }
.kd-cat-hero .breadcrumb-list a { color: rgba(255,255,255,.72); }
.kd-cat-hero .breadcrumb-list a:hover { color: #fff; opacity: 1; }
.kd-cat-hero .breadcrumb-list .sep { margin: 0 8px; opacity: .35; }
.kd-cat-hero .preheader { font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #84b38c; display: inline-block; margin-bottom: var(--space-3, 16px); }
.kd-cat-hero .h1        { color: #fff; margin-bottom: var(--space-4, 24px); }
.kd-cat-hero .hero-cta  { display: flex; gap: var(--space-3, 16px); flex-wrap: wrap; }

.kd-cat-hero .btn-outline { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.55); }
.kd-cat-hero .btn-outline:hover { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.90); }


/* ════════════════════════════════════════════════════════════════
   TRUST BAR (voucher-specific)
═══════════════════════════════════════════════════════════════════ */

.kd-shop-trust-bar {
	background: linear-gradient(135deg, #0d3317 0%, #184a22 100%);
	border-bottom: 1px solid rgba(45,122,58,.28);
	padding: var(--space-4, 24px) 0;
}

.kd-shop-trust-bar .trust-items {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-7, 64px);
	flex-wrap: wrap;
}

.kd-shop-trust-bar .trust-item { display: flex; align-items: center; gap: var(--space-3, 16px); }
.kd-shop-trust-bar .trust-icon { width: 36px; height: 36px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.kd-shop-trust-bar .trust-icon svg { width: 18px; height: 18px; stroke: #84b38c; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.kd-shop-trust-bar .trust-text { font-size: 13px; color: rgba(255,255,255,.82); font-weight: 500; line-height: 1.3; }
.kd-shop-trust-bar .trust-text strong { color: #fff; display: block; font-size: 14px; }

@media (max-width: 768px) {
	.kd-shop-trust-bar .trust-items {
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		gap: 20px;
	}

	.kd-shop-trust-bar .trust-item {
		width: 100%;
		justify-content: flex-start;
		text-align: left;
	}

	.kd-shop-trust-bar .trust-text { text-align: left; }
}


/* ════════════════════════════════════════════════════════════════
   PRODUCTS SECTION
═══════════════════════════════════════════════════════════════════ */

#produkty { padding: var(--space-8, 96px) 0; }

.shop-header {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--space-5, 32px);
	margin-bottom: var(--space-6, 48px);
	flex-wrap: wrap;
}

.shop-header-text .h2 { margin-bottom: var(--space-2, 12px); }

.filter-tabs { display: flex; gap: var(--space-2, 12px); flex-wrap: wrap; align-items: center; }

.filter-tab {
	padding: 9px 20px;
	border-radius: var(--radius-full, 9999px);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: .03em;
	border: 1.5px solid rgba(45,122,58,.22);
	background: rgba(255,255,255,.75);
	color: var(--text-secondary, rgba(26,46,28,.70));
	cursor: pointer;
	transition: all .2s ease;
}

.filter-tab:hover,
.filter-tab.active {
	background: linear-gradient(135deg, #184a22, #256531);
	color: #fff;
	border-color: #2d7a3a;
	box-shadow: 0 4px 12px rgba(45,122,58,.22);
}

.shop-count { font-size: 14px; color: var(--text-muted, rgba(26,46,28,.45)); white-space: nowrap; }

/* ─── Products grid ─────────────────────────────────────────────── */

.products-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-5, 32px);
}

.product-card {
	background: #fff;
	border: 1px solid rgba(45,122,58,.12);
	border-radius: var(--radius-lg, 24px);
	overflow: hidden;
	box-shadow: 0 2px 16px rgba(26,46,28,.07);
	transition: all .3s cubic-bezier(.4,0,.2,1);
	position: relative;
	display: flex;
	flex-direction: column;
}

.product-card::before {
	content: '';
	position: absolute; top: 0; left: 0; right: 0; height: 3px;
	background: linear-gradient(90deg, #143a1d, #2f7b3f);
	transform: scaleX(0); transform-origin: left;
	transition: transform .3s cubic-bezier(.4,0,.2,1);
	z-index: 2;
}

.product-card:hover                { transform: translateY(-7px); box-shadow: 0 14px 40px rgba(26,46,28,.14); border-color: rgba(45,122,58,.28); }
.product-card:hover::before        { transform: scaleX(1); }

.product-card.hidden               { display: none; }

.product-img-wrap {
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, #eaf5ec, #deeee1);
}

.product-img-wrap img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform .5s cubic-bezier(.4,0,.2,1);
	display: block;
}

.product-card:hover .product-img-wrap img { transform: scale(1.04); }

/* Badges */
.product-badge {
	position: absolute;
	top: var(--space-3, 16px); left: var(--space-3, 16px);
	z-index: 2;
	font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
	padding: 5px 12px;
	border-radius: var(--radius-full, 9999px);
}

.badge-bonding     { background: linear-gradient(135deg, #184a22, #2f7440); color: #fff; }
.badge-wybielanie  { background: linear-gradient(135deg, #1a3a6b, #2a5aa0); color: #fff; }
.badge-higiena     { background: linear-gradient(135deg, #2c5f2e, #52b788); color: #fff; }
.badge-podarunkowy { background: linear-gradient(135deg, #7b2d8b, #b05db7); color: #fff; }

/* Product body */
.product-body {
	padding: var(--space-5, 32px);
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: var(--space-3, 16px);
}

.product-category {
	font-size: 11px; font-weight: 700; letter-spacing: .1em;
	text-transform: uppercase; color: #2d7a3a;
}

.product-title {
	font-family: var(--font-serif, 'Playfair Display', serif);
	font-size: clamp(17px, 1.8vw, 21px);
	font-weight: 600;
	color: var(--text-primary, #1a2e1c);
	margin: 0; line-height: 1.3; letter-spacing: -.01em;
}

.product-desc {
	font-size: 14px; line-height: 1.65;
	color: var(--text-secondary, rgba(26,46,28,.70));
	margin: 0; flex: 1;
}

/* Footer */
.product-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3, 16px);
	padding: var(--space-4, 24px) var(--space-5, 32px);
	border-top: 1px solid rgba(45,122,58,.10);
	background: rgba(234,242,236,.50);
}

.product-price {
	font-family: var(--font-serif, 'Playfair Display', serif);
	font-size: 26px; font-weight: 700;
	color: var(--text-primary, #1a2e1c);
	line-height: 1;
}

.product-price span,
.product-price .woocommerce-Price-currencySymbol {
	font-size: 14px; font-weight: 500;
	color: var(--text-muted, rgba(26,46,28,.45));
	font-family: var(--font-sans, 'Inter', sans-serif);
	margin-left: 2px;
}

/* WooCommerce overrides — ukryj domyślną walutę przed liczbą, zostaw za */
.product-price .woocommerce-Price-amount bdi { display: flex; align-items: baseline; gap: 2px; flex-direction: row-reverse; }

.add-to-cart {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 12px 22px;
	border-radius: var(--radius-full, 9999px);
	font-size: 14px; font-weight: 700;
	cursor: pointer;
	border: 2px solid #2d7a3a;
	background: linear-gradient(135deg, #184a22, #2f7440);
	color: #fff;
	letter-spacing: .02em;
	transition: all .25s ease;
	white-space: nowrap;
	position: relative; overflow: hidden;
	text-decoration: none;
}

.add-to-cart::after {
	content: '';
	position: absolute; top: -50%; left: -100%;
	width: 100%; height: 200%;
	background: linear-gradient(90deg, transparent, rgba(200,230,205,.35), transparent);
	transform: skewX(-25deg);
	transition: left .5s ease;
}

.add-to-cart:hover::after { left: 100%; }
.add-to-cart:hover { background: linear-gradient(135deg, #256531, #3c8a4e); border-color: #3d8f4a; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(45,122,58,.28); color: #fff; opacity: 1; }

.add-to-cart svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

@media (max-width: 992px) { .products-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) {
	.products-grid { grid-template-columns: 1fr; }

	.product-footer {
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		gap: 16px;
		padding: 20px 24px;
	}

	.product-price {
		width: 100%;
		text-align: left;
	}

	.add-to-cart {
		width: 100%;
		justify-content: center;
		padding: 12px 16px;
		font-size: 13px;
	}
}


/* ════════════════════════════════════════════════════════════════
   HOW IT WORKS
═══════════════════════════════════════════════════════════════════ */

.how-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--space-4, 24px);
	margin-top: var(--space-6, 48px);
	position: relative;
}

.how-grid::before {
	content: '';
	position: absolute; top: 36px;
	left: 12.5%; right: 12.5%;
	height: 2px;
	background: linear-gradient(90deg, #2d7a3a, #84b38c, #2d7a3a);
	z-index: 0;
}

.how-step { text-align: center; position: relative; z-index: 1; }

.how-bubble {
	width: 72px; height: 72px;
	border-radius: 50%;
	margin: 0 auto var(--space-4, 24px);
	background: linear-gradient(135deg, #184a22, #2f7440);
	border: 3px solid #fff;
	box-shadow: 0 0 0 3px rgba(45,122,58,.22), 0 6px 20px rgba(26,46,28,.18);
	display: grid; place-items: center;
	position: relative;
}

.how-bubble svg { width: 28px; height: 28px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.how-num {
	position: absolute; top: -4px; right: calc(50% - 46px);
	width: 20px; height: 20px; border-radius: 50%;
	background: #fff; border: 2px solid #2d7a3a;
	color: #1f5e2a; font-size: 10px; font-weight: 800;
	display: grid; place-items: center;
}

.how-title { font-size: 15px; font-weight: 700; color: var(--text-primary, #1a2e1c); margin: 0 0 var(--space-2, 12px); }
.how-text  { font-size: 13px; color: var(--text-secondary, rgba(26,46,28,.70)); line-height: 1.6; margin: 0; }

@media (max-width: 992px) {
	.how-grid        { grid-template-columns: repeat(2, 1fr); gap: var(--space-6, 48px); }
	.how-grid::before { display: none; }
}

@media (max-width: 480px) { .how-grid { grid-template-columns: 1fr; } }


/* ════════════════════════════════════════════════════════════════
   FAQ (tożsame z front-page.css — ładowane tu bo front-page.css
   jest warunkowy tylko dla is_front_page())
═══════════════════════════════════════════════════════════════════ */

.faq-list {
	max-width: 860px;
	margin: var(--space-6, 48px) auto 0;
}

.faq-item {
	background: rgba(255,255,255,.75);
	border: 1px solid rgba(45,122,58,.14);
	box-shadow: 0 2px 10px rgba(26,46,28,.06);
	border-radius: var(--radius-md, 16px);
	margin-bottom: var(--space-3, 16px);
	overflow: hidden;
	transition: all .3s ease;
}

.faq-item[aria-expanded="true"] {
	background: rgba(255,255,255,.95);
	border-color: rgba(22,82,36,.35);
	box-shadow: 0 0 16px rgba(27,80,39,.12);
}

.faq-btn {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3, 16px);
	padding: var(--space-4, 24px);
	background: transparent;
	border: none;
	color: var(--text-primary, #1a2e1c);
	font-family: var(--font-sans, 'Inter', sans-serif);
	font-size: 17px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	transition: color .3s ease;
}

.faq-btn:hover { color: var(--green-light, #1f5e2a); }

.faq-icon {
	width: 24px; height: 24px;
	flex-shrink: 0;
	transition: transform .3s cubic-bezier(.4,0,.2,1);
}

.faq-item[aria-expanded="true"] .faq-icon { transform: rotate(180deg); }
.faq-icon svg { width: 100%; height: 100%; stroke: var(--green, #165224); }

.faq-panel {
	max-height: 0;
	overflow: hidden;
	transition: max-height .4s cubic-bezier(.4,0,.2,1);
}

.faq-item[aria-expanded="true"] .faq-panel { max-height: 500px; }

.faq-content {
	padding: 0 var(--space-4, 24px) var(--space-4, 24px);
	color: var(--text-secondary, rgba(26,46,28,.70));
	line-height: 1.7;
	font-size: 15px;
}

.faq-content p:first-child { margin-top: 0; }
.faq-content p:last-child  { margin-bottom: 0; }


/* ════════════════════════════════════════════════════════════════
   CTA GOTOWI (tożsame z portfolio.css)
═══════════════════════════════════════════════════════════════════ */

.cta-section,
.kd-cta-gotowi {
	background: linear-gradient(135deg, #0d3317 0%, #143a1d 40%, #1f5e2a 100%);
	border-top: 1px solid rgba(45,122,58,.30);
	border-bottom: 1px solid rgba(45,122,58,.30);
	position: relative;
	overflow: hidden;
}

.kd-cta-gotowi::before,
.cta-section::before {
	content: '';
	position: absolute; top: -50%; right: -15%;
	width: 60%; height: 200%;
	background: radial-gradient(circle, rgba(45,122,58,.22) 0%, transparent 65%);
	pointer-events: none;
}

.cta-inner {
	text-align: center;
	padding: var(--space-8, 96px) 0;
	position: relative; z-index: 1;
	max-width: 760px;
	margin: 0 auto;
}

/* CTA shortcode może występować razem z onas.css, gdzie .cta-inner jest flexem. */
.kd-cta-gotowi .cta-inner {
	display: block;
	text-align: center;
}

.cta-inner .kicker { color: #84b38c; }
.cta-inner .h2     { color: #ffffff; margin-bottom: var(--space-4, 24px); }
.cta-inner .lead   { color: rgba(255,255,255,.80); margin-left: auto; margin-right: auto; }

.cta-btns {
	display: flex;
	gap: var(--space-3, 16px);
	justify-content: center;
	flex-wrap: wrap;
	margin-top: var(--space-6, 48px);
}

.kd-cta-gotowi .cta-btns {
	width: auto;
	justify-content: center;
}

@media (max-width: 768px) {
	.kd-cta-gotowi .cta-btns .btn {
		flex: 0 1 auto;
	}
}

.cta-inner .btn-ghost,
.kd-cta-gotowi .btn-ghost,
.cta-section .btn-ghost {
	background: rgba(255,255,255,.12);
	color: #ffffff;
	border-color: rgba(255,255,255,.35);
}

.cta-inner .btn-ghost:hover,
.kd-cta-gotowi .btn-ghost:hover,
.cta-section .btn-ghost:hover {
	background: rgba(255,255,255,.22);
	border-color: rgba(255,255,255,.65);
	color: #ffffff;
}


/* ════════════════════════════════════════════════════════════════
   NEWSLETTER
═══════════════════════════════════════════════════════════════════ */

.newsletter-section {
	position: relative;
	overflow: hidden;
	background-color: #eaf2ec;
	background-image:
		radial-gradient(circle at 25% 25%, rgba(45,122,58,.07) 0, transparent 56%),
		radial-gradient(circle at 75% 75%, rgba(45,122,58,.05) 0, transparent 52%),
		repeating-linear-gradient(0deg,   rgba(45,122,58,.05) 0 1px, transparent 1px 84px),
		repeating-linear-gradient(90deg,  rgba(45,122,58,.04) 0 1px, transparent 1px 84px);
	border-top:    1px solid rgba(45,122,58,.18);
	border-bottom: 1px solid rgba(45,122,58,.18);
}

.newsletter-wrap {
	max-width: 900px;
	margin: 0 auto;
	padding: var(--space-7, 64px) var(--container-pad, 24px);
	text-align: center;
}

.newsletter-title {
	margin: 0 0 var(--space-3, 16px);
	font-family: var(--font-serif, 'Playfair Display', serif);
	font-size: clamp(30px, 4.1vw, 46px);
	line-height: 1.2;
	color: #1a2e1c;
}

.newsletter-desc {
	margin: 0 auto var(--space-5, 32px);
	max-width: 62ch;
	color: var(--text-secondary, rgba(26,46,28,.70));
	font-size: 17px;
}

.newsletter-form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: var(--space-3, 16px);
	max-width: 620px;
	margin: 0 auto;
}

.newsletter-input {
	width: 100%;
	padding: 14px 18px;
	border-radius: var(--radius-full, 9999px);
	border: 1px solid rgba(45,122,58,.25);
	background: rgba(255,255,255,.85);
	color: #1a2e1c;
	font-size: 15px;
	font-family: var(--font-sans, 'Inter', sans-serif);
}

.newsletter-input::placeholder { color: rgba(26,46,28,.40); }

.newsletter-input:focus {
	outline: none;
	border-color: #2d7a3a;
	box-shadow: 0 0 0 3px rgba(45,122,58,.18);
	background: #ffffff;
}

@media (max-width: 640px) {
	.newsletter-form                  { grid-template-columns: 1fr; }
	.newsletter-form .btn             { width: 100%; }
}


/* ════════════════════════════════════════════════════════════════
   NEWSLETTER — THE NEWSLETTER PLUGIN BUTTON OVERRIDE
   Plugin TNP renderuje własny button bez naszych klas.
   Targetujemy go przez kontener .newsletter-section lub .tnp-main-wrap.
═══════════════════════════════════════════════════════════════════ */

.newsletter-section input[type="submit"],
.newsletter-section button[type="submit"],
.tnp-main-wrap input[type="submit"],
.tnp-main-wrap button[type="submit"],
.newsletter-form input[type="submit"],
.newsletter-form button[type="submit"] {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	padding: 14px 28px !important;
	border-radius: var(--radius-full, 9999px) !important;
	font-family: var(--font-sans, 'Inter', sans-serif) !important;
	font-size: 15px !important;
	font-weight: 700 !important;
	letter-spacing: 0.02em;
	cursor: pointer;
	border: 2px solid #2d7a3a !important;
	background: linear-gradient(135deg, #184a22, #256531, #2f7440) !important;
	color: #ffffff !important;
	transition: all .25s ease !important;
	box-shadow: 0 4px 14px rgba(45,122,58,.28) !important;
	white-space: nowrap;
}

.newsletter-section input[type="submit"]:hover,
.newsletter-section button[type="submit"]:hover,
.tnp-main-wrap input[type="submit"]:hover,
.tnp-main-wrap button[type="submit"]:hover,
.newsletter-form input[type="submit"]:hover,
.newsletter-form button[type="submit"]:hover {
	background: linear-gradient(135deg, #256531, #3c8a4e) !important;
	border-color: #3d8f4a !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 8px 24px rgba(45,122,58,.38) !important;
}


/* ════════════════════════════════════════════════════════════════
   REDUCED MOTION
═══════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
	.kd-cat-hero::before,
	.product-card,
	.product-img-wrap img,
	.add-to-cart { animation: none !important; transition-duration: .01ms !important; }
}

/* Mobile newsletter: stack email field and submit for comfortable typing space. */
@media (max-width: 640px) {
	.newsletter-section .tnp-main-wrap,
	.newsletter-section .tnp-main-wrap form,
	.newsletter-section .newsletter-form,
	.newsletter-form.tnp-main-wrap {
		display: grid !important;
		grid-template-columns: 1fr !important;
		gap: 12px !important;
	}

	.newsletter-section input[type="email"],
	.newsletter-section input[type="text"],
	.newsletter-section .newsletter-input,
	.newsletter-section input[type="submit"],
	.newsletter-section button[type="submit"],
	.newsletter-form input[type="submit"],
	.newsletter-form button[type="submit"] {
		width: 100% !important;
		min-width: 0 !important;
	}
}
