/* ==============================================
   CUSTOM PRODUCT BOX — SoftDirect Trust Banner
   Aesthetic: Corporate authority, premium trust
   ============================================== */

/* Main container */
.custom-product-box {
    position: relative;
    max-width: 700px;
    margin: 32px auto;
    padding: 0;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow:
        0 1px 3px rgba(38, 60, 151, 0.06),
        0 8px 24px rgba(38, 60, 151, 0.08);
}

/* ── Trust banner area (headline + text) ── */

.cpb-custom-headline {
    position: relative;
    margin: 0;
    padding: 20px 28px 14px;
    background: linear-gradient(135deg, #263c97 0%, #1e3180 60%, #1a2a6c 100%);
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 1.2em;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: left;
    line-height: 1.3;
}

/* Shield icon before headline */
.cpb-custom-headline::before {
    content: "\f132";
    font-family: "FontAwesome";
    display: inline-block;
    margin-right: 10px;
    font-size: 0.9em;
    color: #fcbe00;
    vertical-align: baseline;
}

/* Subtle gold accent line under headline */
.cpb-custom-headline::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 28px;
    width: 48px;
    height: 3px;
    background: #fcbe00;
    border-radius: 2px;
}

.cpb-custom-text {
    margin: 0;
    padding: 18px 28px 22px;
    background: linear-gradient(135deg, #263c97 0%, #1e3180 60%, #1a2a6c 100%);
    color: rgba(255, 255, 255, 0.88);
    font-family: 'Roboto', sans-serif;
    font-size: 0.88em;
    font-weight: 400;
    line-height: 1.65;
    text-align: left;
    letter-spacing: 0.005em;
}

/* ── Product section ── */

.cpb-product-title {
    font-family: 'Roboto', sans-serif;
    font-size: 1.3em;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
    padding: 24px 28px 8px;
    text-align: left;
    line-height: 1.3;
}

.cpb-product-price {
    font-family: 'Roboto', sans-serif;
    font-size: 1.35em;
    font-weight: 700;
    color: #263c97;
    margin: 0;
    padding: 4px 28px 20px;
    text-align: left;
    letter-spacing: -0.01em;
}

.cpb-product-price del {
    color: #999;
    font-weight: 400;
    font-size: 0.8em;
}

.cpb-product-price ins {
    text-decoration: none;
    color: #263c97;
}

/* ── Variations ── */

.cpb-variation-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 28px 16px;
    text-align: left;
}

.cpb-variation-option {
    display: block;
    position: relative;
    border: 2px solid #e8eaf0;
    border-radius: 8px;
    padding: 0;
    margin: 0;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    background: #fafbfd;
}

.cpb-variation-option:hover {
    border-color: #b8c0e0;
    background: #f4f5fa;
}

.cpb-variation-option.selected {
    border-color: #263c97;
    background: #f0f2fa;
    box-shadow: 0 0 0 1px #263c97;
}

.cpb-variation-option input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

/* Custom radio via label ::before */
.cpb-variation-label::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid #c0c4d0;
    border-radius: 50%;
    margin-right: 12px;
    vertical-align: middle;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.cpb-variation-option.selected .cpb-variation-label::before {
    border-color: #263c97;
    background: #263c97;
    box-shadow: inset 0 0 0 3px #fff;
}

.cpb-variation-option:hover .cpb-variation-label::before {
    border-color: #8090c0;
}

.cpb-variation-label {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.92em;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
    box-sizing: border-box;
    text-align: left;
}

.cpb-variation-label bdi,
.cpb-variation-label .woocommerce-Price-amount {
    font-weight: 600;
    color: #263c97;
}

/* ── Add to cart button ── */

.cpb-add-to-cart-button {
    display: block !important;
    width: calc(100% - 56px) !important;
    margin: 8px 28px 24px !important;
    padding: 14px 24px !important;
    border: none !important;
    border-radius: 8px !important;
    background: #fcbe00 !important;
    color: #1a1a2e !important;
    font-family: 'Roboto', sans-serif !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(252, 190, 0, 0.3) !important;
}

.cpb-add-to-cart-button:hover {
    background: #e5ab00 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(252, 190, 0, 0.4) !important;
    color: #1a1a2e !important;
}

.cpb-add-to-cart-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 1px 4px rgba(252, 190, 0, 0.3) !important;
}

.cpb-add-to-cart-button:disabled,
.cpb-add-to-cart-button.disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* ── Loading indicator ── */

.cpb-loading-indicator {
    margin: -8px 28px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Roboto', sans-serif;
    font-size: 0.9em;
    color: #666;
}

.cpb-loading-indicator .spinner {
    border: 3px solid #e8eaf0;
    border-top-color: #263c97;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: cpb-spin 0.7s linear infinite;
    margin: 0;
}

@keyframes cpb-spin {
    to { transform: rotate(360deg); }
}

/* ── Ensure product title is visible ── */

.product_title {
    display: block !important;
}

/* ── Mobile refinements ── */

@media (max-width: 480px) {
    .custom-product-box {
        margin: 20px 12px;
        border-radius: 10px;
    }

    .cpb-custom-headline {
        padding: 18px 20px 12px;
        font-size: 1.1em;
    }

    .cpb-custom-headline::after {
        left: 20px;
    }

    .cpb-custom-text {
        padding: 14px 20px 18px;
        font-size: 0.85em;
    }

    .cpb-product-title {
        padding: 20px 20px 6px;
        font-size: 1.15em;
    }

    .cpb-product-price {
        padding: 4px 20px 16px;
    }

    .cpb-variation-form {
        padding: 0 20px 12px;
    }

    .cpb-add-to-cart-button {
        width: calc(100% - 40px) !important;
        margin: 8px 20px 20px !important;
    }

    .cpb-loading-indicator {
        margin: -8px 20px 20px;
    }
}
