/* Bundle Products Discount for WooCommerce - front-end styles (v1.1.0 layouts) */

.bpd-bundle-heading {
    margin-bottom: 6px;
}

.bpd-group-box {
    --bpd-ink: #14181f;
    --bpd-muted: #6b7280;
    --bpd-line: #e7e5e2;
    --bpd-accent: #0f6b5c;
    --bpd-accent-ink: #ffffff;
    --bpd-surface: #fafaf8;
    margin-bottom: 24px;
    box-sizing: border-box;
}

.bpd-group-box *,
.bpd-group-box *::before,
.bpd-group-box *::after {
    box-sizing: border-box;
}

.bpd-discount-info {
    margin-top: 10px;
    font-size: 0.92em;
    color: var(--bpd-muted);
}

.bpd-tier-list {
    margin: 4px 0 0 18px;
    list-style: disc;
}

.bpd-bogo-note {
    margin: 0;
}

.bpd-price-savings {
    color: #b3271f;
}

/* =========================================================
   LAYOUT 1 — MODERN CARD LAYOUT
   ========================================================= */
.bpd-l1 {
    background: var(--bpd-surface);
    border: 1px solid var(--bpd-line);
    border-radius: 16px;
    padding: 20px;
}

.bpd-l1-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.bpd-l1-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 92px;
    cursor: default;
    position: relative;
}

.bpd-l1-thumb.bpd-l1-optional {
    cursor: pointer;
}

.bpd-l1-thumb img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(20, 24, 31, 0.08);
    border: 2px solid transparent;
    transition: border-color .15s ease, box-shadow .15s ease, opacity .15s ease;
}

.bpd-l1-optional:has(.bpd-item-check:checked) img {
    border-color: var(--bpd-accent);
}

.bpd-l1-optional:has(.bpd-item-check:not(:checked)) img {
    opacity: 0.4;
}

.bpd-l1-thumb-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--bpd-ink);
    text-align: center;
    line-height: 1.25;
}

.bpd-l1-thumb .bpd-item-check {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.bpd-l1-plus {
    font-size: 20px;
    font-weight: 300;
    color: var(--bpd-muted);
    padding: 0 2px;
}

.bpd-l1-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    border-top: 1px solid var(--bpd-line);
    padding-top: 16px;
}

.bpd-l1-prices {
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
}

.bpd-l1-price-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bpd-l1-price-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--bpd-muted);
}

.bpd-l1-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--bpd-ink);
}

.bpd-l1-price.bpd-price-original {
    text-decoration: line-through;
    color: var(--bpd-muted);
    font-weight: 600;
}

.bpd-l1-savings .bpd-l1-price {
    color: #b3271f;
}

.bpd-l1-cta {
    background: var(--bpd-accent);
    color: var(--bpd-accent-ink);
    border: none;
    border-radius: 10px;
    padding: 14px 26px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15, 107, 92, 0.28);
    transition: transform .12s ease, box-shadow .12s ease;
}

.bpd-l1-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 107, 92, 0.34);
}

@media (max-width: 560px) {
    .bpd-l1-summary { flex-direction: column; align-items: stretch; }
    .bpd-l1-cta { width: 100%; }
}

/* =========================================================
   LAYOUT 2 — AMAZON STYLE (Frequently Bought Together)
   ========================================================= */
.bpd-l2 {
    background: #fff;
    border: 1px solid var(--bpd-line);
    border-radius: 10px;
    padding: 18px;
}

.bpd-l2-heading {
    margin: 0 0 14px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--bpd-ink);
}

.bpd-l2-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.bpd-l2-thumb img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--bpd-line);
    background: #fff;
}

.bpd-l2-plus {
    font-size: 18px;
    color: var(--bpd-muted);
}

.bpd-l2-checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 14px;
}

.bpd-l2-check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    cursor: pointer;
}

.bpd-l2-anchor-row {
    cursor: default;
}

.bpd-l2-check-row input {
    width: 16px;
    height: 16px;
    accent-color: #e67e22;
}

.bpd-l2-check-name {
    flex: 1;
    color: var(--bpd-ink);
}

.bpd-l2-check-price {
    font-weight: 700;
    color: var(--bpd-ink);
}

.bpd-l2-total {
    border-top: 1px dashed var(--bpd-line);
    padding-top: 12px;
}

