/**
 * AlmaLinux Shop: store-specific styles that theme.json can't express.
 * Colors come from the theme.json palette through --wp--preset--color--* variables.
 */

/* Header ------------------------------------------------------------- */

.al-shop-logo img {
	display: block;
}

.al-shop-wordmark {
	margin: 0;
	padding-left: var(--wp--preset--spacing--20);
	border-left: 1px solid color-mix(in srgb, var(--wp--preset--color--al-text-on-dark) 35%, transparent);
	line-height: 1;
	white-space: nowrap;
}

.al-shop-header a:focus-visible,
.al-shop-header button:focus-visible,
.al-shop-footer a:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-2);
	outline-offset: 2px;
}

.al-shop-header .wc-block-customer-account a,
.al-shop-header .wc-block-mini-cart__button {
	color: var(--wp--preset--color--al-text-on-dark);
}

.al-shop-header .wc-block-customer-account svg,
.al-shop-header .wc-block-mini-cart__icon {
	fill: currentColor;
}

/* Keep the "Shop" label from crowding the icons on small phones. */
@media (max-width: 420px) {
	.al-shop-wordmark {
		display: none;
	}
}

/* Product listings --------------------------------------------------- */

.al-shop-toolbar {
	gap: var(--wp--preset--spacing--30);
	align-items: center;
}

.al-shop-search .wp-block-search__input {
	border: 1px solid var(--wp--preset--color--al-border);
	border-radius: 6px;
	padding: 0.5rem 0.75rem;
}

.al-shop-grid .wc-block-components-product-image,
.wp-block-woocommerce-product-image-gallery img {
	background: var(--wp--preset--color--accent-5);
	border-radius: 8px;
	overflow: hidden;
}

.al-shop-grid .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--contrast);
}

.al-shop-grid .wp-block-post-title a:hover {
	text-decoration: underline;
}

/* Sale badge: brand yellow with dark ink, per the design system. */
.wc-block-components-product-sale-badge {
	background: var(--wp--preset--color--accent-1);
	color: var(--wp--preset--color--contrast);
	border: 0;
	border-radius: 4px;
	font-weight: 600;
}

/* Outline buttons: navy outline on light surfaces. */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--al-deep-blue);
	border: 2px solid var(--wp--preset--color--al-deep-blue);
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--al-deep-blue);
	color: var(--wp--preset--color--al-text-on-dark);
}

/* Category list on the front page: simple pill links. */
.al-shop-category-list ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--wp--preset--spacing--20);
	list-style: none;
	margin: 0;
	padding: 0;
}

.al-shop-category-list li a {
	display: inline-block;
	padding: 0.5rem 1rem;
	border: 1px solid var(--wp--preset--color--al-border);
	border-radius: 999px;
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	text-decoration: none;
}

.al-shop-category-list li a:hover {
	border-color: var(--wp--preset--color--accent-3);
	color: var(--wp--preset--color--accent-3);
}

/* Footer ------------------------------------------------------------- */

.al-shop-footer-heading {
	font-family: var(--wp--preset--font-family--system);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-size: var(--wp--preset--font-size--small);
}

.al-shop-footer-list {
	list-style: none;
	padding-left: 0;
}

.al-shop-footer-list li {
	margin-bottom: 0.4rem;
}

.al-shop-footer-legal {
	margin-top: var(--wp--preset--spacing--50);
	padding-top: var(--wp--preset--spacing--30);
	border-top: 1px solid var(--wp--preset--color--al-card);
	color: var(--wp--preset--color--accent-2);
}

/* Error states use the darker red so text passes WCAG AA on white. */
.wc-block-components-validation-error,
.wc-block-components-text-input.has-error label {
	color: var(--wp--preset--color--al-red);
}
