/* ========================================================================
   PALMA B2B Catalogue - WooCommerce product card and detail page redesign
   Design language: matches homepage (warm bg, soft shadows, brand red)
   ======================================================================== */

/* --- Page background: light grey so white cards float --- */
.woocommerce.archive .site-main,
.woocommerce-products-header ~ * { background: #f2f0ec; }

/* --- Hide e-commerce chrome (catalog mode) --- */
.woocommerce .price,
.woocommerce .add_to_cart_button,
.woocommerce .single_add_to_cart_button,
.woocommerce .quantity,
.woocommerce .cart,
.woocommerce-cart,
.woocommerce-checkout { display: none !important; }

/* ========================================================================
   PRODUCT LOOP CARDS (list pages, category pages, related products)
   ======================================================================== */
/* Constrain product listing area to match site width */
.woocommerce-products-header ~ .palma-cat-nav,
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering,
.woocommerce ul.products,
.woocommerce .woocommerce-pagination {
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
    width: 100%;
}
.palma-cat-nav {
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
    margin: 0 0 48px;
    padding: 0;
    list-style: none;
}
/* Kill WooCommerce's clearfix ::before that creates a ghost grid cell */
.woocommerce ul.products::before,
.woocommerce ul.products::after {
    content: none !important;
}
.woocommerce ul.products li.product {
    display: flex !important;
    flex-direction: column;
    position: relative;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 0 18px 0 !important;
    background: #ffffff;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.03);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.woocommerce ul.products li.product:hover {
    border-color: rgba(156,19,25,.30);
    box-shadow: 0 16px 40px rgba(0,0,0,.07);
    transform: translateY(-6px);
}

/* Card image area */
.woocommerce ul.products li.product a img {
    display: block;
    width: 100%;
    height: 238px;
    object-fit: cover;
    object-position: center;
    margin: 0;
    background: #ffffff;
    border-bottom: 0;
}
.woocommerce ul.products li.product .woocommerce-loop-product__link {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    text-decoration: none;
    color: inherit;
}

/* Card body */
.woocommerce ul.products li.product .palma-card-inner,
.woocommerce ul.products li.product > .button,
.woocommerce ul.products li.product > a.button {
    /* nothing here, layout handled by flex */
}

/* Product title */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2.woocommerce-loop-product__title {
    padding: 0;
    margin: 0;
    color: #20201d;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -.005em;
    display: block;
    min-height: 64px;
}
.palma-card-title-main,
.palma-card-title-accent {
    display: inline;
}
.woocommerce ul.products li.product .palma-card-context {
    min-height: 20px;
    margin: 8px 0 0;
    padding: 0;
    overflow: hidden;
    color: #20201d;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Spec summary chips */
.palma-card-specs {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.palma-card-specs span {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 30px;
    gap: 4px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #252521;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    box-sizing: border-box;
}
.palma-card-specs b {
    width: 15px;
    height: 15px;
    overflow: hidden;
    color: #9c1319;
    font-size: 0;
    line-height: 1;
    text-transform: none;
    letter-spacing: 0;
    flex: 0 0 auto;
}
.palma-card-specs b::before {
    display: block;
    color: #9c1319;
    font-size: 13px;
    font-weight: 800;
    line-height: 15px;
    text-align: center;
}
.palma-card-specs span:nth-child(1) b::before { content: "V"; }
.palma-card-specs span:nth-child(2) b::before { content: "Ah"; font-size: 10px; }
.palma-card-specs span:nth-child(3) b::before { content: "G"; }

/* RFQ button */
.woocommerce ul.products li.product .palma-rfq-button,
.woocommerce ul.products li.product a.button.palma-rfq-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 8px 18px !important;
    border: 0 !important;
    border-radius: 5px !important;
    color: #ffffff !important;
    background: #9c1319 !important;
    font-weight: 600 !important;
    font-size: 12.5px !important;
    letter-spacing: .02em !important;
    text-decoration: none !important;
    transition: background-color .2s ease !important;
}
.woocommerce ul.products li.product .palma-rfq-button:hover,
.woocommerce ul.products li.product a.button.palma-rfq-button:hover {
    background: #780606 !important;
}
.palma-card-details {
    display: inline-block;
    margin-bottom: 2px;
    color: #9c1319;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s ease;
}
.palma-card-details::after {
    content: " \2192";
    transition: margin-left .2s ease;
}
.palma-card-details:hover {
    color: #780606;
}
.palma-card-details:hover::after {
    margin-left: 4px;
}
.woocommerce ul.products li.product .palma-card-details,
.woocommerce ul.products li.product .palma-rfq-button {
    padding-left: 24px;
    padding-right: 24px;
    padding-bottom: 18px;
}

.woocommerce ul.products li.product .palma-card-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 5px 10px;
    border-radius: 7px;
    color: #8d1117;
    background: #f7e9e7;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .01em;
    pointer-events: none;
}

.woocommerce ul.products li.product .palma-card-family {
    display: none;
}
.woocommerce ul.products li.product .palma-rfq-button {
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 18px !important;
}
.woocommerce ul.products li.product > .palma-card-details,
.woocommerce ul.products li.product > .palma-rfq-button,
.woocommerce ul.products li.product > a.palma-card-details,
.woocommerce ul.products li.product > a.palma-rfq-button {
    /* direct children of li, not inside link */
}
.woocommerce ul.products li.product > a.palma-card-details {
    display: inline-block;
    padding-left: 24px;
    padding-bottom: 0;
    margin-bottom: 18px;
}
.woocommerce ul.products li.product > .palma-rfq-button,
.woocommerce ul.products li.product > a.palma-rfq-button {
    position: absolute;
    bottom: 18px;
    right: 24px;
    padding: 8px 18px;
    margin: 0 !important;
}

/* The text block wrapper WooCommerce puts between image and button */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .palma-card-context,
.woocommerce ul.products li.product .palma-card-specs,
.woocommerce ul.products li.product .price {
    padding-left: 20px;
    padding-right: 20px;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product .palma-card-context,
.woocommerce ul.products li.product .palma-card-specs {
    padding-left: 24px;
    padding-right: 24px;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    padding-top: 22px;
}
.woocommerce ul.products li.product .palma-card-specs {
    padding-bottom: 20px;
}

/* ========================================================================
   CATALOG HERO (archive header)
   ======================================================================== */
.palma-catalog-hero {
    padding: 0 !important;
    margin: 0 !important;
    background: #1a191d !important;
    max-width: none !important;
    border-bottom: 3px solid #9c1319;
}
.palma-catalog-hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px 48px;
}
.palma-catalog-hero h1 {
    margin: 0 0 14px;
    color: #F6F4F0;
    font-size: clamp(32px, 4vw, 44px);
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -.02em;
}
.palma-catalog-hero p {
    margin: 0;
    color: rgba(246,244,240,.6);
    font-size: 16px;
    line-height: 1.6;
    max-width: 620px;
}
.palma-catalog-kicker { display: none; }
.palma-catalog-features {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}
.palma-catalog-features span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid rgba(246,244,240,.14);
    border-radius: 6px;
    color: rgba(246,244,240,.76);
    background: rgba(255,255,255,.035);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
}
.palma-catalog-empty { max-width: 1280px; margin-inline: auto; padding-inline: 24px; }

/* Breadcrumb */
.woocommerce .woocommerce-breadcrumb {
    max-width: 1280px !important;
    margin: 0 auto !important;
    padding: 16px 24px !important;
    color: #999994 !important;
    font-size: 13px !important;
    box-sizing: border-box;
}
.woocommerce .woocommerce-breadcrumb a {
    color: #999994 !important;
    text-decoration: none;
}
.woocommerce .woocommerce-breadcrumb a:hover {
    color: #9c1319 !important;
}

/* ========================================================================
   SORTING / RESULT COUNT BAR
   ======================================================================== */
.woocommerce .woocommerce-result-count {
    margin-bottom: 24px;
    color: #20201d;
    font-size: 15px;
    font-weight: 600;
}
.woocommerce .woocommerce-result-count::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    background: #9c1319;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3C/svg%3E") no-repeat center / contain;
    vertical-align: -3px;
}
.woocommerce .woocommerce-ordering {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    white-space: nowrap;
}
.woocommerce .woocommerce-ordering::before {
    content: "Sort by:";
    display: inline-flex;
    flex: 0 0 auto;
    color: #999994;
    font-size: 13px;
    white-space: nowrap;
}
.woocommerce .woocommerce-ordering select {
    min-width: 0;
    padding: 7px 32px 7px 14px;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 6px;
    background: #fff;
    color: #55554e;
    font-size: 13px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
}

/* ========================================================================
   PRODUCT DETAIL PAGE
   ======================================================================== */
.single-product.woocommerce-page {
    background: #f4f2ee;
}
.single-product div.product {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(380px, .85fr);
    gap: 36px 50px;
    align-items: start;
    padding-top: 8px;
    padding-bottom: 56px;
}
.single-product div.product div.images,
.single-product div.product div.summary,
.single-product div.product .woocommerce-tabs,
.single-product div.product .related {
    float: none !important;
    width: auto !important;
}
.single-product div.product div.images {
    grid-column: 1;
    margin-bottom: 0;
}
.single-product div.product div.summary {
    grid-column: 2;
    margin-bottom: 0;
    padding: 4px 0 0;
}
.single-product div.product .woocommerce-tabs,
.single-product div.product .related,
.single-product div.product .upsells {
    grid-column: 1 / -1;
}
.single-product div.product div.images .woocommerce-product-gallery__wrapper {
    margin: 0;
}
.single-product div.product div.images .woocommerce-product-gallery__image {
    overflow: hidden;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 10px;
    background: #fbfaf7;
    box-shadow: 0 20px 60px rgba(44, 39, 32, .08);
}
.single-product div.product div.images img {
    display: block;
    width: 100%;
    height: auto;
}
.single-product .product .product_title,
.single-product .product .summary-entry > .product_title,
.single-product .product .summary > .product_title {
    display: block !important;
    margin: 0 0 18px;
    color: #20201d;
    font-size: clamp(31px, 3vw, 42px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.01em;
}
.single-product .product .summary-entry > .product_title::after,
.single-product .product .summary > .product_title::after {
    content: "";
    display: block;
    width: 54px;
    height: 3px;
    margin-top: 18px;
    background: #9c1319;
    border-radius: 2px;
}
.palma-single-specs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 18px;
}
.palma-single-spec {
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid rgba(156,19,25,.12);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(44, 39, 32, .045);
}
.palma-single-spec b,
.palma-single-spec strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.palma-single-spec b {
    margin-bottom: 5px;
    color: #8c8982;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
}
.palma-single-spec strong {
    color: #20201d;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.18;
}

