/*
Theme Name: Deercoffe
Theme URI: https://deercoffe.pl
Author: korg.software
Author URI: https://korg.software
Description: Klasyczny motyw WordPress dla Deercoffe, zgodny z WooCommerce.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Tested up to: 6.8
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: deercoffe
Tags: e-commerce, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   Reset & base
   ========================================================================== */

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

:root {
	--deercoffe-color-bg: #f6f6f6;
	--deercoffe-color-text: #1d1d1b;
	--deercoffe-color-muted: #6d6d6d;
	--deercoffe-color-primary: #4a4d36;
	--deercoffe-color-primary-dark: #34362a;
	--deercoffe-color-accent: #a1a96a;
	--deercoffe-color-green: #929e63;
	--deercoffe-color-border: #e3dfd3;
	--deercoffe-color-gray-200: #dadada;
	--deercoffe-color-cream: #e9e1cc;
	--deercoffe-color-cream-light: #eff0e6;
	--deercoffe-color-brown: #56351a;
	--deercoffe-color-terracotta: #a85742;
	--deercoffe-color-error: #d92d20;
	--deercoffe-color-success: #7a8552;
	--deercoffe-color-success-bg: #dce3c7;
	--deercoffe-font-body: "Roboto Mono", Menlo, Consolas, monospace;
	--deercoffe-font-heading: "Arimo", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
	--deercoffe-container-width: 1180px;
}

html {
	box-sizing: border-box;
}

body {
	margin: 0;
	background-color: var(--deercoffe-color-bg);
	color: var(--deercoffe-color-text);
	font-family: var(--deercoffe-font-body);
	font-size: 16px;
	line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--deercoffe-font-heading);
	color: var(--deercoffe-color-primary-dark);
	line-height: 1.25;
	margin: 0 0 0.6em;
}

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

a:hover,
a:focus {
	color: var(--deercoffe-color-accent);
	text-decoration: underline;
}

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

ul, ol {
	padding-left: 1.4em;
}

table {
	width: 100%;
	border-collapse: collapse;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.container {
	width: 100%;
	max-width: var(--deercoffe-container-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: 20px;
	padding-right: 20px;
}

.site-content {
	flex: 1 0 auto;
	/* padding: 0 0 40px 0; */
}

.content-area {
	width: 100%;
}

.has-sidebar .content-area {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 40px;
	align-items: start;
}

@media (max-width: 782px) {
	.has-sidebar .content-area {
		grid-template-columns: 1fr;
	}
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.screen-reader-text:focus {
	position: fixed;
	top: 10px;
	left: 10px;
	width: auto;
	height: auto;
	padding: 10px 16px;
	background: #fff;
	color: var(--deercoffe-color-text);
	z-index: 100000;
	clip: auto;
}

/* ==========================================================================
   Header
   ========================================================================== */

.promo-bar {
	background-color: var(--deercoffe-color-cream);
	color: var(--deercoffe-color-text);
}

.promo-bar-inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 8px 40px;
	font-size: 0.8rem;
	text-align: center;
}

.site-header {
	background-color: #fff;
	border-bottom: 1px solid var(--deercoffe-color-border);
	position: sticky;
	top: 0;
	z-index: 50;
}

.site-header-inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 16px 40px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}

.site-branding {
	display: flex;
	align-items: center;
}

.site-branding .site-logo {
	height: 28px;
	width: auto;
}

/* Primary navigation */

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.main-navigation li {
	position: relative;
}

.main-navigation a {
	display: inline-flex;
	align-items: center;
	padding: 8px 12px;
	color: var(--deercoffe-color-text);
	font-size: 0.85rem;
	font-weight: 400;
	line-height: 1;
	border-radius: 4px;
}

.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item > a {
	color: var(--deercoffe-color-accent);
	text-decoration: underline;
}

.main-navigation ul ul {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	background: #fff;
	border: 1px solid var(--deercoffe-color-border);
	box-shadow: 0 8px 20px rgba(29, 29, 27, 0.08);
	flex-direction: column;
	padding: 6px;
	z-index: 60;
}

.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul {
	display: flex;
}

.menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	background: none;
	border: 0;
	color: var(--deercoffe-color-text) !important;
	cursor: pointer;
}

