/* Store archives, search, cart, checkout and account pages. */
.pf-commerce-page { background: var(--background); padding-bottom: clamp(48px, 7vw, 80px); }
.pf-commerce-page__hero, .pf-page__hero { background: var(--surface-tint); padding: clamp(18px, 2.5vw, 30px) 0; text-align: center; }
.pf-commerce-page__hero h1, .pf-page__hero h1 { color: var(--text); font-size: clamp(30px, 4vw, 46px); margin: 0; }
.pf-commerce-page__hero .woocommerce-breadcrumb { color: #7b7482; font-size: 13px; margin: 0 0 12px; }
.pf-commerce-page__hero .term-description { color: var(--text-light); margin: 13px auto 0; max-width: 620px; }
.pf-commerce-page__content { padding-top: clamp(16px, 2vw, 28px); }
.pf-commerce-page__content::after { clear: both; content: ""; display: table; }

/*
 * Shop/Products/category pages get a wider content column than the site's
 * default 1280px --container (sidebar + product grid need the extra room),
 * scoped to just this hero/content so the homepage's approved layout is
 * untouched.
 */
.pf-commerce-page__hero .container,
.pf-commerce-page__content { max-width: min(1440px, 94vw); }
.pf-commerce-page .woocommerce-notices-wrapper { margin-bottom: 18px; }
.pf-commerce-page .woocommerce-message, .pf-commerce-page .woocommerce-info, .pf-commerce-page .woocommerce-error { border: 0; border-radius: 8px; margin: 0 0 16px; }
.woocommerce-result-count { color: var(--text-light); float: left; font-size: 14px; margin: 0 0 24px; }
.woocommerce-ordering { float: right; margin: 0 0 24px; }
.woocommerce-ordering select { border: 1px solid var(--border); border-radius: 6px; color: var(--text); min-height: 42px; padding: 0 30px 0 12px; }

/*
 * Motta (parent theme) renders the shop/category archive through its own
 * catalog builder rather than this theme's archive-product.php — the
 * result count, sort control, and pagination below are Motta's own
 * markup, re-skinned to this theme's tokens rather than left in Motta's
 * default black/gray. The product cards themselves still come from
 * woocommerce/content-product.php, so they already match.
 */
.motta-result-count { color: var(--text-light); font-size: 14px; }
.catalog-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; margin-bottom: 24px; }
.catalog-toolbar__toolbar { align-items: center; display: flex; gap: 14px; }
.woocommerce-ordering__label { color: var(--text-light); font-size: 13px; }
.mobile-catalog-toolbar__sort-button { border: 1px solid var(--border); border-radius: 8px; color: var(--text); }
#motta-toolbar-view a.active, #motta-toolbar-view a:hover { color: var(--primary); }

/* Buttons: match every WooCommerce-generated button (cart, checkout, my account) to .pf-btn-primary. */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce-page a.button, .woocommerce-page button.button {
    background: var(--primary);
    border: 0;
    border-radius: 8px;
    color: #fff;
    font-weight: 700;
    min-height: 46px;
    padding: 0 22px;
    transition: background-color var(--transition), transform var(--transition);
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce #respond input#submit:hover { background: var(--primary-dark); color: #fff; }
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt { background: var(--primary); }
.woocommerce a.button.loading, .woocommerce button.button.loading, .woocommerce input.button.loading { opacity: 0.7; }

/* Form fields shared by checkout, my-account (edit address, login/register). */
.woocommerce form .form-row label { color: var(--text); font-size: 13px; font-weight: 600; }
.woocommerce form .form-row .required { color: var(--primary); text-decoration: none; }
.woocommerce form .input-text,
.woocommerce form select,
.woocommerce form textarea,
.woocommerce table.shop_table .quantity .qty,
.woocommerce div.quantity .qty {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    min-height: 46px;
    padding: 0 14px;
}
.woocommerce form textarea { min-height: 90px; padding-top: 12px; }

/* Login form's "Keep me signed in" / "Forgot password?" row: unstyled by
   default, so the checkbox label and link just ran together as inline
   paragraph content on narrow screens. */
.woocommerce form .form-row-remember { align-items: center; display: flex; flex-wrap: wrap; gap: 10px 16px; justify-content: space-between; }
.woocommerce form .form-row-remember .woocommerce-form-login__rememberme { display: inline-flex; align-items: center; gap: 6px; }
.woocommerce form .input-text:focus, .woocommerce form select:focus, .woocommerce form textarea:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12); outline: 0;
}
.woocommerce-additional-fields, .woocommerce-billing-fields, .woocommerce-shipping-fields { margin-top: 8px; }

