/*
Theme Name: Jeszcze Się Przyda (Storefront Child)
Template: storefront
Description: Motyw potomny Storefront ze stylistyka outletu - czerwono-pomaranczowa paleta, sticky header, kafelkowe menu kategorii.
Version: 1.0.0
*/

:root {
	--jsp-red: #E2071C;
	--jsp-orange: #D68227;
	--jsp-topbar-bg: #F5F5F5;
	--jsp-text: #222222;
}

body {
	font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---------- Site branding / logo ---------- */
.site-title,
.site-title a {
	font-family: 'Quicksand', sans-serif;
	font-weight: 700;
	color: var(--jsp-orange) !important;
	font-size: 1.7em;
}

.site-description {
	color: #757575;
}

/* ---------- Sticky header ----------
   Storefront's #page wrapper sets overflow-x:hidden (as overflow:"hidden auto"),
   which breaks position:sticky on any descendant - the sticky containing
   block becomes #page instead of the viewport, so the header scrolls away
   with the rest of the content instead of staying put. Using position:fixed
   sidesteps that (fixed is always relative to the viewport regardless of an
   ancestor's overflow, as long as no ancestor has a transform). Body
   padding-top to compensate for the header being taken out of flow is set
   in cat-nav.js, since the header's real height varies by viewport. */
#masthead.site-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 999;
	background: #fff;
	box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.site-header-cart .cart-contents,
.site-header .site-search .search-toggle {
	color: var(--jsp-text);
}

/* ---------- Prices / sale badges (Storefront + WooCommerce defaults) ---------- */
.price ins {
	color: var(--jsp-red);
	font-weight: 700;
	text-decoration: none;
}
.price del {
	color: #757575;
	opacity: 1;
}
.onsale {
	background-color: var(--jsp-red) !important;
	color: #fff !important;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 0.75em;
}

.jsp-omnibus-lowest-price {
	font-size: 0.75em;
	color: #757575;
	margin-top: 2px;
}

/* ---------- Buttons ---------- */
.button,
button,
input[type="submit"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce #respond input#submit {
	background-color: var(--jsp-orange);
	color: #fff;
	border-radius: 4px;
	border: none;
}
.button:hover,
button:hover,
input[type="submit"]:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
	background-color: #b96c1e;
	color: #fff;
}

/* ---------- Category mega-menu ---------- */
.jsp-cat-nav {
	background: var(--jsp-topbar-bg);
	border-top: 1px solid #eaeaea;
	border-bottom: 1px solid #eaeaea;
	position: fixed;
	left: 0;
	right: 0;
	z-index: 998;
	/* `top` (offset below the fixed header) is set by cat-nav.js, since the
	   header's height varies with viewport width and content wrapping. */
}
.jsp-cat-nav__list {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}
.jsp-cat-nav__item {
	position: relative;
}
.jsp-cat-nav__link {
	display: block;
	padding: 12px 16px;
	color: var(--jsp-text);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.95em;
}
.jsp-cat-nav__link:hover {
	color: var(--jsp-orange);
}
.jsp-cat-nav__item.has-children > .jsp-cat-nav__link::after {
	content: "";
	display: inline-block;
	margin-left: 6px;
	border: 4px solid transparent;
	border-top-color: currentColor;
	vertical-align: middle;
}

.jsp-cat-dropdown {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	background: #fff;
	box-shadow: 0 8px 20px rgba(0,0,0,0.12);
	padding: 16px;
	z-index: 1000;
	min-width: 480px;
}
.jsp-cat-nav__item.has-children:hover .jsp-cat-dropdown,
.jsp-cat-nav__item.has-children.jsp-open .jsp-cat-dropdown {
	display: block;
}
.jsp-cat-subgrid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}
.jsp-cat-subcard {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	text-decoration: none;
	color: var(--jsp-text);
	font-size: 0.85em;
}
.jsp-cat-subcard img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 6px;
	margin-bottom: 6px;
	background: #f0f0f0;
}

@media (max-width: 768px) {
	.jsp-cat-nav__list { flex-direction: column; }
	.jsp-cat-dropdown { position: static; min-width: 0; box-shadow: none; }
}
