/* Woo Bundle Products PRO – frontend styles
   UI copied/adapted from the FREE version you liked.
*/

.wbp-bundle-wrapper {
    margin: 2rem auto;
    padding: 1.5rem 1.5rem 1.75rem;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: #f9fafb;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
    max-width: 1100px;
    width: 100%;
    clear: both;
    position: relative;

    /* Design tokens – can be overridden inline from PHP */
    font-family: var(--wbp-font-family, inherit);
    --wbp-title-weight: var(--wbp-title-weight, 700);
    --wbp-card-radius: var(--wbp-card-radius, 14px);
    --wbp-card-shadow: var(--wbp-card-shadow, 0 12px 25px rgba(15, 23, 42, 0.04));
    --wbp-card-shadow-hover: var(--wbp-card-shadow-hover, 0 18px 38px rgba(15, 23, 42, 0.08));
    --wbp-button-radius: var(--wbp-button-radius, 999px);
    --wbp-grid-min: var(--wbp-grid-min, 220px);
}

/* Reset any weird vertical headings from theme */
.wbp-bundle-wrapper,
.wbp-bundle-wrapper * {
    writing-mode: horizontal-tb !important;
    transform: none !important;
}

/* Header */

.wbp-bundle-header {
    margin-bottom: 1.25rem;
}

.wbp-bundle-tagline {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    color: #6b7280;
    margin: 0 0 0.4rem;
}

.wbp-bundle-title {
    font-size: 1.25rem;
    font-weight: var(--wbp-title-weight, 700);
    color: #111827;
    margin: 0 0 0.4rem;
    line-height: 1.25;
}

.wbp-bundle-subtitle {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: #4b5563;
    max-width: 640px;
}

.wbp-bundle-subtitle strong {
    font-weight: 600;
}

/* Toolbar: category buttons + Reset */

.wbp-pro-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.6rem 0.75rem;
    border-radius: 999px;
    background: #eef2ff;
}

.wbp-pro-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.wbp-pro-category-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(79, 70, 229, 0.4);
    font-size: 0.8rem;
    text-decoration: none;
    color: #4338ca;
    background: #eef2ff;
    transition: background 0.12s ease-out, color 0.12s ease-out, box-shadow 0.12s ease-out;
}

.wbp-pro-category-button:hover {
    background: #e0e7ff;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.wbp-pro-category-button.is-active {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.45);
}

.wbp-pro-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.wbp-pro-reset-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(248, 113, 113, 0.6);
    font-size: 0.8rem;
    text-decoration: none;
    color: #b91c1c;
    background: #fee2e2;
    transition: background 0.12s ease-out, color 0.12s ease-out, box-shadow 0.12s ease-out;
}

.wbp-pro-reset-button:hover {
    background: #fecaca;
    box-shadow: 0 4px 10px rgba(248, 113, 113, 0.35);
}

/* Products grid */

.wbp-bundle-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(var(--wbp-grid-min, 220px), 1fr));
    gap: 0.9rem;
}

/* Card */

.wbp-bundle-product {
    background: #ffffff;
    border-radius: var(--wbp-card-radius, 14px);
    border: 1px solid rgba(148, 163, 184, 0.5);
    padding: 0.9rem 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--wbp-card-shadow, 0 12px 25px rgba(15, 23, 42, 0.04));
    transition: transform 0.12s ease-out, box-shadow 0.12s ease-out, border-color 0.12s;
}

.wbp-bundle-product:hover {
    transform: translateY(-2px);
    box-shadow: var(--wbp-card-shadow-hover, 0 18px 38px rgba(15, 23, 42, 0.08));
    border-color: #4f46e5;
}

.wbp-bundle-thumb {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0.6rem;
}

.wbp-bundle-thumb img {
    display: block;
    width: 100%;
    height: auto;
}

.wbp-bundle-product-title {
    font-size: 0.95rem;
    margin: 0 0 0.3rem;
}

.wbp-bundle-product-title a {
    text-decoration: none;
    color: #111827;
}

.wbp-bundle-product-title a:hover {
    text-decoration: underline;
}

.wbp-bundle-price {
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
}

/* Actions */

.wbp-bundle-actions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.wbp-bundle-actions .button {
    font-size: 0.8rem;
    line-height: 1.2;
    padding: 0.4rem 0.85rem;
    border-radius: var(--wbp-button-radius, 999px);
    white-space: nowrap;
}

.wbp-bundle-add-to-basket {
    background-color: #4f46e5;
    border-color: #4f46e5;
    color: #ffffff;
}

.wbp-bundle-added-label {
    background-color: #059669;
    border-color: #059669;
    color: #ffffff;
    cursor: default;
}

.wbp-pro-change-button {
    background-color: #e5e7eb;
    border-color: #d1d5db;
    color: #374151;
}

/* Added state */

.wbp-bundle-product.wbp-bundle-product-added {
    border-color: #10b981;
    box-shadow: 0 18px 40px rgba(5, 150, 105, 0.18);
}

