/* ============================================
   Garmac Pack Selector — Frontend
   ============================================ */

.gps-qty-hidden,
.gps-selector ~ .quantity,
form.cart .gps-selector ~ .quantity {
    display: none !important;
}

.gps-price-hidden {
    display: none !important;
}

.gps-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0 16px;
    width: 100%;
}

/* Card base */
.gps-tier {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px 18px;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, border-style 0.15s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.gps-tier:hover {
    border-color: #b0b0b0;
}

/* Card seleccionada */
.gps-tier--selected {
    border: 2px solid #1D9E75;
    border-style: solid;
    background: #E1F5EE;
    padding: 13px 17px;
}

.gps-tier--selected:hover {
    border-color: #1D9E75;
}

/* Badge "Más popular" */
.gps-badge {
    position: absolute;
    top: -10px;
    right: 14px;
    background: #1D9E75;
    color: #E1F5EE;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    white-space: nowrap;
    pointer-events: none;
}

/* Contenido de la card */
.gps-tier__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
    flex-wrap: wrap;
}

/* Label */
.gps-tier__label {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
}

/* Savings pill */
.gps-tier__discount {
    font-size: 11px;
    font-weight: 600;
    color: #1D9E75;
    background: #E1F5EE;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Precio unitario */
.gps-tier__unit-price {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
    text-align: center;
    flex: 1;
}

/* Total */
.gps-tier__total {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    white-space: nowrap;
    text-align: right;
    min-width: 70px;
}

/* ============================================
   Custom quantity card
   ============================================ */

.gps-tier--custom {
    border-style: dashed;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.gps-tier--custom.gps-tier--selected {
    border-style: solid;
}

/* Row 1: label + input */
.gps-custom-row-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Row 2: discount + unit price + total — mirrors regular tier layout */
.gps-custom-row-bottom {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.gps-custom-row-bottom.gps-custom-row-bottom--visible {
    display: flex;
}

.gps-custom-qty-input {
    width: 105px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    outline: none;
    transition: border-color 0.15s ease;
    -moz-appearance: textfield;
}

.gps-custom-qty-input::-webkit-inner-spin-button,
.gps-custom-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.gps-custom-qty-input:focus {
    border-color: #1D9E75;
}

.gps-tier--selected .gps-custom-qty-input {
    border-color: #1D9E75;
    background: #fff;
}

.gps-tier__custom-discount {
    font-size: 11px;
    font-weight: 600;
    color: #1D9E75;
    background: #E1F5EE;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.gps-tier__custom-discount:empty {
    display: none;
}

.gps-tier__custom-unit {
    font-size: 13px;
    color: #888;
    white-space: nowrap;
    text-align: center;
    flex: 1;
}

.gps-tier__custom-total {
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    white-space: nowrap;
    text-align: right;
    min-width: 70px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 600px) {
    .gps-selector {
        gap: 8px;
    }

    .gps-tier {
        padding: 16px 14px;
        min-height: 52px;
    }

    .gps-tier--selected {
        padding: 15px 13px;
    }

    .gps-tier__label {
        font-size: 14px;
    }

    .gps-tier__unit-price,
    .gps-tier__custom-unit {
        font-size: 12px;
    }

    .gps-tier__total,
    .gps-tier__custom-total {
        font-size: 14px;
        min-width: 60px;
    }

    .gps-custom-qty-input {
        width: 105px;
    }
}
