/* =========================================================
   PeptiVigor Buy More, Save More — Styles
   ========================================================= */

.pvbms-box {
    background: #fff;
    border: 2px solid #6d28d9;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0 30px;
    box-shadow: 0 4px 16px rgba(109, 40, 217, 0.10);
    font-family: inherit;
    box-sizing: border-box;
}

.pvbms-box * {
    box-sizing: border-box;
}

/* Header */
.pvbms-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.35em;
    font-weight: 700;
    color: #4c1d95;
    margin-bottom: 18px;
}

.pvbms-icon {
    flex: 0 0 auto;
    color: #6d28d9;
}

/* Tier grid */
.pvbms-tiers-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

.pvbms-tier-card {
    position: relative;
    border: 2px solid #e5e0f5;
    border-radius: 10px;
    padding: 18px 14px 16px;
    width: calc( 33.333% - 11px );
    min-width: 150px;
    text-align: center;
    cursor: pointer;
    background: #fafaff;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}

.pvbms-tier-card:hover {
    border-color: #a78bfa;
}

.pvbms-tier-card:focus-visible {
    outline: 2px solid #6d28d9;
    outline-offset: 2px;
}

.pvbms-tier-card.pvbms-selected {
    border-color: #6d28d9;
    background: #f5f2ff;
    box-shadow: 0 2px 10px rgba(109, 40, 217, 0.2);
}

.pvbms-tier-card.pvbms-best-value {
    border-color: #6d28d9;
}

.pvbms-best-badge {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    background: #6d28d9;
    color: #fff;
    font-size: 0.68em;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.pvbms-tier-title {
    font-size: 0.95em;
    font-weight: 700;
    color: #222;
    margin: 6px 0 10px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.pvbms-tier-off {
    font-size: 1.15em;
    font-weight: 800;
    color: #1a7a40;
    margin-bottom: 8px;
}

.pvbms-tier-save {
    display: inline-block;
    font-size: 0.78em;
    font-weight: 700;
    color: #4c1d95;
    background: #ede9fe;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.pvbms-tier-each {
    font-size: 0.85em;
    color: #666;
    padding-top: 10px;
    border-top: 1px solid #eee;
    margin-bottom: 8px;
}

.pvbms-tier-each del {
    color: #999;
    margin-right: 6px;
}

.pvbms-each-label {
    display: block;
    font-size: 0.85em;
    color: #999;
}

.pvbms-tier-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9em;
    color: #555;
    padding-top: 8px;
    border-top: 1px solid #eee;
    margin-bottom: 12px;
}

.pvbms-tier-total strong {
    color: #222;
    font-size: 1.1em;
}

.pvbms-select-btn {
    width: 100%;
    background: #ede9fe;
    color: #4c1d95;
    border: none;
    padding: 9px 10px;
    border-radius: 8px;
    font-size: 0.85em;
    font-weight: 700;
    pointer-events: none; /* whole card is the click target */
}

.pvbms-tier-card.pvbms-selected .pvbms-select-btn,
.pvbms-tier-card:hover .pvbms-select-btn {
    background: #6d28d9;
    color: #fff;
}

/* Notice */
.pvbms-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #fef8e8;
    border: 1px solid #f0d580;
    color: #7a5b00;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.88em;
    line-height: 1.5;
}

.pvbms-icon-warning {
    flex: 0 0 auto;
    color: #b8860b;
    margin-top: 1px;
}

/* Live summary */
.pvbms-summary {
    margin-top: 14px;
    padding: 12px 16px;
    background: #f5f2ff;
    border: 1px solid #ddd4fb;
    border-radius: 8px;
    font-size: 0.93em;
    font-weight: 600;
    color: #4c1d95;
}

/* ── Responsive ── */
@media ( max-width: 768px ) {
    .pvbms-tier-card {
        width: calc( 50% - 8px );
    }
}

@media ( max-width: 480px ) {
    .pvbms-box {
        padding: 18px;
    }

    .pvbms-tier-card {
        width: 100%;
    }

    .pvbms-best-badge {
        font-size: 0.65em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pvbms-tier-card {
        transition: none !important;
    }
}

/* Variable products: tier cards show an estimate until a variation is
   picked (exact price then loads via AJAX in pvbms.js). */
.pvbms-variation-hint {
    font-size: 0.85em;
    color: #6b6b6b;
    margin: -6px 0 14px;
}

/* Once a variation is picked the tier prices are exact, so the "starting
   estimate" wording would contradict what the shopper is looking at. */
.pvbms-box:not(.pvbms-pending-variation) .pvbms-variation-hint {
    display: none;
}

.pvbms-pending-variation .pvbms-tiers-grid {
    opacity: 0.55;
    pointer-events: none;
}

/* =========================================================
   v1.6.0 — inline notice for Select button feedback
   ========================================================= */
.pvbms-notice-inline {
    margin: 12px 0 0;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
}

.pvbms-notice-success {
    background: #f0fff6;
    color: #1a7a40;
    border: 1px solid #2ecc71;
}

.pvbms-notice-error {
    background: #fff0f0;
    color: #c0392b;
    border: 1px solid #e74c3c;
}

/* Shake animation — draws attention to variation selectors when customer
   tries to select a kit without choosing options first. */
@keyframes pvbms-shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-6px); }
    40%       { transform: translateX(6px); }
    60%       { transform: translateX(-4px); }
    80%       { transform: translateX(4px); }
}

.pvbms-shake {
    animation: pvbms-shake 0.55s ease;
    outline: 2px solid #e74c3c !important;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .pvbms-shake {
        animation: none;
        outline: 2px solid #e74c3c !important;
    }
}
