/* ==========================================
   CHECKOUT
========================================== */

#collapse-payment-address form{

    max-width:760px;

    margin:0 auto;

}

#collapse-payment-address .form-group{

    margin-bottom:24px;

}

#collapse-payment-address label{

    display:block;

    margin-bottom:8px;

    font-weight:600;

    color:var(--color-text);

}

#collapse-payment-address .form-control{

    width:100%;

    height:48px;

    border:1px solid #ddd;

    border-radius:12px;

    padding:0 16px;

    box-shadow:none;

}

#collapse-payment-address textarea.form-control{

    height:120px;

    padding:16px;

}

#collapse-payment-address .buttons{

    margin-top:40px;

    text-align:right;

}

#button-payment-address{

    padding:14px 34px;

    border:none;

    border-radius:12px;

    background:var(--color-primary);

    color:#fff;

    font-weight:600;

}

/* Тимчасово приховано до інтеграції Нової Пошти */

#input-payment-company,
#input-payment-company + *,
#input-payment-address-2,
#input-payment-postcode{

    display:none;

}

.checkout-guest {
    max-width: 680px;
    margin: 0 auto;
    padding: 32px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,.05);
}

.checkout-guest h2 {
    margin: 0 0 12px;
    font-size: 28px;
}

.checkout-guest p {
    margin: 0 0 24px;
    color: #777;
    line-height: 1.6;
}

.checkout-guest__option {
    margin-bottom: 28px;
}

.checkout-guest__option label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
}

.checkout-guest__option input {
    width: 18px;
    height: 18px;
}

.checkout-button {
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
}

.checkout-button:hover {
    opacity: .9;
}

.checkout-notice {
    color: #b33;
}

.checkout-guest--form {
    max-width: 900px;
}

.checkout-guest__intro {
    margin-bottom: 28px;
}

.checkout-guest__intro p {
    margin-bottom: 0;
}

.checkout-guest__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
}

.checkout-guest__section {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.checkout-guest__section legend {
    margin: 0 0 20px;
    color: var(--color-text);
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 600;
}

.checkout-guest--form .form-group {
    margin-bottom: 18px;
}

.checkout-guest--form .control-label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text);
    font-weight: 600;
}

.checkout-guest--form .form-control {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: none;
}

.checkout-guest__shipping {
    margin-top: 24px;
}

.checkout-guest--form .buttons {
    margin-top: 32px;
}

@media (max-width: 767px) {
    .checkout-guest--form {
        padding: 24px 20px;
    }

    .checkout-guest__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .checkout-guest__section legend {
        font-size: 25px;
    }

    .checkout-guest--form .buttons,
    .checkout-guest--form .pull-right {
        float: none !important;
    }

    .checkout-guest--form .checkout-button {
        width: 100%;
    }
}

/* ==========================================
   SHIPPING
========================================== */

.checkout-shipping {
    max-width: 760px;
    margin: 0 auto;
}

.checkout-shipping h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.checkout-section__hint {
    margin-bottom: 24px;
    color: #777;
}

.shipping-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shipping-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid #e6e1ed;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: .2s;
}

.shipping-option:hover {
    border-color: #b8a7d3;
    background: #faf8fd;
}

.shipping-option input {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.shipping-option__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.shipping-option__content strong {
    color: var(--color-text);
}

.shipping-option__content span {
    color: #666;
    white-space: nowrap;
}

.checkout-comment {
    margin-top: 32px;
}

.checkout-comment label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.checkout-comment textarea {
    width: 100%;
    min-height: 110px;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 12px;
    resize: vertical;
}

.checkout-step-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    margin-top: 32px;
}

.checkout-step-actions .checkout-button {
    display: block;
    width: auto;
    margin-left: auto;
    margin-right: 0;
    float: none !important;
}

/* Exact shipping-step button alignment */
#checkout-checkout .checkout-step-actions #button-shipping-method {
    float: right !important;
    display: block !important;
    position: static !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

#checkout-checkout .checkout-step-actions::after {
    content: "";
    display: table;
    clear: both;
}