/* Cart / order tables. */
.woocommerce table.shop_table { border: 1px solid var(--border); border-collapse: collapse; border-radius: 10px; overflow: hidden; width: 100%; }
.woocommerce table.shop_table th { background: var(--surface-tint); color: var(--text); font-size: 13px; padding: 14px; text-align: left; }
.woocommerce table.shop_table td { border-top: 1px solid var(--border); padding: 14px; vertical-align: middle; }
.woocommerce table.shop_table td.product-thumbnail img { border-radius: 8px; width: 72px; }
.woocommerce table.shop_table td.product-name a { color: var(--text); font-weight: 600; }
.woocommerce table.shop_table .product-remove a { color: var(--text-light); }
.woocommerce table.shop_table .product-remove a:hover { color: var(--primary); }
.woocommerce table.shop_table td.product-subtotal, .woocommerce table.shop_table td.product-price { color: var(--primary); font-weight: 700; }

/* Shipping / payment method lists on checkout. */
.woocommerce ul#shipping_method, .woocommerce ul.wc_payment_methods { list-style: none; margin: 0; padding: 0; }
.woocommerce ul#shipping_method li, .woocommerce ul.wc_payment_methods li.wc_payment_method {
    background: #fff; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; padding: 12px 14px;
}
.woocommerce ul.wc_payment_methods li.wc_payment_method .payment_box { background: var(--surface-tint); border-radius: 8px; margin-top: 10px; padding: 12px; }
.woocommerce-pagination, nav.woocommerce-pagination { clear: both; margin-top: 36px; text-align: center; }
.woocommerce-pagination ul, .woocommerce-pagination ul.page-numbers { border: 0; display: inline-flex; gap: 7px; list-style: none; margin: 0; padding: 0; }
.woocommerce-pagination ul li { border: 0; }
.woocommerce-pagination ul li a, .woocommerce-pagination ul li span,
.woocommerce-pagination .page-numbers { align-items: center; border: 1px solid var(--border); border-radius: 6px; color: var(--text); display: inline-flex; justify-content: center; min-width: 38px; min-height: 38px; }
.woocommerce-pagination ul li span.current, .woocommerce-pagination .page-numbers.current { background: var(--primary); border-color: var(--primary); color: #fff; }
.woocommerce-pagination .page-numbers:hover { border-color: var(--primary); color: var(--primary); }
.woocommerce-pagination .page-numbers.current:hover { color: #fff; }
.pf-page { background: var(--background); min-height: 45vh; }
.pf-page__content { max-width: 900px; padding-bottom: clamp(48px, 7vw, 80px); padding-top: clamp(36px, 6vw, 68px); }
.pf-page__content > * + * { margin-top: 1.25em; }
.pf-page__content h2, .pf-page__content h3 { color: var(--text); line-height: 1.25; }
.pf-page__content p, .pf-page__content li { color: #565061; line-height: 1.8; }
.pf-page__content a, .pf-text-link { color: var(--primary); font-weight: 700; }
.pf-text-link { align-items: center; display: inline-flex; gap: 8px; }
.pf-text-link:hover { color: var(--primary-dark); }
.pf-posts-page__grid { display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); padding-bottom: 72px; padding-top: 50px; }
.pf-post-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.pf-post-card__image img { aspect-ratio: 1.55; height: 100%; object-fit: cover; transition: transform 250ms ease; width: 100%; }
.pf-post-card:hover .pf-post-card__image img { transform: scale(1.04); }
.pf-post-card__content { padding: 20px; }
.pf-post-card__content > p:first-child { color: var(--primary); font-size: 12px; font-weight: 700; margin: 0 0 8px; }
.pf-post-card h2 { font-size: 20px; margin: 0 0 10px; }
.pf-post-card h2 a:hover { color: var(--primary); }
.pf-post-card__content > p { color: var(--text-light); line-height: 1.7; }
.pf-pagination { grid-column: 1 / -1; text-align: center; }
.pf-empty-state { color: var(--text-light); grid-column: 1 / -1; text-align: center; }

/* Plain post/page search results (search.php, non-product queries). */
.pf-search-results { display: grid; gap: 20px; padding-bottom: 40px; }
.pf-search-result { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 20px 24px; }
.pf-search-result h2 { font-size: 19px; margin: 0 0 8px; }
.pf-search-result h2 a:hover { color: var(--primary); }
.pf-search-result p { color: var(--text-light); line-height: 1.7; margin: 0; }

/* 404 page (404.php). */
.pf-404 { align-items: center; display: flex; flex-direction: column; gap: 16px; justify-content: center; min-height: 55vh; padding: clamp(40px, 8vw, 90px) 0; text-align: center; }
.pf-404__code { color: var(--surface-tint); font-size: clamp(70px, 12vw, 130px); font-weight: 800; line-height: 1; }
.pf-404 h1 { color: var(--text); font-size: clamp(24px, 3vw, 32px); margin: 0; }
.pf-404 p { color: var(--text-light); max-width: 460px; }
.pf-404__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 8px; }
.pf-404__search { margin-top: 18px; max-width: 420px; width: 100%; }
.woocommerce-cart-form, .woocommerce-checkout { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: clamp(16px, 3vw, 30px); }
.woocommerce .cart-collaterals .cart_totals, .woocommerce-checkout-review-order { background: var(--surface-tint); border-radius: 10px; padding: 20px; }

/* =============================================================================
   MY ACCOUNT
   =============================================================================
   Motta renders this as `.motta-myaccount__wrapper` (avatar/greeting + the
   `.woocommerce-MyAccount-navigation` nav list) floated left at a fixed
   23.246%, next to `.woocommerce-MyAccount-content` floated right — and the
   old rules this replaces additionally floated the *nested* nav list at its
   own 24% width inside that already-narrow sidebar, plus set the content
   column to `float:right` at the same selector specificity as Motta's own
   `float:left` rule (so which one actually won came down to stylesheet load
   order, not a deliberate layout). Floats also never stretch to match each
   other's height, so a short sidebar (four nav links) or a short content
   panel (the Dashboard's few lines of text) left a dangling blank gap next
   to whichever column was taller. Flexbox replaces all of that: both
   columns are always equal height with `align-items: stretch`, the tinted
   background shows through any leftover space inside a short card instead
   of bare white, and it collapses to one column below 900px instead of
   relying on floats reverting to block. */
.woocommerce-account .pf-page__content { max-width: min(1100px, 94vw); }

/* Logged-out state: WooCommerce swaps the whole two-column layout above for
   a single login/register form (myaccount/form-login.php) — give that its
   own card instead of sitting directly on the page background. */
.woocommerce-account form.login {
    background: var(--surface-tint);
    border-radius: var(--radius);
    padding: clamp(20px, 4vw, 36px);
}

.woocommerce-account .motta-myaccount__wrapper {
    background: var(--surface-tint);
    align-items: flex-start;
    border: 0;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    float: none;
    margin: 0;
    padding: clamp(20px, 3vw, 28px);
    width: auto;
}

.woocommerce-account .motta-myaccount__wrapper .motta-myaccount {
    margin: 0 0 20px;
    padding-bottom: 20px;
    width: 100%;
}

/* Motta's avatar image has no `flex-shrink:0` of its own, so in a fixed
   260px sidebar (see the flex rule below) it could get squeezed by a long
   display name instead of the name wrapping — pin the avatar's size and
   let the text column shrink/wrap instead. */
.woocommerce-account .motta-myaccount__wrapper .motta-myaccount img { flex-shrink: 0; }
.woocommerce-account .motta-myaccount__user { min-width: 0; }
.woocommerce-account .motta-myaccount__user .text { color: var(--text); font-size: 20px; }
.woocommerce-account .motta-myaccount__user .name { color: var(--text-light); overflow-wrap: anywhere; }

.woocommerce-account .woocommerce-MyAccount-navigation { float: none; width: 100%; }
.woocommerce .woocommerce-MyAccount-navigation ul { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.woocommerce .woocommerce-MyAccount-navigation li { margin: 0 !important; }
/* Motta's own nav-link rule (`...navigation li a`) carries one more
   type-selector than any class-only selector re-skinning it here, which
   outweighs source order in the specificity tie-break — `!important` is
   the only reliable way to actually win, not a style choice. */
.woocommerce .woocommerce-MyAccount-navigation a {
    border-left: 0 !important;
    color: var(--text) !important;
    display: block !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    padding: 10px 12px !important;
}
.woocommerce .woocommerce-MyAccount-navigation a::before { display: none !important; }
.woocommerce .woocommerce-MyAccount-navigation .is-active a, .woocommerce .woocommerce-MyAccount-navigation a:hover {
    background: #fff !important;
    border-radius: 8px !important;
    color: var(--primary) !important;
}

.woocommerce-account .woocommerce-MyAccount-content {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    float: none;
    padding: clamp(20px, 3vw, 36px);
    width: auto;
}

@media (min-width: 900px) {
    /* The actual flex parent has to be the `.woocommerce` div, not
       `.pf-page__content` itself: `[woocommerce_my_account]` always wraps
       its output in a plain `<div class="woocommerce">` (WooCommerce's own
       `WC_Shortcodes::shortcode_wrapper()`), and that div — not whatever
       page-builder markup sits above it — is the true direct parent of
       `.motta-myaccount__wrapper` and `.woocommerce-MyAccount-content`.
       Flexbox only lays out *direct* children, so targeting
       `.pf-page__content` directly never reached this pair; it just
       flexed the single wrapper div sitting between them (on this site
       that's Elementor's own container, since the My Account page is
       edited in Elementor as a Shortcode widget — see postmeta
       `_elementor_data` / `_elementor_edit_mode` for page ID 8 — but the
       same gap would exist on a plain Page template too, since the
       shortcode's own wrapper div is always there regardless). A
       descendant selector reaches it no matter how many wrapper layers
       (Elementor's or otherwise) sit in between, and stays scoped to this
       page via the `.woocommerce-account` body class. */
    .woocommerce-account .pf-page__content .woocommerce {
        align-items: stretch;
        display: flex;
        flex-wrap: wrap;
        gap: 28px;
    }
    /* `.pf-page__content > * + *` (a generic blog-style vertical rhythm
       rule, further up this file) only ever matched `.pf-page__content`'s
       actual direct child — the single `.woocommerce` div — never the
       sidebar/content pair one level deeper, so there's no margin to zero
       out on them here; `gap` alone provides the horizontal spacing. */
    .woocommerce-account .motta-myaccount__wrapper { flex: 0 0 260px; }
    .woocommerce-account .woocommerce-MyAccount-content { flex: 1 1 0%; min-width: 0; }
    /* inc/my-account-hero.php's welcome band (`.pf-account-hero`) is hooked
       onto `woocommerce_before_account_navigation`, which fires *inside*
       this same `.woocommerce` div — making it a third direct-child flex
       item alongside the nav/content pair above, not a full-width band
       sitting above them as intended. Without a forced 100% basis it took
       whatever auto width its content needed and left the content column
       almost none, wrapping "Account overview" one letter per line. Forcing
       it to 100% width (with flex-wrap above) pushes it onto its own row;
       the nav/content pair then flow onto the row below it together. */
    .woocommerce-account .pf-page__content .woocommerce > .pf-account-hero {
        flex: 1 1 100%;
    }
}

/* Addresses landing page — two address cards side by side on wide screens,
   stacked on mobile (WooCommerce's own `.u-column1`/`.u-column2` widths are
   percentage floats tuned for a much wider content column than this card
   now has). */
.woocommerce-account .woocommerce-Addresses.col2-set {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}
@media (min-width: 600px) {
    .woocommerce-account .woocommerce-Addresses.col2-set { grid-template-columns: 1fr 1fr; }
}
.woocommerce-account .woocommerce-Address { background: var(--surface-tint); border-radius: 10px; float: none; padding: 18px; width: auto; }
.woocommerce-account .woocommerce-Address-title { align-items: center; display: flex; gap: 12px; justify-content: space-between; }
.woocommerce-account .woocommerce-Address-title h3 { font-size: 15px; margin: 0; }
.woocommerce-account .woocommerce-Address address { color: var(--text-light); font-style: normal; line-height: 1.7; }

/* Orders / downloads tables can't shrink below their column count — scroll
   the table itself instead of the whole page overflowing horizontally. */
.woocommerce-account .woocommerce-orders-table,
.woocommerce-account .woocommerce-table--order-downloads { display: block; max-width: 100%; overflow-x: auto; }

@media (max-width: 480px) {
    .woocommerce-account .motta-myaccount { align-items: flex-start; flex-direction: column; gap: 10px; }
    .woocommerce-account .motta-myaccount__user { margin-left: 0; }
}
@media (max-width: 800px) { .pf-posts-page__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .pf-posts-page__grid { grid-template-columns: 1fr; padding-top: 30px; } .pf-commerce-page .woocommerce-ordering { float: none; margin-bottom: 20px; } .woocommerce .cart-collaterals .cart_totals { width: 100%; } }

/* Shop/category/Products filter sidebar (inc/shop-listing.php). */
.pf-shop-layout { align-items: start; display: grid; gap: 32px; grid-template-columns: 240px minmax(0, 1fr); }
.pf-shop-layout__main { min-width: 0; }
.pf-shop-filters { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; position: sticky; top: 20px; }
.pf-shop-filters__back { align-items: center; color: var(--text); display: inline-flex; font-size: 13px; font-weight: 700; gap: 8px; margin-bottom: 16px; }
.pf-shop-filters__back:hover { color: var(--primary); }
.pf-shop-filters__group { border-top: 1px solid var(--border); padding: 16px 0; }
.pf-shop-filters__group:first-of-type { border-top: 0; padding-top: 0; }
.pf-shop-filters__group summary { color: var(--text); cursor: pointer; font-size: 14px; font-weight: 700; list-style: none; }
.pf-shop-filters__group summary::-webkit-details-marker { display: none; }
.pf-shop-filters__group summary::after { content: "\2013"; float: right; }
.pf-shop-filters__group:not([open]) summary::after { content: "+"; }
.pf-shop-filters__list { list-style: none; margin: 14px 0 0; padding: 0; }
.pf-shop-filters__list li + li { margin-top: 2px; }
.pf-shop-filters__list a { align-items: center; border-radius: 6px; color: var(--text-light); display: flex; font-size: 13px; justify-content: space-between; padding: 7px 8px; }
.pf-shop-filters__list a:hover { background: var(--surface-tint); color: var(--primary); }
.pf-shop-filters__list a b { color: var(--text-light); font-weight: 600; }
.pf-shop-filters__price { margin-top: 14px; }
.pf-shop-filters__price .price_slider { margin-bottom: 16px; }
.pf-shop-filters__price .price_slider_amount { align-items: center; display: flex; flex-wrap: wrap; font-size: 13px; gap: 8px; justify-content: space-between; }
/* Neither WooCommerce core nor this theme sets a width on these two text
   inputs, so browsers fall back to the default size="20" (~170px each) —
   two of those plus the Filter button badly overflow a 240px sidebar (and
   the whole page horizontally on mobile, since nothing here wraps). */
.pf-shop-filters__price #min_price,
.pf-shop-filters__price #max_price {
    background: transparent;
    border: 0;
    box-shadow: none;
    color: var(--text);
    flex: 1 1 auto;
    font-weight: 600;
    max-width: 70px;
    min-width: 0;
    padding: 0;
}
.pf-shop-filters__price .price_slider_amount .button { flex: 0 0 auto; min-height: 34px; padding: 0 14px; }
.pf-shop-filters__price .ui-slider { background: var(--border); border: 0; border-radius: 4px; height: 4px; position: relative; }
.pf-shop-filters__price .ui-slider-range { background: var(--primary); border-radius: 4px; height: 100%; position: absolute; }
.pf-shop-filters__price .ui-slider-handle { background: #fff; border: 2px solid var(--primary); border-radius: 50%; cursor: pointer; height: 16px; outline: 0; position: absolute; top: -6px; width: 16px; }
.pf-listing-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; margin-bottom: 24px; }
.pf-manual-price-filter__row { align-items: center; display: flex; gap: 8px; margin-bottom: 12px; }
.pf-manual-price-filter__row input { border: 1px solid var(--border); border-radius: 6px; min-height: 38px; padding: 0 10px; width: 100%; }
.pf-manual-price-filter .button { min-height: 38px; padding: 0 16px; width: 100%; }
@media (max-width: 900px) {
    .pf-shop-layout { grid-template-columns: 1fr; }
    .pf-shop-filters { position: static; }
}