/* SKU / Category meta line */
.palma-product-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 18px;
    padding: 13px 16px;
    border-radius: 8px;
    background: #fffdfa;
    color: #55554e;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.055);
}
.palma-product-meta-line span {
    display: inline-flex;
    min-width: 0;
    gap: 4px;
}
.palma-product-meta-line a { color: #9c1319; text-decoration: none; }
.palma-product-meta-line a:hover { text-decoration: underline; }

/* RFQ button on detail page */
.single-product .summary a.button.palma-rfq-button,
.single-product .summary-entry a.button.palma-rfq-button,
.woocommerce.single-product a.button.palma-rfq-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    padding: 14px 34px !important;
    margin-top: 4px;
    border: 0 !important;
    border-radius: 6px !important;
    color: #ffffff !important;
    background: #9c1319 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    box-shadow: 0 14px 30px rgba(156,19,25,.18);
}
.single-product .summary a.button.palma-rfq-button:hover,
.single-product .summary-entry a.button.palma-rfq-button:hover,
.woocommerce.single-product a.button.palma-rfq-button:hover {
    color: #ffffff !important;
    background: #780606 !important;
}

/* Spec table */
.palma-product-specs,
.woocommerce table.shop_table {
    width: 100%;
    margin: 24px 0;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 10px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.03);
}
.palma-product-specs th,
.woocommerce table.shop_table th {
    padding: 14px 20px;
    text-align: left;
    color: #55554e;
    font-size: 13px;
    font-weight: 600;
    background: #f7f5ef;
    border-bottom: 1px solid rgba(0,0,0,.06);
}
.palma-product-specs td,
.woocommerce table.shop_table td {
    padding: 14px 20px;
    color: #20201d;
    font-size: 14px;
    border-bottom: 1px solid rgba(0,0,0,.04);
}
.palma-product-specs tr:nth-child(even) td,
.woocommerce table.shop_table tr:nth-child(even) td {
    background: rgba(247,245,239,.5);
}
.palma-product-specs tr:last-child td,
.woocommerce table.shop_table tr:last-child td {
    border-bottom: 0;
}

/* Description area */
.woocommerce-product-details__short-description {
    margin: 0 0 18px;
    padding: 16px 20px;
    border-left: 3px solid #9c1319;
    background: #faf8f6;
    border-radius: 0 8px 8px 0;
    color: #55554e;
    font-size: 15px;
    line-height: 1.65;
}
.woocommerce-product-details__short-description p:last-child {
    margin-bottom: 0;
}

/* Tabs */
.woocommerce div.product .woocommerce-tabs {
    margin-top: 18px;
}
.woocommerce div.product .woocommerce-tabs ul.tabs {
    display: none;
}
.woocommerce div.product .woocommerce-tabs .panel {
    margin: 0;
    padding: 0;
}
.woocommerce div.product .woocommerce-tabs .panel > h2:first-child {
    margin-top: 0;
}

/* Related products heading */
.woocommerce .related > h2 {
    margin: 64px 0 24px;
    color: #20201d;
    font-size: 28px;
    font-weight: 700;
}

/* Pagination */
.woocommerce nav.woocommerce-pagination ul {
    border: 0;
}
.woocommerce nav.woocommerce-pagination ul li {
    border: 0;
    margin: 0 4px;
}
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    padding: 10px 16px;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 6px;
    color: #55554e;
    font-size: 14px;
}
.woocommerce nav.woocommerce-pagination ul li span.current {
    background: #9c1319;
    color: #fff;
    border-color: #9c1319;
}

/* ========================================================================
   EMPTY CATALOGUE STATE
   ======================================================================== */
.palma-catalog-empty { padding-top: 72px; padding-bottom: 88px; }
.palma-catalog-empty h2 { max-width: 680px; margin: 0 0 14px; color: #302F34; font-size: clamp(30px, 4vw, 42px); line-height: 1.12; }
.palma-catalog-empty > p { max-width: 760px; font-size: 17px; }
.palma-catalog-categories { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 980px; margin: 34px 0; padding: 0; list-style: none; }
.palma-catalog-categories a { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 86px; padding: 20px; border: 1px solid #E5E3DF; border-top: 3px solid #9C1319; color: #302F34; background: #fff; font-weight: 700; line-height: 1.25; text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
.palma-catalog-categories a:hover { border-color: #9C1319; box-shadow: 0 8px 22px rgba(48,47,52,.10); transform: translateY(-2px); }
.palma-catalog-categories a:focus-visible { outline: 3px solid #CC3366; outline-offset: 3px; }

/* ========================================================================
   RESPONSIVE
   ======================================================================== */
@media (max-width: 1024px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding-left: 16px;
        padding-right: 16px;
    }
}
@media (max-width: 768px) {
    .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .woocommerce ul.products li.product a img { height: 180px; }
}
@media (max-width: 480px) {
    .woocommerce ul.products { grid-template-columns: 1fr; }
    .palma-catalog-hero-inner { padding: 40px 20px 36px; }
    .palma-catalog-empty { padding-top: 52px; padding-bottom: 60px; }
    .palma-catalog-categories { grid-template-columns: 1fr; }
}

/* ========================================================================
   CATEGORY NAVIGATION BAR
   ======================================================================== */
.palma-cat-nav {
    width: 100%;
    margin: 0 0 32px;
    padding: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.palma-cat-nav ul {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.palma-cat-nav li {
    margin: 0;
    padding: 0;
}
.palma-cat-nav a {
    display: inline-block;
    padding: 10px 4px;
    margin-right: 28px;
    border: 0;
    border-radius: 0;
    color: #888884;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: color .2s ease;
    position: relative;
}
.palma-cat-nav a:hover {
    color: #20201d;
}
.palma-cat-nav li.is-active a {
    color: #9c1319;
    background: transparent;
    box-shadow: none;
}
.palma-cat-nav li.is-active a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: #9c1319;
    border-radius: 1px;
}

/* ========================================================================
   PRODUCT DETAIL PAGE - constrain to site width (1280px)
   ======================================================================== */
.single-product .product,
.single-product .woocommerce-breadcrumb,
.single-product .woocommerce-tabs,
.single-product .related,
.single-product .upsells {
    max-width: 1280px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    box-sizing: border-box;
}
.single-product .woocommerce-breadcrumb {
    padding-top: 24px;
    padding-bottom: 12px;
}

@media (max-width: 1024px) {
    .single-product div.product {
        grid-template-columns: minmax(0, 1fr);
        gap: 28px;
    }
    .single-product div.product div.images,
    .single-product div.product div.summary {
        grid-column: 1;
    }
    .single-product .product .product_title,
    .single-product .product .summary-entry > .product_title,
    .single-product .product .summary > .product_title {
        font-size: clamp(29px, 5vw, 38px);
    }
}

@media (max-width: 559px) {
    .single-product .product,
    .single-product .woocommerce-breadcrumb,
    .single-product .woocommerce-tabs,
    .single-product .related,
    .single-product .upsells {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    .single-product div.product {
        gap: 24px;
        padding-top: 0;
        padding-bottom: 44px;
    }
    .single-product .product .product_title,
    .single-product .product .summary-entry > .product_title,
    .single-product .product .summary > .product_title {
        margin-bottom: 16px;
        font-size: 28px;
        line-height: 1.08;
    }
    .palma-single-specs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        margin-bottom: 16px;
    }
    .palma-single-spec {
        padding: 11px 12px;
    }
    .single-product .summary a.button.palma-rfq-button,
    .single-product .summary-entry a.button.palma-rfq-button,
    .woocommerce.single-product a.button.palma-rfq-button {
        width: 100% !important;
        min-height: 52px;
        margin-top: 2px;
    }
    .palma-product-meta-line {
        flex-direction: column;
        gap: 8px;
    }
    .palma-product-meta-line span {
        display: block;
    }
}

/* ========================================================================
   PRODUCTS ARCHIVE - layout refinement (Web first, then tablet / mobile)
   ======================================================================== */
/* Keep archive-only geometry separate from product-detail components. */
body.post-type-archive-product .palma-catalog-hero,
body.tax-product_cat .palma-catalog-hero,
body.tax-product_tag .palma-catalog-hero {
    border-bottom-width: 3px;
}

/* Web: a balanced two-column header without inventing unapproved imagery. */
.palma-catalog-hero-inner {
    display: grid;
    grid-template-columns: minmax(0, .88fr) minmax(460px, .82fr);
    align-items: center;
    gap: clamp(36px, 5vw, 80px);
    width: 100%;
    box-sizing: border-box;
    min-height: 246px;
    padding: 38px 24px 34px;
}
.palma-catalog-hero-copy { min-width: 0; }
.palma-catalog-hero h1 { margin-bottom: 10px; }
.palma-catalog-hero p { max-width: 650px; }
.palma-catalog-features {
    gap: 10px 24px;
    margin-top: 22px;
}
.palma-catalog-hero-visual {
    position: relative;
    min-height: 0;
    overflow: hidden;
    padding: 10px;
    border: 1px solid rgba(246,244,240,.14);
    border-radius: 12px;
    background:
        radial-gradient(circle at 84% 16%, rgba(156,19,25,.32), transparent 31%),
        linear-gradient(135deg, rgba(255,255,255,.07), transparent 58%),
        rgba(255,255,255,.026);
}
.palma-catalog-hero-visual::before,
.palma-catalog-hero-visual::after {
    position: absolute;
    content: "";
    border-radius: 50%;
    border: 1px solid rgba(156,19,25,.58);
}
.palma-catalog-hero-visual::before {
    width: 190px;
    height: 190px;
    right: -44px;
    top: -54px;
}
.palma-catalog-hero-visual::after {
    width: 108px;
    height: 108px;
    right: 62px;
    bottom: -55px;
    border-color: rgba(246,244,240,.17);
}
.palma-catalog-hero-products {
    position: relative;
    display: grid;
    grid-template-columns: 1.12fr .88fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-height: 178px;
    z-index: 1;
}
.palma-catalog-hero-image {
    position: relative;
    z-index: 1;
    margin: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #f2f2f0;
    box-shadow: 0 18px 44px rgba(0,0,0,.20);
}
.palma-catalog-hero-image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 971 / 270;
    object-fit: cover;
}
.palma-catalog-hero-product {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    margin: 0;
    border: 1px solid rgba(246,244,240,.10);
    border-radius: 8px;
    background: rgba(246,244,240,.92);
    box-shadow: 0 18px 44px rgba(0,0,0,.20);
}
.palma-catalog-hero-product--1 {
    grid-row: 1 / 3;
}
.palma-catalog-hero-product img {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 164px;
    padding: 14px;
    object-fit: contain;
    box-sizing: border-box;
    mix-blend-mode: multiply;
}

/* Desktop category navigation is fully visible; scrolling only belongs to touch layouts. */
.palma-cat-nav {
    position: relative;
    margin: 24px auto 24px;
    overflow: visible;
}
.palma-cat-nav ul {
    justify-content: space-between;
    gap: 20px;
    width: 100%;
}
.palma-cat-nav a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 44px;
    margin-right: 0;
    padding: 11px 0 9px;
}
.palma-cat-label {
    white-space: nowrap;
}
.palma-cat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    color: #77736b;
    background: rgba(255,255,255,.68);
    font-size: 11px;
    font-weight: 700;
}
.palma-cat-nav li.is-active .palma-cat-count {
    color: #9c1319;
    background: #f5e7e4;
}

/* A single toolbar prevents count and sorting controls from visually drifting apart. */
.woocommerce .palma-catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1280px;
    margin: 0 auto 24px;
    padding: 0 24px;
    box-sizing: border-box;
}
.woocommerce .palma-catalog-toolbar .woocommerce-result-count,
.woocommerce .palma-catalog-toolbar .woocommerce-ordering {
    width: auto;
    max-width: none !important;
    margin: 0 !important;
    padding: 0;
    float: none;
}
.woocommerce .palma-catalog-toolbar .woocommerce-result-count { white-space: nowrap; }
.woocommerce .palma-catalog-toolbar .woocommerce-ordering {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

/* Stable product image frame: show the whole approved product image instead of cropping it. */
.woocommerce ul.products li.product {
    padding: 0 !important;
}
.woocommerce ul.products li.product .woocommerce-loop-product__link {
    min-height: 0;
    flex: 1 1 auto;
}
.woocommerce ul.products li.product a img {
    height: 214px;
    box-sizing: border-box;
    padding: 18px 28px 10px;
    object-fit: contain;
    background: #ffffff;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    min-height: 64px;
    padding-top: 18px;
}
.woocommerce ul.products li.product .palma-card-specs {
    min-height: 34px;
    padding-bottom: 24px;
}
.woocommerce ul.products li.product .palma-card-specs--empty { visibility: hidden; }
.woocommerce ul.products li.product .palma-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 56px;
    margin-top: auto;
    padding: 0 22px 16px;
    border-top: 1px solid #f0ede7;
}
.woocommerce ul.products li.product .palma-card-actions .palma-card-details {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}
.woocommerce ul.products li.product .palma-card-actions .palma-rfq-button,
.woocommerce ul.products li.product .palma-card-actions a.palma-rfq-button {
    position: static;
    display: inline-flex !important;
    flex: 0 0 auto;
    min-height: 44px;
    width: auto !important;
    margin: 0 !important;
    padding: 9px 16px !important;
    color: #ffffff !important;
    background: #9c1319 !important;
    box-shadow: 0 10px 22px rgba(156,19,25,.16);
}
.woocommerce ul.products li.product .palma-card-actions .palma-rfq-button:hover,
.woocommerce ul.products li.product .palma-card-actions a.palma-rfq-button:hover {
    color: #ffffff !important;
    background: #780606 !important;
}

