/* =============================================================
   Checkout redesign
   Scoped to /order/cart and /order/checkout (loaded only there).
   Restyles the account / address / delivery / payment flow and
   the order-summary sidebar into a single, modern, card-based
   checkout experience that matches the site's teal brand.
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Urbanist:wght@400;500;600;700;800&display=swap');

:root {
    --wl-brand: #288881;
    --wl-brand-dark: #1b3331;
    --wl-brand-accent: #00ccbd;
    --wl-ink: #14201f;
    --wl-muted: #6b7570;
    --wl-border: #e4e8e7;
    --wl-bg: #f5f7f6;
    --wl-card: #ffffff;
    --wl-warn-bg: #fff8e6;
    --wl-warn-border: #f0c36d;
    --wl-warn-text: #7a5b00;
    --wl-radius-lg: 18px;
    --wl-radius-md: 12px;
    --wl-radius-sm: 8px;
    --wl-shadow: 0 4px 24px rgba(20, 32, 31, 0.06);
    --wl-shadow-lift: 0 10px 30px rgba(20, 32, 31, 0.10);
}

.urbanist-regular { font-family: 'Urbanist', sans-serif; font-weight: 400; }
.urbanist-medium   { font-family: 'Urbanist', sans-serif; font-weight: 500; }
.urbanist-bold     { font-family: 'Urbanist', sans-serif; font-weight: 700; }

/* ---------------------------------------------------------------
   Page shell
   --------------------------------------------------------------- */
.main_order_summary,
main.checkout {
    font-family: 'Urbanist', sans-serif;
    color: var(--wl-ink);
    background: var(--wl-bg);
    padding-bottom: 64px;
}

.main_order_summary .container,
main.checkout.container {
    max-width: 1180px;
}

.main_order_summary h2.fw-bold {
    font-family: 'Urbanist', sans-serif;
    font-weight: 800;
    font-size: 1.9rem;
    color: var(--wl-brand-dark);
    letter-spacing: -0.01em;
    margin-bottom: 4px;
}

.continue-shopping-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--wl-brand);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 28px;
    transition: gap 0.15s ease;
}
.continue-shopping-link:hover { gap: 10px; color: var(--wl-brand-dark); }

/* ---------------------------------------------------------------
   Step headers (Account / Address / Payment)
   --------------------------------------------------------------- */
.section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 32px 0 18px;
}
.section-header:first-of-type { margin-top: 0; }

.section-number {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--wl-brand-dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
}

.section-header h4 {
    margin: 0;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--wl-brand-dark);
}

/* ---------------------------------------------------------------
   Card surfaces
   --------------------------------------------------------------- */
.main_page,
#login_section,
.info_requirement,
.grey-border,
.delivery-chosen {
    background: var(--wl-card);
}

.info_requirement,
.mb-3 > .info_requirement {
    border: 1px solid var(--wl-border);
    border-radius: var(--wl-radius-lg);
    box-shadow: var(--wl-shadow);
    padding: 28px !important;
    margin-bottom: 8px;
}

.main_order_summary h4,
main.checkout h4 {
    font-weight: 700;
    color: var(--wl-brand-dark);
    margin-bottom: 6px;
}

.grey-border {
    border: 1px solid var(--wl-border) !important;
    border-radius: var(--wl-radius-lg);
    box-shadow: var(--wl-shadow);
}

.login_sec p {
    margin: 0 0 4px;
    color: var(--wl-muted);
}
.login_sec a {
    color: var(--wl-brand);
    font-weight: 600;
    text-decoration: none;
}
.login_sec a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------
   Forms
   --------------------------------------------------------------- */
.form-label,
label.form-label,
perch-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--wl-brand-dark);
    margin-bottom: 6px;
}

.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select {
    border: 1.5px solid var(--wl-border);
    border-radius: var(--wl-radius-sm);
    padding: 11px 14px;
    font-size: 0.96rem;
    background-color: #fbfcfc;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus {
    border-color: var(--wl-brand);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(40, 136, 129, 0.14);
    outline: none;
}

.form-control.required,
.form-select.required {
    background-image: none;
}

.error-message.text-danger,
small.error-message {
    display: block;
    font-size: 0.8rem;
    margin-top: 4px;
    color: #d64545 !important;
}

.agree_weightloss,
.do_not {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--wl-muted);
}
.agree_weightloss input,
.do_not input {
    margin-top: 4px;
    accent-color: var(--wl-brand);
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

fieldset legend {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--wl-brand-dark);
    margin-bottom: 14px;
}