.bpd-l2-total-line {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 4px;
}

.bpd-l2-total-line span:last-child {
    font-weight: 700;
}

.bpd-l2-discount-line span:last-child {
    color: #b3271f;
    font-weight: 700;
}

.bpd-l2-cta {
    margin-top: 10px;
    width: 100%;
    background: #e67e22;
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 12px 20px;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    transition: background .12s ease;
}

.bpd-l2-cta:hover {
    background: #d5711b;
}

/* =========================================================
   LAYOUT 3 — GRID LAYOUT
   ========================================================= */
.bpd-l3-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

@media (max-width: 640px) {
    .bpd-l3-grid { grid-template-columns: repeat(2, 1fr); }
}

.bpd-l3-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--bpd-line);
    border-radius: 12px;
    padding: 14px 10px 16px;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.bpd-l3-cell:has(.bpd-item-check:checked) {
    border-color: var(--bpd-accent);
    box-shadow: 0 0 0 2px rgba(15, 107, 92, 0.14);
}

.bpd-l3-cell .bpd-item-check {
    position: absolute;
    opacity: 0;
}

.bpd-l3-check-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--bpd-line);
    background: #fff;
}

.bpd-l3-cell:has(.bpd-item-check:checked) .bpd-l3-check-dot {
    background: var(--bpd-accent);
    border-color: var(--bpd-accent);
}

.bpd-l3-cell:has(.bpd-item-check:checked) .bpd-l3-check-dot::after {
    content: "\2713";
    display: block;
    color: #fff;
    font-size: 12px;
    line-height: 14px;
    text-align: center;
}

.bpd-l3-cell img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 8px;
}

.bpd-l3-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--bpd-ink);
}

.bpd-l3-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--bpd-accent);
}

.bpd-l3-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--bpd-line);
}

.bpd-l3-prices {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.bpd-l3-original {
    text-decoration: line-through;
    color: var(--bpd-muted);
    font-weight: 600;
}

.bpd-l3-bundle {
    font-size: 19px;
    font-weight: 800;
    color: var(--bpd-ink);
}

.bpd-l3-badge {
    background: #eaf6f0;
    color: #157a5b;
    font-weight: 700;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 999px;
}

.bpd-l3-cta {
    background: var(--bpd-ink);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px 24px;
    font-weight: 700;
    font-size: 14.5px;
    cursor: pointer;
}

@media (max-width: 560px) {
    .bpd-l3-footer { flex-direction: column; align-items: stretch; }
    .bpd-l3-cta { width: 100%; }
}

/* =========================================================
   LAYOUT 4 — HORIZONTAL SCROLL LAYOUT
   ========================================================= */
.bpd-l4 {
    display: flex;
    gap: 16px;
    align-items: stretch;
    flex-wrap: wrap;
}

.bpd-l4-summary {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: var(--bpd-ink);
    color: #fff;
    border-radius: 14px;
    padding: 18px;
}

.bpd-l4-summary-eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(255,255,255,0.6);
}

.bpd-l4-summary-count {
    font-size: 13px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 6px;
}

.bpd-l4-summary-prices {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.bpd-l4-summary-prices .bpd-price-original {
    text-decoration: line-through;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
}

.bpd-l4-summary-bundle {
    font-size: 22px;
    font-weight: 800;
}

.bpd-l4-summary-savings {
    font-size: 12.5px;
    color: #ff9d90;
    margin-bottom: 10px;
}

.bpd-l4-cta {
    margin-top: auto;
    background: #fff;
    color: var(--bpd-ink);
    border: none;
    border-radius: 9px;
    padding: 12px 16px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}

.bpd-l4-scroll-wrap {
    position: relative;
    flex: 1 1 300px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.bpd-l4-scroll-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 4px 2px 10px;
    scrollbar-width: thin;
}

.bpd-l4-card {
    position: relative;
    flex: 0 0 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    background: #fff;
    border: 1px solid var(--bpd-line);
    border-radius: 12px;
    padding: 12px 8px 14px;
    cursor: pointer;
}

.bpd-l4-card:has(.bpd-item-check:checked) {
    border-color: var(--bpd-accent);
    box-shadow: 0 0 0 2px rgba(15, 107, 92, 0.14);
}

.bpd-l4-card .bpd-item-check {
    position: absolute;
    opacity: 0;
}

.bpd-l4-check-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--bpd-line);
    background: #fff;
}