@media (max-width: 768px) {

    .shipping-option__content {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .shipping-option__content span {
        white-space: normal;
    }

    .checkout-step-actions {
        display: flex;
        justify-content: stretch;
        width: 100%;
    }

    .checkout-step-actions .checkout-button {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

}

/* ==========================================
   PAYMENT
========================================== */

.checkout-payment {
    max-width: 760px;
    margin: 0 auto;
}

.checkout-payment h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border: 1px solid #e6e1ed;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: .2s;
}

.payment-option:hover {
    border-color: #b8a7d3;
    background: #faf8fd;
}

.payment-option input {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.payment-option__content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.payment-option__content strong {
    color: var(--color-text);
}

.payment-option__content span {
    color: #777;
    font-size: 14px;
}

.checkout-agreement {
    margin-top: 28px;
}

.checkout-agreement label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    line-height: 1.5;
}

.checkout-agreement input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

/* ==========================================
   SUCCESS PAGE
========================================== */

.success-page {

    padding: 80px 0 100px;

}

.success-content {

    max-width: 680px;

    margin: 0 auto;

    padding: 56px 32px;

    text-align: center;

    background: #fff;

    border-radius: 24px;

    box-shadow: 0 12px 40px rgba(0, 0, 0, .06);

}

.success-icon {

    width: 64px;
    height: 64px;

    margin: 0 auto 24px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #f5f1fa;

    color: #8f79bb;

    font-size: 32px;
    font-weight: 600;

}

.success-content h1 {

    margin: 0 0 20px;

    font-family: "Cormorant Garamond", serif;

    font-size: 42px;

    font-weight: 600;

    color: var(--color-text);

}

.success-message {

    margin-bottom: 32px;

    color: #666;

    line-height: 1.7;

}

.success-button {

    display: inline-block;

    padding: 14px 30px;

    border-radius: 12px;

    background: var(--color-primary);

    color: #fff;

    text-decoration: none;

    font-weight: 600;

    transition: .2s;

}

.success-button:hover {

    opacity: .9;

    text-decoration: none;

}


@media (max-width: 768px) {

    .success-page {

        padding: 48px 0 70px;

    }

    .success-content {

        padding: 40px 22px;

        border-radius: 18px;

    }

    .success-content h1 {

        font-size: 34px;

    }

    .success-button {

        width: 100%;

    }

}

/* ==========================================
   FLOWERS CHECKOUT ACCORDION
========================================== */

#checkout-checkout .panel-group {
    margin-bottom: 30px;
}

#checkout-checkout .panel {
    margin-bottom: 12px;
    border: 1px solid #e8e1ef;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 3px 14px rgba(70, 50, 90, 0.04);
}

#checkout-checkout .panel-heading {
    padding: 0;
    border: 0;
    background: #faf8fc;
}

#checkout-checkout .panel-title {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

#checkout-checkout .panel-title a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    color: #51465d;
    text-decoration: none;
}

#checkout-checkout .panel-title a:hover,
#checkout-checkout .panel-title a:focus {
    color: #8f79bb;
    text-decoration: none;
}

#checkout-checkout .panel-title .fa {
    color: #9b87c1;
    font-size: 14px;
    transition: transform .2s ease;
}

#checkout-checkout .panel-collapse {
    border-top: 1px solid #eee8f3;
}

#checkout-checkout .panel-body {
    padding: 24px;
    background: #fff;
}

/* Open section */

#checkout-checkout .panel:has(.panel-collapse.in) {
    border-color: #cfc1df;
    box-shadow: 0 5px 20px rgba(70, 50, 90, 0.07);
}

#checkout-checkout .panel:has(.panel-collapse.in) .panel-heading {
    background: #f7f3fa;
}

#checkout-checkout .panel:has(.panel-collapse.in) .panel-title a {
    color: #8068aa;
}

/* Forms inside checkout */

#checkout-checkout .form-group {
    margin-bottom: 18px;
}

#checkout-checkout .control-label {
    margin-bottom: 7px;
    color: #554c5c;
    font-weight: 500;
}

#checkout-checkout .form-control {
    min-height: 44px;
    border: 1px solid #ddd5e5;
    border-radius: 9px;
    box-shadow: none;
}

#checkout-checkout .form-control:focus {
    border-color: #a995c5;
    box-shadow: 0 0 0 3px rgba(169, 149, 197, 0.12);
}

/* Buttons */

#checkout-checkout .btn {
    border-radius: 9px;
    padding: 11px 22px;
    font-weight: 600;
}

/* Mobile */

@media (max-width: 767px) {

    #checkout-checkout .panel {
        margin-bottom: 9px;
        border-radius: 11px;
    }

    #checkout-checkout .panel-title {
        font-size: 16px;
    }

    #checkout-checkout .panel-title a {
        padding: 16px;
    }

    #checkout-checkout .panel-body {
        padding: 18px 15px;
    }

}

/* Final checkout shipping button alignment */
#checkout-checkout #button-shipping-options {
    display: block !important;
    float: none !important;
    position: static !important;
    margin-left: auto !important;
    margin-right: 0 !important;
}

#checkout-checkout .checkout-step-actions {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    width: 100% !important;
}
