/**
 * Wanshoper — Frontend Styles
 *
 * @package Wanshoper
 */

/* Reset box-sizing for all plugin elements */
.wanshoper-sb *,
.wanshoper-sb *::before,
.wanshoper-sb *::after {
    box-sizing: border-box;
}

.wanshoper-sb {
    font-family: inherit;
}

/* -----------------------------------------------
   Cart Product Table
   ----------------------------------------------- */

/* -----------------------------------------------
   Standard Cart Layout
   ----------------------------------------------- */

.layout-standard .wanshoper-cart-row {
    display: grid;
    grid-template-columns: 80px 2fr 1fr auto 1fr 40px;
    align-items: center;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid #f9f9f9;
}

/* If thumbnail is hidden */
.layout-standard .wanshoper-cart-row:not(:has(.wanshoper-col-thumb)) {
    grid-template-columns: 2fr 1fr auto 1fr 40px;
}

.wanshoper-cart-header {
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 16px 0;
    border-bottom: 1px solid #eee;
    color: #666;
}

.wanshoper-col-thumb img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    background: #f8f8f8;
}

.wanshoper-col-name {
    font-weight: 600;
    font-size: 1.05em;
}

.wanshoper-cart-item .wanshoper-col-name {
    color: #1a1a1a;
}

.layout-standard .wanshoper-col-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.layout-standard .wanshoper-col-price bdi {
    font-weight: 600;
    color: #333;
    font-size: 1.05em;
}

.layout-standard .wanshoper-unit-label {
    font-size: 0.85em;
    color: #999;
}

.layout-standard .wanshoper-cart-header .wanshoper-col-qty,
.layout-standard .wanshoper-cart-row .wanshoper-col-qty {
    display: flex;
    justify-content: center;
}

.layout-standard .wanshoper-cart-header .wanshoper-col-subtotal,
.layout-standard .wanshoper-cart-row .wanshoper-col-subtotal {
    text-align: right;
    justify-content: flex-end;
}

.layout-standard .wanshoper-cart-item .wanshoper-col-subtotal {
    font-weight: 700;
    font-size: 1.1em;
    color: #1a1a1a;
}

.wanshoper-col-remove {
    text-align: right;
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 1024px) {
    .layout-standard .wanshoper-cart-row {
        grid-template-columns: 60px 1.5fr 1fr auto 1fr 32px;
        gap: 12px;
    }
    /* If thumbnail is hidden */
    .layout-standard .wanshoper-cart-row:not(:has(.wanshoper-col-thumb)) {
        grid-template-columns: 1.5fr 1fr auto 1fr 32px;
    }
    .wanshoper-col-thumb img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 767px) {
    .layout-standard .wanshoper-cart-header {
        display: none;
    }
    .layout-standard .wanshoper-cart-row {
        grid-template-columns: 80px 1fr auto;
        grid-template-areas: 
            "thumb name remove"
            "thumb price price"
            "thumb qty subtotal";
        gap: 12px;
        padding: 20px 0;
        align-items: center;
    }
    /* If thumbnail is hidden */
    .layout-standard .wanshoper-cart-row:not(:has(.wanshoper-col-thumb)) {
        grid-template-columns: 1fr auto;
        grid-template-areas: 
            "name remove"
            "price price"
            "qty subtotal";
    }
    .wanshoper-col-thumb { grid-area: thumb; align-self: start; }
    .wanshoper-col-name { grid-area: name; }
    .wanshoper-col-qty { grid-area: qty; justify-content: flex-start !important; }
    .wanshoper-col-price { grid-area: price; flex-direction: row; align-items: baseline; gap: 6px; }
    .wanshoper-col-subtotal { grid-area: subtotal; text-align: right; justify-content: flex-end; }
    .wanshoper-col-remove { grid-area: remove; }
}

/* -----------------------------------------------
   Quantity Controls
   ----------------------------------------------- */

.wanshoper-qty-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 50px;
    overflow: hidden;
    padding: 6px 10px;
}

.wanshoper-qty-btn {
    width: 32px;
    height: 32px;
    background-color: transparent;
    border: none;
    box-shadow: none;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    padding: 0;
}

