/* ============================================================
   Nyla Summer Deals — Deal selector, cards, popup. v2.1
   Brand: #c05f8e (pink) / #d4af7a (gold)
   ============================================================ */

.nyla-deal-page {
    max-width: 680px;
    margin: 0 auto;
    font-family: inherit;
    color: #1a1a1a;
}

/* Title badges */
.nyla-title-badge {
    display: inline-block;
    background: #c05f8e;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 3px 11px;
    border-radius: 50px;
    margin-left: 8px;
    vertical-align: middle;
    line-height: 1.4;
}

.ndp-modal-title {
    font-size: 22px;
    line-height: 1.3;
    margin: 0 40px 14px 0;
    color: #1a1a1a;
}

/* Meta bar */
.ndp-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.ndp-rule-pill {
    background: #c05f8e;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: 5px 13px;
    border-radius: 50px;
}

.ndp-badge {
    background: #c05f8e;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 50px;
}

.ndp-gift-badge { background: #d4af7a; color: #1a1a1a; }

.ndp-desc {
    font-size: 15px;
    color: #5a5a5a;
    margin: 0 0 22px;
    line-height: 1.55;
}

/* ── Slots (typed deals) ─────────────────────────────────────── */
.ndp-slots { display: flex; flex-direction: column; gap: 16px; margin-bottom: 22px; }

.ndp-slot {
    background: #fff;
    border: 1px solid #ead5e3;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 14px rgba(192,95,142,.07);
}

.ndp-slot-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }

.ndp-slot-num {
    width: 26px; height: 26px;
    background: #c05f8e; color: #fff;
    font-size: 13px; font-weight: 700;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.ndp-slot-label {
    font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    color: #1a1a1a;
}

/* ── Bundle / grid head ──────────────────────────────────────── */
.ndp-bundle { margin-bottom: 22px; }

.ndp-bundle-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-bottom: 12px;
}

.ndp-bundle-label {
    font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em; color: #1a1a1a;
}

.ndp-count-pill {
    background: #f1f1f1; color: #777;
    font-size: 12px; font-weight: 700;
    padding: 5px 12px; border-radius: 50px;
    white-space: nowrap;
    transition: background .15s, color .15s;
}

.ndp-count-pill.is-ready { background: #1f7a44; color: #fff; }

/* ── Product cards (theme-proofed) ───────────────────────────── */
.ndp-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}

/* High-specificity + !important so a theme's global button styling
   (e.g. black focus/active backgrounds) can never take over a card. */
.nyla-deal-page .ndp-card,
.nyla-deal-page .ndp-card:hover,
.nyla-deal-page .ndp-card:focus,
.nyla-deal-page .ndp-card:active {
    -webkit-appearance: none;
    appearance: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    background: #fff !important;
    color: #1a1a1a !important;
    border: 2px solid #ececec;
    border-radius: 12px;
    padding: 8px;
    margin: 0;
    cursor: pointer;
    font: inherit;
    box-shadow: none;
    outline: none;
    text-transform: none;
    letter-spacing: normal;
}

.nyla-deal-page .ndp-card:hover {
    border-color: #e0b9cf;
    box-shadow: 0 4px 14px rgba(192,95,142,.12);
}

.nyla-deal-page .ndp-card:active { transform: scale(.98); }

/* Selected = minimal: white card, thin pink border, small tick. */
.nyla-deal-page .ndp-card.is-selected {
    background: #fff !important;
    color: #1a1a1a !important;
    border-color: #c05f8e;
    box-shadow: 0 0 0 1px #c05f8e inset, 0 4px 14px rgba(192,95,142,.16);
}

.ndp-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin-bottom: 7px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f4f4f4;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* aspect-ratio fallback for older browsers */
@supports not (aspect-ratio: 1 / 1) {
    .ndp-card-media { height: 0; padding-bottom: 100%; }
    .ndp-card-media img { position: absolute; top: 0; left: 0; }
}

.ndp-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Small tick, hidden until selected */
.ndp-card-check {
    position: absolute;
    top: 5px; right: 5px;
    width: 18px; height: 18px;
    background: #c05f8e; color: #fff !important;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; line-height: 1;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    opacity: 0; transform: scale(.4);
    transition: opacity .15s, transform .15s;
}

.nyla-deal-page .ndp-card.is-selected .ndp-card-check { opacity: 1; transform: scale(1); }

.ndp-card-name {
    font-size: 13px; font-weight: 600; line-height: 1.25;
    color: #1a1a1a !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 3px;
}

