/* WDP Public Styles */

.wdp-pricing-table {
    margin: 24px 0;
    font-size: 14px;
}

.wdp-table-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
}

.wdp-offer-text {
    color: #e44;
    font-weight: 500;
    margin: 0 0 10px;
}

/* Common table styles */
.wdp-table {
    border-collapse: collapse;
    width: 100%;
    max-width: 100%;
}

.wdp-table th,
.wdp-table td {
    padding: 8px 14px;
    border: 1px solid var(--wdp-border, #ddd);
    text-align: center;
}

.wdp-table th {
    background: #f5f5f5;
    font-weight: 600;
}

/* Vertical layout: left-align the qty column */
.wdp-table-vertical thead th:first-child,
.wdp-table-vertical tbody td:first-child {
    text-align: left;
}

/* Horizontal layout: left-align header column */
.wdp-table-horizontal th {
    text-align: left;
    background: #f5f5f5;
    white-space: nowrap;
}

/* Highlight the active range (set by JS) */
.wdp-table tr.wdp-active-range td,
.wdp-table-horizontal .wdp-active-col {
    background: #fff3b0;
    font-weight: 600;
    border-left: 3px solid #e8a900;
    border-right: 3px solid #e8a900;
}

/* Savings badge */
.wdp-save {
    color: #3a7c3e;
    font-weight: 600;
}

/* Strikethrough in cart — scoped to WDP output only */
.wdp-pricing-table del,
td.wdp-save del,
.wdp-cart-price del {
    opacity: 0.6;
    margin-right: 4px;
}

@media (max-width: 480px) {
    .wdp-table,
    .wdp-table th,
    .wdp-table td {
        font-size: 13px;
        padding: 6px 8px;
    }
}

/* ── Discounted price display (product-level flat rules) ──────────────────── */
.wdp-price-discounted del {
    opacity: 0.6;
    margin-right: 6px;
}
.wdp-price-discounted ins {
    text-decoration: none;
    font-weight: 600;
}

/* ── Discount badge / bubble ──────────────────────────────────────────────── */
/* Anchor containers so the badge can pin to the image corner.
   Covers default WooCommerce themes (Storefront) and Flatsome (.box-image,
   .product-small, .col-inner). */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
ul.products li.product,
li.product .box-image,
.product-small .box-image,
.col-inner .box-image,
.product-small.box {
    position: relative;
}
.woocommerce div.product,
.woocommerce div.product .woocommerce-product-gallery,
.single-product div.product .product-gallery,
.single-product div.product .product-images {
    position: relative;
}

.wdp-badge {
    position: absolute;
    z-index: 9;
    /* !important keeps the flex centering from being overridden by theme span/badge rules. */
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box;
    line-height: 1.1 !important;
    text-align: center;
    padding: 0.4em 0.6em;
    margin: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    white-space: nowrap;
}

/* Shapes */
.wdp-badge-circle {
    border-radius: 50%;
    width: 3.4em;
    height: 3.4em;
    padding: 0;
    white-space: normal;
}
.wdp-badge-rounded { border-radius: 8px; }
.wdp-badge-square  { border-radius: 0; }
.wdp-badge-pill    { border-radius: 999px; padding: 0.35em 0.9em; }
.wdp-badge-ribbon  { border-radius: 0; padding: 0.35em 1.1em; }

/* Positions */
.wdp-badge-top-left     { top: 10px;    left: 10px;  }
.wdp-badge-top-right    { top: 10px;    right: 10px; }
.wdp-badge-bottom-left  { bottom: 10px; left: 10px;  }
.wdp-badge-bottom-right { bottom: 10px; right: 10px; }