.wanshoper-qty-btn:hover {
    background: rgba(0,0,0,0.03);
}

.wanshoper-qty-input {
    width: 40px;
    height: 32px;
    text-align: center;
    border: none;
    background-color: transparent;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    box-shadow: none;
    margin: 0;
    padding: 0;
    -moz-appearance: textfield;
}

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

/* Rounded / Pill style overrides */
.wanshoper-qty-style-rounded,
.wanshoper-qty-style-pill {
    border-radius: 50px;
}

/* Minimal style */
.wanshoper-qty-style-minimal {
    border: none !important;
    background: transparent !important;
}

.wanshoper-qty-style-minimal .wanshoper-qty-input {
    border: 1px solid #eee !important;
    border-radius: 8px;
    background: #fff !important;
}

/* -----------------------------------------------
   Remove Button
   ----------------------------------------------- */

.wanshoper-remove-item {
    width: auto;
    height: auto;
    border: none;
    outline: none;
    background: transparent;
    color: #1a1a1a;
    font-size: 20px;
    cursor: pointer;
    border-radius: 0;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    min-height: 0;
    box-shadow: none;
    line-height: 1;
}

.wanshoper-remove-item:hover,
.wanshoper-remove-item:focus {
    color: #e53935;
    background: transparent;
    outline: none;
    border: none;
}

.wanshoper-cart-table .wanshoper-remove-item svg {
    display: block;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 0;
}

/* -----------------------------------------------
   Cart Summary
   ----------------------------------------------- */

.wanshoper-cart-summary {
    max-width: 400px;
    display: flex;
    flex-direction: column;
}

.wanshoper-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: none;
    color: #1a1a1a;
}

.wanshoper-summary-label {
    font-weight: 400;
}

.wanshoper-summary-value {
    font-weight: 500;
}

.wanshoper-summary-total {
    font-size: 1.1em;
    border-bottom: none;
    border-top: none;
}

.wanshoper-summary-discount .wanshoper-summary-value {
    color: inherit;
}

/* -----------------------------------------------
   Cart Practitioner's ID
   ----------------------------------------------- */

.wanshoper-practitioner-row {
    border-bottom: none !important;
    padding-top: 12px !important;
}

.wanshoper-practitioner-wrap {
    display: flex;
    gap: 8px;
    width: 100%;
}

.wanshoper-practitioner-input {
    flex: 1 1 auto;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease;
}

.wanshoper-practitioner-input:focus {
    border-color: #333;
    outline: none;
}

.wanshoper-practitioner-btn {
    flex: 0 0 auto;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}

/* -----------------------------------------------
   Empty Cart
   ----------------------------------------------- */

.wanshoper-cart-empty {
    text-align: center;
    padding: 48px 24px;
}

.wanshoper-empty-cart-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.wanshoper-empty-cart-msg {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 24px;
}

/* -----------------------------------------------
   Buttons
   ----------------------------------------------- */

.wanshoper-btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.wanshoper-btn:hover {
    opacity: 0.85;
}

.wanshoper-return-shop {
    background: #333;
    color: #fff;
}

.wanshoper-update-cart {
    min-width: 160px;
    text-align: center;
}

/* -----------------------------------------------
   Loading state
   ----------------------------------------------- */

.wanshoper-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* -----------------------------------------------
   Responsive
   ----------------------------------------------- */

@media (max-width: 767px) {
    .wanshoper-cart-header {
        display: none;
    }

    .wanshoper-cart-item {
        flex-wrap: wrap;
        gap: 8px;
    }

    .wanshoper-col-thumb {
        flex: 0 0 60px;
        max-width: 60px;
    }

    .wanshoper-col-name {
        flex: 1 1 calc(100% - 80px);
    }

    .wanshoper-col-price,
    .wanshoper-col-subtotal {
        flex: 1 1 auto;
        font-size: 0.9em;
    }
}

/* -----------------------------------------------
   Checkout — Headings
   ----------------------------------------------- */

.wanshoper-checkout-heading {
    font-size: 1.3em;
    font-weight: 700;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #333;
}

/* -----------------------------------------------
   Checkout — Form Fields
   ----------------------------------------------- */

