/* ==========================================================================
   Peptide Product Variants — Widget Styles
   All selectors scoped under .ppv-widget to prevent leaking into other plugins
   ========================================================================== */

/* Reset & Base — scoped only to this widget */
.ppv-widget {
    max-width: 100%;
    box-sizing: border-box;
}

.ppv-widget *,
.ppv-widget *::before,
.ppv-widget *::after {
    box-sizing: border-box;
}

/* Section spacing */
.ppv-widget .ppv-section {
    margin-bottom: 24px;
}

/* ---------- Section Titles ---------- */
.ppv-widget .ppv-section-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ---------- Price Display ---------- */
.ppv-widget .ppv-price-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
    margin-bottom: 24px;
}

.ppv-widget .ppv-price-display {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
    transition: opacity 0.2s ease;
    font-family: inherit;
    order: 1;
}

.ppv-widget .ppv-price-display.ppv-fade {
    opacity: 0;
}

.ppv-widget .ppv-price-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    background-color: #dc2626;
    border-radius: 6px;
    letter-spacing: 0.3px;
    line-height: 1;
    white-space: nowrap;
    order: 2;
}

.ppv-widget .ppv-price-regular {
    font-size: 16px;
    font-weight: 500;
    color: #9ca3af;
    text-decoration: line-through;
    line-height: 1.2;
    font-family: inherit;
    order: 3;
}

/* ---------- Variant Pills ---------- */
.ppv-widget .ppv-variants-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ppv-widget .ppv-variant-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    background-color: #ffffff;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
    text-align: center;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    line-height: 1.3;
    font-family: inherit;
}

.ppv-widget .ppv-variant-pill:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.ppv-widget .ppv-variant-pill.ppv-active {
    background-color: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}

.ppv-widget .ppv-variant-pill.ppv-out-of-stock {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* ---------- Quantity Pill Selectors (top row) ---------- */
.ppv-widget .ppv-quantity-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ppv-widget .ppv-quantity-pill {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    background-color: #ffffff;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
    text-align: center;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    gap: 2px;
    font-family: inherit;
}

.ppv-widget .ppv-quantity-pill:hover {
    border-color: #9ca3af;
    background-color: #f9fafb;
}

.ppv-widget .ppv-quantity-pill.ppv-active {
    background-color: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}

.ppv-widget .ppv-quantity-pill.ppv-active .ppv-discount-text {
    color: #86efac;
}

.ppv-widget .ppv-quantity-pill.ppv-active .ppv-qpill-freeship {
    color: #86efac;
}

.ppv-widget .ppv-qpill-label {
    font-size: 14px;
    font-weight: 700;
}

.ppv-widget .ppv-qpill-discount {
    font-size: 12px;
    font-weight: 700;
}

.ppv-widget .ppv-qpill-freeship {
    font-size: 11px;
    color: #16a34a;
}

/* ---------- Bundle Cards ---------- */
.ppv-widget .ppv-bundles-row {
    display: flex;
    gap: 14px;
    margin-top: 4px;
}

.ppv-widget .ppv-bundle-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px 16px 18px;
    background-color: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    text-align: center;
    flex: 1 1 0%;
    min-width: 0;
}

.ppv-widget .ppv-bundle-card:hover {
    border-color: #9ca3af;
    background-color: #fafafa;
}

.ppv-widget .ppv-bundle-card.ppv-active {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 1px #1a1a1a;
}

/* Badge */
.ppv-widget .ppv-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-block;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #ffffff;
    background-color: #16a34a;
    border-radius: 5px;
    white-space: nowrap;
    z-index: 1;
    line-height: 1.3;
}

/* Vial icons */
.ppv-widget .ppv-bundle-vial-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-shrink: 0;
    line-height: 1;
    min-height: 55px;
    width: 100%;
    max-width: 120px;
}

.ppv-widget .ppv-bundle-img {
    object-fit: contain;
    display: inline-block;
    flex: 1 1 0%;
    min-width: 0;
    max-height: 60px;
    width: auto !important;
    height: auto !important;
}

/* Bundle info wrapper */
.ppv-widget .ppv-bundle-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.ppv-widget .ppv-bundle-label {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
}

.ppv-widget .ppv-bundle-sublabel {
    font-size: 13px;
    color: #9ca3af;
}

.ppv-widget .ppv-bundle-sublabel.ppv-discount-text {
    color: #16a34a;
    font-weight: 600;
    font-size: 13px;
}

/* ---------- Discount Text ---------- */
.ppv-widget .ppv-discount-text {
    color: #16a34a;
    font-weight: 600;
}

/* ---------- Shipping Banners ---------- */
.ppv-widget .ppv-shipping-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
}

.ppv-widget .ppv-shipping-free {
    background-color: #f0fdf4;
    color: #166534;
}

