/* ==========================================================================
   Osevaro storefront: WordPress and WooCommerce content inside the design.
   Everything the mockups draw comes from ds/osevaro.css, ds/app.css and pages/*.css
   unchanged. This file only styles what WordPress itself prints (page content,
   WooCommerce forms, notices, tables, the consent banner's neighbours) with the
   same tokens, so nothing here invents a new look.
   ========================================================================== */

/* WordPress chrome that has no place on the shop */
#wpadminbar { display: none !important; }
html { margin-top: 0 !important; }
.hp { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------------------------------------------------------- content pages */
.ov-content { gap: 20px; }
.ov-content .crumbs { margin-bottom: -4px; }
.ov-prose { max-width: 46rem; font-size: 17px; line-height: 1.65; color: var(--ink); overflow-wrap: anywhere; }
.ov-prose > * + * { margin-top: 1em; }
.ov-prose :is(h2, h3, h4) { font-family: var(--font-display); font-weight: 600; font-variation-settings: 'SOFT' 50; line-height: 1.25; margin-top: 1.6em; }
.ov-prose h2 { font-size: var(--fs-h2); }
.ov-prose h3 { font-size: var(--fs-h3); font-family: var(--font-body); font-weight: 700; }
.ov-prose h4 { font-size: 17px; font-family: var(--font-body); font-weight: 700; }
.ov-prose :is(ul, ol):not([class]) { padding-left: 1.3em; }
.ov-prose ul:not([class]) { list-style: disc; }
.ov-prose ol:not([class]) { list-style: decimal; }
.ov-prose li + li { margin-top: .4em; }
.ov-prose img { max-width: 100%; height: auto; border-radius: var(--r-tile); }
.ov-prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ov-prose :is(th, td) { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.ov-prose blockquote { margin-left: 0; padding: 12px 18px; border-left: 3px solid var(--sage); background: var(--linen); border-radius: 0 12px 12px 0; }
.ov-prose hr { border: 0; border-top: 1px solid var(--line); }
.ov-prose .wp-block-buttons, .ov-prose .wp-block-button { display: flex; flex-wrap: wrap; gap: 12px; }
.ov-prose :is(.wp-block-button__link, .button, .ugb-button) {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 24px; border-radius: var(--r-btn);
  background: var(--btn-primary-bg); color: var(--btn-primary-fg); font-weight: 650; text-decoration: none;
}
.ov-prose :is(.wp-block-group, .wp-block-columns, .wp-block-cover, [class*="stk-"], [class*="ugb-"]) { max-width: 100%; background-image: none !important; }
.ov-prose .wp-block-columns { display: grid; gap: 24px; }
@media (min-width: 900px) { .ov-prose .wp-block-columns { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); } }
.ov-posts { display: grid; gap: 20px; }
.ov-posts > li { padding: 20px 24px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
.ov-posts .h3 { text-decoration: none; }

/* ---------------------------------------------------------------- forms printed by WordPress */
:is(.ov-prose, .ov-wc) :is(input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="search"], input[type="url"], input[type="date"], select, textarea) {
  width: 100%; min-height: 52px; padding: 12px 16px; border: 1.5px solid var(--field-border); border-radius: var(--r-input);
  background: var(--card); color: var(--ink); font: inherit; font-size: 16px;
}
:is(.ov-prose, .ov-wc) textarea { min-height: 140px; }
:is(.ov-prose, .ov-wc) :is(input, select, textarea):focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-color: var(--ink); }
:is(.ov-prose, .ov-wc) label { display: inline-block; margin-bottom: 6px; font-size: 15px; font-weight: 600; color: var(--ink); }
:is(.ov-prose, .ov-wc) :is(button[type="submit"], input[type="submit"], .button, .wpforms-submit) {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px;
  border: 1.5px solid transparent; border-radius: var(--r-btn); background: var(--btn-primary-bg); color: var(--btn-primary-fg);
  font: inherit; font-size: 16px; font-weight: 650; text-decoration: none; cursor: pointer;
}
:is(.ov-prose, .ov-wc) :is(button[type="submit"], input[type="submit"], .button, .wpforms-submit):hover { background: var(--btn-primary-hover); }
:is(.ov-prose, .ov-wc) :is(.button.alt, .checkout-button, #place_order, .single_add_to_cart_button) { background: var(--btn-cta-bg); color: var(--btn-cta-fg); }
:is(.ov-prose, .ov-wc) :is(.button.alt, .checkout-button, #place_order, .single_add_to_cart_button):hover { background: var(--btn-cta-hover); }
.ov-prose .wpforms-container .wpforms-field { padding: 0 0 18px; }
.ov-prose .wpforms-container .wpforms-field-label { font-weight: 600; }
.ov-prose .wpforms-container .wpforms-required-label { color: var(--coral-text); }
.ov-prose .wpforms-error, .ov-wc .woocommerce-invalid label { color: var(--error); }

/* ---------------------------------------------------------------- WooCommerce: notices */
.ov-wc .woocommerce-notices-wrapper:empty { display: none; }
:is(.ov-wc, .ov-notices) :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) {
  list-style: none; margin: 0 0 16px; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--sage-tint); color: var(--ink-fixed); font-size: 15px; line-height: 1.5;
}
:is(.ov-wc, .ov-notices) .woocommerce-error { background: var(--coral-tint); }
:is(.ov-wc, .ov-notices) :is(.woocommerce-message, .woocommerce-info, .woocommerce-error) a { color: var(--ink-fixed); font-weight: 650; }
:is(.ov-wc, .ov-notices) :is(.woocommerce-message, .woocommerce-info) .button { float: right; min-height: 40px; margin-left: 12px; }
.ov-notices { margin-top: 16px; }