.ndp-card-price { font-size: 13px; font-weight: 700; color: #c05f8e !important; margin-top: auto; }

.ndp-empty { font-size: 13px; color: #aaa; font-style: italic; margin: 6px 0; }

/* ── Summary ─────────────────────────────────────────────────── */
.ndp-summary {
    background: #fdf7fa;
    border: 1px solid #ead5e3;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 18px;
}

.ndp-summary-title {
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    color: #8a8a8a; margin: 0 0 10px;
}

.ndp-summary-list { list-style: none; padding: 0; margin: 0 0 10px; }

.ndp-summary-list li {
    display: flex; justify-content: space-between; gap: 12px;
    font-size: 14px; color: #1a1a1a;
    padding: 6px 0; border-bottom: 1px solid #ead5e3;
}

.ndp-summary-list li:last-child { border-bottom: none; }

.ndp-sum-price { white-space: nowrap; }
.ndp-sum-price del { color: #b0a3aa; margin-right: 4px; }
.ndp-sum-price ins { text-decoration: none; color: #1f7a44; font-weight: 700; }
.ndp-item-free { color: #1f7a44; }

.ndp-summary-save {
    background: #eafaf0; color: #1f7a44;
    font-size: 14px; text-align: center;
    padding: 7px 12px; border-radius: 8px; margin-bottom: 10px;
}

.ndp-summary-save strong { font-size: 15px; }

.ndp-summary-total {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 16px; font-weight: 700; color: #1a1a1a;
    padding-top: 10px; border-top: 2px solid #ead5e3;
}

.ndp-summary-total span { color: #c05f8e; font-size: 19px; }
.ndp-summary-gift { margin-top: 8px; font-size: 13px; color: #1f7a44; }

/* ── Add to cart ─────────────────────────────────────────────── */
.ndp-actionbar { margin-top: 4px; }

.nyla-deal-page .ndp-add-btn {
    display: block;
    width: 100%;
    padding: 15px 20px;
    background: #c05f8e !important;
    color: #fff !important;
    font-size: 16px; font-weight: 700; letter-spacing: .03em;
    border: none; border-radius: 10px;
    cursor: pointer;
    transition: background .2s, transform .1s, opacity .2s;
    text-align: center; line-height: 1.3;
}

.nyla-deal-page .ndp-add-btn:hover { background: #a04a76 !important; color: #fff !important; }
.nyla-deal-page .ndp-add-btn:active { transform: scale(.99); }

.nyla-deal-page .ndp-add-btn:disabled {
    background: #d8d8d8 !important;
    color: #fff !important;
    cursor: not-allowed;
}

.ndp-helper {
    margin: 8px 0 0;
    font-size: 13px; color: #8a8a8a; text-align: center; min-height: 18px;
}

.ndp-helper.is-warn { color: #c0392b; font-weight: 600; }

/* ── Feedback ────────────────────────────────────────────────── */
.ndp-feedback { margin-top: 12px; font-size: 14px; text-align: center; min-height: 22px; }

.ndp-feedback.is-success {
    color: #1f7a44; font-weight: 600;
    background: #eafaf0; border-radius: 8px; padding: 12px;
    display: flex; flex-direction: column; gap: 8px; align-items: center;
}

.ndp-feedback.is-error { color: #c62828; }

.ndp-feedback-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.ndp-fb-cart {
    background: #c05f8e; color: #fff !important;
    text-decoration: none !important;
    padding: 8px 16px; border-radius: 8px; font-weight: 700; font-size: 14px;
}

.ndp-fb-cart:hover { background: #a04a76; }

.ndp-fb-keep {
    background: transparent; border: 1px solid #c9c9c9; color: #555;
    padding: 8px 16px; border-radius: 8px; font-weight: 600; font-size: 14px; cursor: pointer;
}

.ndp-fb-keep:hover { background: #f3f3f3; }

/* ============================================================
   Product-page launcher buttons (max 2)
   ============================================================ */
.nyla-deal-launchers {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    clear: both;
    margin: 18px 0;
}

.nyla-deal-launchers-title {
    font-size: 12px; font-weight: 800;
    text-transform: uppercase; letter-spacing: .07em;
    color: #c05f8e; margin: 0 0 8px;
}

.nyla-deal-launchers .nyla-deal-open {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    background: linear-gradient(135deg, #fdf2f8 0%, #fbeef4 100%) !important;
    color: #1a1a1a !important;
    border: 1px solid #ead5e3;
    border-radius: 12px;
    padding: 12px 14px;
    margin: 0 0 10px;
    cursor: pointer;
    font: inherit;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s, transform .1s;
}

.nyla-deal-launchers .nyla-deal-open:hover {
    border-color: #c05f8e;
    box-shadow: 0 4px 16px rgba(192,95,142,.15);
}

.nyla-deal-launchers .nyla-deal-open:active { transform: scale(.99); }

.ndl-icon { font-size: 24px; line-height: 1; flex-shrink: 0; }
.ndl-text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.ndl-title { font-size: 15px; font-weight: 700; line-height: 1.25; }
.ndl-rule { font-size: 12.5px; color: #c05f8e; font-weight: 600; margin-top: 1px; }
.ndl-arrow { font-size: 18px; color: #c05f8e; flex-shrink: 0; transition: transform .15s; }
.nyla-deal-launchers .nyla-deal-open:hover .ndl-arrow { transform: translateX(3px); }

/* ============================================================
   Deal product page (Select Products + price rule)
   ============================================================ */
.nyla-select-wrap { margin: 14px 0; }

.nyla-select-products-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 240px;
    max-width: 100%;
    padding: 15px 28px;
    background: #c05f8e !important;
    color: #fff !important;
    font-size: 16px; font-weight: 700; letter-spacing: .02em;
    border: none; border-radius: 50px;
    cursor: pointer;
    text-transform: none;
    box-shadow: 0 6px 18px rgba(192,95,142,.28);
    transition: background .2s, transform .1s;
}

.nyla-select-products-btn:hover { background: #a04a76 !important; color: #fff !important; }
.nyla-select-products-btn:active { transform: scale(.99); }

.nyla-deal-price-rule {
    display: inline-block;
    font-size: 20px;
    font-weight: 700;
    color: #c05f8e;
}

.nyla-loop-select { display: inline-block; }

/* ============================================================
   Modal
   ============================================================ */
html.nyla-modal-lock { overflow: hidden; }

.nyla-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 999999;
    background: rgba(20, 10, 16, .55);
    padding: 16px;
    box-sizing: border-box;
}

.nyla-modal-overlay.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: nyla-fade .18s ease;
}

@keyframes nyla-fade { from { opacity: 0; } to { opacity: 1; } }

.nyla-modal {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 720px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 60px rgba(0,0,0,.3);
    animation: nyla-pop .2s ease;
}

@keyframes nyla-pop {
    from { transform: translateY(14px) scale(.98); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.nyla-modal-close {
    position: absolute;
    top: 10px; right: 12px;
    width: 36px; height: 36px;
    border: none; background: #f2f2f2 !important; color: #555 !important;
    font-size: 24px; line-height: 1; border-radius: 50%;
    cursor: pointer; z-index: 2;
    transition: background .15s;
}

.nyla-modal-close:hover { background: #e6e6e6 !important; color: #000 !important; }

.nyla-modal-body { overflow-y: auto; padding: 24px; -webkit-overflow-scrolling: touch; }
.nyla-deal-page.is-modal { max-width: none; }

.nyla-modal-loading { display: flex; align-items: center; justify-content: center; min-height: 180px; }

.nyla-spinner {
    width: 38px; height: 38px;
    border: 4px solid #ead5e3; border-top-color: #c05f8e;
    border-radius: 50%;
    animation: nyla-spin .8s linear infinite;
}

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

.nyla-modal-error { text-align: center; color: #c62828; padding: 30px 10px; }

/* ============================================================
   Cart display
   ============================================================ */
.nyla-cart-tag {
    display: inline-block;
    background: #c05f8e; color: #fff;
    font-size: 11px; padding: 2px 8px; border-radius: 50px;
    margin-left: 6px; vertical-align: middle;
}

.nyla-cart-tag--gift { background: #d4af7a; color: #1a1a1a; }
.nyla-free-price { text-decoration: none; color: #1f7a44; font-weight: 700; }
.nyla-gift-locked { font-size: 12px; color: #aaa; }
.nyla-gift-note { font-size: 12px; color: #1f7a44; margin: 2px 0 0; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 600px) {
    .ndp-cards { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .ndp-card-name { font-size: 12px; }
    .ndp-modal-title { font-size: 19px; }
    .nyla-modal-body { padding: 18px 14px; }
    .ndp-slot { padding: 13px; }
    .nyla-deal-page .ndp-add-btn { font-size: 15px; padding: 14px; }
    .nyla-select-products-btn { width: 100%; }
}

@media (max-width: 360px) {
    .ndp-cards { grid-template-columns: repeat(2, 1fr); }
}