/* Tablet: retain two columns at 768px, make category scroll deliberate but unobtrusive. */
@media (max-width: 1024px) {
    .palma-catalog-hero-inner {
        grid-template-columns: minmax(0, 1fr) minmax(240px, .60fr);
        gap: 36px;
    }
    .woocommerce ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        padding-left: 16px;
        padding-right: 16px;
    }
}
@media (max-width: 768px) {
    .palma-catalog-hero-inner {
        grid-template-columns: 1fr;
        min-height: 0;
        padding-top: 34px;
        padding-bottom: 30px;
    }
    .palma-catalog-hero-visual { display: none; }
    .palma-catalog-features { margin-top: 18px; }
    .palma-catalog-features span { min-height: 32px; }
    .palma-cat-nav {
        padding-left: 16px;
        padding-right: 16px;
        box-sizing: border-box;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 44px), transparent 100%);
        mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 44px), transparent 100%);
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }
    .palma-cat-nav::-webkit-scrollbar { display: none; }
    .palma-cat-nav ul {
        justify-content: flex-start;
        width: max-content;
        min-width: 100%;
        gap: 25px;
        padding-right: 48px;
    }
    .palma-cat-nav li { scroll-snap-align: start; }
    .woocommerce .palma-catalog-toolbar { margin-bottom: 20px; }
    .woocommerce .palma-catalog-toolbar .woocommerce-ordering::before {
        flex: 0 0 auto;
        white-space: nowrap;
    }
    .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .woocommerce ul.products li.product a img { height: 192px; padding: 14px; }
    .woocommerce ul.products li.product .palma-card-actions {
        align-items: center;
        flex-direction: row;
        gap: 12px;
        padding: 0 18px 16px;
    }
    .woocommerce ul.products li.product .woocommerce-loop-product__title,
    .woocommerce ul.products li.product .palma-card-context,
    .woocommerce ul.products li.product .palma-card-specs { padding-left: 18px; padding-right: 18px; }
    .woocommerce ul.products li.product .palma-card-actions .palma-rfq-button { width: 100% !important; }
}

/* Mobile: one readable product card per row; toolbar and hero compact without hiding content. */
@media (max-width: 559px) {
    .palma-catalog-hero-inner { padding: 28px 20px 25px; }
    .palma-catalog-hero h1 { font-size: 32px; }
    .palma-catalog-hero p { font-size: 14px; line-height: 1.55; }
    .palma-catalog-features {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 16px;
    }
    .palma-catalog-features span {
        align-items: center;
        justify-content: center;
        min-width: 0;
        padding: 8px 9px;
        font-size: 12px;
        text-align: center;
    }
    .palma-cat-nav { margin: 20px 0 16px; padding-left: 20px; padding-right: 20px; }
    .woocommerce .palma-catalog-toolbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 20px;
        padding-left: 20px;
        padding-right: 20px;
    }
    .woocommerce .palma-catalog-toolbar .woocommerce-ordering {
        align-self: stretch;
        width: 100%;
    }
    .woocommerce .palma-catalog-toolbar .woocommerce-ordering select { flex: 1 1 auto; }
    .woocommerce ul.products {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
        padding-left: 20px;
        padding-right: 20px;
    }
    .woocommerce ul.products li.product a img { height: 220px; padding: 18px; }
    .woocommerce ul.products li.product .palma-card-actions {
        align-items: center;
        flex-direction: row;
        padding-right: 20px;
        padding-left: 20px;
    }
    .woocommerce ul.products li.product .palma-card-actions .palma-rfq-button { width: auto !important; }
}

