/* Carrito: estilos basados en clases propias (tg-*) */
.tg-cart {
    --tg-accent: #0a66d1;
    /* azul principal */
    --tg-muted: #6c757d;
    --tg-bg: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    color: #222;
    font-size: 13px;
    /* base más grande */
}

/* Layout */
.tg-container {
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.tg-cart-left {
    flex: 1 1 66%;
}

.tg-summary {
    flex: 0 0 320px;
    align-self: flex-start;
}

/* Item card */
.tg-cart-item {
    background: var(--tg-bg);
    border-radius: 6px;
    padding: 18px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    margin-bottom: 18px;
}

.tg-cart-item-row {
    display: flex;
    align-items: flex-start;
    margin-left: -8px;
    /* gutter compensation */
    margin-right: -8px;
}

.tg-col-1 {
    flex: 0 0 8.333332%;
    max-width: 8.333332%;
}

.tg-col-2 {
    flex: 0 0 16.666666%;
    max-width: 16.666666%;
}

.tg-col-3 {
    flex: 0 0 24.999999%;
    max-width: 24.999999%;
}

.tg-col-4 {
    flex: 0 0 33.333332%;
    max-width: 33.333332%;
}

.tg-col-5 {
    flex: 0 0 41.666666%;
    max-width: 41.666666%;
}

.tg-col-6 {
    flex: 0 0 49.999999%;
    max-width: 49.999999%;
}

.tg-col-7 {
    flex: 0 0 58.333332%;
    max-width: 58.333332%;
}

.tg-col-8 {
    flex: 0 0 66.666666%;
    max-width: 66.666666%;
}

.tg-col-9 {
    flex: 0 0 74.999999%;
    max-width: 74.999999%;
}

.tg-col-10 {
    flex: 0 0 83.333332%;
    max-width: 83.333332%;
}

.tg-col-11 {
    flex: 0 0 91.666666%;
    max-width: 91.666666%;
}

.tg-col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* Ensure grid items wrap on small screens */
@media (max-width: 900px) {

    .tg-col-1,
    .tg-col-2,
    .tg-col-3,
    .tg-col-4,
    .tg-col-5,
    .tg-col-6,
    .tg-col-7,
    .tg-col-8,
    .tg-col-9,
    .tg-col-10,
    .tg-col-11,
    .tg-col-12 {
        flex-basis: 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

.tg-item-image img {
    object-fit: cover;
    border-radius: 6px;
    display: block;
    max-width: calc(100% - 5px);
}

.tg-item-title {
    font-size: 1.15em;
    font-weight: 700;
    margin: 0 0 8px;
    color: #d9534f;
}

.tg-item-meta ul {
    margin: 0 0 8px 18px;
    padding: 0;
    color: var(--tg-muted);
    font-size: 1em;
}

.tg-item-meta li {
    margin-bottom: 6px;
    line-height: 1.35;
}

.tg-trash-wrapper {
    display: flex;
    justify-content: flex-end;
}

.tg-trash {
    color: #d9534f;
    font-size: 18px;
    cursor: pointer;
}

.tg-item-price {
    font-weight: 700;
    font-size: 1.08em;
    color: #111;
}

/* Form fields inside item */
.tg-item-form .tg-form-fields {
    display: flex;
    flex-wrap: wrap;
    margin-top: 14px;
    margin-left: -8px;
    /* gutter compensation */
    margin-right: -8px;
}

.tg-field-group {
    box-sizing: border-box;
    padding-left: 8px;
    /* gutter */
    padding-right: 8px;
}

/* legacy tg-col-xx emoved: use .tg-col-{1..12} instead */

.tg-label {
    display: block;
    font-size: 0.90em;
    color: var(--tg-muted);
    margin-bottom: 6px;
}

.tg-input,
.tg-select,
.tg-textarea {
    width: 100%;
    border: 1px solid #e9e9e9;
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
    font-size: 1em;
}

.tg-textarea {
    min-height: 64px;
    resize: vertical;
}

.tg-radio-list label {
    display: block;
    margin-bottom: 6px;
}


.tg-services-list .tg-service-row {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f7f7f7;
    flex-wrap: wrap;
    /* gutter: compensamos padding interno con márgenes negativos */
    margin-left: -8px;
    margin-right: -8px;
    /* permitir que la descripción ocupe línea nueva */
}

.tg-service-main {
    /* grid: 8/12 */
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
    display: flex;
    gap: 10px;
    align-items: center;
    padding-left: 8px;
    padding-right: 8px;
}

.tg-service-qty {
    /* grid: 1/12 */
    flex: 0 0 8.333333%;
    max-width: 8.333333%;
    padding-left: 8px;
    padding-right: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.tg-service-price {
    /* grid: 3/12 */
    flex: 0 0 25%;
    max-width: 25%;
    padding-left: 8px;
    padding-right: 8px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    white-space: nowrap;
    color: #222;
    font-weight: 600;
}

.tg-service-desc {
    /* grid: full width */
    flex-basis: 100%;
    display: block;
    padding-left: 8px;
    padding-right: 8px;
    color: var(--tg-muted);
    font-size: 0.95em;
    margin-top: 6px;
}

/* Responsive: stack service row items on small screens */
@media (max-width: 900px) {

    .tg-service-main,
    .tg-service-qty,
    .tg-service-price,
    .tg-service-desc {
        flex-basis: 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .tg-service-qty {
        justify-content: flex-start;
    }

    .tg-service-price {
        justify-content: flex-start;
    }
}

/* Summary card */
.tg-summary-wrap {
    background: var(--tg-bg);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
    padding: 18px 20px 24px;
    position: relative;
}

.tg-summary-wrap::before {
    content: "";
    position: absolute;
    left: 8px;
    width: calc(100% - 16px);
    top: 8px;
    height: 6px;
    background: var(--tg-accent);
    border-radius: 6px;
}

.tg-summary-line {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 0;
}

.tg-summary-title {
    margin: 0;
    font-weight: 700;
    font-size: 1em;
}

.tg-summary-desc {
    margin: 0;
    color: var(--tg-muted);
    font-size: 0.95em;
    text-align: right;
}

.tg-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-top: 1px dashed #efefef;
}

.tg-summary-row:first-of-type {
    border-top: none;
}

.tg-summary-left {
    color: var(--tg-muted);
}

.tg-summary-right {
    font-weight: 700;
}

.tg-total {
    font-size: 1.15em;
}

.tg-summary-actions {
    margin-top: 14px;
}

.tg-button {
    display: inline-block;
    background: var(--tg-accent);
    color: #fff;
    padding: 12px 18px;
    text-align: center;
    border-radius: 28px;
    text-decoration: none;
    width: 100%;
    box-shadow: 0 8px 20px rgba(10, 102, 209, 0.16);
    font-weight: 600;
}

.tg-divider {
    margin: 16px 0;
}

.tg-divider-line {
    border: 0;
    height: 2px;
    background: #e6e6e6;
    border-radius: 2px;
}

.tg-service-qty input {
    min-height: auto !important;
}

/* Ensure the person-count number inputs are not constrained by any max-width */
.tg-field-group.tg-col-2 .tg-input[type="number"],
.tg-item-form .tg-field-group.tg-col-2 input[type="number"] {
    max-width: none !important;
}

/* Required field indicator */

/* Pago: comisión (etiqueta informativa) */
.tg-payment-commission {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 6px 12px;
    font-size: 0.95em;
    color: #7a3a00;
    background: linear-gradient(180deg, #fff7f0 0%, #fff3ec 100%);
    border: 1px solid rgba(218, 127, 78, 0.18);
    border-radius: 999px;
    box-shadow: 0 6px 18px rgba(218, 127, 78, 0.06);
    font-weight: 600;
    white-space: nowrap;
    align-self: flex-start;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.tg-payment-commission::before {
    content: "ℹ";
    display: inline-block;
    font-style: normal;
    font-weight: 700;
    color: rgba(122, 58, 0, 0.95);
    font-size: 0.95em;
    line-height: 1;
}

.tg-payment-commission:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(218, 127, 78, 0.08);
}

.tg-payment-commission:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(218, 127, 78, 0.12);
}

/* Compact view */
@media (max-width:600px) {
    .tg-payment-commission {
        font-size: 0.9em;
        padding: 5px 10px;
        gap: 6px;
    }
}

/* If placed inside payment method card, align to the top-right */
.tg-payment-method .tg-payment-commission {
    margin-left: auto;
}

.tg-field-required .tg-label::after {
    content: " *";
    color: #d9534f;
    margin-left: 4px;
    font-weight: 600;
}

/* Disabled button state */
.tg-button-disabled {
    background: #cfd8e6;
    color: #7a8696;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.9;
}

.tg-available-message {
    background: #d9edf7;
    color: #31708f;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.95em;
    margin-bottom: 12px;
    margin-left: -8px;
    margin-right: -8px;
    line-height: 1.4;
}

.tg-item-info {
    color: var(--tg-muted);
    font-size: 0.95em;
    margin-top: 4px;
    line-height: 1;
}

.tg-payment-methods {
    display: flex;
    gap: 16px;
    margin: 16px 0;
    flex-wrap: wrap
}

.tg-payment-method {
    flex: 1 1 220px;
    border: 1px solid #e6e6e6;
    padding: 12px;
    border-radius: 6px;
    background: #fff
}

.tg-payment-method h4 {
    margin: 0 0 8px;
    font-size: 1em
}

.tg-payment-actions {
    margin-top: 8px
}

.tg-payme-button {
    background: #007bff;
    color: #fff;
    border: 0
}

.tg-paypal-button {
    background: #003087;
    color: #fff;
    border: 0
}

.tg-payment-logo {
    margin-bottom: 15px;
    text-align: center;
}

.tg-payment-logo img {
    max-height: 40px;
    max-width: 75%;
    display: block;
    margin-left: auto;
    margin-right: auto;
}


.tg-paying-block {
    border: 1px solid #e6e6e6;
    padding: 12px;
    border-radius: 6px;
    background: #fff;
    margin: 12px 0
}

.tg-paying-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px
}

.tg-paying-method {
    color: #666;
    font-size: 0.95em;
    margin-left: 6px
}

.tg-paying-body {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.tg-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid #eee;
    border-top-color: #0059CB;
    border-radius: 50%;
    animation: tg-spin .9s linear infinite
}

.tg-paying-amount {
    font-size: 1em;
    margin-bottom: 4px;
}

.tg-paying-message {
    color: #333;
    font-size: 1.5em;
    margin-bottom: 4px;
}

.tg-help {
    color: #666;
    font-size: 1.2em;
    margin-bottom: 4px;
}

.tg-paying-actions {
    margin-top: 6px
}

.tg-paying-success {
    color: green;
    font-weight: 600
}

@keyframes tg-spin {
    to {
        transform: rotate(360deg)
    }
}

/* Responsive */
@media (max-width:720px) {
    .tg-payment-methods {
        flex-direction: column
    }

    .tg-payment-method {
        width: 100%
    }
}

@media (max-width: 900px) {

    .tg-container,
    .tg-cart-item-row {
        flex-direction: column;
    }

    .tg-summary {
        width: 100%;
        position: static;
        flex-basis: 100% !important;
    }

    .tg-summary-wrap {
        position: static;
        top: auto;
    }

    .tg-col-1,
    .tg-col-2,
    .tg-col-3,
    .tg-col-4,
    .tg-col-5,
    .tg-col-6,
    .tg-col-7,
    .tg-col-8,
    .tg-col-9,
    .tg-col-10,
    .tg-col-11,
    .tg-col-12 {
        flex-basis: 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .tg-summary-wrap::before {
        left: 16px;
        width: calc(100% - 32px);
    }
}