/* ---------------------------------------------------------------
   Buttons
   --------------------------------------------------------------- */
.btn.btn-primary,
input[type="submit"].btn-primary,
.add-btn,
input.add-btn {
    background: var(--wl-brand) !important;
    border: none !important;
    border-radius: 999px !important;
    padding: 13px 26px !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em;
    color: #fff !important;
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 6px 16px rgba(40, 136, 129, 0.25);
}
.btn.btn-primary:hover,
input[type="submit"].btn-primary:hover,
.add-btn:hover {
    background: var(--wl-brand-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(27, 51, 49, 0.28);
}
.btn.btn-primary:active,
.add-btn:active { transform: translateY(0); }

.btn_forgot {
    background: transparent !important;
    color: var(--wl-brand) !important;
    font-weight: 600 !important;
    border: none !important;
    box-shadow: none !important;
    text-align: center;
}
.btn_forgot:hover { text-decoration: underline; }

/* ---------------------------------------------------------------
   Payment method selector
   --------------------------------------------------------------- */
.wl-payment-section {
    margin-top: 4px;
}

.wl-payment-heading {
    font-weight: 700;
    font-size: 1rem;
    color: var(--wl-brand-dark);
    margin-bottom: 14px;
}

.wl-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.wl-payment-method {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border: 1.5px solid var(--wl-border);
    border-radius: var(--wl-radius-md);
    background: #fbfcfc;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.wl-payment-method:hover {
    border-color: var(--wl-brand);
    box-shadow: 0 4px 14px rgba(40, 136, 129, 0.10);
}
.wl-payment-method.is-selected {
    border-color: var(--wl-brand);
    background: #f1f8f7;
    box-shadow: 0 0 0 3px rgba(40, 136, 129, 0.12);
}

.wl-payment-radio {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.wl-payment-media {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--wl-border);
    border-radius: var(--wl-radius-sm);
}
.wl-payment-media img {
    max-width: 30px;
    max-height: 26px;
    width: auto;
    height: auto;
}

.wl-payment-text {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.wl-payment-title {
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--wl-ink);
}
.wl-payment-sub {
    font-size: 0.83rem;
    color: var(--wl-muted);
}

.wl-payment-tick {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--wl-border);
    background: #fff;
    position: relative;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}
.wl-payment-method.is-selected .wl-payment-tick {
    border-color: var(--wl-brand);
    background: var(--wl-brand);
}
.wl-payment-method.is-selected .wl-payment-tick::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

.wl-continue-btn {
    display: block;
    width: 100%;
    background: var(--wl-brand);
    border: none;
    border-radius: 999px;
    padding: 15px 26px;
    font-family: 'Urbanist', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.01em;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(40, 136, 129, 0.25);
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.wl-continue-btn:hover {
    background: var(--wl-brand-dark);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(27, 51, 49, 0.28);
}
.wl-continue-btn:active { transform: translateY(0); }

.wl-payment-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 12px 0 0;
    font-size: 0.8rem;
    color: var(--wl-muted);
}
.wl-payment-lock {
    width: 13px;
    height: 13px;
    color: var(--wl-muted);
    opacity: 0.85;
    flex: 0 0 auto;
}

@media (max-width: 575.98px) {
    .wl-payment-method { padding: 13px 14px; gap: 12px; }
    .wl-payment-media { width: 40px; height: 40px; }
}

/* ---------------------------------------------------------------
   Address picker cards (order_address_form.html)
   --------------------------------------------------------------- */
.plan {
    margin-bottom: 4px;
}
.plan > h4 {
    font-weight: 700;
    font-size: 1rem;
    color: var(--wl-brand-dark);
    margin: 18px 0 10px;
}
.plan:first-child > h4 { margin-top: 0; }

