/**
 * 2PX Elementor Suite — Product Cards Widget
 * BEM Methodology
 */

/* ── Grid container ─────────────────────────────────────────────────────────── */
.twopx-productcards__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}

/* ── Card ───────────────────────────────────────────────────────────────────── */
.twopx-productcards__card {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    padding: 32px 28px;
    border-radius: 12px;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    position: relative;
}

.twopx-productcards__card--featured {
    background-color: #1a1a2e;
}

/* ── Badge ──────────────────────────────────────────────────────────────────── */
.twopx-productcards__badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 4px 4px 0 0;
    margin-bottom: 16px;
    align-self: flex-start;
}

/* ── Title ──────────────────────────────────────────────────────────────────── */
.twopx-productcards__title {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

/* ── Value / Price ──────────────────────────────────────────────────────────── */
.twopx-productcards__value-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 20px;
}

.twopx-productcards__value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.twopx-productcards__value-suffix {
    font-size: 0.9375rem;
    font-weight: 400;
    opacity: 0.75;
}

/* ── Features list ──────────────────────────────────────────────────────────── */
.twopx-productcards__features {
    list-style: none;
    margin: 0 0 24px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.twopx-productcards__feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.twopx-productcards__check {
    flex-shrink: 0;
    font-size: 0.875rem;
    margin-top: 2px;
}

/* ── Quantity selector ──────────────────────────────────────────────────────── */
.twopx-productcards__qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 24px;
}

.twopx-productcards__qty-label {
    font-size: 0.875rem;
    font-weight: 600;
}

.twopx-productcards__qty-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}

.twopx-productcards__qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1;
    padding: 0;
    transition: background-color 0.15s ease;
}

.twopx-productcards__qty-btn:hover {
    background-color: rgba(0, 0, 0, 0.06);
}

.twopx-productcards__qty-input {
    width: 44px;
    text-align: center;
    border: none;
    border-left: 1px solid #d1d5db;
    border-right: 1px solid #d1d5db;
    font-size: 1rem;
    font-weight: 600;
    background: transparent;
    padding: 0;
    -moz-appearance: textfield;
}

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

/* ── Button Group ────────────────────────────────────────────────────────────── */
.twopx-productcards__btn-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

/* ── Button CTA ─────────────────────────────────────────────────────────────── */
.twopx-productcards__btn {
    display: block;
    width: 100%;
    padding: 12px 24px;
    text-align: center;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid currentColor;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* ── Button 2 — Modal Trigger ────────────────────────────────────────────────── */
.twopx-productcards__btn-modal {
    display: block;
    width: 100%;
    padding: 12px 24px;
    text-align: center;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    border-radius: 6px;
    border: 1px solid currentColor;
    background-color: transparent;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
    box-sizing: border-box;
}

/* ── Modal Overlay ───────────────────────────────────────────────────────────── */
.twopx-productcards__modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background-color: rgba(0, 0, 0, 0.55);
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.twopx-productcards__modal-overlay.is-open {
    display: flex;
}

/* ── Modal Container ─────────────────────────────────────────────────────────── */
.twopx-productcards__modal {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 860px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
}

/* ── Modal Header ────────────────────────────────────────────────────────────── */
.twopx-productcards__modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.twopx-productcards__modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.twopx-productcards__modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.twopx-productcards__modal-close:hover {
    opacity: 1;
}

/* ── Modal Grid ──────────────────────────────────────────────────────────────── */
.twopx-productcards__modal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* ── Modal Location Button ───────────────────────────────────────────────────── */
.twopx-productcards__modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 12px;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    border-radius: 6px;
    border: 2px solid currentColor;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    min-height: 56px;
    box-sizing: border-box;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .twopx-productcards__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .twopx-productcards__modal-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .twopx-productcards__grid {
        grid-template-columns: 1fr;
    }
    .twopx-productcards__modal {
        padding: 24px 20px;
    }
    .twopx-productcards__modal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