.wbp-bundle-product.wbp-bundle-product-added .wbp-bundle-thumb {
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.35);
}

/* Responsive */

@media (max-width: 782px) {
    .wbp-bundle-wrapper {
        padding: 1.25rem 1rem 1.5rem;
        border-radius: 12px;
    }

    .wbp-bundle-title {
        font-size: 1.1rem;
    }

    .wbp-bundle-subtitle {
        font-size: 0.86rem;
    }

    .wbp-pro-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* -----------------------------------------------------------
 * Xanndora / Rehub Recart – button styling + mobile alignment
 * ---------------------------------------------------------*/

.wbp-bundle-wrapper {
    --xbp-grad-soft: linear-gradient(135deg, rgba(118, 0, 236, 0.14) 0%, rgba(255, 128, 0, 0.14) 100%);
    --xbp-grad-strong: linear-gradient(135deg, #7600ec 0%, #FF8000 100%);
    --xbp-border-soft: rgba(118, 0, 236, 0.22);
    --xbp-shadow-soft: 0 10px 22px rgba(15, 23, 42, 0.06);
}

/* Unify look for category + card buttons */
.wbp-bundle-wrapper .wbp-pro-category-button,
.wbp-bundle-wrapper .wbp-bundle-actions .wbp-bundle-add-to-basket,
.wbp-bundle-wrapper .wbp-bundle-actions .wbp-pro-change-button {
    background: var(--xbp-grad-soft) !important;
    border: 1px solid var(--xbp-border-soft) !important;
    color: #111827 !important;
    box-shadow: var(--xbp-shadow-soft);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.wbp-bundle-wrapper .wbp-pro-category-button:hover,
.wbp-bundle-wrapper .wbp-bundle-actions .wbp-bundle-add-to-basket:hover,
.wbp-bundle-wrapper .wbp-bundle-actions .wbp-pro-change-button:hover,
.wbp-bundle-wrapper .wbp-pro-category-button:focus-visible,
.wbp-bundle-wrapper .wbp-bundle-actions .wbp-bundle-add-to-basket:focus-visible,
.wbp-bundle-wrapper .wbp-bundle-actions .wbp-pro-change-button:focus-visible {
    background: var(--xbp-grad-strong) !important;
    border-color: rgba(118, 0, 236, 0.55) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.wbp-bundle-wrapper .wbp-pro-category-button.is-active {
    background: var(--xbp-grad-strong) !important;
    border-color: rgba(118, 0, 236, 0.65) !important;
    color: #ffffff !important;
    box-shadow: 0 14px 30px rgba(118, 0, 236, 0.18);
}

/* "Added to bundle" label – calm premium green */
.wbp-bundle-wrapper .wbp-bundle-actions .wbp-bundle-added-label {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(34, 197, 94, 0.22) 100%) !important;
    border: 1px solid rgba(16, 185, 129, 0.55) !important;
    color: #065f46 !important;
    box-shadow: var(--xbp-shadow-soft);
    cursor: default;
    font-weight: 700;
}

/* Reset button – "danger" but still consistent */
.wbp-bundle-wrapper .wbp-pro-reset-button {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.14) 0%, rgba(244, 63, 94, 0.14) 100%) !important;
    border: 1px solid rgba(239, 68, 68, 0.45) !important;
    color: #991b1b !important;
    box-shadow: var(--xbp-shadow-soft);
    font-weight: 700;
}

.wbp-bundle-wrapper .wbp-pro-reset-button:hover,
.wbp-bundle-wrapper .wbp-pro-reset-button:focus-visible {
    background: linear-gradient(135deg, #ef4444 0%, #f43f5e 100%) !important;
    border-color: rgba(239, 68, 68, 0.75) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* Align product card buttons nicely */
.wbp-bundle-wrapper .wbp-bundle-actions {
    justify-content: center;
}

/* Mobile: center buttons and stack category list vertically */
@media (max-width: 782px) {
    .wbp-bundle-wrapper .wbp-bundle-actions {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .wbp-bundle-wrapper .wbp-bundle-actions .button {
        width: 100%;
        max-width: 320px;
        text-align: center;
        justify-content: center;
    }

    .wbp-bundle-wrapper .wbp-pro-toolbar {
        border-radius: 16px;
        padding: 0.75rem;
    }

    .wbp-bundle-wrapper .wbp-pro-categories {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0.55rem;
        max-height: 320px;
        overflow-y: auto;
        padding-right: 2px;
    }

    .wbp-bundle-wrapper .wbp-pro-category-button {
        width: 100%;
        padding: 0.55rem 0.9rem;
        font-size: 0.9rem;
    }

    .wbp-bundle-wrapper .wbp-pro-toolbar-actions {
        width: 100%;
        margin-top: 0.25rem;
    }

    .wbp-bundle-wrapper .wbp-pro-reset-button {
        width: 100%;
        padding: 0.55rem 0.9rem;
        font-size: 0.9rem;
    }
}