.plan[data-save] {
    border: 1.5px solid var(--wl-border) !important;
    border-radius: var(--wl-radius-md) !important;
    background: #fbfcfc !important;
    padding: 16px 18px !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.plan[data-save]:hover {
    border-color: var(--wl-brand) !important;
    box-shadow: 0 4px 14px rgba(40, 136, 129, 0.12);
}
.plan[data-save]:has(input[type="radio"]:checked) {
    border-color: var(--wl-brand) !important;
    background: #f1f8f7 !important;
}
.address p { color: var(--wl-muted); }
.address p:first-of-type { color: var(--wl-ink); font-weight: 600; }

/* ---------------------------------------------------------------
   Trust badges (payment method logos)
   --------------------------------------------------------------- */
.main_order_summary img[alt="Visa"],
.main_order_summary img[alt="Mastercard"] {
    border: 1px solid var(--wl-border);
    border-radius: var(--wl-radius-sm);
    padding: 6px 10px;
    background: #fff;
}

/* ---------------------------------------------------------------
   Alerts / notices
   --------------------------------------------------------------- */
.alert-warning {
    background: var(--wl-warn-bg) !important;
    border: 1px solid var(--wl-warn-border) !important;
    color: var(--wl-warn-text) !important;
    border-radius: var(--wl-radius-sm) !important;
    padding: 14px 18px !important;
}

.shipping-notice {
    border-radius: var(--wl-radius-md) !important;
}

/* ---------------------------------------------------------------
   Order summary sidebar
   --------------------------------------------------------------- */
.your_order {
    position: sticky;
    top: 24px;
}

.your_order h4 {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--wl-brand-dark);
    margin-bottom: 14px;
}

.order-summary {
    border: 1px solid var(--wl-border) !important;
    border-radius: var(--wl-radius-lg) !important;
    box-shadow: var(--wl-shadow-lift);
    padding: 22px !important;
    background: var(--wl-card);
}

.order-summary hr {
    border-color: var(--wl-border);
    opacity: 1;
    margin: 16px 0;
}

.order-item {
    padding: 10px 0;
    border-bottom: 1px solid var(--wl-border);
}
.order-item:last-of-type { border-bottom: none; }

.order-item .product-image {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: var(--wl-radius-sm);
    border: 1px solid var(--wl-border);
    background: #fafcfc;
}

.Glucomannan_title h5 {
    font-weight: 700;
    font-size: 0.98rem;
    color: var(--wl-ink);
    margin-bottom: 2px;
}
.Glucomannan_title p {
    font-size: 0.85rem;
    color: var(--wl-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.Glucomannan_title input[type="number"] {
    width: 64px;
    padding: 6px 8px;
}

.sub_total,
.order-summary .d-flex.justify-content-between {
    font-size: 0.95rem;
    padding: 6px 0;
}

.discount-input {
    border: 1.5px dashed var(--wl-border);
    border-radius: var(--wl-radius-sm);
    padding: 6px 10px;
    font-size: 0.88rem;
    width: 150px;
}

.total_cost {
    font-size: 1.02rem;
}
.total_cost span:last-child { color: var(--wl-brand-dark); }
.order-summary .total_cost:last-of-type {
    font-size: 1.2rem;
    font-weight: 800;
}
.order-summary .total_cost:last-of-type span:last-child { color: var(--wl-brand); }

/* ---------------------------------------------------------------
   Delivery day selector (checkout.php)
   --------------------------------------------------------------- */
.delivery-selector h2 {
    font-weight: 800;
    color: var(--wl-brand-dark);
    font-size: 1.4rem;
}

.delivery-option {
    border: 1.5px solid var(--wl-border) !important;
    border-radius: var(--wl-radius-md) !important;
    background: #fbfcfc;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.delivery-option:hover {
    border-color: var(--wl-brand) !important;
    box-shadow: 0 4px 14px rgba(40, 136, 129, 0.12);
}
.delivery-option:has(input:checked) {
    border-color: var(--wl-brand) !important;
    background: #f1f8f7;
    box-shadow: 0 0 0 3px rgba(40, 136, 129, 0.12);
}
.delivery-option input[type="radio"] {
    accent-color: var(--wl-brand);
    width: 18px;
    height: 18px;
}

.delivery-caveat { color: var(--wl-muted) !important; }

.delivery-chosen {
    border: 1px solid var(--wl-border);
    border-radius: var(--wl-radius-lg);
    box-shadow: var(--wl-shadow);
    padding: 20px 24px !important;
}
.delivery-chosen p { margin: 0; }
.delivery-chosen a {
    color: var(--wl-brand);
    font-weight: 600;
    text-decoration: none;
    margin-left: 6px;
}
.delivery-chosen a:hover { text-decoration: underline; }

/* ---------------------------------------------------------------
   Responsive
   --------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .your_order { position: static; margin-top: 28px; }
    .info_requirement { padding: 20px !important; }
}

@media (max-width: 575.98px) {
    .main_order_summary h2.fw-bold { font-size: 1.5rem; }
    .section-header { gap: 10px; }
    .section-number { width: 28px; height: 28px; font-size: 0.85rem; }
    .info_requirement { padding: 16px !important; border-radius: var(--wl-radius-md); }
    .discount-input { width: 120px; }
}
