/**
 * Selector de Presentación — front styles
 * Z Digital · Creative Elements widget
 */

.zdp {
    --zdp-cols-d: 2;
    --zdp-cols-t: 2;
    --zdp-cols-m: 1;
    width: 100%;
}

.zdp-title {
    margin: 0 0 12px;
    line-height: 1.3;
}

.zdp-grid {
    display: grid;
    grid-template-columns: repeat(var(--zdp-cols-d), minmax(0, 1fr));
    gap: 16px;
}

.zdp-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 18px;
    background-color: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    box-sizing: border-box;
    min-width: 0;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.zdp-card:hover {
    border-color: #c7cbd1;
}

.zdp-card:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 164, 93, .25);
}

.zdp-card.is-active {
    border-color: #22a45d;
    box-shadow: 0 0 0 1px #22a45d inset;
}

.zdp-name {
    color: #4b5563;
    font-size: 15px;
    line-height: 1.3;
}

.zdp-price {
    color: #111827;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.15;
    word-break: break-word;
}

.zdp-unit {
    color: #9ca3af;
    font-size: 13px;
    line-height: 1.3;
}

/* Best value badge */
.zdp-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    display: inline-block;
    padding: 4px 12px;
    background-color: #6c2bd9;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    line-height: 1.2;
    border-radius: 999px;
    white-space: nowrap;
}

/* Selected check */
.zdp-check {
    position: absolute;
    top: 10px;
    right: 10px;
    display: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: #22a45d;
    color: #fff;
}

.zdp-card.is-active .zdp-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.zdp-check svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Unavailable */
.zdp-card.is-unavailable {
    opacity: .55;
    cursor: not-allowed;
}

.zdp-oos {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #b91c1c;
}

/* When cards drive the native selector, hide the theme's variant control. */
.zdp-native-hidden {
    display: none !important;
}

/* Tablet */
@media (max-width: 1024px) {
    .zdp-grid {
        grid-template-columns: repeat(var(--zdp-cols-t), minmax(0, 1fr));
    }
}

/* Mobile */
@media (max-width: 767px) {
    .zdp-grid {
        grid-template-columns: repeat(var(--zdp-cols-m), minmax(0, 1fr));
    }
}
