/*
Theme Name: klyro
Theme URI: https://kliccode.com
Author: kliccode
Author URI: https://kliccode.com
Description: A minimal WordPress block theme with WooCommerce support.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: klyro
Tags: block-theme, full-site-editing, woocommerce, e-commerce, custom-colors, custom-logo, translation-ready
*/

/* ---------- Reset ---------- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

/* ---------- Layout: sticky footer ---------- */
html {
	height: 100%;
}

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	line-height: 1.6;
	color: var(--wp--preset--color--contrast, #111);
	background: var(--wp--preset--color--base, #fff);
}

/* main grows to fill empty space so footer sits at bottom */
main {
	flex: 1 0 auto;
}

/* ---------- Sticky header ---------- */
header.wp-block-template-part,
.wp-site-blocks > header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--wp--preset--color--base, #fff);
}

/* wp admin bar offset when logged in */
.admin-bar header.wp-block-template-part,
.admin-bar .wp-site-blocks > header {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar header.wp-block-template-part,
	.admin-bar .wp-site-blocks > header {
		top: 46px;
	}
}

/* ---------- Links ---------- */
a {
	color: inherit;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

/* ---------- Media ---------- */
img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ---------- WooCommerce: product grid ---------- */
.woocommerce ul.products {
	list-style: none;
	padding: 0;
	margin: 0;
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.woocommerce ul.products li.product {
	text-align: center;
}

/* ---------- WooCommerce: buttons ---------- */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
	display: inline-block;
	padding: 0.6em 1.2em;
	background: var(--wp--preset--color--primary, #111);
	color: #fff;
	border-radius: 4px;
	border: none;
	cursor: pointer;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover {
	opacity: 0.85;
	text-decoration: none;
}


/* Klyro Product Card */
.klyro-product-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	background: #fff;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.klyro-product-card__image-link {
	display: block;
}

.klyro-product-card__image {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #f5f5f5;
}

.klyro-product-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.klyro-product-card__badge {
	position: absolute;
	top: 8px;
	padding: 4px 8px;
	font-size: 0.75rem;
	font-weight: 700;
	border-radius: 4px;
	color: #fff;
	line-height: 1;
}

.klyro-product-card__badge--sale {
	left: 8px;
	background: #e63946;
}

.klyro-product-card__badge--discount {
	right: 8px;
	background: #111;
}

.klyro-product-card__title {
	font-size: 1rem;
	margin: 0;
	padding: 0 0.75rem;
}

.klyro-product-card__title a {
	text-decoration: none;
	color: inherit;
}

.klyro-product-card__price {
	padding: 0 0.75rem;
	font-weight: 600;
}

.klyro-product-card__button {
	display: block;
	margin: 0.5rem 0.75rem 0.75rem;
	padding: 0.6rem 1rem;
	text-align: center;
	text-decoration: none;
	font-weight: 600;
	border-radius: 6px;
	background: #111;
	color: #fff;
	transition: background 0.15s ease;
}

.klyro-product-card__button:hover {
	background: #333;
	color: #fff;
}