/* ---------------------------------------------------------------- WooCommerce: account */
.ov-wc__body { display: grid; gap: 24px; }
.ov-wc .woocommerce { display: grid; gap: 24px; }
@media (min-width: 900px) { .ov-account .woocommerce { grid-template-columns: 260px minmax(0, 1fr); align-items: start; } }
.ov-wc .woocommerce-MyAccount-navigation ul { display: grid; gap: 4px; padding: 8px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); }
.ov-wc .woocommerce-MyAccount-navigation a { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 12px; text-decoration: none; color: var(--ink); font-weight: 600; }
.ov-wc .woocommerce-MyAccount-navigation .is-active a { background: var(--tab-active-bg); color: var(--ink-fixed); }
.ov-wc .woocommerce-MyAccount-content { display: grid; gap: 16px; min-width: 0; }
.ov-wc .osevaro-account-overview h2 { font-size: var(--fs-h3); font-family: var(--font-body); font-weight: 700; margin-bottom: 12px; }
.ov-wc .osevaro-account-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.ov-wc .osevaro-account-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: 18px; text-decoration: none; color: var(--ink); }
.ov-wc .osevaro-account-card small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 15px; }
.ov-wc .osevaro-account-card-icon { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sage-tint); color: var(--ink-fixed); }
.ov-wc :is(.woocommerce-form-login, .woocommerce-form-register, .woocommerce-ResetPassword, .woocommerce-EditAccountForm, .woocommerce-address-fields) {
  display: grid; gap: 14px; max-width: 34rem; padding: clamp(20px, 2.4vw, 32px); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card);
}
.ov-wc .u-columns, .ov-wc .col2-set { display: grid; gap: 24px; }
@media (min-width: 900px) { .ov-wc .u-columns, .ov-wc .col2-set { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ov-wc .woocommerce-form-row, .ov-wc .form-row { margin: 0; }
.ov-wc .woocommerce-form__label-for-checkbox { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.ov-wc .woocommerce-LostPassword a, .ov-wc .lost_password a { font-size: 15px; }
.ov-wc h2, .ov-wc h3 { font-family: var(--font-display); font-weight: 600; font-variation-settings: 'SOFT' 50; font-size: var(--fs-h3); }
.ov-wc .required { color: var(--coral-text); text-decoration: none; }
.ov-signin { margin-top: 8px; display: grid; gap: 16px; scroll-margin-top: 120px; }

/* ---------------------------------------------------------------- WooCommerce: tables (orders, cart, totals) */
.ov-wc table.shop_table, .ov-wc table.woocommerce-orders-table, .ov-wc table.woocommerce-table {
  width: 100%; border-collapse: separate; border-spacing: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; font-size: 15px;
}
.ov-wc :is(table.shop_table, table.woocommerce-table) :is(th, td) { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.ov-wc :is(table.shop_table, table.woocommerce-table) tr:last-child > * { border-bottom: 0; }
.ov-wc table.shop_table img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; background: var(--well); }
.ov-wc .product-remove a { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; text-decoration: none; font-size: 20px; color: var(--ink); }
.ov-wc .quantity input.qty { width: 84px; min-height: 44px; text-align: center; }
.ov-wc .cart-collaterals, .ov-wc .woocommerce-checkout-review-order { display: grid; gap: 16px; }
.ov-wc .cart_totals { max-width: 30rem; margin-left: auto; }
.ov-wc .wc-proceed-to-checkout .checkout-button { width: 100%; }
@media (max-width: 699.98px) {
  .ov-wc table.shop_table_responsive thead { display: none; }
  .ov-wc table.shop_table_responsive tr { display: grid; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .ov-wc table.shop_table_responsive td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 6px 16px; }
  .ov-wc table.shop_table_responsive td::before { content: attr(data-title); font-weight: 600; }
}
.ov-wc #payment { padding: 16px; background: var(--linen); border-radius: 18px; }
.ov-wc #payment ul.payment_methods { display: grid; gap: 8px; }

/* ---------------------------------------------------------------- product page: WooCommerce's own form when ordering opens */
.buy__open form.cart { display: grid; gap: 12px; }
.buy__open .variations { width: 100%; }
.buy__open .variations :is(th, td) { display: block; padding: 0 0 6px; text-align: left; }
.buy__open .single_variation_wrap { display: grid; gap: 12px; }
.buy__open .woocommerce-variation-add-to-cart { display: flex; gap: 12px; align-items: stretch; }
.buy__open .single_add_to_cart_button { flex: 1; }
.pdp-reviews { margin-top: 24px; }

/* ---------------------------------------------------------------- the analytics consent panel (osevaro-analytics) in the design's type and colours */
.osevaro-cookie-panel { font-family: var(--font-body); font-size: 15px; background: var(--card); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-lift); }
.osevaro-cookie-copy h2 { font-family: var(--font-display); font-weight: 600; font-variation-settings: 'SOFT' 50; }
.osevaro-cookie-copy a, .osevaro-cookie-settings { color: var(--link) !important; }
.osevaro-cookie-actions button { background: var(--btn-secondary-bg) !important; border: 1.5px solid var(--ink) !important; color: var(--ink) !important; border-radius: var(--r-btn) !important; font-size: 15px !important; font-family: var(--font-body); }
.osevaro-cookie-settings-fallback { font-size: 13px !important; font-family: var(--font-body); background: var(--card) !important; color: var(--ink) !important; border: 1px solid var(--line) !important; }
@media (max-width: 767.98px) {
  body.has-tabbar .osevaro-cookie-panel { bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px); }
  body.has-tabbar .osevaro-cookie-settings-fallback { bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px); }
  .osevaro-cookie-panel { font-size: 14px; }
}

/* Live WooCommerce forms must remain usable in the mobile app shell. */
html[data-shell="app"][data-order="open"] .buy__cta { display: block; }
#osevaro-product-options { scroll-margin-top: calc(var(--appbar-h, 60px) + 18px); }
html[data-shell="app"] .buy__open .variations select { min-height: 44px; font-size: 16px; }
html[data-shell="app"] .buy__open .single_add_to_cart_button { min-height: 44px; }