.wanshoper-form-fields .form-row,
.wanshoper-custom-field-row {
    margin-bottom: 20px;
    width: 100%;
}

.wanshoper-form-fields label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 0.9em;
}

.wanshoper-form-fields input[type="text"],
.wanshoper-form-fields input[type="email"],
.wanshoper-form-fields input[type="tel"],
.wanshoper-form-fields input[type="number"],
.wanshoper-form-fields select,
.wanshoper-form-fields textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wanshoper-form-fields input:focus,
.wanshoper-form-fields select:focus,
.wanshoper-form-fields textarea:focus {
    border-color: #333;
    outline: none;
    box-shadow: 0 0 0 2px rgba(51, 51, 51, 0.1);
}

/* 2-column form layout */
.wanshoper-fields-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

.wanshoper-fields-2col .form-row-wide {
    grid-column: 1 / -1;
}

@media (max-width: 600px) {
    .wanshoper-fields-2col {
        grid-template-columns: 1fr;
    }
}

/* -----------------------------------------------
   Checkout — Shipping Toggle
   ----------------------------------------------- */

.wanshoper-ship-toggle {
    margin-bottom: 16px;
}

.wanshoper-ship-toggle label {
    cursor: pointer;
    font-weight: 500;
}

.wanshoper-ship-checkbox {
    margin-right: 8px;
}

/* -----------------------------------------------
   Checkout — Order Review
   ----------------------------------------------- */

.wanshoper-review-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
}

.wanshoper-review-header {
    font-weight: 600;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    background: #fafafa;
}

.wanshoper-review-footer {
    background: #fafafa;
    font-size: 1.05em;
}

.wanshoper-review-col {
    flex: 1 1 0;
}

.wanshoper-review-total {
    text-align: right;
    flex: 0 0 120px;
}