.bpd-l4-card:has(.bpd-item-check:checked) .bpd-l4-check-dot {
    background: var(--bpd-accent);
    border-color: var(--bpd-accent);
}

.bpd-l4-card img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
}

.bpd-l4-card-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--bpd-ink);
}

.bpd-l4-card-price {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--bpd-accent);
}

.bpd-l4-arrow {
    flex: 0 0 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--bpd-line);
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: var(--bpd-ink);
    text-align: center !important;
}

.bpd-l4-arrow:hover {
    background: var(--bpd-surface);
}

@media (max-width: 640px) {
    .bpd-l4-summary { flex: 1 1 100%; }
}

/* =========================================================
   LAYOUT 5 — PREMIUM GLASS LAYOUT
   ========================================================= */
.bpd-l5 {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    border-radius: 20px;
    overflow: hidden;
    background: radial-gradient(120% 140% at 0% 0%, #241a3d 0%, #140f26 45%, #0a0c18 100%);
    color: #f3f0ff;
    width: 70%;
}

.bpd-l5-left {
    flex: 1 1 260px;
    padding: 26px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bpd-l5-eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #f4c77b;
    font-weight: 700;
    margin-bottom: 6px;
}

.bpd-l5-feature-title {
    margin: 0 0 8px 0;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.bpd-l5-features {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bpd-l5-features li {
    font-size: 13.5px;
    color: rgba(243, 240, 255, 0.85);
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.bpd-l5-check {
    color: #f4c77b;
    font-weight: 700;
    flex: 0 0 auto;
}

.bpd-l5-price-box {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14);
    backdrop-filter: blur(6px);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 16px;
}

.bpd-l5-price-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: rgba(243,240,255,0.6);
}

.bpd-l5-price {
    font-size: 26px;
    font-weight: 800;
    background: linear-gradient(90deg, #f4c77b, #e8846b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.bpd-l5-original {
    text-decoration: line-through;
    color: rgba(243,240,255,0.45);
    font-size: 13px;
}

.bpd-l5-savings {
    color: #7be6b4;
    font-size: 12.5px;
    font-weight: 700;
}

.bpd-l5-cta {
    background: linear-gradient(90deg, #f4c77b, #e8846b);
    color: #1c1224;
    border: none;
    border-radius: 10px;
    padding: 14px 22px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(232, 132, 107, 0.35);
    transition: transform .12s ease, box-shadow .12s ease;
}

.bpd-l5-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 30px rgba(232, 132, 107, 0.42);
}

.bpd-l5-right {
    flex: 1 1 260px;
    background: rgba(255,255,255,0.035);
    border-left: 1px solid rgba(255,255,255,0.08);
    padding: 22px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    align-content: start;
}

.bpd-l5-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    padding: 12px 8px 14px;
    cursor: pointer;
    width: 85%;
    height: 75%;
}

.bpd-l5-card-anchor {
    cursor: default;
    border-color: #f4c77b;
    width: 75%;
    height: 95%;
}

.bpd-l5-card .bpd-item-check {
    position: absolute;
    opacity: 0;
}

.bpd-l5-check-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
}

.bpd-l5-card:has(.bpd-item-check:checked) .bpd-l5-check-dot {
    background: #f4c77b;
    border-color: #f4c77b;
}

.bpd-l5-card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    border-radius: 8px;
}

.bpd-l5-card-name {
    font-size: 12px;
    font-weight: 600;
    color: #f3f0ff;
}

.bpd-l5-card-price {
    font-size: 12px;
    font-weight: 700;
    color: #f4c77b;
}

@media (max-width: 640px) {
    .bpd-l5-right { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================================
   SAVINGS BANNER / BADGE (cart + checkout, unrelated to layouts above)
   ========================================================= */
.bpd-upsell-notice {
    background: #fff8e6;
    border: 1px solid #f2d98a;
    color: #6b5300;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 0.98em;
}

.bpd-savings-banner {
    background: #e7f7ec;
    border: 1px solid #b7e4c7;
    color: #1e4620;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 1.05em;
}

tr.bpd-total-savings th,
tr.bpd-total-savings td {
    color: #1e7e34;
    font-weight: bold;
}
