/*
 * woocommerce.css — Espresso Bar theme
 *
 * Overrides WooCommerce default styles to match the Espresso Bar design system.
 * All color, typography, and spacing values use --wp--preset--* variables from theme.json.
 * Loaded only when WooCommerce is active (see functions.php).
 *
 * Sections:
 *   1. Buttons
 *   2. Notices
 *   3. Sale badge
 *   4. Star ratings
 *   5. Product loop (archive / shop)
 *   6. Single product
 *   7. Cart
 *   8. Checkout
 *   9. My Account
 */


/* ─── 1. Buttons ─────────────────────────────────────────────────────────── */

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #payment #place_order,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	display: inline-block;
	background-color: var(--wp--preset--color--rosso);
	color: var(--wp--preset--color--crema);
	font-family: var(--wp--preset--font-family--condensed);
	font-size: var(--wp--preset--font-size--micro);
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
	border: none;
	border-radius: 1px;
	padding: 0.8125rem 1.875rem;
	cursor: pointer;
	transition: background-color 0.15s ease;
	line-height: 1.4;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce #payment #place_order:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover {
	background-color: #5E1814;
	color: var(--wp--preset--color--crema);
}

.woocommerce a.button:focus-visible,
.woocommerce button.button:focus-visible,
.woocommerce input.button:focus-visible,
.woocommerce #respond input#submit:focus-visible,
.woocommerce a.button.alt:focus-visible,
.woocommerce button.button.alt:focus-visible,
.woocommerce input.button.alt:focus-visible,
.woocommerce #payment #place_order:focus-visible,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:focus-visible {
	outline: 2px solid var(--wp--preset--color--rosso);
	outline-offset: 2px;
}

/* Disabled state */
.woocommerce a.button.disabled,
.woocommerce a.button:disabled,
.woocommerce button.button:disabled,
.woocommerce input.button:disabled {
	background-color: rgba(43, 23, 17, 0.2);
	color: rgba(43, 23, 17, 0.4);
	cursor: not-allowed;
}


/* ─── 2. Notices ─────────────────────────────────────────────────────────── */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.wc-block-components-notice-banner {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	border-top: none;
	border-radius: 1px;
	padding: 1rem 1.25rem;
	margin-bottom: var(--wp--preset--spacing--4);
}

.woocommerce-message {
	background-color: rgba(108, 112, 73, 0.1);
	border-left: 3px solid var(--wp--preset--color--olive);
	color: var(--wp--preset--color--espresso);
}

.woocommerce-info {
	background-color: rgba(183, 110, 60, 0.1);
	border-left: 3px solid var(--wp--preset--color--caramello);
	color: var(--wp--preset--color--espresso);
}

.woocommerce-error {
	background-color: rgba(124, 32, 27, 0.08);
	border-left: 3px solid var(--wp--preset--color--rosso);
	color: var(--wp--preset--color--espresso);
}

.woocommerce-message::before,
.woocommerce-info::before {
	display: none;
}

.woocommerce-message a.button,
.woocommerce-info a.button {
	float: none;
	padding: 0.5rem 1.25rem;
	font-size: var(--wp--preset--font-size--micro);
	margin-right: 0.75rem;
}


/* ─── 3. Sale badge ──────────────────────────────────────────────────────── */

.woocommerce span.onsale {
	background-color: var(--wp--preset--color--rosso);
	color: var(--wp--preset--color--crema);
	font-family: var(--wp--preset--font-family--condensed);
	font-size: var(--wp--preset--font-size--micro);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	border-radius: 1px;
	padding: 0.3rem 0.6rem;
	min-height: auto;
	min-width: auto;
	line-height: 1.4;
}


/* ─── 4. Star ratings ────────────────────────────────────────────────────── */

.woocommerce .star-rating {
	color: var(--wp--preset--color--caramello);
	font-size: var(--wp--preset--font-size--small);
}

.woocommerce .star-rating span::before {
	color: var(--wp--preset--color--caramello);
}

.woocommerce p.stars a {
	color: var(--wp--preset--color--caramello);
}

.woocommerce p.stars a:hover,
.woocommerce p.stars a.active {
	color: var(--wp--preset--color--caramello);
}


/* ─── 5. Product loop ────────────────────────────────────────────────────── */

.woocommerce ul.products {
	gap: var(--wp--preset--spacing--5);
}

.woocommerce ul.products li.product {
	text-align: left;
}

.woocommerce ul.products li.product a img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	margin-bottom: var(--wp--preset--spacing--3);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2 {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	line-height: 1.15;
	color: var(--wp--preset--color--espresso);
	padding: 0;
	margin-bottom: 0.25rem;
}