.ppv-widget .ppv-shipping-today {
    background-color: #f0fdf4;
    color: #166534;
}

.ppv-widget .ppv-shipping-icon {
    font-size: 20px;
    line-height: 1;
    flex-shrink: 0;
}

.ppv-widget .ppv-countdown {
    font-variant-numeric: tabular-nums;
}


/* ---------- Add to Cart Section ---------- */
.ppv-widget .ppv-cart-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

/* Quantity Selector */
.ppv-widget .ppv-qty-wrapper {
    display: inline-flex;
    align-items: center;
    background-color: #f3f4f6;
    border-radius: 50px;
    padding: 4px;
    flex-shrink: 0;
}

.ppv-widget .ppv-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 18px;
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    line-height: 1;
    font-family: inherit;
}

.ppv-widget .ppv-qty-btn:hover {
    background-color: #e5e7eb;
    color: #1a1a1a;
}

.ppv-widget .ppv-qty-input {
    width: 40px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    background: transparent;
    border: none;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
    font-family: inherit;
}

.ppv-widget .ppv-qty-input::-webkit-inner-spin-button,
.ppv-widget .ppv-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* CoA Button */
.ppv-widget .ppv-coa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    background-color: #ffffff;
    border: 2px solid #1a1a1a;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    min-height: 50px;
    letter-spacing: 0.3px;
    font-family: inherit;
    text-decoration: none;
    flex-shrink: 0;
}

.ppv-widget .ppv-coa-btn:hover {
    background-color: #f3f4f6;
}

.ppv-widget .ppv-coa-btn:active {
    transform: scale(0.98);
}

/* Add to Cart Button */
.ppv-widget .ppv-add-to-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    background-color: #1a1a1a;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    min-height: 50px;
    letter-spacing: 0.3px;
    font-family: inherit;
}

.ppv-widget .ppv-add-to-cart-btn:hover {
    background-color: #333333;
}

.ppv-widget .ppv-add-to-cart-btn:active {
    transform: scale(0.98);
}

.ppv-widget .ppv-add-to-cart-btn.ppv-loading {
    opacity: 0.7;
    cursor: wait;
}

.ppv-widget .ppv-add-to-cart-btn.ppv-added {
    background-color: #16a34a;
}

.ppv-widget .ppv-add-to-cart-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .ppv-widget .ppv-bundles-row {
        flex-wrap: nowrap;
        gap: 10px;
    }

    .ppv-widget .ppv-bundle-card {
        padding: 20px 10px 14px;
        gap: 6px;
    }

    .ppv-widget .ppv-bundle-vial-icons {
        min-height: 45px;
        max-width: 100px;
    }

    .ppv-widget .ppv-bundle-img {
        max-height: 48px;
    }

    .ppv-widget .ppv-bundle-label {
        font-size: 14px;
    }

    .ppv-widget .ppv-bundle-sublabel {
        font-size: 12px;
    }

    .ppv-widget .ppv-badge {
        top: -9px;
        padding: 3px 8px;
        font-size: 9px;
    }

    .ppv-widget .ppv-cart-section {
        flex-direction: row;
    }

    .ppv-widget .ppv-coa-btn {
        flex: 0 0 auto;
        padding: 12px 20px;
        font-size: 14px;
    }

    .ppv-widget .ppv-add-to-cart-btn {
        flex: 1;
    }

    .ppv-widget .ppv-quantity-pills-row {
        gap: 8px;
    }

    .ppv-widget .ppv-quantity-pill {
        min-width: 80px;
        padding: 10px 16px;
    }

    .ppv-widget .ppv-price-display {
        font-size: 26px;
    }

    .ppv-widget .ppv-price-display {
        font-size: 24px;
    }

    .ppv-widget .ppv-price-regular {
        font-size: 14px;
    }

    .ppv-widget .ppv-price-badge {
        font-size: 11px;
        padding: 4px 8px;
    }
}

@media (max-width: 480px) {
    .ppv-widget .ppv-variant-pill {
        padding: 8px 16px;
        font-size: 14px;
        min-width: 50px;
    }

    .ppv-widget .ppv-variants-row {
        gap: 8px;
    }

    .ppv-widget .ppv-bundles-row {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .ppv-widget .ppv-bundle-card {
        padding: 18px 8px 12px;
    }

    .ppv-widget .ppv-bundle-vial-icons {
        min-height: 38px;
        max-width: 90px;
    }

    .ppv-widget .ppv-bundle-img {
        max-height: 40px;
    }

    .ppv-widget .ppv-bundle-label {
        font-size: 13px;
    }

    .ppv-widget .ppv-bundle-sublabel {
        font-size: 11px;
    }

    .ppv-widget .ppv-badge {
        padding: 2px 6px;
        font-size: 8px;
    }
}
