/* WooCommerce: shop grid, product page, cart, checkout, account. Values measured from the previous site. */

/* ---------- Page background (shop, categories, product) ---------- */
.post-type-archive-product #wrapper, .post-type-archive-product #main,
.tax-product_cat #wrapper, .tax-product_cat #main,
.tax-product_tag #wrapper, .tax-product_tag #main,
.single-product #wrapper, .single-product #main { background: var(--tsd-shop-bg); }

/* ---------- Shared helpers used by shop markup ---------- */
.woocommerce-page .col-first { order: -1; }
@media (min-width: 850px) {
  .woocommerce-page .row-divided > .col + .col:not(.large-12) { border-left: 1px solid #ececec; }
  .woocommerce-page .col-divided + .col { padding-left: 30px; }
}
@media (max-width: 849px) { .woocommerce-page .col-divided { border-right: 0; padding-right: 15px; } }
.z-1 { z-index: 21; }
/* Same as the old grid (should move to layout.css): nested containers have no gutter,
   containers clear their content, section titles keep the heading size. */
.woocommerce-page .row .container { padding-left: 0; padding-right: 0; }
.woocommerce-page .section-title-container::after { content: ""; display: table; clear: both; }
.woocommerce-page h3.section-title { font-size: 1.25em; }
@media (max-width: 549px) { .woocommerce-page h3.section-title { font-size: 1em; } }
.mb-half { margin-bottom: 15px; }
.mb-half:last-child { margin-bottom: 0; }
ul.ul-reset, ul.ul-reset > li { margin: 0; padding: 0; }
ul.ul-reset > li { list-style: none; }
.h3 { font-size: 1.25em; }
ins { text-decoration: none; }
.flex-row { display: flex; flex-flow: row nowrap; align-items: center; justify-content: space-between; width: 100%; }
.flex-col { max-height: 100%; }
.flex-grow { flex: 1; }
.flex-col .button, .flex-col button, .flex-col input { margin-bottom: 0; }
.is-large { font-size: 1.15em; }
.is-small, .is-small.button { font-size: .8em; }
@media (max-width: 549px) { .is-large { font-size: 1em; } }
@media (max-width: 849px) {
  .medium-flex-wrap { flex-flow: column wrap; }
  .medium-flex-wrap .flex-col { flex-grow: 0; width: 100%; padding-top: 5px; padding-bottom: 5px; }
  .medium-text-center { float: none !important; text-align: center !important; width: 100% !important; }
}

/* Column count helpers for product rows */
.small-columns-1 > .col { flex-basis: 100%; max-width: 100%; }
.small-columns-2 > .col { flex-basis: 50%; max-width: 50%; }
.small-columns-3 > .col { flex-basis: 33.3333%; max-width: 33.3333%; }
.small-columns-4 > .col { flex-basis: 25%; max-width: 25%; }
@media (min-width: 550px) {
  .medium-columns-1 > .col { flex-basis: 100%; max-width: 100%; }
  .medium-columns-2 > .col { flex-basis: 50%; max-width: 50%; }
  .medium-columns-3 > .col { flex-basis: 33.3333%; max-width: 33.3333%; }
  .medium-columns-4 > .col { flex-basis: 25%; max-width: 25%; }
}
@media (min-width: 850px) {
  .large-columns-1 > .col { flex-basis: 100%; max-width: 100%; }
  .large-columns-2 > .col { flex-basis: 50%; max-width: 50%; }
  .large-columns-3 > .col { flex-basis: 33.3333%; max-width: 33.3333%; }
  .large-columns-4 > .col { flex-basis: 25%; max-width: 25%; }
  .large-columns-5 > .col { flex-basis: 20%; max-width: 20%; }
  .large-columns-6 > .col { flex-basis: 16.6667%; max-width: 16.6667%; }
}

/* ---------- Widgets (shop sidebar, page sidebar) ---------- */
.woocommerce-page .widget { margin-bottom: 1.5em; }
.woocommerce-page .widget ul { margin: 0; }
.woocommerce-page .widget li { list-style: none; }
.woocommerce-page span.widget-title { display: inline; font-size: 1em; font-weight: 600; letter-spacing: .05em; line-height: 1.05; text-transform: none; }
.woocommerce-page .widget .is-divider { margin-top: .66em; }
.woocommerce-page .widget > .is-divider.small { height: 3px; }
ul.product_list_widget { padding: 0; }
ul.product_list_widget li { position: relative; min-height: 80px; margin-bottom: 0; padding: 10px 0 5px 75px; overflow: hidden; line-height: 1.33; vertical-align: top; list-style: none; }
ul.product_list_widget li + li { border-top: 1px solid #ececec; }
ul.product_list_widget li a:not(.remove) { display: block; margin-bottom: 5px; padding: 0; overflow: hidden; line-height: 1.3; text-overflow: ellipsis; }
ul.product_list_widget li img { position: absolute; top: 10px; left: 0; width: 60px; height: 60px; margin-bottom: 5px; object-fit: cover; object-position: 50% 50%; }

/* ---------- Prices ---------- */
.price { line-height: 1; }
.price-wrapper .price { display: block; }
span.amount { color: #111; font-weight: 700; white-space: nowrap; }
.price ins span.amount, .price > span.amount { color: var(--tsd-alert); }
del span.amount { font-weight: 400; margin-right: .3em; opacity: .6; }
.price:has(del) { display: flex !important; gap: 10px; }
.price:has(del) del { order: 1; }

/* ---------- Shop title bar ---------- */
.page-title { position: relative; }
.page-title-inner { position: relative; min-height: 60px; padding-top: 20px; }
.page-title-inner button, .page-title-inner form, .page-title-inner p, .page-title-inner select, .page-title-inner ul { margin-top: 0; margin-bottom: 0; }
.breadcrumbs { padding: 0; font-weight: 700; letter-spacing: 0; color: #222; text-transform: none; }
.breadcrumbs.uppercase { text-transform: none; letter-spacing: 0; line-height: 1.2; }
.breadcrumbs .divider { position: relative; top: 0; margin: 0 .3em; font-weight: 300; opacity: .35; }
.breadcrumbs a { color: rgba(74, 74, 74, .8); font-weight: 400; }
.breadcrumbs a:hover { color: #111; }
.woocommerce-result-count { display: inline-block; margin: 0 1em 0 auto; }
.woocommerce-ordering, .woocommerce-ordering select { display: inline-block; margin: 5px 0; }
.woocommerce-ordering select { width: auto; font-weight: 400; }
.filter-button { display: inline-block; margin-top: .5em; }
.category-filter-row { padding: 10px 0 11px; } /* +1px: the old icon font sat 1px lower on the baseline */
.category-filter-row .inline-block { display: inline-block; }
.filter-button.uppercase { text-transform: uppercase; letter-spacing: .05em; line-height: 1.2; }
.filter-button i { position: relative; line-height: 1.2; vertical-align: -1px; }
.category-page-row { padding-top: 30px; }

/* Mobile: shop sidebar as a drawer */
.shop-sidebar-close { display: none; }
@media (max-width: 849px) {
  .category-page-row > .col.hide-for-medium.is-drawer-open { display: block !important; position: fixed; inset: 0; z-index: 100000; max-width: none; padding: 0; background: rgba(0, 0, 0, .6); }
  .is-drawer-open > #shop-sidebar { position: absolute; top: 0; bottom: 0; left: 0; width: 300px; max-width: 85%; padding: 40px 20px 20px; overflow-y: auto; background: var(--tsd-shop-bg); }
  .is-drawer-open .shop-sidebar-close { display: block; position: absolute; top: 5px; right: 10px; padding: 0 8px; font-size: 28px; line-height: 1; color: #333; background: none; border: 0; cursor: pointer; }
  body.tsd-shop-drawer-open { overflow: hidden; }
}

/* ---------- Product boxes ---------- */
.box { position: relative; width: 100%; margin: 0 auto; }
.box a { display: inline-block; }
.box-image { position: relative; height: auto; margin: 0 auto; overflow: hidden; }
.box-image > a, .box-image > div > a { display: block; }
.box-image img { width: 100%; max-width: 100%; margin: 0 auto; }
.box-text { position: relative; width: 100%; padding-top: .7em; padding-bottom: 1.4em; font-size: .9em; }
@media (max-width: 549px) { .box-text { font-size: 85%; } }
.box-text a:not(.button) { margin-top: .1em; margin-bottom: .1em; line-height: 1.3; }
.box-text p { margin-top: .1em; margin-bottom: .1em; }
.box-text .button { margin-top: 1em; }
.products .box-vertical .box-text { font-size: 1.1em; }
.image-cover { position: relative; height: auto; padding-top: 100%; overflow: hidden; background-position: 50% 50%; background-size: cover; }
.has-equal-box-heights .box-image { padding-top: 100%; }
.has-equal-box-heights .box-image img, .image-cover img, img.back-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 50%; }
.badge-container { margin: 30px 0 0; }
.show-on-hover { opacity: 0; pointer-events: none; filter: blur(0); transition: opacity .5s, transform .3s; }
.has-hover:hover img.show-on-hover { opacity: 1; }
@media (min-width: 550px) {
  .box-vertical { display: table; width: 100%; }
  .box-vertical .box-image, .box-vertical .box-text { display: table-cell; vertical-align: middle; }
  .box-vertical .box-text { padding-left: 1.5em; padding-right: 1.5em; }
  .box-vertical .box-image { width: 50%; }
}
@media (max-width: 549px) { .box-vertical .box-image { width: 100% !important; } }

/* Shop grid cards */
.shop-container .products .product-small .col-inner { padding: 10px; overflow: hidden; background: #fff; border-radius: 12px; }
.shop-container .products .product-small .box-text-products { padding-bottom: 0; }
.shop-container .products .product-small .product-title a { font-weight: 700; }
.shop-container .products .product-small .add-to-cart-button .button { width: 100%; margin: 15px 0 0; font-size: 14px; font-weight: 700; border-radius: 6px; }

/* Buttons used by WooCommerce */
.button.is-flat { box-shadow: none; }
.button.primary { background-color: var(--tsd-primary); color: #fff; border-color: rgba(0, 0, 0, .05); }
.button.alt, .button.checkout, .checkout-button { background-color: var(--tsd-secondary); }
.button:hover { color: #fff; }

/* Sidebar product block (shop + product pages) */
.sidebar-product .product-small.box { display: flex; padding: 5px; background: #fff; border-radius: 6px; }
.sidebar-product .product-small.box .box-image { width: 50%; }
.sidebar-product .product-small.box .box-text { padding: 5px 10px; }
.sidebar-product .product-small.box .product-title { font-weight: 700; }
.sidebar-product .product-small.box .add-to-cart-button { display: none; }
.sidebar-product .post-item .box-text { padding: 5px 10px; }
.sidebar-product .post-item .box-text .post-title { font-size: 14px; }
.sidebar-product .post-item .box-text .is-divider { display: none; }
.sidebar-product .post-item .box-blog-post { padding: 5px; background: #fff; border-radius: 6px; }

/* ---------- Pagination (base styles in blog.css) ---------- */
.woocommerce-pagination ul.links li { margin-left: inherit; }

/* ---------- Single product ---------- */
.woocommerce-product-gallery { opacity: 1 !important; }
.woocommerce-product-gallery .woocommerce-product-gallery__wrapper { margin: 0; }
.product-gallery-slider img { width: 100%; }
.woocommerce-product-gallery__trigger { display: none; }
.woocommerce-product-gallery .flex-control-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin: 15px 0 0; padding: 0; list-style: none; }
.woocommerce-product-gallery .flex-control-thumbs li { flex: 0 0 calc(25% - 7.5px); margin: 0; }
.woocommerce-product-gallery .flex-control-thumbs img { cursor: pointer; opacity: .5; }
.woocommerce-product-gallery .flex-control-thumbs img.flex-active { opacity: 1; }
.product-info { padding-top: 10px; }
.product-title-container h1 { margin-bottom: .5em; }
.product-info .price { margin: .5em 0; font-size: 1.5em; font-weight: bolder; }
.single-product .product-info .single_add_to_cart_button { background: var(--tsd-primary); border: 1px solid rgba(0, 0, 0, .05); border-radius: 6px; }
form.cart { margin-bottom: 1.3em; display: flex; flex-wrap: wrap; gap: 1em; width: 100%; }
form.cart > * { flex: 1 1 100%; margin: 0; }
form.cart :where(.ux-quantity, .single_add_to_cart_button) { flex: 0 0 auto; }
.quantity { display: inline-flex; opacity: 1; vertical-align: top; white-space: nowrap; }
.quantity .minus, .quantity .plus { min-width: 24px; padding-left: .4em; padding-right: .4em; }
.quantity .button.minus { border-right: 0 !important; border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.quantity .button.plus { border-left: 0 !important; border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.quantity input { display: inline-block; margin: 0; padding-left: 0; padding-right: 0; vertical-align: top; }
.quantity input[type=number] { font-weight: 400; width: 2.5em; max-width: 2.5em; font-size: 1em; text-align: center; border-radius: 0 !important; appearance: textfield; -webkit-appearance: textfield; -moz-appearance: textfield; }
@media (max-width: 549px) { .quantity input[type=number] { width: 2em; } }
.quantity input[type=number]::-webkit-inner-spin-button, .quantity input[type=number]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
input[type=button].is-form, .button.is-form { font-family: inherit; position: relative; overflow: hidden; font-weight: 400; color: #666; text-transform: none; text-shadow: 1px 1px 1px #fff; background-color: #f9f9f9; border: 1px solid #ddd; }
.button.is-form:hover { color: #000; background-color: #f1f1f1; }

/* Promotion + commitment boxes in the product layout block */
.promotion { margin-bottom: 30px; padding: 10px; background: #fff; border-radius: 12px; }
.promotion h3 { display: table-cell; padding: 5px 10px; font-size: 15px; background: #e3e3e3; border-radius: 6px; }
.promotion .promotion-title { position: relative; margin-top: 15px; padding: 0 10px 0 60px; }
.promotion .promotion-title p:empty { display: none; } /* stray paragraph left by wpautop in the block */
.promotion .promotion-title img { position: absolute; top: 0; left: 10px; width: 35px; }
.custom-product-page ul, .custom-product-page ol { padding-left: 0; }
.custom-product-page li { margin-bottom: .6em; }
.custom-product-page .col-inner > p:last-child { margin-bottom: 0; }
.col-inner ul li, .entry-content ul li, .col-inner ol li, .entry-content ol li { margin-left: 1.3em; }
.col-inner ul li.tab, .entry-content ul li.tab { margin-left: 0; }

/* Product tabs */
.tabbed-content { display: flex; flex-flow: row wrap; }
.tabbed-content .nav, .tabbed-content .tab-panels { width: 100%; }
.woocommerce-tabs ul.nav-tabs { display: flex; flex-flow: row wrap; align-items: center; justify-content: flex-start; width: 100%; margin: 0; padding: 0; }
.woocommerce-tabs .nav-tabs > li { position: relative; display: inline-block; margin: 0 .1em -1px; padding: 0; list-style: none; }
.woocommerce-tabs .nav-tabs > li:first-child { margin-left: 0; }
.woocommerce-tabs .nav-tabs > li:last-child { margin-right: 0; }
.woocommerce-tabs.tabbed-content ul.nav-tabs > li > a { display: inline-flex; flex-wrap: wrap; align-items: center; padding: 10px 15px; font-size: .8em; letter-spacing: .02em; text-transform: none; color: rgba(18, 18, 18, .85); font-weight: 600; background-color: rgba(0, 0, 0, .04); border-left: 1px solid #ddd; border-right: 1px solid #ddd; border-top: 2px solid #ddd; }
.woocommerce-tabs.tabbed-content ul.nav-tabs > li.active > a { color: rgba(18, 18, 18, .85); background-color: #fff; border-top-color: var(--tsd-primary); }
.tab-panels { padding-top: 1em; }
@media (max-width: 549px) {
  .woocommerce-tabs ul.small-nav-collapse > li { width: 100%; margin: 0 !important; }
  .woocommerce-tabs.tabbed-content ul.small-nav-collapse > li > a { display: block; width: 100%; }
}
.nav-tabs + .tab-panels { padding: 30px; background-color: #fff; border: 1px solid #ddd; }
.tab-panels .entry-content { padding: 0; }
.tab-panels .panel:not(.active) { display: block; height: 0; padding: 0; overflow: hidden; opacity: 0; visibility: hidden; }
.tab-panels .panel.active { display: block !important; }
.woocommerce-tabs.container { padding-left: 0; padding-right: 0; }

/* ---------- Notices ---------- */
.message-wrapper { margin: 0; padding-bottom: .5em; }
.return-to-shop .button { margin-right: 0; }
.message-container span { font-weight: 700; }
.message-container a { margin: 0 15px 0 0; }
.container .message-container { padding-left: 0; padding-right: 0; }
.woocommerce-message, .woocommerce-error, .woocommerce-info { list-style: none; }

/* ---------- Account ---------- */
.woocommerce-form-row label .required, .form-row .required { color: var(--tsd-alert); font-weight: 700; border: 0; text-decoration: none; }
.form-row-wide { clear: both; }
@media (min-width: 550px) {
  .form-row-first, .form-row-last { float: left; width: 48%; }
  .form-row-first { margin-right: 4%; }
}
.account-container h2.h3 { line-height: 1.2; }
.woocommerce form.woocommerce-form { margin-bottom: 1.3em; }
.woocommerce form .form-row, .woocommerce form .lost_password { margin-bottom: 8px; }
.woocommerce form .input-text { font-weight: 400; }
.woocommerce form .password-input { display: block; position: relative; }
.woocommerce form .password-input input { padding-right: 2em; }
.show-password-input { display: none; }
.woocommerce-form-login .woocommerce-form-login__rememberme { display: block; }
.woocommerce-form-login .woocommerce-form__input-checkbox { font-size: 16px; line-height: 1.6; }
.woocommerce form .woocommerce-button { display: inline-block; margin: 0 1em 0 0; border: 1px solid rgba(0, 0, 0, .05); border-radius: 0; }

/* ---------- Cart / checkout ---------- */
.shop_table { width: 100%; margin-bottom: 1.5em; border-collapse: collapse; }
.shop_table th, .shop_table td { padding: .6em .4em; text-align: left; vertical-align: middle; border-bottom: 1px solid #ececec; }
.shop_table th { font-size: .9em; letter-spacing: .05em; line-height: 1.05; text-transform: uppercase; }
.shop_table .product-thumbnail img { width: 80px; }
.shop_table .product-remove a { font-size: 1.5em; color: #999; }
.shop_table .quantity { margin: 0; }
.shop_table .actions .coupon { display: flex; gap: 10px; margin-bottom: 1em; }
.shop_table .actions .coupon input { width: auto; margin: 0; }
.cart-collaterals .cart_totals { max-width: 480px; margin-left: auto; }
.cart-collaterals .cart_totals h2 { font-size: 1.1em; text-transform: uppercase; }
.wc-proceed-to-checkout .checkout-button { display: block; width: 100%; color: #fff; background-color: var(--tsd-primary); border-radius: 6px; }
@media (max-width: 549px) { .shop_table .product-price, .shop_table .product-subtotal { display: none; } }
@media (min-width: 850px) {
  form.woocommerce-checkout { display: grid; grid-template-columns: 7fr 5fr; column-gap: 30px; align-items: start; }
  form.woocommerce-checkout > * { grid-column: 1; }
  form.woocommerce-checkout > #order_review_heading, form.woocommerce-checkout > #order_review { grid-column: 2; }
  form.woocommerce-checkout > #customer_details { grid-row: 1 / span 3; }
}
.woocommerce-checkout #order_review { padding: 15px 30px 30px; border: 2px solid var(--tsd-primary); background: #fff; }
.woocommerce-checkout #order_review_heading { font-size: 1.1em; text-transform: uppercase; }
.woocommerce-checkout-payment ul.payment_methods { margin: 0 0 1em; padding: 0; list-style: none; }
.woocommerce-checkout-payment .payment_box { padding: 10px; font-size: .9em; background: #f7f7f7; }
#place_order { width: 100%; color: #fff; background-color: var(--tsd-primary); border-radius: 6px; }
.select2-container .select2-selection--single { height: 48px; }