.woocommerce ul.products li.product .price {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--espresso);
	font-variant-numeric: tabular-nums;
	margin-bottom: var(--wp--preset--spacing--3);
}

.woocommerce ul.products li.product .price del {
	color: rgba(43, 23, 17, 0.4);
	margin-right: 0.375rem;
}

.woocommerce ul.products li.product .price ins {
	text-decoration: none;
	color: var(--wp--preset--color--rosso);
}

.woocommerce ul.products li.product a.button {
	width: 100%;
	text-align: center;
}


/* ─── 6. Single product ──────────────────────────────────────────────────── */

.woocommerce div.product .product_title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	line-height: 1.08;
	color: var(--wp--preset--color--espresso);
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--x-large);
	color: var(--wp--preset--color--espresso);
	font-variant-numeric: tabular-nums;
}

.woocommerce div.product p.price ins,
.woocommerce div.product span.price ins {
	color: var(--wp--preset--color--rosso);
	text-decoration: none;
}

.woocommerce div.product p.price del,
.woocommerce div.product span.price del {
	color: rgba(43, 23, 17, 0.4);
}

.woocommerce div.product .woocommerce-product-details__short-description {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--body);
	line-height: 1.65;
	color: var(--wp--preset--color--espresso);
}

/* Quantity input */
.woocommerce div.product form.cart .quantity input.qty {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--medium);
	border: 1px solid rgba(43, 23, 17, 0.25);
	border-radius: 1px;
	color: var(--wp--preset--color--espresso);
	background: transparent;
	padding: 0.625rem 0.75rem;
	width: 4.5rem;
	text-align: center;
}

.woocommerce div.product form.cart .quantity input.qty:focus-visible {
	outline: 2px solid var(--wp--preset--color--rosso);
	outline-offset: 2px;
}

/* Single add to cart button */
.woocommerce div.product form.cart .single_add_to_cart_button {
	margin-left: 0.75rem;
}

/* Product meta (SKU, categories, tags) */
.woocommerce div.product .product_meta {
	font-family: var(--wp--preset--font-family--condensed);
	font-size: var(--wp--preset--font-size--micro);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(43, 23, 17, 0.55);
	border-top: 1px solid rgba(43, 23, 17, 0.1);
	padding-top: var(--wp--preset--spacing--3);
	margin-top: var(--wp--preset--spacing--3);
}

.woocommerce div.product .product_meta a {
	color: var(--wp--preset--color--rosso);
}

/* Tabs */
.woocommerce div.product .woocommerce-tabs ul.tabs {
	border-bottom: 1px solid rgba(43, 23, 17, 0.15);
	padding: 0;
	margin-bottom: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before {
	border-bottom: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
	background: transparent;
	border: none;
	border-radius: 0;
	margin: 0 var(--wp--preset--spacing--2) 0 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
	font-family: var(--wp--preset--font-family--condensed);
	font-size: var(--wp--preset--font-size--micro);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(43, 23, 17, 0.5);
	padding: 0.75rem 0;
	display: block;
	border-bottom: 2px solid transparent;
	text-decoration: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a,
.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
	color: var(--wp--preset--color--espresso);
	border-bottom-color: var(--wp--preset--color--rosso);
}

.woocommerce div.product .woocommerce-tabs .panel {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--body);
	line-height: 1.65;
	padding-top: var(--wp--preset--spacing--4);
}


/* ─── 7. Cart ─────────────────────────────────────────────────────────────── */

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

.woocommerce table.cart th {
	font-family: var(--wp--preset--font-family--condensed);
	font-size: var(--wp--preset--font-size--micro);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(43, 23, 17, 0.5);
	border-bottom: 1px solid rgba(43, 23, 17, 0.15);
	padding: 0.75rem 0;
}

.woocommerce table.cart td {
	border-bottom: 1px solid rgba(43, 23, 17, 0.1);
	padding: var(--wp--preset--spacing--3) 0;
	vertical-align: middle;
}

.woocommerce table.cart .product-name a {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	color: var(--wp--preset--color--espresso);
	text-decoration: none;
}

.woocommerce table.cart .product-name a:hover {
	color: var(--wp--preset--color--rosso);
}

.woocommerce table.cart .product-price,
.woocommerce table.cart .product-subtotal {
	font-family: var(--wp--preset--font-family--body);
	font-variant-numeric: tabular-nums;
}

.woocommerce table.cart td.actions {
	padding-top: var(--wp--preset--spacing--3);
	border-bottom: none;
}

.woocommerce-cart .cart-collaterals .cart_totals {
	float: none;
	width: 100%;
	max-width: 420px;
	margin-left: auto;
}

