/**
 * Custom CSS for Detro HomeDesign Theme
 * Additional styles beyond theme.json
 */

/* Sticky Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	background-color: var(--wp--preset--color--primary);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	transition: box-shadow 0.3s ease;
}

/* Smooth scrolling */
html {
	scroll-behavior: smooth;
}

/* WooCommerce Product Grid */
.woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: var(--wp--preset--spacing--large);
	list-style: none;
	padding: 0;
}

.woocommerce ul.products li.product {
	margin-bottom: 0;
}

/* Product Card Styling */
.woocommerce ul.products li.product .woocommerce-loop-product__link {
	display: block;
	text-decoration: none;
	color: inherit;
}

.woocommerce ul.products li.product img {
	width: 100%;
	height: auto;
	border-radius: 4px;
}

.woocommerce ul.products li.product .price {
	color: var(--wp--preset--color--accent);
	font-weight: 600;
}

/* Cart & Checkout Styling */
.woocommerce-cart .cart-collaterals,
.woocommerce-checkout .cart-collaterals {
	margin-top: var(--wp--preset--spacing--huge);
}

.woocommerce table.shop_table {
	border-collapse: collapse;
	width: 100%;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
	padding: var(--wp--preset--spacing--medium);
	border-bottom: 1px solid var(--wp--preset--color--neutral);
}

/* Form Styling */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	width: 100%;
	padding: var(--wp--preset--spacing--small);
	border: 1px solid var(--wp--preset--color--neutral);
	border-radius: 4px;
}

/* Button Styling */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
	background-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--primary);
	border: none;
	padding: var(--wp--preset--spacing--medium) var(--wp--preset--spacing--large);
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
	background-color: var(--wp--preset--color--text-dark);
}

/* Gallery Lightbox */
.gallery-lightbox {
	cursor: pointer;
}

.gallery-lightbox img {
	transition: opacity 0.3s ease;
}

.gallery-lightbox:hover img {
	opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
	.woocommerce ul.products {
		grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
		gap: var(--wp--preset--spacing--medium);
	}

	.woocommerce table.shop_table {
		font-size: 0.875rem;
	}

	.woocommerce table.shop_table th,
	.woocommerce table.shop_table td {
		padding: var(--wp--preset--spacing--small);
	}
}

/* Accessibility */
.skip-link {
	position: absolute;
	left: -9999px;
	z-index: 999999;
}

.skip-link:focus {
	left: 6px;
	top: 7px;
	background: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--primary);
	padding: var(--wp--preset--spacing--small) var(--wp--preset--spacing--medium);
	text-decoration: none;
}

/* Focus States */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}