/* Scheme A consistency lock: clean B2B product card rhythm. */
.woocommerce ul.products li.product {
    border-radius: 8px;
}
.woocommerce ul.products li.product a img {
    height: 228px;
    padding: 22px 30px 8px;
    background: #ffffff;
}
.woocommerce ul.products li.product .palma-card-badge {
    top: 18px;
    right: 18px;
    min-height: 25px;
    padding: 5px 10px;
    border-radius: 7px;
    font-size: 12px;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2.woocommerce-loop-product__title,
.woocommerce ul.products li.product .palma-card-context,
.woocommerce ul.products li.product .palma-card-specs {
    width: calc(100% - 64px);
    margin-left: 32px !important;
    margin-right: 32px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    min-height: 24px;
    padding-top: 20px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: 0;
}
.woocommerce ul.products li.product .palma-card-title-main {
    display: inline;
}
.woocommerce ul.products li.product .palma-card-context {
    min-height: 21px;
    margin-top: 8px;
    color: #20201d;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}
.woocommerce ul.products li.product .palma-card-specs {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 34px;
    margin-top: 18px;
    padding-bottom: 26px;
}
.woocommerce ul.products li.product .palma-card-specs span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 24px;
    gap: 8px;
    color: #20201d;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}
.woocommerce ul.products li.product .palma-card-specs span + span {
    margin-left: 0;
}
.woocommerce ul.products li.product .palma-card-specs b {
    display: inline-block;
    width: 15px;
    height: 15px;
    overflow: hidden;
    color: #9c1319;
    background: currentColor;
    font-size: 0;
    line-height: 0;
    flex: 0 0 auto;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}
.woocommerce ul.products li.product .palma-card-spec--voltage b {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.5 1.8 4.8 13h6.1l-1.4 9.2 8.8-12h-6l1.2-8.4Z' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.5 1.8 4.8 13h6.1l-1.4 9.2 8.8-12h-6l1.2-8.4Z' fill='black'/%3E%3C/svg%3E");
}
.woocommerce ul.products li.product .palma-card-spec--capacity b {
    width: 17px;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 3h8v2h3.5A2.5 2.5 0 0 1 22 7.5V18a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V7.5A2.5 2.5 0 0 1 4.5 5H8V3Zm-3.5 4A.5.5 0 0 0 4 7.5V18a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V7.5a.5.5 0 0 0-.5-.5h-15ZM9 9h2v3h3V9h2v8h-2v-3h-3v3H9V9Z' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 3h8v2h3.5A2.5 2.5 0 0 1 22 7.5V18a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V7.5A2.5 2.5 0 0 1 4.5 5H8V3Zm-3.5 4A.5.5 0 0 0 4 7.5V18a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V7.5a.5.5 0 0 0-.5-.5h-15ZM9 9h2v3h3V9h2v8h-2v-3h-3v3H9V9Z' fill='black'/%3E%3C/svg%3E");
}
.woocommerce ul.products li.product .palma-card-spec--type b {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2 20 5.4v5.8c0 5.1-3.3 8.9-8 10.8-4.7-1.9-8-5.7-8-10.8V5.4L12 2Zm0 2.2L6 6.8v4.4c0 3.8 2.2 6.8 6 8.6 3.8-1.8 6-4.8 6-8.6V6.8l-6-2.6Zm-1 4.3h2V14h3l-4 4-4-4h3V8.5Z' fill='black'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2 20 5.4v5.8c0 5.1-3.3 8.9-8 10.8-4.7-1.9-8-5.7-8-10.8V5.4L12 2Zm0 2.2L6 6.8v4.4c0 3.8 2.2 6.8 6 8.6 3.8-1.8 6-4.8 6-8.6V6.8l-6-2.6Zm-1 4.3h2V14h3l-4 4-4-4h3V8.5Z' fill='black'/%3E%3C/svg%3E");
}
.woocommerce ul.products li.product .palma-card-spec-value {
    display: inline-block;
}
.woocommerce ul.products li.product .palma-card-actions {
    min-height: 62px;
    padding: 0 32px 20px;
    border-top: 0;
}
.woocommerce ul.products li.product .palma-card-actions .palma-card-details {
    min-height: 42px;
    color: #9c1319;
    font-size: 14px;
    font-weight: 700;
}
.woocommerce ul.products li.product .palma-card-actions .palma-rfq-button,
.woocommerce ul.products li.product .palma-card-actions a.palma-rfq-button {
    min-height: 42px;
    padding: 9px 18px !important;
    border-radius: 6px !important;
    color: #ffffff !important;
    background: #9c1319 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    box-shadow: none;
}

@media (max-width: 559px) {
    .woocommerce ul.products li.product a img {
        height: 238px;
        padding: 22px 36px 8px;
    }
    .woocommerce ul.products li.product .woocommerce-loop-product__title,
    .woocommerce ul.products li.product h2.woocommerce-loop-product__title,
    .woocommerce ul.products li.product .palma-card-context,
    .woocommerce ul.products li.product .palma-card-specs {
        width: calc(100% - 64px);
        margin-left: 32px !important;
        margin-right: 32px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        min-height: 26px;
        padding-top: 22px;
        font-size: 21px;
        line-height: 1.08;
    }
    .woocommerce ul.products li.product .palma-card-context {
        margin-top: 10px;
        font-size: 14px;
    }
    .woocommerce ul.products li.product .palma-card-specs {
        margin-top: 20px;
        padding-bottom: 28px;
    }
    .woocommerce ul.products li.product .palma-card-actions {
        padding-left: 32px;
        padding-right: 32px;
        padding-bottom: 18px;
    }
    .woocommerce ul.products li.product .palma-card-actions .palma-rfq-button,
    .woocommerce ul.products li.product .palma-card-actions a.palma-rfq-button {
        width: auto !important;
        min-width: 132px;
    }
}

/* ========================================================================
   MOBILE CATEGORY DROPDOWN (方案 C)
   The dropdown is rendered on the server and replaces the horizontal text
   tabs on mobile (<=768px) via the media query at the end of this file, so
   category pages never flash the desktop tab bar. On desktop the dropdown is
   hidden and the tab bar stays.
   ======================================================================== */
.palma-cat-dropdown { display: none; position: relative; width: 100%; }

.palma-cat-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 50px;
    padding: 12px 16px;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 12px;
    background: #ffffff;
    color: #302f34;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .05);
}
.palma-cat-dropdown-trigger:hover { border-color: rgba(156, 19, 25, .45); }
.palma-cat-dropdown-trigger:focus-visible {
    outline: 2px solid #9c1319;
    outline-offset: 2px;
}
.palma-cat-dropdown-current {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.palma-cat-dropdown-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #f2f0ec;
    color: #77736b;
    font-size: 12px;
    font-weight: 700;
    flex: 0 0 auto;
}
.palma-cat-dropdown-caret {
    margin-left: auto;
    width: 8px;
    height: 8px;
    border-right: 2px solid #9c1319;
    border-bottom: 2px solid #9c1319;
    transform: rotate(45deg);
    flex: 0 0 auto;
    transition: transform .2s ease;
}
.palma-cat-dropdown-trigger[aria-expanded="true"] .palma-cat-dropdown-caret {
    transform: rotate(-135deg);
}

.palma-cat-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 120;
    max-height: 60vh;
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, .10);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.palma-cat-nav .palma-cat-dropdown.is-open .palma-cat-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.palma-cat-dropdown-backdrop {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(24, 22, 20, .38);
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s;
}
.palma-cat-dropdown-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

.palma-cat-nav .palma-cat-dropdown-option {
    display: flex !important;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 13px 16px;
    color: #55514a;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    white-space: normal;
    border-top: 1px solid rgba(0, 0, 0, .05);
}
.palma-cat-nav .palma-cat-dropdown-option:first-child { border-top: 0; }
.palma-cat-nav .palma-cat-dropdown-option:hover { background: #faf9f6; color: #20201d; }
.palma-cat-nav .palma-cat-dropdown-option:focus-visible {
    outline: 2px solid #9c1319;
    outline-offset: -2px;
}
.palma-cat-nav .palma-cat-dropdown-option.is-active { color: #9c1319; background: #fdf6f5; }
.palma-cat-nav .palma-cat-dropdown-opt-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.palma-cat-nav .palma-cat-dropdown-opt-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: #f2f0ec;
    color: #77736b;
    font-size: 12px;
    font-weight: 700;
    margin-left: auto;
    flex: 0 0 auto;
}
.palma-cat-nav .palma-cat-dropdown-option.is-active .palma-cat-dropdown-opt-count {
    background: #9c1319;
    color: #ffffff;
}


/* Mobile: server-rendered dropdown replaces the horizontal tab bar entirely,
   so the first paint is the dropdown UI (no tab-bar flash while JS loads). */
@media (max-width: 768px) {
    .palma-cat-nav {
        overflow: visible;
        overflow-y: visible;
        -webkit-mask-image: none;
        mask-image: none;
        scroll-snap-type: none;
        -ms-overflow-style: auto;
    }
    .palma-cat-nav ul { display: none; }
    .palma-cat-dropdown { display: block; }
}

/* ===== Series 二级导航（Category -> Series，D-008，客户 docx 图3/4「再分一级」）===== */
.palma-series-nav {
    max-width: 1280px;
    margin: 0 auto 10px;
    padding: 16px 24px 0;
    box-sizing: border-box;
}
.palma-series-nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 14px 0 0;
    border-top: 1px solid rgba(0,0,0,.06);
}
.palma-series-nav li a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}
.palma-series-nav li a:hover {
    border-color: rgba(156,19,25,.45);
    color: #9c1319;
}
.palma-series-nav li.is-active a {
    background: #9c1319;
    border-color: #9c1319;
    color: #fff;
}
.palma-series-nav .palma-series-count {
    font-size: 11px;
    opacity: .7;
    font-variant-numeric: tabular-nums;
}
.palma-series-nav li.is-active .palma-series-count { opacity: .9; }
@media (max-width: 768px) {
    .palma-series-nav { padding: 12px 16px 0; }
    .palma-series-nav ul { gap: 6px; padding-top: 10px; }
    .palma-series-nav li a { padding: 6px 12px; font-size: 12px; }
}

/* ========================================================================
   PARAMETER FILTER BAR (shop archive: voltage / capacity / type)
   ======================================================================== */
.palma-pf {
    max-width: 1280px;
    margin: 24px auto 0;
    padding: 24px 24px 20px;
    background: #ffffff;
    border: 1px solid rgba(60, 42, 30, 0.08);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(31, 5, 8, 0.06);
    box-sizing: border-box;
}
.palma-pf__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.palma-pf__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #2e2a27;
}
.palma-pf__clear {
    font-size: 13px;
    color: #9c1319;
    text-decoration: none;
    font-weight: 600;
}
.palma-pf__clear:hover { text-decoration: underline; }
.palma-pf__groups {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 28px;
}
.palma-pf__group {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}
.palma-pf__group legend {
    padding: 0;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #6b6259;
}
.palma-pf__options { display: flex; flex-wrap: wrap; gap: 8px; }
.palma-pf__option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid rgba(60, 42, 30, 0.16);
    border-radius: 999px;
    font-size: 13px;
    line-height: 1.2;
    color: #3c2a1e;
    cursor: pointer;
    user-select: none;
    background: #faf8f6;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.palma-pf__option:hover { border-color: rgba(156, 19, 25, 0.45); }
