/**
 * Van Isle Gift Baskets — WooCommerce brand styling.
 *
 * Loaded only on store pages (see vigb_enqueue_assets). Colour tokens come
 * from :root vars defined in foundation.css. Targets classic templates
 * (shop archive, single product) and the Cart/Checkout blocks.
 */

/* =====================================================================
   Shared: buttons, links, headings
   ===================================================================== */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce .button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button,
.woocommerce input.button.alt {
	background-color: var(--vigb-deep-kelp);
	color: var(--vigb-warm-ivory);
	border: 0;
	border-radius: 2px;
	padding: 12px 24px;
	font-family: Manrope, system-ui, sans-serif;
	font-weight: 600;
	font-size: 0.9rem;
	letter-spacing: 0.02em;
	text-transform: none;
	transition: background-color 0.2s ease;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce .button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button:hover {
	background-color: #12241f;
	color: var(--vigb-warm-ivory);
}

.woocommerce a.button:focus-visible,
.woocommerce button.button:focus-visible,
.woocommerce .button:focus-visible {
	outline: 2px solid var(--vigb-cedar);
	outline-offset: 2px;
}

.woocommerce a {
	color: var(--vigb-charcoal);
}

.woocommerce a:hover {
	color: var(--vigb-cedar);
}

.woocommerce .price,
.woocommerce .amount {
	color: var(--vigb-charcoal);
	font-family: Manrope, system-ui, sans-serif;
}

/* =====================================================================
   1. Shop archive
   ===================================================================== */
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
	display: none !important;
}

.woocommerce ul.products,
.woocommerce-page ul.products {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: clamp(24px, 3vw, 40px);
	margin: 0 0 clamp(40px, 5vw, 64px);
	padding: 0;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
	display: none !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
	width: auto !important;
	float: none !important;
	margin: 0 !important;
	text-align: left;
	padding: 0;
}

/* Square image, consistent crop, subtle scale on hover */
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
	display: block;
	overflow: hidden;
	margin-bottom: 16px;
	text-decoration: none;
}

.woocommerce ul.products li.product a img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	margin: 0;
	transition: transform 0.5s ease;
}

.woocommerce ul.products li.product:hover a img,
.woocommerce ul.products li.product:focus-within a img {
	transform: scale(1.04);
}

/* Name in Cormorant, underline on hover */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-weight: 500;
	font-size: 1.5rem;
	line-height: 1.15;
	color: var(--vigb-charcoal);
	padding: 0;
	margin: 0 0 6px;
	text-decoration: none;
}

