/* subscription.css — Bloom Box Subscription Flow */

/* ===========================
   Page Header
   =========================== */
.sub-page-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 40px 0;
}

.sub-breadcrumb {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    color: #b0a0a5;
    letter-spacing: 0.5px;
}

.sub-breadcrumb a {
    color: #b0a0a5;
    text-decoration: none;
    transition: color 0.2s;
}

.sub-breadcrumb a:hover {
    color: #c0607a;
}

.breadcrumb-sep {
    margin: 0 6px;
    opacity: 0.6;
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: #3b2e31;
    margin-top: 14px;
    margin-bottom: 10px;
    line-height: 1.2;
}

.page-title em {
    font-family: 'Dancing Script', cursive;
    color: #c0607a;
    font-weight: 700;
    font-style: normal;
}

.subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    color: #a0909a;
    margin-bottom: 36px;
    line-height: 1.6;
}

/* ===========================
   Layout
   =========================== */
.subscription-main {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 0 40px;
}

.subscription-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* ===========================
   Form Section
   =========================== */
.form-section {
    flex: 1;
    background: #ffffff;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 8px 40px rgba(60, 20, 30, 0.06);
    border: 1px solid rgba(230, 200, 210, 0.4);
}

.form-group {
    margin-bottom: 44px;
}

.form-group:last-child {
    margin-bottom: 0;
}

/* Step badge in heading */
.form-group h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #a0a0a0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c0607a, #e8849e);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(192, 96, 122, 0.3);
}

.optional-tag {
    font-size: 0.65rem;
    letter-spacing: 1px;
    color: #b8a0a8;
    border: 1px dashed #e0c8d0;
    border-radius: 20px;
    padding: 2px 8px;
    margin-left: 4px;
}

/* ===========================
   Frequency Tabs
   =========================== */
.radio-group {
    display: flex;
    gap: 12px;
}

.tabs-group {
    background: #f5f0f2;
    padding: 6px;
    border-radius: 16px;
}

.tab-label {
    flex: 1;
    text-align: center;
    cursor: pointer;
}

.tab-label input {
    display: none;
}

.tab-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 14px 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tab-icon {
    font-size: 1.4rem;
    line-height: 1;
    margin-bottom: 4px;
}

.tab-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    color: #6a6a6a;
    transition: color 0.3s;
}

.tab-sub {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    color: #a0a0a0;
    font-weight: 500;
    transition: color 0.3s;
}

.tab-label input:checked+.tab-content {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(60, 20, 30, 0.08);
}

.tab-label input:checked+.tab-content .tab-text {
    color: #c0607a;
}

.tab-label input:checked+.tab-content .tab-sub {
    color: #e8849e;
}

/* ===========================
   Payment Plan Toggles
   =========================== */
.toggle-group {
    display: flex;
    gap: 16px;
}

.toggle-switch {
    flex: 1;
    position: relative;
    cursor: pointer;
}

.toggle-switch input {
    display: none;
}

.toggle-slider {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 22px 18px;
    background: #fafafa;
    border: 2px solid #f0e0e8;
    border-radius: 18px;
    transition: all 0.3s ease;
    text-align: center;
}

.plan-icon {
    font-size: 1.6rem;
    margin-bottom: 4px;
}

.plan-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #4a4a4a;
    transition: color 0.3s;
}

.plan-sub {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    color: #a0a0a0;
    font-weight: 500;
    transition: color 0.3s;
}

.toggle-switch input:checked+.toggle-slider {
    background: linear-gradient(135deg, #f4fbf4 0%, #edf6ee 100%);
    border-color: #79a379;
    box-shadow: 0 6px 24px rgba(121, 163, 121, 0.2);
}

.toggle-switch input:checked+.toggle-slider .plan-label {
    color: #4a5c49;
}

.toggle-switch input:checked+.toggle-slider .plan-sub {
    color: #79a379;
}

.annual-switch .badge {
    position: absolute;
    top: -10px;
    right: 50%;
    transform: translateX(50%);
}

/* ===========================
   Add-on Checkbox Cards
   =========================== */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-card {
    cursor: pointer;
    display: block;
}

.checkbox-card input {
    display: none;
}

.checkbox-content {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: #fafafa;
    border: 2px solid #f0e0e8;
    border-radius: 14px;
    transition: all 0.25s ease;
}

.addon-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.addon-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.addon-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #3b2e31;
}

.addon-desc {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    color: #a0909a;
    margin-top: 3px;
    line-height: 1.4;
}

.addon-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    color: #c0607a;
    white-space: nowrap;
}

.checkbox-card:hover .checkbox-content {
    border-color: #e8849e;
    background: #fdf8f9;
    transform: translateX(3px);
}

.checkbox-card input:checked+.checkbox-content {
    background: #fdf2f5;
    border-color: #c0607a;
    box-shadow: 0 4px 16px rgba(192, 96, 122, 0.12);
}

.checkbox-card input:checked+.checkbox-content .addon-title::before {
    content: "✓ ";
    color: #c0607a;
}

/* ===========================
   Delivery Details Grid
   =========================== */
.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group.full-width {
    grid-column: 1 / -1;
}