.palma-pf__option.is-checked {
    border-color: #9c1319;
    background: rgba(156, 19, 25, 0.06);
    color: #9c1319;
    font-weight: 600;
}
.palma-pf__option input[type="checkbox"] {
    margin: 0;
    accent-color: #9c1319;
    width: 14px;
    height: 14px;
}
.palma-pf__option em {
    font-style: normal;
    font-size: 11px;
    color: #97907f;
}
.palma-pf__option.is-checked em { color: rgba(156, 19, 25, 0.75); }
.palma-pf__actions { margin-top: 16px; }
.palma-pf__apply {
    appearance: none;
    border: 0;
    border-radius: 999px;
    background: #9c1319;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding: 10px 26px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}
.palma-pf__apply:hover { background: #7e0f14; transform: translateY(-1px); }
.palma-pf__apply:focus-visible,
.palma-pf__option input:focus-visible ~ span {
    outline: 2px solid #9c1319;
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .palma-pf { padding: 18px 18px 16px; }
    .palma-pf__groups { grid-template-columns: 1fr; gap: 14px; }
}

/* ========================================================================
   PRODUCT ARCHIVE V2 — locked classification-page decisions (2026-09-07)
   High-fidelity Hero, category rail and filters; existing global chrome.
   ======================================================================== */
body.post-type-archive-product .site-main,
body.tax-product_cat .site-main,
body.tax-product_tag .site-main {
    background: #ffffff;
}

body.post-type-archive-product .woocommerce-breadcrumb,
body.tax-product_cat .woocommerce-breadcrumb,
body.tax-product_tag .woocommerce-breadcrumb {
    display: none !important;
}

body.post-type-archive-product .palma-catalog-hero,
body.tax-product_cat .palma-catalog-hero,
body.tax-product_tag .palma-catalog-hero {
    color: #ffffff;
    background: #9c1319 !important;
    border: 0;
}

body.post-type-archive-product .palma-catalog-hero-inner,
body.tax-product_cat .palma-catalog-hero-inner,
body.tax-product_tag .palma-catalog-hero-inner {
    display: block;
    width: 100%;
    max-width: 1280px;
    min-height: 0;
    margin: 0 auto;
    padding: 54px 24px 42px;
}

.palma-catalog-hero-copy {
    max-width: 720px;
}

body.post-type-archive-product .palma-catalog-hero h1,
body.tax-product_cat .palma-catalog-hero h1,
body.tax-product_tag .palma-catalog-hero h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(34px, 3.2vw, 44px);
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -.025em;
}

.palma-catalog-hero h1 span {
    color: #f2c4c6;
}

body.post-type-archive-product .palma-catalog-hero p,
body.tax-product_cat .palma-catalog-hero p,
body.tax-product_tag .palma-catalog-hero p {
    max-width: 650px;
    margin: 18px 0 0;
    color: rgba(255,255,255,.84);
    font-size: 15.5px;
    line-height: 1.65;
}

.palma-catalog-hero-actions,
.palma-catalog-bottom-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.palma-catalog-hero-actions {
    margin-top: 28px;
}

.palma-catalog-hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 11px 22px;
    border: 1px solid rgba(255,255,255,.9);
    border-radius: 5px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.palma-catalog-hero-button--primary {
    color: #9c1319 !important;
    background: #ffffff;
}

.palma-catalog-hero-button--primary:hover {
    color: #780606 !important;
    background: #f8eeee;
    border-color: #f8eeee;
}

.palma-catalog-hero-button--secondary {
    color: #ffffff !important;
    background: transparent;
}

.palma-catalog-hero-button--secondary:hover {
    color: #9c1319 !important;
    background: #ffffff;
}

.palma-catalog-hero-button:focus-visible,
.palma-pf-toggle:focus-visible,
.palma-pf__close:focus-visible,
.palma-pf__apply:focus-visible,
.palma-catalog-active-filter:focus-visible,
.palma-catalog-clear-all:focus-visible {
    outline: 3px solid rgba(255,255,255,.72);
    outline-offset: 3px;
}

.palma-catalog-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 34px;
    color: rgba(255,255,255,.66);
    font-size: 13px;
}

.palma-catalog-breadcrumb a {
    color: rgba(255,255,255,.84);
    text-decoration: none;
}

.palma-catalog-breadcrumb [aria-current="page"] {
    color: #ffffff;
    font-weight: 700;
}

/* Category pills and Refine share one sticky rail. */
body.post-type-archive-product .palma-cat-nav,
body.tax-product_cat .palma-cat-nav,
body.tax-product_tag .palma-cat-nav {
    position: sticky;
    top: 0;
    z-index: 45;
    width: 100%;
    max-width: none !important;
    margin: 0;
    padding: 0;
    overflow: visible;
    border-bottom: 0;
    background: #f2f0ec;
    box-shadow: none;
}

.palma-cat-rail {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 9px 24px;
    box-sizing: border-box;
}

body.post-type-archive-product .palma-cat-nav ul,
body.tax-product_cat .palma-cat-nav ul,
body.tax-product_tag .palma-cat-nav ul {
    display: flex;
    flex: 1 1 auto;
    justify-content: flex-start;
    gap: 7px;
    min-width: 0;
    margin: 0;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.palma-cat-nav ul::-webkit-scrollbar {
    display: none;
}

body.post-type-archive-product .palma-cat-nav a,
body.tax-product_cat .palma-cat-nav a,
body.tax-product_tag .palma-cat-nav a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    margin: 0;
    padding: 8px 15px;
    border: 1px solid #ecece9;
    border-radius: 999px;
    color: #57565f;
    background: #ffffff;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
}

.palma-cat-nav a::after {
    content: none !important;
}

body.post-type-archive-product .palma-cat-nav li:not(.is-active) a:hover,
body.tax-product_cat .palma-cat-nav li:not(.is-active) a:hover,
body.tax-product_tag .palma-cat-nav li:not(.is-active) a:hover {
    color: #9c1319 !important;
    border-color: #d9c8c9 !important;
}

body.post-type-archive-product .palma-cat-nav li.is-active a,
body.tax-product_cat .palma-cat-nav li.is-active a,
body.tax-product_tag .palma-cat-nav li.is-active a {
    color: #ffffff;
    border-color: #9c1319;
    background: #9c1319;
}

.palma-cat-count {
    color: #a09b92;
    background: #f4f4f2;
}

.palma-cat-nav li.is-active .palma-cat-count {
    color: #ffffff;
    background: rgba(255,255,255,.18);
}

.palma-pf-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 104px;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid #ddd9d0;
    border-radius: 10px;
    color: #444441;
    background: #f6f4f0;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
    cursor: pointer;
}

.palma-pf-toggle__icon {
    flex: 0 0 auto;
    color: #9c1319;
}

.palma-pf-toggle__chevron {
    flex: 0 0 auto;
    transition: transform .25s ease;
}

.palma-pf-toggle[aria-expanded="true"] .palma-pf-toggle__chevron {
    transform: rotate(180deg);
}

.palma-pf-toggle:hover,
.palma-pf-toggle[aria-expanded="true"] {
    color: #9c1319;
    border-color: #9c1319;
    background: #ffffff;
}

.palma-pf-toggle__count {
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    color: #ffffff;
    background: #9c1319;
    font-size: 11px;
    text-align: center;
}

/* Desktop disclosure panel; the same form becomes a bottom sheet on mobile. */
.palma-pf-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    background: #f3f2f0;
    border-bottom: 1px solid transparent;
    transition: max-height .3s ease, opacity .2s ease, border-color .2s ease;
}

.palma-pf-panel.is-open {
    max-height: 360px;
    opacity: 1;
    border-bottom-color: #e7e6e3;
}