.wanshoper-review-thumb {
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.wanshoper-review-thumb img {
    border-radius: 4px;
    vertical-align: middle;
}

/* -----------------------------------------------
   Checkout — Payment Methods
   ----------------------------------------------- */

.wanshoper-payment-methods {
    margin-bottom: 20px;
}

.wanshoper-payment-method {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.wanshoper-payment-method label {
    cursor: pointer;
    font-weight: 500;
}

.wanshoper-payment-method input[type="radio"] {
    margin-right: 8px;
}

.wanshoper-payment-desc {
    margin-top: 8px;
    padding-left: 24px;
    font-size: 0.9em;
    color: #666;
    transition: all 0.2s ease;
}

.wanshoper-terms {
    margin: 16px 0;
    font-size: 0.85em;
}

.wanshoper-place-order {
    margin-top: 16px;
}

.wanshoper-place-order-btn {
    padding: 14px 28px;
    font-size: 16px;
    transition: all 0.3s ease;
}

/* -----------------------------------------------
   Custom Field
   ----------------------------------------------- */

.wanshoper-custom-field {
    margin-bottom: 16px;
}

.wanshoper-custom-field .wanshoper-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 0.9em;
}

.wanshoper-custom-field .wanshoper-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wanshoper-custom-field .wanshoper-input:focus {
    border-color: #333;
    outline: none;
    box-shadow: 0 0 0 2px rgba(51, 51, 51, 0.1);
}

/* -----------------------------------------------
   Minimal Stacked Cart Layout
   ----------------------------------------------- */

.wanshoper-cart-table.layout-minimal_stacked .wanshoper-cart-row {
    display: grid;
    grid-template-columns: 1fr 0.75fr 0.75fr 40px;
    align-items: center;
    padding: 24px 0;
    gap: 16px;
    border-bottom: 1px solid #f0f0f0;
}

@media (max-width: 767px) {
    .wanshoper-cart-table.layout-minimal_stacked .wanshoper-cart-row {
        grid-template-columns: 1fr auto;
        row-gap: 16px;
        column-gap: 12px;
        align-items: flex-start;
    }
    
    .wanshoper-cart-table.layout-minimal_stacked .wanshoper-col-stacked-info {
        grid-column: 1;
        grid-row: 1;
    }
    
    .wanshoper-cart-table.layout-minimal_stacked .wanshoper-col-remove {
        grid-column: 2;
        grid-row: 1;
        display: flex;
        justify-content: flex-end;
    }
    
    .wanshoper-cart-table.layout-minimal_stacked .wanshoper-col-qty {
        grid-column: 1;
        grid-row: 2;
        align-self: center;
    }

    .wanshoper-cart-table.layout-minimal_stacked .wanshoper-stacked-subtotal {
        grid-column: 2;
        grid-row: 2;
        margin-left: 0;
        text-align: right;
        align-self: center;
    }
}

.wanshoper-col-stacked-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wanshoper-name-val {
    font-weight: 600;
    font-size: 1.1em;
    color: #1a1a1a;
    margin: 0;
}

.wanshoper-price-val {
    font-size: 1.05em;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.wanshoper-unit-label {
    font-size: 0.9em;
    color: #999;
    font-weight: 400;
}

.wanshoper-qty-style-pill {
    border-radius: 50px;
    padding: 4px 8px;
    background: #fff !important;
    border: 1px solid #eee !important;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    height: 44px;
    justify-content: center;
}

.wanshoper-qty-style-pill .wanshoper-qty-btn {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    color: #444 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0 !important;
    min-height: 0 !important;
    line-height: 1;
}

.wanshoper-qty-style-pill .wanshoper-qty-input {
    border: none !important;
    width: 40px !important;
    font-weight: 700;
    font-size: 1.1em;
    color: #1a1a1a;
    background: transparent !important;
    padding: 0 !important;
    text-align: center;
    margin: 0 !important;
    box-shadow: none !important;
}

.wanshoper-stacked-subtotal {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
    margin-left: 20px;
}

.wanshoper-total-label {
    font-size: 0.8em;
    color: #999;
    font-weight: 500;
}

.wanshoper-subtotal-val {
    font-size: 1.15em;
    font-weight: 700;
    color: #1a1a1a;
}


/* -----------------------------------------------
   Minimal List Review Layout
   ----------------------------------------------- */

.wanshoper-review-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wanshoper-review-list-item {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 0.95em;
}

.wanshoper-review-list-qty {
    color: #888;
    width: 30px;
}

.wanshoper-review-list-name {
    flex: 1 1 auto;
}

.wanshoper-review-list-total {
    font-weight: 600;
}

.wanshoper-review-list-summary {
    border-top: 1px solid #eee;
    padding-top: 8px;
    margin-top: 4px;
}

/* -----------------------------------------------
   Boxed Payment Methods
   ----------------------------------------------- */

.wanshoper-payment-method-boxed {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 16px !important;
    margin-bottom: 12px;
    background: #fff;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.wanshoper-payment-method-boxed label {
    display: flex;
    align-items: center;
    width: 100%;
}

.wanshoper-payment-method-boxed .wanshoper-payment-title {
    flex: 1 1 auto;
}

.wanshoper-payment-method-boxed .wanshoper-payment-icon {
    margin-left: auto;
}

.wanshoper-payment-method-boxed .wanshoper-payment-icon img {
    max-height: 24px;
    width: auto;
    display: block;
}

/* -----------------------------------------------
   Boxed Payment Methods Refinement
   ----------------------------------------------- */

.wanshoper-payment-method-boxed.wanshoper-selected {
    border-color: #000;
    box-shadow: 0 0 0 1px #000;
}

/* Custom Circular Radio */
.wanshoper-payment-method input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid #ccc;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    position: relative;
    margin-right: 12px;
    flex-shrink: 0;
    transition: border-color 0.15s ease;
}

.wanshoper-payment-method input[type="radio"]:checked {
    border-color: #000;
}

.wanshoper-payment-method input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #000;
}

/* -----------------------------------------------
   Modern Toggle Switch
   ----------------------------------------------- */

.wanshoper-switch-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.wanshoper-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.wanshoper-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.wanshoper-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.wanshoper-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

.wanshoper-switch input:checked + .wanshoper-slider {
    background-color: #333;
}

.wanshoper-switch input:checked + .wanshoper-slider:before {
    transform: translateX(20px);
}

.wanshoper-slider.round {
    border-radius: 24px;
}

.wanshoper-slider.round:before {
    border-radius: 50%;
}