.woocommerce-cart .cart_totals table {
	width: 100%;
}

.woocommerce-cart .cart_totals table th,
.woocommerce-cart .cart_totals table td {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--body);
	border-bottom: 1px solid rgba(43, 23, 17, 0.1);
	padding: 0.75rem 0;
}

.woocommerce-cart .cart_totals .order-total th,
.woocommerce-cart .cart_totals .order-total td {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	border-bottom: none;
}

.woocommerce-cart .cart_totals .order-total .amount {
	font-variant-numeric: tabular-nums;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
	display: block;
	text-align: center;
	width: 100%;
	margin-top: var(--wp--preset--spacing--3);
}


/* ─── 8. Checkout ─────────────────────────────────────────────────────────── */

.woocommerce-checkout h3,
.woocommerce-checkout #order_review_heading {
	font-family: var(--wp--preset--font-family--condensed);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(43, 23, 17, 0.55);
	border-bottom: 1px solid rgba(43, 23, 17, 0.12);
	padding-bottom: 0.75rem;
	margin-bottom: var(--wp--preset--spacing--3);
}

.woocommerce form .form-row label {
	font-family: var(--wp--preset--font-family--condensed);
	font-size: var(--wp--preset--font-size--micro);
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(43, 23, 17, 0.65);
	display: block;
	margin-bottom: 0.35rem;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--body);
	color: var(--wp--preset--color--espresso);
	background-color: transparent;
	border: 1px solid rgba(43, 23, 17, 0.25);
	border-radius: 1px;
	padding: 0.625rem 0.875rem;
	width: 100%;
	box-sizing: border-box;
	transition: border-color 0.15s ease;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
	outline: none;
	border-color: var(--wp--preset--color--rosso);
}

/* Order review table in checkout */
.woocommerce-checkout-review-order table {
	width: 100%;
	border-collapse: collapse;
}

.woocommerce-checkout-review-order table th {
	font-family: var(--wp--preset--font-family--condensed);
	font-size: var(--wp--preset--font-size--micro);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(43, 23, 17, 0.5);
	padding: 0.5rem 0;
	border-bottom: 1px solid rgba(43, 23, 17, 0.15);
}

.woocommerce-checkout-review-order table td {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	padding: 0.625rem 0;
	border-bottom: 1px solid rgba(43, 23, 17, 0.08);
}

.woocommerce-checkout-review-order table .order-total td,
.woocommerce-checkout-review-order table .order-total th {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 700;
	border-bottom: none;
}

/* Payment section */
.woocommerce #payment {
	background: rgba(43, 23, 17, 0.03);
	border-radius: 1px;
	padding: var(--wp--preset--spacing--4);
}

.woocommerce #payment ul.payment_methods {
	border-bottom: 1px solid rgba(43, 23, 17, 0.1);
	padding-bottom: var(--wp--preset--spacing--3);
	margin-bottom: var(--wp--preset--spacing--3);
}

.woocommerce #payment ul.payment_methods li label {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--body);
	text-transform: none;
	letter-spacing: 0;
	color: var(--wp--preset--color--espresso);
	cursor: pointer;
}

.woocommerce #payment div.payment_box {
	background: rgba(43, 23, 17, 0.04);
	border-radius: 1px;
}

.woocommerce #payment #place_order {
	display: block;
	width: 100%;
	text-align: center;
}


/* ─── 9. My Account ───────────────────────────────────────────────────────── */

.woocommerce-account .woocommerce-MyAccount-navigation {
	width: auto;
	float: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
	list-style: none;
	padding: 0;
	margin: 0 0 var(--wp--preset--spacing--5) 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	border-bottom: 1px solid rgba(43, 23, 17, 0.12);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
	font-family: var(--wp--preset--font-family--condensed);
	font-size: var(--wp--preset--font-size--micro);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(43, 23, 17, 0.5);
	text-decoration: none;
	display: block;
	padding: 0.75rem var(--wp--preset--spacing--3) 0.75rem 0;
	border-bottom: 2px solid transparent;
	margin-bottom: -1px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover,
.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
	color: var(--wp--preset--color--espresso);
	border-bottom-color: var(--wp--preset--color--rosso);
}

.woocommerce-account .woocommerce-MyAccount-content {
	float: none;
	width: 100%;
}

.woocommerce-account .woocommerce-orders-table th {
	font-family: var(--wp--preset--font-family--condensed);
	font-size: var(--wp--preset--font-size--micro);
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: rgba(43, 23, 17, 0.5);
}

.woocommerce-account .woocommerce-orders-table td {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
}
