/* ==========================================================================
   Shop: product page, loops, cart, checkout, account, notices.
   WooCommerce's own styles are off; block cart and checkout keep theirs.
   ========================================================================== */

/* Product page */
.crumbs-pad { padding: 24px 0; }
/* The picture column (with the purchase box on books) has a fixed width that fits a cover and the buy box; the text takes the rest */
.prod { display: grid; grid-template-columns: minmax(0, min(490px, 45%)) minmax(0, 1fr); gap: 56px; align-items: start; }
.pgal { display: grid; grid-template-columns: 88px 1fr; gap: 16px; }
.pgal:not(:has(.thumbs)) { grid-template-columns: 1fr; }
.thumbs { display: flex; flex-direction: column; gap: 12px; }
.thumbs button { width: 88px; height: 88px; padding: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--cream); cursor: pointer; }
.thumbs button.on { border: 2px solid var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.main-img { background: var(--cream); border-radius: var(--r-card); aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.main-img img { max-height: 86%; width: auto; height: auto; max-width: 86%; object-fit: contain; }
.info { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 24px; }
.info h1 { font-size: 48px; line-height: 1.1; }
.price-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.info .price { font-size: 30px; }
.stock-ok { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--journeys); }
.stock-ok i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: block; }
.stock-out { font-size: 15px; font-weight: 700; color: var(--error); }
.desc { font-size: 18px; line-height: 1.75; color: var(--ink2); }
.desc p + p { margin-top: .8em; }
.buy form.cart { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; margin: 0; }
.buy form.cart .single_add_to_cart_button { flex: 1; background: var(--sun); color: var(--ink); min-width: 180px; }
.buy form.cart .single_add_to_cart_button:hover { background: #F2C800; }
.buy form.cart .single_add_to_cart_button.disabled { opacity: .5; cursor: not-allowed; }
.buy > .btn { width: 100%; }
.quantity { display: flex; align-items: center; border: 1px solid var(--field); border-radius: var(--r-btn); background: #fff; }
.quantity .qty { width: 48px; height: 46px; border: 0; text-align: center; font-size: 17px; font-weight: 700; background: transparent; -moz-appearance: textfield; appearance: textfield; }
.quantity .qty::-webkit-outer-spin-button, .quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-btn { width: 44px; height: 46px; border: 0; background: none; font-size: 20px; cursor: pointer; color: var(--ink); }
.quantity.hidden { display: none; }
.variations { border-collapse: collapse; width: 100%; margin-bottom: 12px; }
.variations th, .variations td { display: block; text-align: right; padding: 0; }
.variations label { font-size: 15px; font-weight: 600; display: block; margin-bottom: 6px; }
.variations select { min-height: 48px; width: 100%; border: 1px solid var(--field); border-radius: var(--r-btn); background: #fff; padding: 0 12px; font-size: 16px; }
.variations .reset_variations { font-size: 14px; display: inline-block; margin-top: 8px; }
.variations_form .single_variation_wrap { flex-basis: 100%; display: flex; flex-direction: column; gap: 12px; }
.woocommerce-variation-add-to-cart { display: flex; gap: 12px; }
.woocommerce-variation-price .price { font-size: 22px; }
.facts { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); margin: 0; }
.facts div { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.facts dd { margin: 0; font-size: 16px; font-weight: 700; }
.ship { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px; display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.6; color: var(--ink2); }
.ship svg { flex-shrink: 0; margin-top: 2px; }
.tabs { margin-top: 72px; border-bottom: 1px solid var(--line); display: flex; gap: 32px; overflow-x: auto; }
.tabs button { height: 52px; border: 0; background: none; font-size: 17px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; cursor: pointer; padding: 0; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.tab-body { padding: 32px 0; max-width: 760px; font-size: 18px; line-height: 1.75; color: var(--ink2); }
.chapter { border-bottom: 1px solid var(--line); }
.chapter summary { min-height: 52px; display: flex; align-items: center; font-weight: 700; color: var(--ink); cursor: pointer; }
.chapter .rich { padding-bottom: 20px; }

/* Book page: tabs under the intro, the image column sticks with the purchase box under the image */
.prod-book .pgal { position: sticky; top: 24px; }
.prod-book .info { position: static; }
.prod-book .main-img { aspect-ratio: auto; height: min(44vh, 520px); min-height: 280px; }
.book-buy { grid-column: -2 / -1; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.book-buy .price { font-size: 26px; }
.book-tabs .tabs { margin: 4px 0 0; }
.book-tabs .tab-body { padding: 24px 0 8px; font-size: 17px; }
.book-tabs .book-sec[hidden] { display: none; }
.book-tabs .book-sec > summary { display: none; }
.buy-bar { display: none; }
.rel { padding-bottom: 96px; }
.rel .band-h { margin: 48px 0 28px; }
.rel h2 { font-size: 34px; }
.onsale { display: none; }

/* Shop loop */
.woocommerce-result-count { font-size: 14px; color: var(--muted); margin: 0 0 16px; }
.woocommerce-ordering { margin: 0 0 24px; }
.woocommerce-ordering select { min-height: 44px; border: 1px solid var(--field); border-radius: var(--r-btn); background: #fff; padding: 0 12px; }
.woocommerce-pagination ul { list-style: none; padding: 0; display: flex; gap: 8px; justify-content: center; margin-top: 48px; }
/* Only the page links: the list around them also has the class page-numbers. */
.woocommerce-pagination li > .page-numbers { min-width: 44px; height: 44px; padding: 0 12px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: var(--r-btn); text-decoration: none; font-weight: 700; background: #fff; }
.woocommerce-pagination li > .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.woocommerce-info, .woocommerce-message, .woocommerce-error, .woocommerce-notices-wrapper > div { list-style: none; margin: 0 0 24px; padding: 14px 18px; border-radius: var(--r-btn); background: var(--cream); font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.woocommerce-message { background: var(--journeys-t); color: var(--journeys-x); }
.woocommerce-error { background: #F7E1DE; color: var(--error); flex-direction: column; align-items: flex-start; }
.woocommerce-message .button, .woocommerce-info .button { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: var(--r-btn); background: var(--ink); color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; }

/* Classic cart, checkout and account pages */
.shop-page { max-width: none; }
.shop-page .body { font-size: 16px; line-height: 1.6; }
.shop-page .body > * + * { margin-top: 24px; }
.woocommerce .button, .woocommerce button.button, .woocommerce input.button, .wc-block-components-button:not(.is-link) { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border-radius: var(--r-btn); border: 0; background: var(--ink); color: #fff; font-family: var(--body); font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; }
.woocommerce .button.alt, .woocommerce .checkout-button, #place_order, .wc-block-components-checkout-place-order-button, .wc-block-cart__submit-button { background: var(--sun) !important; color: var(--ink) !important; }
.shop_table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; }
.shop_table th, .shop_table td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: middle; }
.shop_table thead th { background: var(--cream); font-size: 14px; }
.shop_table .product-thumbnail img { width: 64px; border-radius: 4px; }
.shop_table .product-remove a { font-size: 22px; text-decoration: none; color: var(--muted); }
.shop_table .coupon { display: flex; gap: 8px; flex-wrap: wrap; }
.shop_table .coupon input, .woocommerce form .input-text, .woocommerce form select { min-height: 48px; border: 1px solid var(--field); border-radius: var(--r-btn); background: #fff; padding: 0 12px; font-size: 16px; }
.woocommerce form textarea.input-text { min-height: 100px; padding: 12px; }
.cart-collaterals { margin-top: 32px; display: flex; justify-content: flex-end; }
.cart_totals { width: 100%; max-width: 420px; }
.cart_totals h2, .woocommerce-billing-fields h3, .woocommerce-shipping-fields h3, #order_review_heading, .woocommerce-additional-fields h3 { font-size: 24px; margin-bottom: 16px; }
.wc-proceed-to-checkout { margin-top: 16px; }
.wc-proceed-to-checkout .button { width: 100%; }
.woocommerce form .form-row { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; }
.woocommerce form .form-row label { font-size: 15px; font-weight: 600; }
.woocommerce form .form-row .required { color: var(--error); text-decoration: none; }
.woocommerce .col2-set { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.woocommerce-checkout #customer_details { margin-bottom: 32px; }
.woocommerce-checkout-payment { background: var(--cream); border-radius: var(--r-card); padding: 20px; margin-top: 24px; }
.wc_payment_methods { list-style: none; padding: 0; }
.woocommerce-form-login, .woocommerce-form-register, .woocommerce-ResetPassword { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 24px; max-width: 480px; }
.woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.woocommerce-MyAccount-navigation a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--cream); text-decoration: none; font-weight: 600; }
.woocommerce-MyAccount-navigation .is-active a { background: var(--ink); color: #fff; }

/* Block cart and checkout: keep core layout, use our type and colours */
.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout { font-family: var(--body); }
.wc-block-components-title, .wc-block-components-checkout-step__title { font-family: var(--display) !important; }
.wc-block-components-text-input input, .wc-block-components-select select, .wc-block-components-textarea { border-color: var(--field) !important; border-radius: var(--r-btn) !important; }
.wc-block-components-product-name { color: var(--ink); font-weight: 700; }

@media (max-width: 900px) {
	.prod { grid-template-columns: 1fr; gap: 28px; }
	.info { position: static; }
	.woocommerce .col2-set { grid-template-columns: 1fr; }
	/* Book: one column in reading order; image, intro, purchase box, then the sections as an accordion */
	.prod-book { display: flex; flex-direction: column; gap: 20px; align-items: stretch; }
	.prod-book .pgal, .prod-book .info { display: contents; }
	.prod-book .main-img { order: 1; height: auto; aspect-ratio: 1 / 1; min-height: 0; }
	.prod-book .thumbs { order: 2; }
	.prod-book .info > * { order: 3; }
	.prod-book .book-buy { order: 4; }
	.prod-book .book-buy .price-row { display: none; }
	.prod-book .info > .book-tabs { order: 5; }
	.prod-book .info > .facts, .prod-book .info > .ship { order: 6; }
	.book-tabs .tabs { display: none; }
	.book-tabs .book-sec, .book-tabs .book-sec[hidden] { display: block; border-top: 1px solid var(--line); }
	.book-tabs .book-sec:last-child { border-bottom: 1px solid var(--line); }
	.book-tabs .book-sec > summary { display: flex; justify-content: space-between; align-items: center; min-height: 52px; font-size: 17px; font-weight: 700; cursor: pointer; list-style: none; }
	.book-tabs .book-sec > summary::-webkit-details-marker { display: none; }
	.book-tabs .book-sec > summary::after { content: "+"; font-weight: 400; font-size: 22px; }
	.book-tabs .book-sec[open] > summary::after { content: "−"; }
	.book-tabs .tab-body { padding: 0 0 20px; }
	.buy-bar:not([hidden]) { position: fixed; inset-inline: 0; bottom: 0; z-index: 110; display: flex; align-items: center; gap: 14px; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px -12px rgba(31, 32, 28, .25); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
	.buy-bar .price { font-size: 18px; font-weight: 700; white-space: nowrap; }
	.buy-bar .btn { flex: 1; justify-content: center; min-height: 48px; padding: 0 14px; white-space: nowrap; }
	.buy-bar select { min-height: 48px; min-width: 0; max-width: 38%; border: 1px solid var(--field); border-radius: var(--r-btn); background: #fff; padding: 0 8px; font-size: 15px; }
	body:has(.buy-bar:not([hidden])) { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
}
@media (max-width: 760px) {
	.pgal { grid-template-columns: 1fr; }
	.thumbs { flex-direction: row; order: 2; overflow-x: auto; }
	.thumbs button { width: 72px; height: 72px; flex-shrink: 0; }
	.info h1 { font-size: 36px; }
	.tabs { gap: 20px; }
	.shop_table thead { display: none; }
	.shop_table tr { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
	.shop_table td { border: 0; padding: 8px 12px; }
	.shop_table td::before { content: attr(data-title); display: block; font-size: 13px; color: var(--muted); }
}

/* Long short description: first paragraph, the rest on request */
.desc-more { margin-top: .8em; }
.desc-more summary { display: inline-flex; align-items: center; min-height: 44px; font-size: 16px; font-weight: 700; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; list-style: none; }
.desc-more summary::-webkit-details-marker { display: none; }
.desc-more[open] summary { display: none; }
.desc-more p + p { margin-top: .8em; }

/* Empty block cart: the site's own look instead of WooCommerce's (no sad face, product cards as in the shop) */
.wp-block-woocommerce-empty-cart-block { padding: 24px 0 96px; }
.wc-block-cart__empty-cart__title.with-empty-cart-icon::before { display: none; }
.wc-block-cart__empty-cart__title { font-size: 34px; margin: 0 0 8px; }
.wp-block-woocommerce-empty-cart-block > p { margin: 0 0 8px; font-size: 18px; }
.wp-block-woocommerce-empty-cart-block .wp-block-separator.is-style-dots { display: none; }
.wp-block-woocommerce-empty-cart-block > h2:not(.wc-block-cart__empty-cart__title) { font-size: 34px; text-align: right !important; margin: 64px 0 28px; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid.has-4-columns .wc-block-grid__products { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid.has-4-columns .wc-block-grid__product { margin: 0; padding: 0 0 20px; width: auto; max-width: none; flex: none; border: 1px solid var(--line); border-radius: var(--r-card); background: #fff; overflow: hidden; text-align: right; display: flex; flex-direction: column; gap: 10px; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 14px; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-image { height: 260px; margin: 0; display: flex; align-items: center; justify-content: center; background: var(--cream); }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-image img { max-height: 220px; max-width: 86%; width: auto; height: auto; object-fit: contain; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-title { padding: 0 20px; font-family: var(--display); font-size: 21px; font-weight: 700; line-height: 1.3; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-price { padding: 0 20px; font-weight: 700; margin: 0; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart { padding: 0 20px; margin: auto 0 0; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .wp-block-button__link { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: var(--r-btn); background: var(--sun); color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: none; border: 0; }
@media (max-width: 900px) { .wp-block-woocommerce-empty-cart-block .wc-block-grid.has-4-columns .wc-block-grid__products { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
	.wp-block-woocommerce-empty-cart-block > h2:not(.wc-block-cart__empty-cart__title) { font-size: 28px; margin: 48px 0 20px; }
	.wp-block-woocommerce-empty-cart-block .wc-block-grid.has-4-columns .wc-block-grid__products { gap: 12px; }
	.wp-block-woocommerce-empty-cart-block .wc-block-grid.has-4-columns .wc-block-grid__product { padding-bottom: 14px; gap: 8px; }
	.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-image { height: 170px; }
	.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-image img { max-height: 150px; }
	.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-title { padding: 0 12px; font-size: 17px; }
	.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-price { padding: 0 12px; font-size: 15px; }
	.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart { padding: 0 12px; }
	.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .wp-block-button__link { width: 100%; justify-content: center; padding: 0 10px; font-size: 14px; white-space: nowrap; }
}

/* ---------- English site (/en/): left to right ---------- */
.lang-en .variations th, .lang-en .variations td, .lang-en .shop_table th, .lang-en .shop_table td { text-align: left; }
.lang-en .wp-block-woocommerce-empty-cart-block > h2:not(.wc-block-cart__empty-cart__title) { text-align: left !important; }
.lang-en .wp-block-woocommerce-empty-cart-block .wc-block-grid.has-4-columns .wc-block-grid__product { text-align: left; }.lang-en .quantity { flex-direction: row-reverse; } /* Minus, number, plus from left to right. */

/* ---------- "Added to cart" banner ---------- */
.toasts { position: fixed; inset-inline-end: 24px; bottom: 24px; z-index: 120; width: min(400px, calc(100vw - 32px)); pointer-events: none; }
.toasts .toast { pointer-events: auto; display: grid; grid-template-columns: 64px 1fr auto; gap: 12px 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: 0 24px 48px -24px rgba(31, 32, 28, .45); padding: 14px; opacity: 0; transform: translateY(16px); transition: opacity .25s ease, transform .25s ease; }
.toasts[data-on] .toast { opacity: 1; transform: none; }
.toast-img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; background: var(--paper); }
.toast-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.toast-t b { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.toast-t b svg { color: #2f7d4b; flex: none; }
.toast-t span { font-size: 14px; color: var(--muted, #5b5a55); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.toast-x { align-self: start; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%; background: none; color: var(--ink); cursor: pointer; }
.toast-x:hover, .toast-x:focus-visible { background: var(--paper); }
.toast-act { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.toast-act .btn { justify-content: center; width: 100%; }
/* The theme's banner replaces WooCommerce's "View cart" link next to the button. */
.added_to_cart.wc-forward { display: none; }
@media (max-width: 600px) {
	/* Bottom sheet on phones. */
	.toasts { inset-inline: 0; bottom: 0; width: auto; }
	.toasts .toast { border-radius: 16px 16px 0 0; border-bottom: 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); transform: translateY(100%); }
}
@media (prefers-reduced-motion: reduce) {
	.toasts .toast { transition: none; }
}