/**
 * Negar Theme — WooCommerce base styles.
 *
 * Only brand alignment on top of WooCommerce's own stylesheets (which stay
 * enabled). Detailed product/archive/cart styling belongs to later phases.
 */

/* Product search form (WooCommerce template: product-searchform.php, e.g. on 404).
   The header uses its own form (template-parts/header/search.php, styled in main.css). */
.woocommerce-product-search:not(.header-search) {
	position: relative;
	display: flex;
	gap: var(--space-2);
}

.woocommerce-product-search .search-field {
	flex: 1 1 auto;
}

/* Buttons */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
	border-radius: var(--radius-sm);
	background: var(--color-surface-warm);
	color: var(--color-text);
	font-family: inherit;
	font-weight: var(--font-weight-medium);
}

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

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce ul.products li.product .button.add_to_cart_button,
.woocommerce .single_add_to_cart_button {
	background: var(--color-primary);
	color: var(--color-white);
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce ul.products li.product .button.add_to_cart_button:hover,
.woocommerce .single_add_to_cart_button:hover {
	background: var(--color-primary-strong);
	color: var(--color-white);
}

.woocommerce a.added_to_cart {
	color: var(--color-accent-strong);
}

/* Price & badges */
.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
	color: var(--color-text);
	font-weight: var(--font-weight-bold);
}

.woocommerce ul.products li.product .price del,
.woocommerce div.product p.price del {
	color: var(--color-text-muted);
	font-weight: var(--font-weight-regular);
}

/* Badge sits inside the image corner so overflow containers (rails) never clip it. */
.woocommerce ul.products li.product span.onsale {
	inset-block-start: var(--space-2);
	inset-inline: var(--space-2) auto;
	margin: 0;
}

.woocommerce span.onsale {
	min-width: 0;
	min-height: 0;
	padding: 0.15rem 0.6rem;
	border-radius: var(--radius-pill);
	background: var(--color-secondary);
	color: var(--color-text);
	font-weight: var(--font-weight-bold);
	line-height: 1.6;
}

/* Product card (archives + rails) */
.woocommerce ul.products li.product a img {
	border-radius: var(--radius-md);
	aspect-ratio: 1;
	object-fit: cover;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
	color: var(--color-text);
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-medium);
	line-height: var(--line-height-tight);
}

/* Breadcrumb, notices, tabs */
.woocommerce .woocommerce-breadcrumb {
	margin-block-end: var(--space-5);
	color: var(--color-text-muted);
	font-size: var(--font-size-sm);
}

.woocommerce .woocommerce-breadcrumb a {
	color: var(--color-accent-strong);
}

.woocommerce-message,
.woocommerce-info {
	border-top-color: var(--color-accent);
}

.woocommerce-message::before,
.woocommerce-info::before {
	color: var(--color-accent);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
	border-bottom-color: var(--color-white);
}

/* Layout of WooCommerce pages inside the theme wrapper */
.site-main--woocommerce .woocommerce-products-header {
	margin-block-end: var(--space-5);
}

/* Checkout and address forms: a single country (inc/checkout.php) needs no selector.
   The field stays in the form (value submitted), only hidden. */
.negar-single-country .negar-hidden-country,
.negar-single-country .wc-block-components-address-form__country,
.negar-single-country .wc-block-components-country-input {
	display: none;
}
