/* ==========================================================================
   GoBeyond Formation — WooCommerce styles (classic templates and blocks)
   ========================================================================== */

.gbf-woo-page { padding: 56px 0 96px; background: var(--gbf-soft); min-height: 50vh; }
.gbf-woo-title { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: 28px !important; }
.gbf-woo-main { padding-top: 0; }
.gbf-theme .woocommerce, .gbf-theme .woocommerce-page { font-family: var(--gbf-font); }

/* Buttons */
.gbf-theme .woocommerce a.button, .gbf-theme .woocommerce button.button, .gbf-theme .woocommerce input.button,
.gbf-theme .woocommerce #respond input#submit, .gbf-theme .woocommerce a.button.alt, .gbf-theme .woocommerce button.button.alt,
.gbf-theme .wc-block-components-button:not(.is-link), .gbf-theme .wp-element-button.wc-block-components-button {
	background: var(--gbf-blue); color: #fff; border: 0; border-radius: 12px; padding: 14px 24px; font-family: var(--gbf-font);
	font-weight: 700; font-size: 15px; line-height: 1.2; transition: background .2s, transform .2s; text-decoration: none;
}
.gbf-theme .woocommerce a.button:hover, .gbf-theme .woocommerce button.button:hover, .gbf-theme .woocommerce input.button:hover,
.gbf-theme .woocommerce a.button.alt:hover, .gbf-theme .woocommerce button.button.alt:hover, .gbf-theme .wc-block-components-button:not(.is-link):hover {
	background: var(--gbf-blue-600); color: #fff;
}
.gbf-theme .woocommerce button.button:disabled, .gbf-theme .woocommerce button.button:disabled[disabled] { background: #9AA4BA; color: #fff; }
.gbf-theme #place_order { width: 100%; padding: 18px 24px; font-size: 16px; border-radius: 14px; box-shadow: 0 8px 20px color-mix(in srgb, var(--gbf-blue) 28%, transparent); }

/* Fields */
.gbf-theme .woocommerce form .form-row { margin: 0 0 16px; padding: 0; }
.gbf-theme .woocommerce form .form-row label { font-size: 13px; font-weight: 600; color: var(--gbf-muted); margin-bottom: 6px; display: block; line-height: 1.4; }
.gbf-theme .woocommerce form .form-row .required { color: var(--gbf-red); text-decoration: none; }
.gbf-theme .woocommerce form .form-row input.input-text, .gbf-theme .woocommerce form .form-row textarea, .gbf-theme .woocommerce form .form-row select,
.gbf-theme .woocommerce-page form .form-row input.input-text, .gbf-theme .woocommerce input[type="email"], .gbf-theme .woocommerce input[type="tel"],
.gbf-theme .woocommerce input[type="text"], .gbf-theme .woocommerce input[type="password"], .gbf-theme .woocommerce input[type="number"], .gbf-theme .woocommerce select,
.gbf-theme .woocommerce textarea {
	width: 100%; border: 1.5px solid var(--gbf-line); border-radius: 12px; padding: 12px 14px; font-family: var(--gbf-font); font-size: 15px;
	background: #fff; color: var(--gbf-ink); line-height: 1.4; outline: none; transition: border-color .2s; box-shadow: none;
}
.gbf-theme .woocommerce input:focus, .gbf-theme .woocommerce select:focus, .gbf-theme .woocommerce textarea:focus { border-color: var(--gbf-blue); }
.gbf-theme .woocommerce form .form-row.woocommerce-invalid input.input-text, .gbf-theme .woocommerce form .form-row.woocommerce-invalid select { border-color: var(--gbf-red); }
.gbf-theme .select2-container--default .select2-selection--single { height: 48px; border: 1.5px solid var(--gbf-line); border-radius: 12px; }
.gbf-theme .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 45px; padding-left: 14px; color: var(--gbf-ink); }
.gbf-theme .select2-container--default .select2-selection--single .select2-selection__arrow { height: 46px; right: 8px; }
.gbf-theme .select2-dropdown { border-color: var(--gbf-line); border-radius: 12px; overflow: hidden; }
.gbf-theme .select2-container--default .select2-results__option--highlighted[aria-selected], .gbf-theme .select2-container--default .select2-results__option--highlighted[data-selected] { background: var(--gbf-blue); }
.gbf-theme .woocommerce input[type="file"] { border: 1.5px dashed var(--gbf-blue-100); border-radius: 12px; padding: 14px; background: var(--gbf-blue-50); width: 100%; }