.woocommerce ul.products li.product:hover .woocommerce-loop-product__title,
.woocommerce ul.products li.product:focus-within .woocommerce-loop-product__title {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

.woocommerce ul.products li.product .price {
	display: block;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 1rem;
	font-weight: 500;
	color: var(--vigb-charcoal);
	margin: 0 0 14px;
}

.woocommerce ul.products li.product .button {
	display: inline-block;
	margin: 0;
}

/* --- Block-based archive (WooCommerce Product Collection block) --- */
li.wc-block-product {
	text-align: left;
}

li.wc-block-product .wc-block-components-product-image,
li.wc-block-product .wc-block-grid__product-image {
	overflow: hidden;
	margin-bottom: 16px;
}

li.wc-block-product .wc-block-components-product-image img,
li.wc-block-product img.attachment-woocommerce_thumbnail {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	transition: transform 0.5s ease;
}

li.wc-block-product:hover .wc-block-components-product-image img,
li.wc-block-product:focus-within .wc-block-components-product-image img {
	transform: scale(1.04);
}

li.wc-block-product .wp-block-post-title {
	text-align: left;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-weight: 500;
	font-size: 1.5rem;
	line-height: 1.15;
	margin: 0 0 6px;
}

li.wc-block-product .wp-block-post-title a {
	color: var(--vigb-charcoal);
	text-decoration: none;
}

li.wc-block-product:hover .wp-block-post-title a,
li.wc-block-product:focus-within .wp-block-post-title a {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

li.wc-block-product .wp-block-woocommerce-product-price,
li.wc-block-product .wc-block-components-product-price {
	text-align: left;
	font-family: Manrope, system-ui, sans-serif;
	font-size: 1rem;
	font-weight: 500;
	color: var(--vigb-charcoal);
	margin: 0 0 14px;
}

li.wc-block-product .wp-block-button.wc-block-components-product-button,
li.wc-block-product .wc-block-components-product-button.align-center {
	justify-content: flex-start;
	text-align: left;
}

li.wc-block-product .wp-block-button__link,
li.wc-block-product .wc-block-components-product-button a.button,
li.wc-block-product .wc-block-components-product-button button {
	background-color: var(--vigb-deep-kelp);
	color: var(--vigb-warm-ivory);
	border-radius: 2px;
	font-family: Manrope, system-ui, sans-serif;
	font-weight: 600;
	font-size: 0.9rem;
	letter-spacing: 0.02em;
	padding: 12px 24px;
}

li.wc-block-product .wp-block-button__link:hover,
li.wc-block-product .wc-block-components-product-button a.button:hover {
	background-color: #12241f;
	color: var(--vigb-warm-ivory);
}

/* Hide the block archive's result count / sorting controls too */
.wc-block-product-collection .wc-block-product-collection__no-results,
.wp-block-woocommerce-product-collection-no-results {
	/* keep no-results message */
}

/* =====================================================================
   2. Single product
   ===================================================================== */
.woocommerce .woocommerce-breadcrumb {
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.85rem;
	color: var(--vigb-charcoal);
	margin-bottom: clamp(24px, 4vw, 40px);
}

.woocommerce .woocommerce-breadcrumb a {
	color: var(--vigb-charcoal);
	text-decoration: none;
}

.woocommerce .woocommerce-breadcrumb a:hover {
	color: var(--vigb-cedar);
	text-decoration: underline;
}

.woocommerce div.product .product_title {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-weight: 500;
	font-size: clamp(2rem, 3.5vw, 2.75rem);
	line-height: 1.1;
	color: var(--vigb-charcoal);
	margin-bottom: 12px;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
	font-family: Manrope, system-ui, sans-serif;
	font-size: 1.35rem;
	font-weight: 500;
	color: var(--vigb-charcoal);
	margin-bottom: 20px;
}

.woocommerce div.product .woocommerce-product-details__short-description {
	font-family: Manrope, system-ui, sans-serif;
	line-height: 1.7;
	color: var(--vigb-charcoal);
	margin-bottom: 24px;
}

/* Quantity stepper */
.woocommerce .quantity input.qty,
.woocommerce div.product form.cart .quantity .qty {
	background-color: var(--vigb-base-white);
	border: 1px solid var(--vigb-driftwood);
	border-radius: 2px;
	padding: 12px 8px;
	width: 4.5em;
	font-family: Manrope, system-ui, sans-serif;
	color: var(--vigb-charcoal);
}

.woocommerce .quantity input.qty:focus {
	outline: none;
	border-color: var(--vigb-deep-kelp);
	box-shadow: 0 0 0 2px rgba(24, 48, 45, 0.35);
}

.woocommerce div.product form.cart {
	margin-bottom: 28px;
}

.woocommerce div.product form.cart .button {
	padding: 14px 32px;
	vertical-align: middle;
}

/* Category links / product meta */
.woocommerce div.product .product_meta {
	font-family: Manrope, system-ui, sans-serif;
	font-size: 0.85rem;
	color: var(--vigb-driftwood);
	border-top: 1px solid var(--vigb-driftwood);
	padding-top: 18px;
}

.woocommerce div.product .product_meta a {
	color: var(--vigb-charcoal);
	text-decoration: none;
}

.woocommerce div.product .product_meta a:hover {
	color: var(--vigb-cedar);
	text-decoration: underline;
}

/* Tabs -> clean description section (tab nav hidden; reviews removed via PHP) */
.woocommerce div.product .woocommerce-tabs ul.tabs {
	display: none;
}

.woocommerce div.product .woocommerce-tabs .panel {
	margin: 0;
	padding: 0;
	font-family: Manrope, system-ui, sans-serif;
	line-height: 1.7;
	color: var(--vigb-charcoal);
}

.woocommerce div.product .woocommerce-tabs {
	border-top: 1px solid var(--vigb-driftwood);
	padding-top: clamp(32px, 4vw, 48px);
	margin-top: clamp(32px, 4vw, 48px);
}

.woocommerce div.product .woocommerce-tabs .panel > h2:first-child {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-weight: 500;
	font-size: 1.75rem;
	color: var(--vigb-charcoal);
}

/* =====================================================================
   Related products ("You may also like")
   ===================================================================== */
.woocommerce .related.products,
.woocommerce .up-sells.products {
	border-top: 1px solid var(--vigb-driftwood);
	padding-top: clamp(40px, 5vw, 64px);
	margin-top: clamp(40px, 5vw, 64px);
}

.woocommerce .related.products > h2,
.woocommerce .up-sells.products > h2 {
	font-family: "Cormorant Garamond", Georgia, serif;
	font-weight: 500;
	font-size: clamp(1.75rem, 3vw, 2.25rem);
	color: var(--vigb-charcoal);
	margin-bottom: clamp(24px, 3vw, 40px);
	text-align: left;
}

/* =====================================================================
   3. Cart (block)
   ===================================================================== */
.wp-block-woocommerce-cart .wc-block-cart-items__header,
.wc-block-cart-items__header {
	font-family: Manrope, system-ui, sans-serif;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.75rem;
	color: var(--vigb-charcoal);
	border-bottom: 1px solid var(--vigb-driftwood);
}

.wc-block-cart__totals-title,
.wc-block-components-totals-item__label {
	font-family: Manrope, system-ui, sans-serif;
}

.wc-block-cart__totals-title {
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 0.75rem;
	color: var(--vigb-charcoal);
}

.wc-block-cart-item__product-name,
.wc-block-components-product-name {
	font-family: "Cormorant Garamond", Georgia, serif !important;
	font-size: 1.25rem;
	color: var(--vigb-charcoal);
}

/* Quantity stepper (cart block) */
.wc-block-components-quantity-selector {
	border: 1px solid var(--vigb-driftwood);
	border-radius: 2px;
}

.wc-block-components-quantity-selector input.wc-block-components-quantity-selector__input {
	font-family: Manrope, system-ui, sans-serif;
	color: var(--vigb-charcoal);
}

.wc-block-components-quantity-selector__button {
	color: var(--vigb-charcoal);
}

/* Coupon accordion + panels */
.wc-block-components-totals-coupon,
.wc-block-components-panel {
	border: 1px solid var(--vigb-driftwood);
	border-radius: 2px;
}

.wc-block-components-panel__button {
	font-family: Manrope, system-ui, sans-serif;
	font-weight: 600;
	color: var(--vigb-charcoal);
}

/* Cart totals panel surface */
.wc-block-cart .wc-block-components-sidebar {
	background-color: var(--vigb-base-white);
	border: 1px solid var(--vigb-driftwood);
	border-radius: 2px;
	padding: 24px;
}

/* =====================================================================
   4. Checkout (block)
   ===================================================================== */
.wc-block-components-text-input input,
.wc-block-components-text-input .input-text,
.wc-block-checkout select,
.wc-block-components-select .components-form-token-field__input,
.wc-block-components-address-form input,
.wc-block-components-address-form select {
	background-color: var(--vigb-base-white) !important;
	border: 1px solid var(--vigb-driftwood) !important;
	border-radius: 2px !important;
	font-family: Manrope, system-ui, sans-serif;
	color: var(--vigb-charcoal);
}

.wc-block-components-text-input input:focus,
.wc-block-components-text-input .input-text:focus,
.wc-block-checkout select:focus,
.wc-block-components-address-form input:focus {
	outline: none !important;
	border-color: var(--vigb-deep-kelp) !important;
	box-shadow: 0 0 0 2px rgba(24, 48, 45, 0.35) !important;
}

.wc-block-components-text-input label,
.wc-block-components-checkout-step__description,
.wc-block-components-form .wc-block-components-text-input label {
	font-family: Manrope, system-ui, sans-serif;
	color: var(--vigb-charcoal);
}

/* Section headings */
.wc-block-components-checkout-step__title,
.wc-block-components-title,
.wc-block-components-checkout-step__heading-content {
	font-family: "Cormorant Garamond", Georgia, serif !important;
	font-weight: 500 !important;
	color: var(--vigb-charcoal) !important;
}

.wc-block-components-checkout-step__title {
	font-size: 1.5rem !important;
}

/* Order summary panel */
.wc-block-components-sidebar,
.wp-block-woocommerce-checkout-order-summary-block {
	background-color: var(--vigb-warm-ivory);
	border: 1px solid var(--vigb-driftwood);
	border-radius: 2px;
}

.wc-block-components-order-summary-item__name,
.wc-block-components-product-metadata {
	font-family: "Cormorant Garamond", Georgia, serif;
	color: var(--vigb-charcoal);
}

.wc-block-components-totals-item,
.wc-block-components-order-summary__content {
	font-family: Manrope, system-ui, sans-serif;
	color: var(--vigb-charcoal);
}

/* =====================================================================
   Block buttons (cart + checkout): deep-kelp
   ===================================================================== */
.wc-block-components-button.wc-block-components-button.contained,
.wp-block-woocommerce-cart .wc-block-cart__submit-button,
.wc-block-components-button.contained {
	background-color: var(--vigb-deep-kelp);
	color: var(--vigb-warm-ivory);
	border-radius: 2px;
	font-family: Manrope, system-ui, sans-serif;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.wc-block-components-button.wc-block-components-button.contained:hover,
.wc-block-components-button.contained:hover {
	background-color: #12241f;
}

.wc-block-components-button.wc-block-components-button.contained:focus-visible {
	outline: 2px solid var(--vigb-cedar);
	outline-offset: 2px;
}

/* Text/outline block buttons and links -> cedar on hover */
.wc-block-components-button.text:hover,
.wc-block-components-address-card__edit:hover,
a.wc-block-cart__shopping-button:hover {
	color: var(--vigb-cedar);
}