.wanshoper-switch-label {
    font-weight: 500;
}

/* -----------------------------------------------
   Custom Field Design — Stacked
   ----------------------------------------------- */

.wanshoper-custom-field-inner.design-stacked {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wanshoper-custom-field-inner.design-stacked .wanshoper-custom-field-btn {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
}

/* -----------------------------------------------
   Custom Field Design — Inline
   ----------------------------------------------- */

.wanshoper-custom-field-inner.design-inline {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: stretch;
}

.wanshoper-custom-field-inner.design-inline .wanshoper-input {
    flex: 1 1 auto;
}

.wanshoper-custom-field-inner.design-inline .wanshoper-custom-field-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.wanshoper-field-description {
    font-size: 0.85em;
    color: #777;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* -----------------------------------------------
   Checkout Button
   ----------------------------------------------- */

.wanshoper-checkout-btn-wrap {
    width: 100%;
}

.wanshoper-form-fields select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-chevron-down' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
    padding-right: 2.5rem !important;
}

.wanshoper-checkout-button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wanshoper-checkout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.wanshoper-align-justify .wanshoper-checkout-btn {
    display: flex;
    width: 100%;
}

.wanshoper-align-icon-left,
.wanshoper-align-icon-right {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wanshoper-checkout-btn svg {
    width: 1.2em;
    height: 1.2em;
    display: block;
    fill: currentColor;
    flex-shrink: 0;
}

.wanshoper-checkout-btn i {
    flex-shrink: 0;
}

.wanshoper-align-icon-left {
    margin-right: 8px;
}

.wanshoper-align-icon-right {
    margin-left: 8px;
}
/* -----------------------------------------------
   Single Cart Widget
   ----------------------------------------------- */

.wanshoper-single-cart-flex {
    display: flex;
    flex-wrap: wrap;
}

.wanshoper-single-cart-products {
    flex: 1;
    min-width: 0;
}

.wanshoper-cart-title {
    margin: 0 0 20px 0;
}

.wanshoper-summary-box-inner {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
}

.wanshoper-summary-title {
    margin: 0 0 20px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.wanshoper-summary-custom-fields {
    margin-bottom: 24px;
}

.wanshoper-summary-field {
    margin-bottom: 16px;
}

.wanshoper-summary-field .wanshoper-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
}

.wanshoper-summary-field .wanshoper-field-desc {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.wanshoper-summary-totals {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-bottom: 24px;
}

.wanshoper-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
}

.wanshoper-summary-row.wanshoper-total-row {
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
    font-weight: 700;
    font-size: 18px;
}

.wanshoper-checkout-btn-full {
    width: 100%;
    justify-content: center;
    padding: 18px 24px;
    font-weight: 600;
    font-size: 16px;
}

.wanshoper-practitioner-wrap.wanshoper-practitioner-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wanshoper-practitioner-stack .wanshoper-practitioner-input {
    width: 100%;
    flex: 1;
}

.wanshoper-practitioner-stack .wanshoper-practitioner-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background-color: #d1d1d1; /* Light grey as per image */
    color: #fff;
    font-weight: 600;
}

.wanshoper-practitioner-stack .wanshoper-practitioner-btn:hover {
    background-color: #bbbbbb;
}

.wanshoper-practitioner-stack .wanshoper-practitioner-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .wanshoper-single-cart-flex {
        flex-direction: column;
    }
    
    .wanshoper-single-cart-summary {
        flex: 0 0 100%;
        width: 100%;
    }
}

/* -----------------------------------------------
   Unified Single Checkout Styling
   ----------------------------------------------- */

/* Layout & Containers */
.woocommerce-checkout .wanshoper-single-checkout {
    max-width: 100%;
    overflow-x: hidden;
}

.woocommerce-checkout .wanshoper-single-checkout-flex {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 0;
}

.woocommerce-checkout .wanshoper-checkout-forms,
.woocommerce-checkout .wanshoper-checkout-summary {
    flex: 0 0 100%;
    width: 100%;
    box-sizing: border-box;
}

/* Forms & Fields Architecture */
.woocommerce-checkout .wanshoper-single-checkout .wanshoper-form-fields {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
}