.input-group label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: #6a6a6a;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-label-icon {
    font-size: 0.9rem;
}

.custom-input {
    width: 100%;
    padding: 14px 18px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.92rem;
    color: #3b2e31;
    background: #fafafa;
    border: 1.5px solid #ede0e5;
    border-radius: 12px;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    resize: vertical;
}

.custom-input::placeholder {
    color: #c0b0b8;
    font-weight: 400;
}

.custom-input:focus {
    outline: none;
    border-color: #c0607a;
    background: #fffbfc;
    box-shadow: 0 0 0 3px rgba(192, 96, 122, 0.1);
}

/* ===========================
   Order Summary Card
   =========================== */
.summary-section {
    width: 370px;
    flex-shrink: 0;
}

.sticky-summary {
    position: sticky;
    top: 90px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(60, 20, 30, 0.1);
    border: 1px solid rgba(230, 200, 210, 0.4);
}

.summary-header {
    background: linear-gradient(135deg, #c0607a 0%, #e8849e 100%);
    padding: 28px 32px 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.summary-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #ffffff;
    font-weight: 700;
}

.summary-freshness {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.summary-details {
    background: #ffffff;
    padding: 28px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.92rem;
    color: #4a4a4a;
}

.summary-line span:last-child {
    font-weight: 700;
}

.text-sm {
    font-size: 0.8rem;
}

.text-gray {
    color: #a0909a;
}

.text-gray strong {
    color: #6a5a60;
    font-weight: 700;
}

.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #f0e0e5, transparent);
    margin: 4px 0;
}

.discount-line {
    color: #4a5c49;
}

.discount-line span:last-child {
    color: #4a7a4a;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0 4px;
    border-top: 2px dashed #f0e0e5;
    margin-top: 4px;
}

.summary-total span:first-child {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #3b2e31;
    display: flex;
    flex-direction: column;
}

.summary-total #payment-term-text {
    font-size: 0.72rem;
    font-weight: 400;
    color: #a0909a;
    margin-top: 2px;
}

#summary-total-price {
    font-family: 'Dancing Script', cursive;
    color: #c0607a;
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
    transition: transform 0.2s ease;
}

/* Price update pulse */
@keyframes pricePulse {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.08);
        color: #a84b63;
    }

    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pricePulse 0.35s ease-out forwards;
}

/* ===========================
   Checkout Button
   =========================== */
.btn-full {
    width: 100%;
    padding: 17px;
    font-size: 0.85rem;
    border: none;
    cursor: pointer;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 4px;
}

.btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

.btn-full.loading .btn-text {
    opacity: 0.6;
}

.btn-full.loading .btn-spinner {
    display: block;
}

.guarantee-text {
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    color: #b0a0a8;
    margin-top: 10px;
    letter-spacing: 0.3px;
}

/* ===========================
   Success Modal
   =========================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(40, 15, 25, 0.55);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    padding: 20px;
}

.modal-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.modal-card {
    background: #ffffff;
    border-radius: 28px;
    padding: 48px 40px 40px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 80px rgba(60, 20, 30, 0.25);
    transform: scale(0.88) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.visible .modal-card {
    transform: scale(1) translateY(0);
}

.modal-confetti {
    font-size: 1.5rem;
    letter-spacing: 6px;
    margin-bottom: 18px;
    animation: fadeInDown 0.6s ease 0.2s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    display: block;
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #3b2e31;
    margin-bottom: 12px;
    font-weight: 700;
}

.modal-title em {
    font-family: 'Dancing Script', cursive;
    color: #c0607a;
    font-weight: 700;
    font-size: 2.2rem;
    font-style: normal;
}

.modal-message {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: #7a6a72;
    line-height: 1.65;
    margin-bottom: 20px;
}

.modal-details {
    background: #fdf5f7;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    color: #6a5a60;
    text-align: left;
    line-height: 1.7;
    border: 1px dashed #f0d8e0;
}

.modal-details:empty {
    display: none;
}

.modal-close-btn {
    padding: 16px 40px;
    font-size: 0.88rem;
    border: none;
    border-radius: 14px;
}

/* ===========================
   Badge (shared)
   =========================== */
.badge {
    position: absolute;
    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 5px 10px;
    border-radius: 20px;
}

.badge-popular {
    background-color: #fcf0f3;
    color: #c0607a;
    border: 1px solid #f2dee6;
}

/* ===========================
   Responsive
   =========================== */
@media (max-width: 960px) {
    .subscription-container {
        flex-direction: column;
    }

    .summary-section {
        width: 100%;
        order: -1;
    }

    .sticky-summary {
        position: static;
    }

    .details-grid {
        grid-template-columns: 1fr;
    }

    .input-group.full-width {
        grid-column: auto;
    }

    .toggle-group {
        gap: 12px;
    }
}

@media (max-width: 600px) {

    .subscription-main,
    .sub-page-header {
        padding-left: 20px;
        padding-right: 20px;
    }

    .form-section {
        padding: 28px 20px;
    }

    .tabs-group {
        flex-direction: column;
    }

    .toggle-group {
        flex-direction: column;
    }

    .summary-header {
        padding: 22px 22px 18px;
    }

    .summary-details {
        padding: 20px 22px 24px;
    }
}