.main-navigation-head,
.nav-close,
.nav-scrim {
	display: none;
}

.header-utilities {
	display: flex;
	align-items: center;
	gap: 18px;
}

.header-utility-link {
	font-size: 0.85rem;
	color: var(--deercoffe-color-text);
}

.header-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 0;
	color: var(--deercoffe-color-text) !important;
	cursor: pointer;
	padding: 4px;
	position: relative;
}

.header-cart,
.header-wishlist {
	display: inline-flex;
}

.header-wishlist {
	margin-right: -8px;
}

.wishlist-count {
	position: absolute;
	top: -6px;
	right: -8px;
	color: #fff;
	font-size: 0.65rem;
	line-height: 1;
	border-radius: 50%;
	align-items: center;
	justify-content: center;
}

.wishlist-count:empty {
	display: none;
}

.cart-count {
	position: absolute;
	left: 50%;
	top: 62%;
	transform: translate(-50%, -50%);
	color: var(--deercoffe-color-text);
	font-family: var(--deercoffe-font-body);
	font-size: 0.6rem;
	line-height: 1;
}

.wishlist-count {
	display: flex;
	width: 16px;
	height: 16px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	background: #a1a96a;
}

body.nav-open {
	overflow: hidden;
}

@media (max-width: 782px) {
	.promo-bar-inner {
		padding: 8px 16px;
		font-size: 0.7rem;
		line-height: 1.35;
	}

	.menu-toggle {
		display: inline-flex;
	}

	.site-header-inner {
		flex-wrap: nowrap;
		padding: 15px;
		gap: 8px;
	}

	.site-branding {
		flex: 1;
		justify-content: center;
	}

	.header-utilities {
		gap: 2px;
	}

	.header-utility-link {
		display: none;
	}

	.nav-scrim {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(10, 10, 8, 0.72);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.35s ease, visibility 0.35s ease;
		z-index: 90;
	}

	.nav-scrim.is-active {
		opacity: 1;
		visibility: visible;
	}

	.main-navigation {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		width: 310px;
		max-width: 86vw;
		display: flex;
		flex-direction: column;
		background: #fff;
		box-shadow: 18px 0 36px rgba(0, 0, 0, 0.2);
		transform: translateX(-100%);
		transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
		z-index: 100;
		overflow-y: auto;
	}

	.main-navigation.is-active {
		transform: translateX(0);
	}

	.main-navigation-head {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 34px 24px 28px;
	}

	.main-navigation-head .main-navigation-logo {
		height: 25px;
		width: auto;
	}

	.nav-close {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 44px;
		height: 44px;
		padding: 0;
		background: none;
		border: 0;
		color: var(--deercoffe-color-text) !important;
		cursor: pointer;
	}

	.menu-toggle:hover,
	.menu-toggle:focus-visible,
	.nav-close:hover,
	.nav-close:focus-visible {
		color: #fff !important;
	}

	.main-navigation ul {
		flex-direction: column;
		gap: 10px;
		padding: 0 15px 24px;
	}

	.main-navigation ul ul {
		position: static;
		border: 0;
		box-shadow: none;
		padding-left: 14px;
	}

	.main-navigation a {
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 15px 12px;
		border: 1px solid var(--deercoffe-color-cream);
		border-radius: 0;
		font-family: var(--deercoffe-font-heading);
		font-size: 18px;
		letter-spacing: 0.04em;
		color: var(--deercoffe-color-text);
		transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
	}

	.main-navigation a::before {
		content: "";
		flex-shrink: 0;
		width: 8px;
		height: 8px;
		border-radius: 50%;
		background: var(--deercoffe-color-terracotta);
		transition: background-color 0.2s ease;
	}

	.main-navigation a::after {
		content: "\2192";
		margin-left: auto;
		font-family: var(--deercoffe-font-body);
		font-size: 18px;
		color: var(--deercoffe-color-terracotta);
		transition: color 0.2s ease;
	}

	.main-navigation .current-menu-item > a,
	.main-navigation a:hover,
	.main-navigation a:focus {
		background-color: var(--deercoffe-color-primary);
		border-color: var(--deercoffe-color-primary);
		color: #fff;
		text-decoration: none;
	}

	.main-navigation .current-menu-item > a::before,
	.main-navigation a:hover::before,
	.main-navigation a:focus::before {
		background-color: #fff;
	}

	.main-navigation .current-menu-item > a::after,
	.main-navigation a:hover::after,
	.main-navigation a:focus::after {
		color: var(--deercoffe-color-cream);
	}
}