.woocommerce-checkout .wanshoper-single-checkout .form-row {
    width: 100%;
    float: none;
    padding: 0;
    display: block;
}

.woocommerce-checkout .wanshoper-single-checkout .form-row:last-child {
    margin-bottom: 16px;
}

/* Desktop Specifics (Two Columns & Half-width fields) */
@media (min-width: 1025px) {
    .woocommerce-checkout .wanshoper-single-checkout-flex {
        flex-direction: row;
    }

    .woocommerce-checkout .wanshoper-checkout-forms {
        flex: 1 1 0;
        width: auto;
    }

    .woocommerce-checkout .wanshoper-checkout-summary {
        flex: 0 0 auto;
        width: auto;
    }

    .woocommerce-checkout .wanshoper-summary-sticky {
        position: sticky;
        top: 20px;
    }

    .woocommerce-checkout .wanshoper-single-checkout .form-row-first,
    .woocommerce-checkout .wanshoper-single-checkout .form-row-last {
        width: 48.5%;
    }
}

/* Mobile Specifics */
@media (max-width: 1024px) {
    .woocommerce-checkout .wanshoper-single-checkout .form-row-first,
    .woocommerce-checkout .wanshoper-single-checkout .form-row-last {
        width: 100%;
    }
}

/* Shipping Toggle Switch Style */
.woocommerce-checkout .wanshoper-single-checkout .wanshoper-checkout-shipping-toggle {
    margin-bottom: 30px;
    padding: 20px 0;
    border-top: 1px solid #eef2f5;
    border-bottom: 1px solid #eef2f5;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-toggle-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    gap: 12px;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-toggle-slider {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    background-color: #ccc;
    border-radius: 34px;
    transition: .4s;
    flex-shrink: 0;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-toggle-input:checked + .wanshoper-toggle-slider {
    background-color: #1a1a1a;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-toggle-input:checked + .wanshoper-toggle-slider:before {
    transform: translateX(22px);
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-ship-label {
    font-weight: 600;
    font-size: 16px;
    color: #1a1a1a;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-shipping-fields-wrap {
    margin-top: 30px;
    margin-bottom: 40px;
}

/* Global Field Styling */
.woocommerce-checkout .wanshoper-single-checkout .wanshoper-label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    color: #1a1a1a;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-input,
.woocommerce-checkout .wanshoper-single-checkout select,
.woocommerce-checkout .wanshoper-single-checkout textarea {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.woocommerce-checkout .wanshoper-single-checkout textarea {
    height: auto;
    min-height: 120px;
    padding: 15px;
    line-height: 1.5;
}

/* Select & Select2 Consistency Lock */
.wanshoper-single-checkout select,
.wanshoper-single-checkout .wanshoper-input[type="select"] {
    width: 100% !important;
    height: 50px !important;
    background-color: #fff !important;
    border: 1px solid #e1e8ed !important;
    border-radius: 8px !important;
    padding: 0 15px !important;
    font-size: 15px !important;
    color: #1a1a1a !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    position: relative !important;
}

/* Ensure original select stays hidden if Select2 is active */
.wanshoper-single-checkout select.select2-hidden-accessible {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.wanshoper-single-checkout .select2-container--default .select2-selection--single {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    height: 50px !important;
    background-color: #fff !important;
    border: 1px solid #e1e8ed !important;
    border-radius: 8px !important;
    padding: 0 15px !important;
    font-size: 15px !important;
    color: #1a1a1a !important;
    box-shadow: none !important;
    position: relative !important;
}

/* Custom Arrow for all Selects */
.wanshoper-single-checkout select,
.wanshoper-single-checkout .select2-container--default .select2-selection--single {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 15px center !important;
    background-size: 14px !important;
    padding-right: 40px !important;
}

/* Select2 Specific Overrides */
.wanshoper-single-checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 48px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    color: #1a1a1a !important;
    display: block !important;
}

.wanshoper-single-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
    display: none !important;
}

.wanshoper-single-checkout .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #888 !important;
}

/* Focus States */
.wanshoper-single-checkout select:focus,
/* Select2 Dropdown & Search Styling */
.select2-dropdown {
    border: 1px solid #e1e8ed !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
    overflow: hidden !important;
    z-index: 9999 !important;
}

.select2-container--default .select2-search--dropdown {
    padding: 10px !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #e1e8ed !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    outline: none !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #1a1a1a !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[data-selected] {
    background-color: #1a1a1a !important;
    color: #fff !important;
}

.select2-results__option {
    padding: 10px 15px !important;
    font-size: 14px !important;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-input:focus,
.woocommerce-checkout .wanshoper-single-checkout select:focus,
.woocommerce-checkout .wanshoper-single-checkout textarea:focus {
    border-color: #1a1a1a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

/* Summary Card Styling */
.woocommerce-checkout .wanshoper-single-checkout .wanshoper-summary-box-inner {
    background: #f4f7f9;
    padding: 30px;
    border-radius: 16px;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-summary-title {
    font-size: 1.25em;
    font-weight: 700;
    margin-bottom: 25px;
    color: #1a1a1a;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-review-list {
    margin-bottom: 25px;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-review-list-item {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.95em;
    color: #1a1a1a;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-review-list-qty {
    color: #888;
    width: 25px;
    flex-shrink: 0;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-review-list-name {
    flex: 1;
    font-weight: 500;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-review-list-total {
    font-weight: 700;
}

/* Practitioner ID Section */
.woocommerce-checkout .wanshoper-single-checkout .wanshoper-practitioner-field {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid #eef2f5;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-field-desc {
    margin-bottom: 12px;
    font-size: 0.85em;
    color: #778ca3;
    line-height: 1.4;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-practitioner-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background-color: #d1d1d1;
    color: #fff;
    font-weight: 600;
    transition: all 0.3s ease;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-practitioner-btn:hover:not(:disabled) {
    background-color: #bbbbbb;
}

/* "Don't have a Practitioner ID?" Section (under Practitioner's ID Field) */
.wanshoper-practitioner-no-id {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 10px;
}
.wanshoper-practitioner-no-id-text {
    font-size: 14px;
    color: #1a1a1a;
    font-weight: 500;
}
.wanshoper-practitioner-no-id-btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 30px;
    background-color: #dbf9b8;
    color: #2e5803;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}
.wanshoper-practitioner-no-id-btn:hover {
    background-color: #c9f49c;
    color: #1f3d01;
}

/* Totals & Payment Section */
.woocommerce-checkout .wanshoper-single-checkout .wanshoper-summary-totals {
    border-top: 1px solid #e1e8ed;
    padding-top: 20px;
    margin-bottom: 30px;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-total-row {
    border-top: 1px solid #e1e8ed;
    padding-top: 15px;
    margin-top: 15px;
    font-size: 1.2em;
    font-weight: 800;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-payment-title {
    font-size: 1.4em;
    font-weight: 800;
    margin-bottom: 20px;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-payment-method-boxed {
    background: #fff;
    border: 1px solid #e1e8ed;
    margin-bottom: 10px;
    border-radius: 10px;
    padding: 14px;
    transition: all 0.2s ease;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-payment-method-boxed.wanshoper-selected {
    border-color: #1a1a1a;
    box-shadow: 0 0 0 1px #1a1a1a;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-confirm-btn {
    width: 100%;
    border-radius: 50px;
    padding: 18px;
    font-weight: 700;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.woocommerce-checkout .wanshoper-single-checkout .wanshoper-confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* -----------------------------------------------
   Dynamic Add to Cart Widget
   ----------------------------------------------- */

.wanshoper-hidden {
    display: none !important;
}

.wanshoper-atc-dynamic-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.wanshoper-atc-align-left { text-align: left; }
.wanshoper-atc-align-center { text-align: center; }
.wanshoper-atc-align-right { text-align: right; }
.wanshoper-atc-align-justify .wanshoper-atc-dynamic-wrapper { width: 100%; }
.wanshoper-atc-align-justify .wanshoper-atc-main-btn,
.wanshoper-atc-align-justify .wanshoper-atc-counter-wrap { width: 100%; }

.wanshoper-atc-main-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1;
    min-width: 140px;
    padding: 12px 24px;
    box-sizing: border-box;
}

.wanshoper-atc-main-btn i,
.wanshoper-atc-main-btn svg {
    width: 20px;
    height: 20px;
    font-size: 20px;
    flex-shrink: 0;
    display: block;
    fill: currentColor;
}

.wanshoper-atc-counter-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    min-width: 140px;
    padding: 0 10px;
    box-sizing: border-box;
}

.wanshoper-atc-qty-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 15px;
    transition: all 0.2s;
}

.wanshoper-atc-qty-val {
    font-weight: 600;
    font-size: 16px;
    min-width: 30px;
    text-align: center;
}

.wanshoper-atc-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    display: none;
}

.wanshoper-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid #333;
    border-top-color: transparent;
    border-radius: 50%;
    animation: wanshoper-spin 0.8s linear infinite;
}

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

.wanshoper-loading {
    pointer-events: none;
}

.wanshoper-loading .wanshoper-atc-loader {
    display: flex !important;
}
/* -----------------------------------------------
   Flip Box Widget
   ----------------------------------------------- */

.wanshoper-flip-box-wrapper {
    perspective: 1000px;
    background-color: transparent;
}

.wanshoper-flip-box-inner {
    position: relative;
    width: 100%;
    height: 300px;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

/* Flip Directions */
.wanshoper-flip-direction-left:hover .wanshoper-flip-box-inner,
.wanshoper-flip-direction-left:focus .wanshoper-flip-box-inner {
    transform: rotateY(180deg);
}

.wanshoper-flip-direction-right:hover .wanshoper-flip-box-inner,
.wanshoper-flip-direction-right:focus .wanshoper-flip-box-inner {
    transform: rotateY(-180deg);
}

.wanshoper-flip-direction-up:hover .wanshoper-flip-box-inner,
.wanshoper-flip-direction-up:focus .wanshoper-flip-box-inner {
    transform: rotateX(180deg);
}

.wanshoper-flip-direction-down:hover .wanshoper-flip-box-inner,
.wanshoper-flip-direction-down:focus .wanshoper-flip-box-inner {
    transform: rotateX(-180deg);
}

/* Vertical Flip Backside Correction */
.wanshoper-flip-direction-up .wanshoper-flip-box-back {
    transform: rotateX(180deg);
}
.wanshoper-flip-direction-down .wanshoper-flip-box-back {
    transform: rotateX(-180deg);
}

.wanshoper-flip-box-side {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 8px;
}

.wanshoper-flip-box-front {
    background-color: #f1f1f1;
    color: black;
}

.wanshoper-flip-box-back {
    background-color: #1a1a1a;
    color: white;
    transform: rotateY(180deg);
}

.wanshoper-flip-box-content h3 {
    margin: 0 0 15px;
    font-size: 24px;
}

.wanshoper-flip-box-content .icon {
    font-size: 40px;
    margin-bottom: 20px;
}

.wanshoper-flip-box-content .desc {
    font-size: 16px;
    line-height: 1.5;
}

.wanshoper-flip-box-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 25px;
    background-color: #fff;
    color: #000;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.wanshoper-flip-box-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* -----------------------------------------------
   Inline Field Notices (Premium Alert Look)
   ----------------------------------------------- */
.wanshoper-field-notice {
    font-size: 0.9em;
    margin-bottom: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    display: none;
    border-left: 4px solid transparent;
    animation: wanshoperFadeSlideIn 0.3s ease;
}

@keyframes wanshoperFadeSlideIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.wanshoper-field-notice.success {
    background-color: rgba(26, 127, 55, 0.05);
    color: #1a7f37;
    border-left-color: #1a7f37;
}

.wanshoper-field-notice.error {
    background-color: rgba(209, 36, 47, 0.05);
    color: #d1242f;
    border-left-color: #d1242f;
}

.wanshoper-field-notice.warning {
    background-color: rgba(181, 147, 10, 0.05);
    color: #b5930a;
    border-left-color: #b5930a;
}

.wanshoper-field-notice.info {
    background-color: rgba(9, 105, 218, 0.05);
    color: #0969da;
    border-left-color: #0969da;
}

.wanshoper-field-notice strong {
    font-weight: 700;
}

.wanshoper-field-notice strong {
    font-weight: 700;
}
