/*
 * Nestora WooCommerce styles: shop archive, cart, checkout and My account.
 * Loaded only on WooCommerce pages. Licensed under GPL-2.0-or-later, same as the theme.
 */

/* Notices */
.woocommerce-info,
.woocommerce-message,
.woocommerce-error {
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
	list-style: none;
	background: #fff;
	border-left: 4px solid var(--nst-brand);
	border-radius: var(--nst-radius);
}
.woocommerce-error { border-left-color: #b3261e; }

/* Shop archive */
.nestora-shop { padding-bottom: 4rem; }
.shop-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.shop-toolbar .woocommerce-result-count { margin: 0; }
.shop-toolbar select { width: auto; }
.nestora-shop ul.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2.5rem 1.5rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.nestora-shop ul.products::before, .nestora-shop ul.products::after { content: none; }
.nestora-shop ul.products li.product { float: none; width: auto; margin: 0; text-align: center; }
.nestora-shop ul.products li.product img { width: 100%; border-radius: var(--nst-radius); }
.nestora-shop ul.products li.product .woocommerce-loop-product__title { font-size: 1.05rem; }
.nestora-shop ul.products li.product .price { display: block; margin-bottom: .75rem; font-weight: 700; color: var(--nst-ink); }
.nestora-shop ul.products li.product .button { display: inline-block; padding: .6rem 1.2rem; font-weight: 600; color: #fff; text-decoration: none; background: var(--nst-ink); border-radius: 999px; }
.nestora-shop ul.products li.product .button:hover { background: var(--nst-brand); }

/* Pages that use the standard WooCommerce shortcodes or blocks use the full width. */
.woocommerce-cart .entry,
.woocommerce-checkout .entry,
.woocommerce-account .entry { max-width: 1140px; }

/* Classic cart, checkout and account tables */
.woocommerce table.shop_table { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
.woocommerce table.shop_table th,
.woocommerce table.shop_table td { padding: .9rem .75rem; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--nst-line); }
.woocommerce table.cart img { width: 72px; height: auto; border-radius: var(--nst-radius); }
.woocommerce .quantity .qty { width: 5rem; }
.woocommerce form .form-row { margin-bottom: 1.1rem; }
.woocommerce form .form-row label .required { color: #b3261e; text-decoration: none; }
.woocommerce-checkout #payment { padding: 1.25rem; background: #fff; border-radius: var(--nst-radius); }
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.wc-block-components-button:not(.is-link) {
	display: inline-block;
	padding: .75rem 1.5rem;
	font-weight: 600;
	color: #fff;
	text-decoration: none;
	background: var(--nst-ink);
	border: 0;
	border-radius: 999px;
	cursor: pointer;
}
.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.wc-block-components-button:not(.is-link):hover { color: #fff; background: var(--nst-brand); }
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt { color: var(--nst-ink); background: var(--nst-accent); }
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover { color: var(--nst-ink); background: var(--nst-accent-deep); }

/* Block-based cart and checkout */
.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout { color: var(--nst-text); }
.wc-block-components-text-input input,
.wc-block-components-select .wc-block-components-select__select { border-radius: var(--nst-radius); }

/* Stack the cart table on narrow screens (WooCommerce responsive table). */
@media (max-width: 767px) {
	.shop_table_responsive thead { display: none; }
	.shop_table_responsive tr { display: block; margin-bottom: 1.25rem; border: 1px solid var(--nst-line); border-radius: var(--nst-radius); background: #fff; }
	.shop_table_responsive td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 1px solid var(--nst-line); }
	.shop_table_responsive td::before { content: attr(data-title); font-weight: 600; color: var(--nst-ink); }
	.shop_table_responsive td.product-thumbnail::before, .shop_table_responsive td.product-remove::before { content: none; }
}