/* Notices */
.gbf-theme .woocommerce-message, .gbf-theme .woocommerce-info, .gbf-theme .woocommerce-error, .gbf-theme .woocommerce-noreviews, .gbf-theme p.no-comments {
	border: 1px solid var(--gbf-line); border-left: 4px solid var(--gbf-blue); border-radius: 12px; background: #fff; color: var(--gbf-ink);
	padding: 16px 20px 16px 52px; font-size: 15px; margin-bottom: 24px; list-style: none;
}
.gbf-theme .woocommerce-message::before, .gbf-theme .woocommerce-info::before { color: var(--gbf-blue); top: 16px; left: 20px; }
.gbf-theme .woocommerce-error { border-left-color: var(--gbf-red); }
.gbf-theme .woocommerce-error::before { color: var(--gbf-red); top: 16px; left: 20px; }
.gbf-theme .woocommerce-message { border-left-color: var(--gbf-green); }
.gbf-theme .woocommerce-message::before { color: var(--gbf-green); }
.gbf-theme .woocommerce-info a, .gbf-theme .woocommerce-message a:not(.button) { color: var(--gbf-blue); font-weight: 700; }

/* Checkout (classic) */
.gbf-theme form.woocommerce-checkout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); column-gap: 32px; row-gap: 0; grid-template-rows: auto auto 1fr; align-items: start; }
.gbf-theme form.woocommerce-checkout > .woocommerce-NoticeGroup { grid-column: 1 / -1; }
/* Extra blocks added by checkout-field plugins sit in the left column under the customer details. */
.gbf-theme form.woocommerce-checkout > *:not(#customer_details):not(#order_review_heading):not(#order_review):not(.woocommerce-NoticeGroup) { grid-column: 1; }
.gbf-theme form.woocommerce-checkout > div:not(#customer_details):not(#order_review):not(.woocommerce-NoticeGroup):not(:empty) { margin-top: 24px; background: #fff; border: 1px solid var(--gbf-line); border-radius: 20px; padding: 28px; }
.gbf-theme form.woocommerce-checkout #customer_details { grid-column: 1; grid-row: 1 / span 3; align-self: start; background: #fff; border: 1px solid var(--gbf-line); border-radius: 20px; padding: 32px; }
.gbf-theme form.woocommerce-checkout #customer_details .col-1, .gbf-theme form.woocommerce-checkout #customer_details .col-2 { width: 100%; float: none; max-width: none; flex: none; }
.gbf-theme form.woocommerce-checkout #customer_details .col-2:not(:empty) { margin-top: 12px; }
.gbf-theme form.woocommerce-checkout #order_review_heading { grid-column: 2; grid-row: 1; margin: 0; font-size: 20px; background: #fff; border: 1px solid var(--gbf-line); border-bottom: 0; border-radius: 20px 20px 0 0; padding: 26px 28px 0; }
.gbf-theme form.woocommerce-checkout #order_review { grid-column: 2; grid-row: 2; background: #fff; border: 1px solid var(--gbf-line); border-top: 0; border-radius: 0 0 20px 20px; padding: 8px 28px 28px; position: sticky; top: calc(var(--gbf-admin-bar) + 110px); }
.gbf-theme .woocommerce-checkout h3 { font-size: 20px; margin: 8px 0 20px; }
.gbf-theme .woocommerce-checkout h3 + .woocommerce-billing-fields__field-wrapper { margin-top: 0; }
.gbf-theme .woocommerce-billing-fields__field-wrapper, .gbf-theme .woocommerce-shipping-fields__field-wrapper, .gbf-theme .woocommerce-additional-fields__field-wrapper { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.gbf-theme .woocommerce-billing-fields__field-wrapper .form-row-wide, .gbf-theme .woocommerce-shipping-fields__field-wrapper .form-row-wide, .gbf-theme .woocommerce-additional-fields__field-wrapper .form-row-wide { grid-column: 1 / -1; }
.gbf-theme .woocommerce form .form-row-first, .gbf-theme .woocommerce form .form-row-last { width: auto; float: none; }
.gbf-theme .woocommerce-checkout-review-order-table { border: 0 !important; border-radius: 0; margin-bottom: 20px !important; }
.gbf-theme .woocommerce-checkout-review-order-table th, .gbf-theme .woocommerce-checkout-review-order-table td { padding: 14px 0 !important; border-top: 1px solid var(--gbf-line) !important; font-size: 15px; }
.gbf-theme .woocommerce-checkout-review-order-table thead th { color: var(--gbf-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; border-top: 0 !important; }
.gbf-theme .woocommerce-checkout-review-order-table .order-total th, .gbf-theme .woocommerce-checkout-review-order-table .order-total td { font-size: 18px; font-weight: 800; color: var(--gbf-ink); }
.gbf-theme .woocommerce-checkout-review-order-table td:last-child, .gbf-theme .woocommerce-checkout-review-order-table th:last-child { text-align: right; }
.gbf-theme #payment { background: var(--gbf-soft) !important; border-radius: 16px !important; }
.gbf-theme #payment ul.payment_methods { border-bottom-color: var(--gbf-line) !important; padding: 18px !important; }
.gbf-theme #payment ul.payment_methods li { list-style: none; }
.gbf-theme #payment div.payment_box { background: #fff !important; border-radius: 12px; color: var(--gbf-muted) !important; }
.gbf-theme #payment div.payment_box::before { border-bottom-color: #fff !important; }
.gbf-theme #payment div.form-row { padding: 18px !important; }
.gbf-theme .woocommerce-privacy-policy-text { font-size: 13px; color: var(--gbf-muted); }
.gbf-theme .woocommerce-form-coupon-toggle .woocommerce-info { margin-bottom: 16px; }
.gbf-theme form.checkout_coupon { background: #fff; border: 1px solid var(--gbf-line) !important; border-radius: 16px; padding: 20px !important; margin-bottom: 24px !important; }

/* Cart */
.gbf-theme .woocommerce table.shop_table { border: 1px solid var(--gbf-line); border-radius: 20px; background: #fff; border-collapse: separate; overflow: hidden; }
.gbf-theme .woocommerce table.shop_table th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--gbf-muted); padding: 16px 20px; }
.gbf-theme .woocommerce table.shop_table td { padding: 16px 20px; border-top: 1px solid var(--gbf-line); }
.gbf-theme .woocommerce a.remove { color: var(--gbf-red) !important; }
.gbf-theme .woocommerce a.remove:hover { background: var(--gbf-red); color: #fff !important; }
.gbf-theme .woocommerce .cart-collaterals .cart_totals { background: #fff; border: 1px solid var(--gbf-line); border-radius: 20px; padding: 28px; }
.gbf-theme .woocommerce .cart-collaterals .cart_totals table.shop_table { border: 0; }
.gbf-theme .woocommerce .cart-collaterals .cart_totals h2 { font-size: 20px; margin-bottom: 12px; }
.gbf-theme .woocommerce .coupon .input-text { width: 180px !important; margin-right: 8px; }

/* My account — classic layout only when the GoBeyond portal is switched off */
.gbf-theme:not(.gbf-portal-page):not(.gbf-auth-page) .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 10px; background: #fff; border: 1px solid var(--gbf-line); border-radius: 20px; }
.gbf-theme:not(.gbf-portal-page):not(.gbf-auth-page) .woocommerce-MyAccount-navigation a { display: block; padding: 12px 16px; border-radius: 12px; font-weight: 600; text-decoration: none; color: var(--gbf-ink); }
.gbf-theme:not(.gbf-portal-page):not(.gbf-auth-page) .woocommerce-MyAccount-content { background: #fff; border: 1px solid var(--gbf-line); border-radius: 20px; padding: 32px; }

/* Orders / thank-you */
.gbf-theme .woocommerce-order { background: #fff; border: 1px solid var(--gbf-line); border-radius: 20px; padding: 32px; }
.gbf-theme ul.woocommerce-order-overview { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; padding: 0 !important; margin: 24px 0 !important; }
.gbf-theme ul.woocommerce-order-overview li { border: 1px solid var(--gbf-line) !important; border-radius: 14px; padding: 14px !important; margin: 0 !important; background: var(--gbf-soft); }
.gbf-theme .woocommerce-thankyou-order-received { font-size: 20px; font-weight: 800; color: var(--gbf-green); }

/* Products (shop / single) */
.gbf-theme .woocommerce ul.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 0; }
.gbf-theme .woocommerce ul.products::before, .gbf-theme .woocommerce ul.products::after { display: none; }
.gbf-theme .woocommerce ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; background: #fff; border: 1px solid var(--gbf-line); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; }
.gbf-theme .woocommerce ul.products li.product img { border-radius: 14px; }
.gbf-theme .woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 18px !important; font-weight: 800; color: var(--gbf-ink); }
.gbf-theme .woocommerce ul.products li.product .price, .gbf-theme .woocommerce div.product p.price, .gbf-theme .woocommerce div.product span.price { color: var(--gbf-blue) !important; font-weight: 800; }
.gbf-theme .woocommerce ul.products li.product .button { margin-top: auto; text-align: center; }
.gbf-theme .woocommerce span.onsale { background: var(--gbf-blue); border-radius: 999px; min-height: 0; line-height: 1; padding: 8px 12px; font-weight: 700; }
.gbf-theme .woocommerce div.product { background: #fff; border: 1px solid var(--gbf-line); border-radius: 24px; padding: 32px; }
.gbf-theme .woocommerce div.product .product_title { font-size: clamp(26px, 3vw, 36px); margin-bottom: 12px; }
.gbf-theme .woocommerce div.product div.images img { border-radius: 16px; }
.gbf-theme .woocommerce div.product .woocommerce-tabs ul.tabs { padding: 0; }
.gbf-theme .woocommerce div.product .woocommerce-tabs ul.tabs li { border-radius: 12px 12px 0 0; background: var(--gbf-soft); border-color: var(--gbf-line); }
.gbf-theme .woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: #fff; }
.gbf-theme .woocommerce div.product form.cart .button { padding: 14px 28px; }
.gbf-theme .woocommerce .quantity .qty { width: 80px; border: 1.5px solid var(--gbf-line); border-radius: 12px; padding: 12px; }
.gbf-theme .woocommerce-breadcrumb { font-size: 13px; color: var(--gbf-muted) !important; margin-bottom: 20px !important; }
.gbf-theme .woocommerce-breadcrumb a { color: var(--gbf-blue) !important; }
.gbf-theme .woocommerce-products-header__title { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: 20px; }
.gbf-theme .woocommerce .woocommerce-ordering select { width: auto; }
.gbf-theme .woocommerce nav.woocommerce-pagination ul { border: 0; display: flex; gap: 8px; justify-content: center; }
.gbf-theme .woocommerce nav.woocommerce-pagination ul li { border: 0; }
.gbf-theme .woocommerce nav.woocommerce-pagination ul li a, .gbf-theme .woocommerce nav.woocommerce-pagination ul li span { border: 1px solid var(--gbf-line); border-radius: 12px; min-width: 42px; padding: 12px; background: #fff; }
.gbf-theme .woocommerce nav.woocommerce-pagination ul li span.current { background: var(--gbf-blue); color: #fff; }

/* Block cart & checkout */
.gbf-theme .wp-block-woocommerce-checkout, .gbf-theme .wp-block-woocommerce-cart { font-family: var(--gbf-font); }
.gbf-theme .wc-block-checkout__main, .gbf-theme .wc-block-cart__main { background: #fff; border: 1px solid var(--gbf-line); border-radius: 20px; padding: 28px !important; }
.gbf-theme .wc-block-components-sidebar { background: #fff; border: 1px solid var(--gbf-line); border-radius: 20px; padding: 24px !important; }
.gbf-theme .wc-block-components-text-input input, .gbf-theme .wc-block-components-combobox .wc-block-components-combobox-control input, .gbf-theme .wc-blocks-components-select .wc-blocks-components-select__select { border-radius: 12px !important; border-color: var(--gbf-line) !important; }
.gbf-theme .wc-block-components-text-input.is-active input:focus { border-color: var(--gbf-blue) !important; box-shadow: none !important; }
.gbf-theme .wc-block-components-checkout-place-order-button { width: 100%; }

@media (max-width: 1024px) {
	.gbf-theme form.woocommerce-checkout { grid-template-columns: minmax(0, 1fr); }
	.gbf-theme form.woocommerce-checkout #customer_details, .gbf-theme form.woocommerce-checkout #order_review_heading, .gbf-theme form.woocommerce-checkout #order_review { grid-column: 1; grid-row: auto; }
	.gbf-theme form.woocommerce-checkout #order_review { position: static; }
	.gbf-theme .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
	.gbf-woo-page { padding: 32px 0 64px; }
	.gbf-theme form.woocommerce-checkout #customer_details, .gbf-theme .woocommerce div.product { padding: 20px; }
	.gbf-theme .woocommerce-billing-fields__field-wrapper, .gbf-theme .woocommerce-shipping-fields__field-wrapper, .gbf-theme .woocommerce-additional-fields__field-wrapper { grid-template-columns: minmax(0, 1fr); }
	.gbf-theme .woocommerce ul.products { grid-template-columns: minmax(0, 1fr); }
}

/* Package details under the product name (cart, checkout, emails preview) */
.gbf-theme .woocommerce-checkout-review-order-table dl.variation, .gbf-theme .woocommerce table.shop_table dl.variation, .gbf-theme .wc-item-meta { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; font-size: 13px; margin: 8px 0 0; color: var(--gbf-muted); list-style: none; padding: 0; }
.gbf-theme dl.variation dt, .gbf-theme dl.variation dd { margin: 0; float: none; }
.gbf-theme dl.variation dd p, .gbf-theme .wc-item-meta p { margin: 0; }
.gbf-theme dl.variation dd { color: var(--gbf-ink); font-weight: 600; }
.gbf-theme .wc-item-meta li { display: contents; }
.gbf-theme .woocommerce-checkout-review-order-table td.product-name { text-align: left; }
.gbf-theme .woocommerce-checkout-review-order-table .product-quantity { font-weight: 600; color: var(--gbf-muted); }
.gbf-theme .woocommerce form .form-row .woocommerce-error, .gbf-theme .checkout-inline-error-message { color: var(--gbf-red); font-size: 13px; margin-top: 4px; }

/* Never let long values (company names, emails, package details) widen the checkout on phones */
.gbf-theme form.woocommerce-checkout > *, .gbf-theme form.woocommerce-checkout #customer_details > *, .gbf-theme .woocommerce-billing-fields__field-wrapper > * { min-width: 0; }
.gbf-theme .woocommerce-checkout-review-order-table { table-layout: fixed; width: 100%; }
.gbf-theme .woocommerce-checkout-review-order-table td, .gbf-theme .woocommerce-checkout-review-order-table th, .gbf-theme dl.variation dd, .gbf-theme dl.variation dt, .gbf-theme .wc-item-meta li { overflow-wrap: anywhere; word-break: normal; }
.gbf-theme dl.variation { grid-template-columns: auto minmax(0, 1fr); }
.gbf-theme .woocommerce-checkout-review-order-table .product-total, .gbf-theme .woocommerce-checkout-review-order-table tfoot td { width: 38%; text-align: right; }
@media (max-width: 480px) {
	.gbf-theme form.woocommerce-checkout #customer_details, .gbf-theme form.woocommerce-checkout #order_review { padding: 16px; }
	.gbf-theme .woocommerce-checkout-review-order-table th, .gbf-theme .woocommerce-checkout-review-order-table td { padding-left: 0; padding-right: 0; }
	.gbf-theme dl.variation { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.gbf-theme dl.variation dd { margin-bottom: 4px; }
}
