/* One white card treatment for homepage carousels and WooCommerce loops. */
.product-small:has(> .col-inner > .htw-rounded-card) { display: flex; }
.product-small:has(> .col-inner > .htw-rounded-card) > .col-inner {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}
.spc-carousel .spc-item { display: flex; }
.htw-rounded-card {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 8px;
    border: 1px solid #e7eee8;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(25, 50, 33, .045);
}
.htw-rounded-card .htw-rounded-card__media {
    border-radius: 10px;
    background: #fff;
}
.htw-rounded-card .htw-rounded-card__image {
    object-fit: contain;
    object-position: center;
}
.htw-rounded-card .htw-rounded-card__information {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 0 6px 12px;
    text-align: center;
}
.htw-rounded-card h3.htw-rounded-card__title { text-align: center; }
.htw-rounded-card .htw-rounded-card__price {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 2px 7px;
    margin-top: auto;
    padding-top: 4px;
    text-align: center;
}
.htw-rounded-card .htw-rounded-card__price del,
.htw-rounded-card .htw-rounded-card__price del .amount {
    color: #7c857f;
    font-weight: 400;
    text-decoration: line-through;
}
.htw-rounded-card .htw-rounded-card__price ins,
.htw-rounded-card .htw-rounded-card__price ins .amount {
    color: #19251f;
    font-weight: 700;
    text-decoration: none;
}
.htw-rounded-card .loopy-card-price-from { color: #737b75; font-size: .85em; }
.product-small:has(> .col-inner > .htw-rounded-card) > .col-inner > .badge-container .badge-inner {
    padding: 6px 10px;
    font-weight: 700 !important;
}

/* Match the product-gallery sale badge to the shared WooCommerce cards. */
.woocommerce-product-gallery > .badge-container {
    top: 16px;
    left: 16px;
    width: auto;
    margin: 0;
    pointer-events: none;
}
.woocommerce-product-gallery > .badge-container .badge {
    display: block;
    width: auto;
    height: auto;
    margin: 0;
}
.woocommerce-product-gallery > .badge-container .badge-inner.on-sale {
    position: static;
    display: block;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    padding: 6px 10px;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--loopy-badge-bg, #8fe8b3) !important;
    color: var(--loopy-badge-fg, #191919) !important;
    font: 700 12px/1.2 "HTW Rounded Card Roboto", Roboto, Arial, sans-serif;
    font-size: 12px !important;
    font-weight: 700 !important;
    text-align: center;
    white-space: nowrap;
}
.woocommerce-product-gallery > .badge-container .badge-inner.on-sale .onsale {
    position: static;
    display: inline;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent !important;
    color: var(--loopy-badge-fg, #191919) !important;
    font: inherit;
}

/* The original WooCommerce list links remain intact inside each dropdown. */
.loopy-filter-disclosure { margin: 0 0 18px; }
.loopy-filter-disclosure > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #d7dfd8;
    border-radius: 8px;
    background: #fff;
    color: #19251f;
    font: 500 15px/1.35 Arial, Helvetica, sans-serif;
    list-style: none;
    cursor: pointer;
}
.loopy-filter-disclosure > summary::-webkit-details-marker { display: none; }
.loopy-filter-disclosure > summary::after {
    content: '';
    flex: none;
    width: 8px;
    height: 8px;
    margin-right: 3px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
}
.loopy-filter-disclosure[open] > summary { border-radius: 8px 8px 0 0; }
.loopy-filter-disclosure[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.loopy-filter-disclosure > summary:focus-visible { outline: 2px solid #256d4d; outline-offset: 2px; }
.loopy-filter-disclosure__panel {
    max-height: 280px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 13px;
    border: 1px solid #d7dfd8;
    border-top: 0;
    border-radius: 0 0 8px 8px;
    background: #fff;
}
.loopy-filter-disclosure__panel > .widget-title,
.loopy-filter-disclosure__panel > .is-divider { display: none; }
.loopy-filter-disclosure__panel > ul { margin: 0; padding: 0; }

@media (max-width: 719px) {
    .htw-rounded-card { padding: 6px; border-radius: 13px; }
    .htw-rounded-card .htw-rounded-card__media { border-radius: 8px; }
    .htw-rounded-card .htw-rounded-card__information { padding: 0 3px 10px; }
}