/* ==========================================================================
   Forms / validation
   ========================================================================== */

.field-error {
	display: none;
	color: var(--deercoffe-color-error);
	font-size: 0.75rem;
	line-height: 1.4;
}

.field-error.is-visible {
	display: block;
}

input.is-invalid,
textarea.is-invalid {
	border-color: var(--deercoffe-color-error);
}

.field-success {
	display: block;
	color: var(--deercoffe-color-success);
	font-size: 0.75rem;
	line-height: 1.4;
}

input.is-valid,
textarea.is-valid {
	background: var(--deercoffe-color-success-bg);
	border-color: var(--deercoffe-color-success);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
	background-color: var(--deercoffe-color-cream-light);
	color: var(--deercoffe-color-text);
}

.site-footer a {
	color: var(--deercoffe-color-muted);
}

.site-footer a:hover,
.site-footer a:focus {
	color: var(--deercoffe-color-primary);
}

.footer-content {
	max-width: 1240px;
	margin: 0 auto;
	padding: 60px 40px 0;
	display: grid;
	grid-template-columns: 1.8fr 0.9fr 0.9fr 1.5fr;
	gap: 30px;
}

.footer-heading {
	font-family: var(--deercoffe-font-body);
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--deercoffe-color-text);
	margin: 0 0 16px;
}

.footer-text {
	font-size: 0.9rem;
	color: var(--deercoffe-color-muted);
	line-height: 1.6;
	margin: 0;
}

.footer-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.footer-list a {
	font-size: 0.9rem;
}

.footer-newsletter-form {
	margin: 16px 0;
}

.footer-newsletter-form-row {
	display: flex;
	align-items: center;
	gap: 8px;
	border-bottom: 1px solid var(--deercoffe-color-muted);
	padding-bottom: 8px;
}

.footer-newsletter-form .field-error {
	margin-top: 6px;
}

.footer-newsletter-form input {
	flex: 1;
	border: 0;
	background: none;
	font-family: inherit;
	font-size: 0.85rem;
	padding: 4px 0;
}

.footer-newsletter-form button {
	background: none;
	border: 0;
	color: #000;
	cursor: pointer;
	padding: 0;
	display: inline-flex;
}

.footer-newsletter-form button:hover,
.footer-newsletter-form button:focus {
	background: none;
}

.footer-newsletter-form button svg {
	transition: transform 0.2s ease;
}

.footer-newsletter-form button:hover svg,
.footer-newsletter-form button:focus svg {
	transform: scale(1.15);
}

.footer-social {
	display: flex;
	gap: 16px;
}

.footer-social a {
	color: var(--deercoffe-color-muted);
	display: inline-flex;
}

.footer-social img {
	width: 20px;
	height: 20px;
}

.footer-bottom {
	max-width: 1240px;
	margin: 0 auto;
	padding: 40px 40px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	font-size: 0.85rem;
	color: var(--deercoffe-color-muted);
}