body.post-type-archive-product .palma-pf,
body.tax-product_cat .palma-pf,
body.tax-product_tag .palma-pf {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px 22px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.palma-pf__head {
    display: none;
}

.palma-pf__groups {
    display: grid;
    gap: 0;
}

/* No-JS fallback keeps the reviewed three-column rhythm; overflow groups use a
   full-width row so they do not collapse into narrow vertical stacks. */
.palma-pf__groups:not(.is-content-aware) {
    grid-template-columns: .65fr 1.35fr 1fr;
}

.palma-pf__group {
    min-width: 0;
    padding: 0 28px;
    border: 0;
}

.palma-pf__group:first-child {
    padding-left: 0;
}

.palma-pf__group + .palma-pf__group {
    border-left: 1px solid #e2e1de;
}

.palma-pf__groups:not(.is-content-aware) .palma-pf__group:nth-child(n+4) {
    grid-column: 1 / -1;
    padding: 18px 0 0;
    border-top: 1px solid #e2e1de;
    border-left: 0;
}

.palma-pf__groups:not(.is-content-aware) .palma-pf__group:nth-child(n+4) .palma-pf__options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Content-aware layout: catalog-nav.js measures the natural chip row plus the
   group padding, then assigns a 12-column span (2-12). This prevents groups
   from wrapping while the same row still has usable space. */
.palma-pf__groups.is-content-aware {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    row-gap: 38px;
}

.palma-pf__groups.is-content-aware .palma-pf__group {
    grid-column: span var(--palma-pf-span, 2);
}

.palma-pf__groups.is-content-aware .palma-pf__group.is-row-start {
    padding-left: 0;
    border-left: 0;
}

.palma-pf__group legend {
    margin-bottom: 9px;
    color: #77736b;
    font-size: 11.5px;
    font-weight: 750;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.palma-pf__option {
    min-height: 34px;
    padding: 6px 12px;
    border-color: #e2e2df;
    color: #444441;
    background: #ffffff;
}

.palma-pf__option input {
    position: absolute;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.palma-pf__option:has(input:focus-visible) {
    outline: 2px solid rgba(156,19,25,.38);
    outline-offset: 2px;
}

.palma-pf__option.is-checked {
    color: #ffffff;
    border-color: #9c1319;
    background: #9c1319;
}

.palma-pf__option.is-checked em {
    color: rgba(255,255,255,.75);
}

.palma-pf__option.is-disabled {
    color: rgba(68,68,65,.48);
    border-color: #ecece9;
    background: #f7f7f5;
    cursor: not-allowed;
}

.palma-pf__option.is-disabled:hover {
    border-color: #ecece9;
}

.palma-pf__option.is-disabled em {
    color: rgba(119,115,107,.7);
}

.palma-pf__actions {
    display: none;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 18px;
}

.palma-pf__clear,
.palma-catalog-clear-all {
    color: #6d6870;
    font-size: 13px;
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.palma-pf__apply {
    min-height: 40px;
    padding: 9px 22px;
    border-radius: 6px;
}

.palma-pf__close,
.palma-pf-backdrop {
    display: none;
}

/* Result count and active filters; sorting is intentionally absent. */
body.post-type-archive-product .palma-catalog-toolbar,
body.tax-product_cat .palma-catalog-toolbar,
body.tax-product_tag .palma-catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px 22px;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 22px 24px 12px;
    box-sizing: border-box;
}

body.post-type-archive-product .palma-catalog-toolbar .woocommerce-result-count,
body.tax-product_cat .palma-catalog-toolbar .woocommerce-result-count,
body.tax-product_tag .palma-catalog-toolbar .woocommerce-result-count {
    width: auto;
    max-width: none !important;
    margin: 0 !important;
    padding: 0;
    color: #57565f;
    font-size: 14px;
    white-space: nowrap;
}

.palma-catalog-active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.palma-catalog-active-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 5px 9px 5px 11px;
    border-radius: 999px;
    color: #7a0e13;
    background: #f3e5e6;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}

.palma-catalog-active-filter small {
    padding-left: 0;
    color: inherit;
    font-size: 17px;
    font-weight: 400;
    line-height: 1;
}

/* Archive grid: 4 / 3 / 2 / 1 at the locked breakpoints. */
body.post-type-archive-product ul.products,
body.tax-product_cat ul.products,
body.tax-product_tag ul.products {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    max-width: 1280px !important;
    margin: 0 auto 48px;
    padding: 8px 24px 0;
}

body.post-type-archive-product ul.products li.product,
body.tax-product_cat ul.products li.product,
body.tax-product_tag ul.products li.product {
    border-color: #ecece9;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(48,47,52,.05);
}

body.post-type-archive-product ul.products li.product a img,
body.tax-product_cat ul.products li.product a img,
body.tax-product_tag ul.products li.product a img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0;
    box-sizing: border-box;
    padding: 14px 16px 6px;
    object-fit: contain;
    object-position: center;
    background: #ffffff;
}

body.post-type-archive-product ul.products li.product .palma-card-actions,
body.tax-product_cat ul.products li.product .palma-card-actions,
body.tax-product_tag ul.products li.product .palma-card-actions {
    justify-content: flex-end;
    min-height: 58px;
    padding: 0 24px 16px;
}

body.post-type-archive-product ul.products li.product .palma-card-actions .palma-card-details,
body.tax-product_cat ul.products li.product .palma-card-actions .palma-card-details,
body.tax-product_tag ul.products li.product .palma-card-actions .palma-card-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 124px;
    min-height: 42px;
    margin: 0;
    padding: 9px 18px;
    border: 1px solid #9c1319;
    border-radius: 6px;
    color: #ffffff;
    background: #9c1319;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

.woocommerce ul.products li.product .palma-card-details::after {
    content: none;
}

body.post-type-archive-product ul.products li.product .palma-card-actions .palma-card-details:hover,
body.tax-product_cat ul.products li.product .palma-card-actions .palma-card-details:hover,
body.tax-product_tag ul.products li.product .palma-card-actions .palma-card-details:hover {
    color: #ffffff;
    border-color: #780606;
    background: #780606;
}

/* Archive and related cards use the approved 800x800 source ratio while
   tightening only vertical rhythm; type sizes and button sizes stay locked. */
body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
body.tax-product_tag ul.products li.product .woocommerce-loop-product__title,
body.single-product .related ul.products li.product .woocommerce-loop-product__title {
    min-height: 24px;
    padding-top: 12px;
}

body.post-type-archive-product ul.products li.product .palma-card-context,
body.tax-product_cat ul.products li.product .palma-card-context,
body.tax-product_tag ul.products li.product .palma-card-context,
body.single-product .related ul.products li.product .palma-card-context {
    margin-top: 6px;
}

body.post-type-archive-product ul.products li.product .palma-card-specs,
body.tax-product_cat ul.products li.product .palma-card-specs,
body.tax-product_tag ul.products li.product .palma-card-specs,
body.single-product .related ul.products li.product .palma-card-specs {
    min-height: 24px;
    margin-top: 12px;
    padding-bottom: 16px;
}

body.post-type-archive-product ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
body.tax-product_tag ul.products li.product .woocommerce-loop-product__title,
body.post-type-archive-product ul.products li.product .palma-card-context,
body.tax-product_cat ul.products li.product .palma-card-context,
body.tax-product_tag ul.products li.product .palma-card-context,
body.post-type-archive-product ul.products li.product .palma-card-specs,
body.tax-product_cat ul.products li.product .palma-card-specs,
body.tax-product_tag ul.products li.product .palma-card-specs,
body.single-product .related ul.products li.product .woocommerce-loop-product__title,
body.single-product .related ul.products li.product .palma-card-context,
body.single-product .related ul.products li.product .palma-card-specs {
    width: calc(100% - 48px);
    margin-left: 24px !important;
    margin-right: 24px !important;
}

/* Related Products reuse the exact archive product-card geometry. Keeping this
   as one parity block prevents a future "compact related card" from drifting
   back to a second card design on product detail pages. */
body.single-product .related ul.products {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
    max-width: 1280px !important;
    margin: 0 auto 48px;
    padding: 8px 24px 0;
}

body.single-product .related ul.products li.product {
    border-color: #ecece9;
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(48,47,52,.05);
}

body.single-product .related ul.products li.product a img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0;
    box-sizing: border-box;
    padding: 14px 16px 6px;
    object-fit: contain;
    object-position: center;
    background: #ffffff;
}

body.single-product .related ul.products li.product .palma-card-actions {
    justify-content: flex-end;
    min-height: 58px;
    padding: 0 24px 16px;
}

body.single-product .related ul.products li.product .palma-card-actions .palma-card-details {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 124px;
    min-height: 42px;
    margin: 0;
    padding: 9px 18px;
    border: 1px solid #9c1319;
    border-radius: 6px;
    color: #ffffff;
    background: #9c1319;
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

body.single-product .related ul.products li.product .palma-card-actions .palma-card-details:hover {
    color: #ffffff;
    border-color: #780606;
    background: #780606;
}

@media (max-width: 1279px) {
    body.single-product .related ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1023px) {
    body.single-product .related ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 767px) {
    body.single-product .related ul.products {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        padding: 8px 20px 0;
    }

    body.single-product .related ul.products li.product a img {
        height: auto;
        padding: 14px 16px 6px;
    }
}

/* Pagination retains WooCommerce URLs and filter query arguments. */
body.post-type-archive-product .woocommerce-pagination,
body.tax-product_cat .woocommerce-pagination,
body.tax-product_tag .woocommerce-pagination {
    max-width: 1280px;
    margin: 0 auto 52px;
    padding: 0 24px;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0 13px;
    box-sizing: border-box;
    border-color: #e7e5e1;
    border-radius: 8px;
    line-height: 1;
}

/* Bottom conversion panel, placed before the existing global footer. */
.palma-catalog-bottom-cta {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 64px;
    box-sizing: border-box;
}

.palma-catalog-bottom-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 40px 46px;
    border-radius: 18px;
    color: #ffffff;
    background: #9c1319;
}

.palma-catalog-bottom-cta h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(24px, 2.4vw, 30px);
    font-weight: 800;
    line-height: 1.2;
}

.palma-catalog-bottom-cta p {
    max-width: 620px;
    margin: 10px 0 0;
    color: rgba(255,255,255,.82);
    font-size: 14.5px;
    line-height: 1.65;
}

@media (max-width: 1279px) {
    body.post-type-archive-product ul.products,
    body.tax-product_cat ul.products,
    body.tax-product_tag ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1023px) {
    body.post-type-archive-product ul.products,
    body.tax-product_cat ul.products,
    body.tax-product_tag ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .palma-catalog-bottom-cta-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    body.post-type-archive-product .palma-cat-nav ul,
    body.tax-product_cat .palma-cat-nav ul,
    body.tax-product_tag .palma-cat-nav ul {
        display: flex;
    }

    .palma-cat-dropdown {
        display: none;
    }
}

@media (max-width: 767px) {
    body.post-type-archive-product .palma-catalog-hero-inner,
    body.tax-product_cat .palma-catalog-hero-inner,
    body.tax-product_tag .palma-catalog-hero-inner {
        padding: 36px 20px 32px;
    }

    body.post-type-archive-product .palma-catalog-hero h1,
    body.tax-product_cat .palma-catalog-hero h1,
    body.tax-product_tag .palma-catalog-hero h1 {
        font-size: 29px;
        line-height: 1.18;
    }

    body.post-type-archive-product .palma-catalog-hero p,
    body.tax-product_cat .palma-catalog-hero p,
    body.tax-product_tag .palma-catalog-hero p {
        margin-top: 14px;
        font-size: 14px;
        line-height: 1.58;
    }

    .palma-catalog-hero-actions {
        display: grid;
        gap: 10px;
        margin-top: 22px;
    }

    .palma-catalog-hero-button {
        width: 100%;
        min-height: 52px;
        box-sizing: border-box;
    }

    .palma-catalog-breadcrumb {
        margin-top: 26px;
    }

    body.post-type-archive-product .palma-cat-nav,
    body.tax-product_cat .palma-cat-nav,
    body.tax-product_tag .palma-cat-nav {
        position: static;
    }

    .palma-cat-rail {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 20px;
    }

    body.post-type-archive-product .palma-cat-nav ul,
    body.tax-product_cat .palma-cat-nav ul,
    body.tax-product_tag .palma-cat-nav ul {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        flex: 1 0 100%;
        gap: 8px;
        overflow: visible;
    }

    body.post-type-archive-product .palma-cat-nav a,
    body.tax-product_cat .palma-cat-nav a,
    body.tax-product_tag .palma-cat-nav a {
        justify-content: center;
        min-width: 0;
        padding: 8px 6px;
        font-size: 12px;
        text-align: center;
        white-space: normal;
    }

    .palma-cat-label {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .palma-pf-toggle {
        justify-content: flex-start;
        width: 100%;
        min-height: 46px;
        padding: 10px 16px;
    }

    .palma-pf-toggle__count {
        margin-left: auto;
    }

    .palma-pf-panel {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 82;
        max-height: none;
        overflow: visible;
        visibility: hidden;
        opacity: 1;
        background: transparent;
        border: 0;
        transform: translateY(105%);
        transition: transform .3s ease, visibility 0s linear .3s;
    }

    .palma-pf-panel.is-open {
        max-height: none;
        visibility: visible;
        transform: translateY(0);
        transition: transform .3s ease;
    }

    body.post-type-archive-product .palma-pf,
    body.tax-product_cat .palma-pf,
    body.tax-product_tag .palma-pf {
        max-height: 78vh;
        overflow-y: auto;
        padding: 10px 20px calc(16px + env(safe-area-inset-bottom));
        border-radius: 18px 18px 0 0;
        background: #ffffff;
        box-shadow: 0 -18px 48px rgba(48,47,52,.16);
    }

    .palma-pf__head {
        position: sticky;
        top: -10px;
        z-index: 2;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        margin: 0 0 16px;
        padding: 12px 0;
        border-bottom: 1px solid #f0f0ee;
        background: #ffffff;
    }

    .palma-pf__title {
        margin: 0;
        color: #363342;
        font-size: 15px;
        text-transform: none;
    }

    .palma-pf__close {
        display: inline-flex;
        min-height: 36px;
        padding: 8px 12px;
        border: 1px solid #e7e5e1;
        border-radius: 8px;
        color: #57565f;
        background: #f6f4f0;
        font: inherit;
        font-size: 12px;
        font-weight: 700;
    }

    .palma-pf__groups,
    .palma-pf__groups.is-content-aware {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .palma-pf__groups.is-content-aware .palma-pf__group {
        grid-column: auto;
    }

    .palma-pf__group,
    .palma-pf__group:first-child {
        padding: 0;
    }

    .palma-pf__group + .palma-pf__group {
        padding-top: 18px;
        border-top: 1px solid #ecece9;
        border-left: 0;
    }

    .palma-pf__options {
        gap: 8px;
    }

    .palma-pf__option {
        min-height: 38px;
        padding: 8px 13px;
    }

    .palma-pf__actions {
        display: flex;
        position: sticky;
        bottom: calc(-16px - env(safe-area-inset-bottom));
        margin: 20px -20px calc(-16px - env(safe-area-inset-bottom));
        padding: 13px 20px calc(13px + env(safe-area-inset-bottom));
        border-top: 1px solid #f0f0ee;
        background: #ffffff;
    }

    .palma-pf__apply {
        flex: 1 1 auto;
        min-height: 48px;
    }

    .palma-pf-backdrop {
        position: fixed;
        inset: 0;
        z-index: 78;
        display: block;
        width: 100%;
        height: 100%;
        padding: 0;
        border: 0;
        visibility: hidden;
        opacity: 0;
        background: rgba(30,28,35,.45);
        transition: opacity .25s ease, visibility 0s linear .25s;
    }

    .palma-pf-backdrop.is-open {
        visibility: visible;
        opacity: 1;
        transition: opacity .25s ease;
    }

    body.palma-pf-no-scroll {
        overflow: hidden;
    }

    body.post-type-archive-product .palma-catalog-toolbar,
    body.tax-product_cat .palma-catalog-toolbar,
    body.tax-product_tag .palma-catalog-toolbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px 20px 10px;
    }

    body.post-type-archive-product ul.products,
    body.tax-product_cat ul.products,
    body.tax-product_tag ul.products {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        padding: 8px 20px 0;
    }

    body.post-type-archive-product ul.products li.product a img,
    body.tax-product_cat ul.products li.product a img,
    body.tax-product_tag ul.products li.product a img {
        height: auto;
        padding: 14px 16px 6px;
    }

    .palma-catalog-bottom-cta {
        padding: 0 20px 48px;
    }

    .palma-catalog-bottom-cta-inner {
        gap: 26px;
        padding: 30px 24px;
    }

    .palma-catalog-bottom-cta-actions {
        display: grid;
        width: 100%;
        gap: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .palma-pf-panel,
    .palma-pf-backdrop,
    .palma-catalog-hero-button,
    .palma-pf-toggle {
        transition: none !important;
    }
}

/* ========================================================================
   PRODUCT DETAIL - static high-fidelity layout implementation
   The template intentionally keeps the site's global header/footer and the
   native WooCommerce related-products query. These styles only restyle the
   middle product-detail content.
   ======================================================================== */
.single-product.woocommerce-page {
    --palma-pdp-brand: #9c1319;
    --palma-pdp-brand-dark: #780606;
    --palma-pdp-ink: #17191d;
    --palma-pdp-muted: #666b74;
    --palma-pdp-line: #e8e9ec;
    --palma-pdp-soft: #f6f7f9;
    --palma-pdp-shadow: 0 16px 40px rgba(17, 24, 39, .08);
    background: #f6f4f0;
    color: var(--palma-pdp-ink);
}

.single-product .woocommerce-breadcrumb,
.single-product .palma-pdp,
.single-product .palma-pdp-cta {
    width: min(1180px, calc(100% - 36px));
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.single-product .woocommerce-breadcrumb {
    margin-top: 12px;
    padding-top: 0;
    padding-bottom: 0;
    color: #777;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: normal;
    line-height: 1.5;
    text-transform: none;
}

.single-product .woocommerce-breadcrumb a {
    color: #777;
}

.single-product .woocommerce-breadcrumb a:hover {
    color: var(--palma-pdp-brand);
}

.palma-pdp {
    margin-top: 12px;
    margin-bottom: 0;
}

/* Hero */
.palma-pdp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
    gap: 38px;
    align-items: start;
}

.palma-pdp-gallery {
    min-width: 0;
}

.palma-pdp-main-image {
    position: relative;
    display: grid;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 0;
    overflow: hidden;
    border: 1px solid #ece8e1;
    border-radius: 18px;
    background: linear-gradient(145deg, #f8f6f2, #f0ede7);
}

.palma-pdp-main-image img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover;
    object-position: center;
}

.palma-pdp-zoom {
    position: absolute;
    right: 18px;
    bottom: 18px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--palma-pdp-line);
    border-radius: 50%;
    background: #fff;
    color: #222;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(17, 24, 39, .08);
    transition: border-color .2s ease, transform .2s ease;
}

.palma-pdp-zoom:hover {
    border-color: rgba(215, 25, 32, .45);
    transform: translateY(-1px);
}

.palma-pdp-zoom svg {
    width: 18px;
    height: 18px;
}

.palma-pdp-thumbs {
    display: flex;
    flex: 1 1 auto;
    gap: 10px;
    min-width: 0;
    overflow-x: auto;
    padding: 1px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.palma-pdp-thumbs::-webkit-scrollbar {
    display: none;
}

.palma-pdp-thumbs-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.palma-pdp-thumb-nav {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--palma-pdp-line);
    border-radius: 50%;
    background: #fff;
    color: #222;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, opacity .2s ease;
}

.palma-pdp-thumb-nav svg {
    width: 16px;
    height: 16px;
}

.palma-pdp-thumb-nav:hover:not(:disabled) {
    border-color: rgba(215, 25, 32, .45);
    color: var(--palma-pdp-brand);
}

.palma-pdp-thumb-nav:disabled {
    opacity: .28;
    cursor: default;
}

.palma-pdp-thumbs-wrap:not(.is-scrollable) .palma-pdp-thumb-nav {
    display: none;
}

.palma-pdp-thumb {
    display: grid;
    place-items: center;
    flex: 0 0 96px;
    width: 96px;
    height: 96px;
    padding: 0;
    border: 1px solid var(--palma-pdp-line);
    border-radius: 12px;
    background: #f1f2f4;
    cursor: pointer;
    overflow: hidden;
    scroll-snap-align: start;
    transition: border-color .2s ease, background .2s ease;
}

.palma-pdp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: .88;
}

.palma-pdp-thumb.is-active {
    border-color: var(--palma-pdp-brand);
    box-shadow: inset 0 0 0 1px var(--palma-pdp-brand);
    background: #fff;
}

.palma-pdp-summary {
    min-width: 0;
    padding-top: 6px;
}

.palma-pdp-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff0f1;
    color: var(--palma-pdp-brand-dark);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
}

.palma-pdp-title {
    margin: 14px 0 6px;
    color: var(--palma-pdp-ink);
    font-size: 42px;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.03em;
}

.palma-pdp-title::after {
    display: none;
}

.palma-pdp-subtitle {
    margin-bottom: 14px;
    color: #454a53;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.palma-pdp-desc,
.palma-pdp-desc p {
    max-width: 620px;
    margin: 0;
    color: #5f646d;
    font-size: 15px;
    line-height: 1.6;
}

.palma-pdp-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0 16px;
}

.palma-pdp-stat {
    min-width: 0;
    padding: 16px 14px;
    border: 1px solid var(--palma-pdp-line);
    border-radius: 14px;
    background: #fff;
}

.palma-pdp-stat-icon {
    margin-bottom: 8px;
    color: var(--palma-pdp-brand);
    font-size: 21px;
    line-height: 1;
}

.palma-pdp-stat b {
    display: block;
    overflow: hidden;
    color: #17191d;
    font-size: 17px;
    line-height: 1.25;
    text-overflow: ellipsis;
}

.palma-pdp-stat span {
    display: block;
    margin-top: 2px;
    color: #777;
    font-size: 11px;
}

.palma-pdp-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 14px 0 18px;
}

.palma-pdp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.palma-pdp-button.primary {
    background: var(--palma-pdp-brand);
}

.palma-pdp-button.primary:hover {
    background: var(--palma-pdp-brand-dark);
    transform: translateY(-1px);
}

.palma-pdp-button.secondary {
    border: 1px solid #d8dbe0;
    background: #fff;
    color: #222;
}

.palma-pdp-button.secondary:hover {
    border-color: rgba(215, 25, 32, .35);
    transform: translateY(-1px);
}

.palma-pdp-button svg {
    width: 18px;
    height: 18px;
}

.palma-pdp-meta {
    margin-top: 8px;
    border-top: 1px solid var(--palma-pdp-line);
}