.footer-bottom-text {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.footer-payments {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

.footer-payments img {
	width: 33px;
	height: 22px;
	border: 1px solid var(--deercoffe-color-border);
	border-radius: 4px;
	background: #fff;
}

@media (max-width: 900px) {
	.footer-content {
		grid-template-columns: 1fr 1fr;
	}
	
}

@media (max-width: 560px) {
	.footer-content {
		grid-template-columns: 1fr;
		padding: 50px 15px 0;
	}

	.footer-bottom {
		padding-left: 15px;
		padding-right: 15px;
	}
}

/* ==========================================================================
   Widgets & sidebar
   ========================================================================== */

.widget {
	margin-bottom: 30px;
}

.widget-title {
	font-size: 1.1rem;
	margin-bottom: 14px;
}

/* ==========================================================================
   Posts & pages
   ========================================================================== */

.entry-header .entry-title {
	margin-bottom: 0.3em;
}

.entry-meta {
	color: var(--deercoffe-color-muted);
	font-size: 0.85rem;
	margin-bottom: 1em;
}

.entry-meta a {
	color: inherit;
}

.entry-thumbnail {
	margin-bottom: 20px;
	border-radius: 6px;
	overflow: hidden;
}

/* article.post,
article.page {
	margin-bottom: 50px;
} */

.pagination,
.post-navigation,
.comments-pagination {
	margin-top: 30px;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.pagination .page-numbers,
.post-navigation a {
	display: inline-block;
	padding: 8px 12px;
	border: 1px solid var(--deercoffe-color-border);
	border-radius: 4px;
}

.pagination .page-numbers.current {
	background-color: var(--deercoffe-color-primary);
	color: #fff;
	border-color: var(--deercoffe-color-primary);
}

/* ==========================================================================
   Comments
   ========================================================================== */

.comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-list .children {
	list-style: none;
	margin: 0 0 0 30px;
	padding: 0;
}

.comment-body {
	padding: 20px 0;
	border-bottom: 1px solid var(--deercoffe-color-border);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--deercoffe-color-border);
	border-radius: 4px;
	font-family: inherit;
	font-size: 1rem;
}

/* ==========================================================================
   Buttons & forms
   ========================================================================== */

button,
input[type="submit"],
.button,
.wp-block-button__link {
	display: inline-block;
	background-color: var(--deercoffe-color-primary);
	color: #fff !important;
	border: 0;
	border-radius: 4px;
	padding: 12px 22px;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none !important;
}

button:hover,
input[type="submit"]:hover,
.button:hover,
.wp-block-button__link:hover {
	background-color: var(--deercoffe-color-primary-dark);
}

/* Reusable pill/link button variants, shared across pages (home, shop, ...). */

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 18px 30px;
	font-family: var(--deercoffe-font-body);
	font-size: 0.85rem;
	font-weight: 400;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	text-decoration: none !important;
	border: 1px solid transparent;
	border-radius: 0;
	cursor: pointer;
	white-space: nowrap;
}

.btn-white {
	background: #fff;
	color: var(--deercoffe-color-text) !important;
}

.btn-white:hover {
	background: var(--deercoffe-color-bg);
}

.btn-outline {
	background: transparent;
	color: var(--deercoffe-color-text) !important;
	border-color: var(--deercoffe-color-text);
}

.btn-outline:hover {
	background: var(--deercoffe-color-text);
	color: #fff !important;
}

.btn-olive {
	background: var(--deercoffe-color-accent);
	color: #fff !important;
}

.btn-olive:hover {
	background: var(--deercoffe-color-primary);
}

.btn-brown {
	background: var(--deercoffe-color-brown);
	color: #fff !important;
}

.btn-brown:hover {
	background: var(--deercoffe-color-primary-dark);
}

.btn-link {
	padding: 18px 30px;
	border: none;
	background: transparent;
	text-transform: none;
	letter-spacing: normal;
	font-size: 15px;
	color: var(--deercoffe-color-text) !important;
	text-decoration-line: underline !important;
	text-decoration-style: solid;
	text-decoration-skip-ink: none;
	text-decoration-thickness: 6%;
	text-underline-offset: 25%;
	text-underline-position: from-font;
}

.btn-link:hover {
	background: transparent;
	opacity: 0.7;
}

/* ==========================================================================
   WooCommerce tweaks
   ========================================================================== */

.woocommerce ul.products li.product .price {
	color: var(--deercoffe-color-primary);
	font-weight: 600;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce #respond input#submit,
.woocommerce input.button {
	background-color: var(--deercoffe-color-primary);
	color: #fff;
	border-radius: 4px;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce input.button:hover {
	background-color: var(--deercoffe-color-primary-dark);
	color: #fff;
}

.woocommerce span.onsale {
	background-color: var(--deercoffe-color-accent);
}

.header-cart .cart-contents {
	color: var(--deercoffe-color-text);
}