.palma-pdp-meta-row {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--palma-pdp-line);
    color: #333;
    font-size: 13px;
    line-height: 1.5;
}

.palma-pdp-meta-key {
    color: #7c8189;
}

.palma-pdp-meta-row a {
    color: var(--palma-pdp-brand);
    text-decoration: none;
}

.palma-pdp-meta-row a:hover {
    text-decoration: underline;
}

.palma-pdp-share-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* Share panel */
.palma-pdp-share-panel {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: 24px;
    padding: 18px 22px;
    border: 1px solid #dfe1e5;
    border-radius: 14px;
    background: #fff;
}

.palma-pdp-share-title {
    flex: 0 0 auto;
    padding-right: 24px;
    border-right: 1px solid #dfe1e5;
    color: #252a32;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
}

.palma-pdp-share-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
}

.palma-pdp-share-action {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease;
}

.palma-pdp-share-action:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(17, 24, 39, .14);
}

.palma-pdp-share-action--linkedin {
    background: #0a66c2;
    font-size: 15px;
    letter-spacing: -.06em;
}

.palma-pdp-share-action--facebook {
    background: #1877f2;
    font-size: 20px;
    font-family: Arial, sans-serif;
}

.palma-pdp-share-action--x {
    background: #17191d;
    font-size: 14px;
    font-weight: 500;
}

.palma-pdp-copy-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 96px;
    min-height: 40px;
    margin-left: auto;
    padding: 8px 12px;
    border: 1px solid #e2e4e8;
    border-radius: 9px;
    background: #fff;
    color: #454a53;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.palma-pdp-copy-link:hover,
.palma-pdp-copy-link:focus-visible {
    border-color: var(--palma-pdp-brand);
    color: var(--palma-pdp-brand);
}

.palma-pdp-copy-link.is-copied {
    border-color: var(--palma-pdp-brand);
    background: var(--palma-pdp-brand);
    color: #fff;
}

.palma-pdp-copy-link-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
}

.palma-pdp-copy-link-icon svg {
    width: 100%;
    height: 100%;
}

.palma-pdp-copy-feedback {
    flex: 0 0 auto;
    min-width: 0;
    color: var(--palma-pdp-brand);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* Integrated product details: use the native tab runtime but hide the tab bar. */
.single-product .palma-pdp .woocommerce-tabs {
    margin-top: 34px;
    border: 1px solid #ededee;
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--palma-pdp-shadow);
    overflow: hidden;
}

.single-product .palma-pdp .woocommerce-tabs ul.tabs {
    display: none !important;
}

.single-product .palma-pdp .woocommerce-tabs .panel {
    margin: 0 !important;
    padding: clamp(22px, 3vw, 38px) !important;
    background: #fff;
}

.single-product .palma-pdp .woocommerce-tabs .panel.active {
    display: block !important;
}

/* The integrated layout always has one visible combined panel. */
.single-product .palma-pdp .woocommerce-tabs .panel:first-of-type {
    display: block !important;
}

.palma-pdp-details-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(28px, 3vw, 40px);
    align-items: stretch;
}

.palma-pdp-details-overview h2,
.palma-pdp-details-specifications h2,
.palma-pdp-details-downloads h2 {
    margin: 0 0 16px;
    color: #17191d;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.palma-pdp-details-overview {
    min-width: 0;
}

.palma-pdp-details-specifications {
    min-width: 0;
    padding-top: clamp(22px, 3vw, 32px);
    border-top: 1px solid var(--palma-pdp-line);
}

.palma-pdp-overview-copy p {
    margin: 0;
    color: #5e636b;
    font-size: 16px;
    line-height: 1.72;
}

.palma-pdp-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.palma-pdp-feature {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 4px 10px;
    padding: 14px;
    border: 1px solid rgba(23, 25, 29, .06);
    border-radius: 13px;
    background: #faf9f7;
    text-align: left;
}

.palma-pdp-feature-icon {
    display: grid;
    place-items: center;
    grid-row: 1 / span 2;
    width: 30px;
    height: 30px;
    border: 1px solid #f0b7ba;
    border-radius: 9px;
    color: var(--palma-pdp-brand);
    font-size: 15px;
    line-height: 1;
}

.palma-pdp-feature-body {
    min-width: 0;
}

.palma-pdp-feature b {
    display: block;
    overflow: hidden;
    color: #17191d;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.palma-pdp-feature span {
    display: block;
    margin-top: 2px;
    color: #777;
    font-size: 10.5px;
    line-height: 1.3;
}

.palma-pdp-spec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.palma-pdp-spec-item {
    display: grid;
    align-content: start;
    gap: 5px;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid rgba(23, 25, 29, .06);
    border-radius: 13px;
    background: #faf9f7;
    break-inside: avoid;
}

.palma-pdp-spec-item--wide {
    grid-column: 1 / -1;
}

.palma-pdp-spec-item dt {
    color: #7d8189;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1.2;
    text-transform: uppercase;
}

.palma-pdp-spec-item dd {
    margin: 0;
    color: #17191d;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.palma-pdp-details-downloads {
    grid-column: 1 / -1;
    min-width: 0;
    padding-top: clamp(22px, 3vw, 32px);
    border-top: 1px solid var(--palma-pdp-line);
}

@media (max-width: 1024px) {
    .palma-pdp-spec-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .single-product .palma-pdp .woocommerce-tabs .panel {
        padding: 20px 18px !important;
    }

    .palma-pdp-details-overview h2,
    .palma-pdp-details-specifications h2,
    .palma-pdp-details-downloads h2 {
        margin-bottom: 13px;
        font-size: 19px;
    }

    .palma-pdp-details-layout {
        gap: 24px;
    }

    .palma-pdp-overview-copy p {
        font-size: 14.5px;
    }

    .palma-pdp-features {
        gap: 8px;
        margin-top: 16px;
    }

    .palma-pdp-feature {
        padding: 12px;
    }

    .palma-pdp-spec-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .palma-pdp-spec-item {
        padding: 12px 13px;
    }

    .palma-pdp-spec-item dd {
        font-size: 13.5px;
    }
}

/* Final CTA */
.palma-pdp-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 34px;
    margin-bottom: 48px;
    padding: 28px 30px;
    border-radius: 16px;
    background: linear-gradient(90deg, #22272d, #11151a);
    color: #fff;
}

.palma-pdp-cta h2 {
    margin: 0 0 4px;
    color: #fff;
    font-size: 24px;
    line-height: 1.2;
}

.palma-pdp-cta p {
    margin: 0;
    color: #c7cbd0;
    font-size: 14px;
}

.palma-pdp-cta a {
    flex: 0 0 auto;
    padding: 13px 20px;
    border-radius: 9px;
    background: var(--palma-pdp-brand);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transition: background .2s ease, transform .2s ease;
}

.palma-pdp-cta a:hover {
    background: var(--palma-pdp-brand-dark);
    transform: translateY(-1px);
}

@media (max-width: 900px) {
    .palma-pdp-hero {
        grid-template-columns: 1fr;
    }

    .palma-pdp-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .palma-pdp-features {
        grid-template-columns: 1fr;
    }

    .palma-pdp-spec-grid {
        grid-template-columns: 1fr;
    }

    .palma-pdp-title {
        font-size: 34px;
    }
}

@media (max-width: 560px) {
    .single-product .woocommerce-breadcrumb,
    .single-product .palma-pdp,
    .single-product .palma-pdp-cta {
        width: min(1180px, calc(100% - 24px));
    }

    .palma-pdp-actions {
        grid-template-columns: 1fr;
    }

    .palma-pdp-thumbs {
        gap: 8px;
    }

    .palma-pdp-thumbs-wrap {
        gap: 8px;
    }

    .palma-pdp-thumb-nav {
        flex: 0 0 30px;
        width: 30px;
        height: 30px;
    }

    .palma-pdp-thumb {
        flex-basis: 76px;
        width: 76px;
        height: 76px;
        border-radius: 10px;
    }

    .palma-pdp-main-image {
        aspect-ratio: 1 / 1;
    }

    .palma-pdp-stats {
        gap: 8px;
    }

    .palma-pdp-stat {
        padding: 12px 10px;
    }

    .palma-pdp-stat b {
        font-size: 15px;
    }

    .single-product .palma-pdp .woocommerce-tabs .panel {
        padding: 20px 18px !important;
    }

    .single-product .palma-pdp .woocommerce-tabs ul.tabs {
        gap: 20px;
        padding: 0 18px !important;
    }

    .palma-pdp-features {
        grid-template-columns: 1fr;
    }

    .palma-pdp-spec-grid {
        gap: 8px;
    }

    .palma-pdp-spec-item {
        padding: 13px 14px;
    }

    .palma-pdp-cta {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px 20px;
    }
}

/* Product detail breadcrumb: full-width page theme band. */
.single-product .woocommerce-breadcrumb {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 18px max(18px, calc((100vw - 1180px) / 2)) !important;
    box-sizing: border-box;
    background: #9c1319;
    color: #f6f4f0 !important;
    font-size: 13px !important;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
}

.single-product .woocommerce-breadcrumb a,
.single-product .woocommerce-breadcrumb a:hover {
    color: #f6f4f0 !important;
}

.single-product .palma-pdp {
    margin-top: 20px;
}

@media (max-width: 560px) {
    .single-product .woocommerce-breadcrumb {
        padding-right: 12px !important;
        padding-left: 12px !important;
    }

    .palma-pdp-share-panel {
        display: block;
        padding: 17px 16px;
    }

    .palma-pdp-share-title {
        padding: 0 0 14px;
        border-right: 0;
        border-bottom: 1px solid #dfe1e5;
    }

    .palma-pdp-share-actions {
        flex-wrap: wrap;
        padding-top: 15px;
    }

    .palma-pdp-share-action {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }

    .palma-pdp-copy-link {
        flex: 1 1 120px;
        margin-left: 0;
    }

    .palma-pdp-copy-feedback {
        flex-basis: 100%;
        min-height: 15px;
    }
}
