/* ==========================================================================
   Wizutech BundlePacks — Velgrina "Birlikte Alın" Styles
   Colors: teal #2E7D8C, black #1E2022, border #D1D5DB, light #F4F5F4
   Fonts: YOK — tema Poppins'i miras alınır (DESIGN.md: "Never hardcode
          font-family, use Tailwind font-sans/font-display"). Bu dosyada
          daha önce 'Poppins' iki yerde elle yazılıydı; kaldırıldı.
   ========================================================================== */

.velgrina-bundlepacks {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin: 2rem 0;
    padding: 24px 28px;
}

/* ---------- Header ---------- */

.velgrina-bundlepacks__header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.velgrina-bundlepacks__title {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    color: #1E2022;
    line-height: 1.2;
}

.velgrina-bundlepacks__discount-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background-color: #2E7D8C;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.velgrina-bundlepacks__subtitle {
    margin: 0 0 24px;
    font-size: 14px;
    color: #6B7280;
    line-height: 1.4;
}

/* ---------- Grid ---------- */

.velgrina-bundlepacks__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

/* ---------- Card ---------- */

.velgrina-bundlepacks__card {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.velgrina-bundlepacks__card--main {
    border-color: #2E7D8C;
}

.velgrina-bundlepacks__card--selected {
    border-color: #2E7D8C;
    box-shadow: 0 0 0 1px #2E7D8C;
}

/* ---------- Card image ---------- */

.velgrina-bundlepacks__card-image {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background-color: #F4F5F4;
}

.velgrina-bundlepacks__card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Hover image swap (second media gallery entry). Rendered above the
 * primary <img> inside .velgrina-bundlepacks__card-image and fades in
 * on card hover. */
.velgrina-bundlepacks__card-hover-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 2;
    pointer-events: none;
}
.velgrina-bundlepacks__card:hover .velgrina-bundlepacks__card-hover-img {
    opacity: 1;
}

.velgrina-bundlepacks__card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    background-color: #1E2022;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    letter-spacing: 0.02em;
}

/* ---------- Card info ---------- */

.velgrina-bundlepacks__card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    flex: 1;
}

.velgrina-bundlepacks__card-name {
    font-size: 13px;
    font-weight: 500;
    color: #1E2022;
    line-height: 1.4;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

a.velgrina-bundlepacks__card-name:hover {
    color: #2E7D8C;
}

.velgrina-bundlepacks__stars {
    display: flex;
    align-items: center;
    gap: 1px;
    margin: 2px 0 4px;
}
.velgrina-bundlepacks__review-count {
    font-size: 11px;
    color: #6B7280;
    margin-left: 3px;
}

.velgrina-bundlepacks__card-price {
    font-size: 15px;
    font-weight: 600;
    color: #1E2022;
    line-height: 1.3;
}

/* ---------- Checkbox ---------- */

.velgrina-bundlepacks__checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #D1D5DB;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #1E2022;
    user-select: none;
    transition: background-color 0.15s ease;
}

.velgrina-bundlepacks__checkbox:hover {
    background-color: #F4F5F4;
}

.velgrina-bundlepacks__checkbox--locked {
    cursor: default;
    color: #6B7280;
}

.velgrina-bundlepacks__checkbox--locked:hover {
    background-color: transparent;
}

.velgrina-bundlepacks__checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2E7D8C;
    cursor: inherit;
    margin: 0;
}

/* ---------- Footer ---------- */

.velgrina-bundlepacks__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 16px 0 0;
    border-top: 1px solid #e5e7eb;
}

/* ---------- Total ---------- */

.velgrina-bundlepacks__total {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.velgrina-bundlepacks__total-label {
    font-size: 14px;
    font-weight: 400;
    color: #6B7280;
}

.velgrina-bundlepacks__total-price {
    font-size: 22px;
    font-weight: 700;
    color: #1E2022;
    margin-left: 6px;
}

.velgrina-bundlepacks__total-count {
    font-size: 13px;
    font-weight: 400;
    color: #6B7280;
    margin-left: 4px;
}

/* ---------- Savings ---------- */

.velgrina-bundlepacks__savings {
    font-size: 13px;
    color: #16a34a;
    font-weight: 500;
}

.velgrina-bundlepacks__savings strong {
    font-weight: 700;
}

.velgrina-bundlepacks__savings-note {
    font-style: normal;
    font-size: 11px;
    font-weight: 400;
    color: #6b7280;
    margin-left: 4px;
}

/* "Set indirimi için en az 3 ürün seçin" ipucu (< min seçiliyken) */
.velgrina-bundlepacks__minhint {
    font-size: 12px;
    font-weight: 500;
    color: #b45309;
}

/* Set eklenemediğinde gösterilen hata satırı */
.velgrina-bundlepacks__error {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #dc2626;
}

/* ---------- Add to Cart button ---------- */

.velgrina-bundlepacks__atc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background-color: #2E7D8C;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.velgrina-bundlepacks__atc-btn:hover {
    background-color: #245f6b;
}

.velgrina-bundlepacks__atc-btn:focus-visible {
    outline: 2px solid #2E7D8C;
    outline-offset: 2px;
}

.velgrina-bundlepacks__atc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.velgrina-bundlepacks__atc-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ---------- Varyasyon slotu ----------
   Kontrol NATIVE <select>. Açılır panel KULLANILMAZ: mobil şerit
   overflow-x:auto olduğu için (aşağıdaki media query) dikeyde de kırpma
   bağlamıdır — mutlak konumlu bir panel oradan çıkamaz, ölçüldü: 175px
   taşıyıp kesiliyordu. OS picker hiçbir overflow bağlamına takılmaz.
   Görsel dil `.wizfamily__current` (variants.css) ile aynı: 8px radius,
   #D1D5DB kenar, teal hover/focus.                                        */

.velgrina-bundlepacks__slot {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 12px 10px;
}

.velgrina-bundlepacks__slot-label {
    font-size: 11px;
    font-weight: 500;
    color: #6B7280;
    line-height: 1.3;
    letter-spacing: 0.01em;
}

.velgrina-bundlepacks__slot-select {
    width: 100%;
    min-height: 44px; /* DESIGN.md dokunma hedefi */
    padding: 8px 30px 8px 10px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    background-color: #fff;
    color: #1E2022;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%239CA3AF' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.2s ease;
}

.velgrina-bundlepacks__slot-select:hover {
    border-color: #2E7D8C;
}

.velgrina-bundlepacks__slot-select:focus-visible {
    outline: 2px solid #2E7D8C;
    outline-offset: 2px;
}

.velgrina-bundlepacks__slot-select option:disabled {
    color: #4B5563; /* #9CA3AF kontrast ~2.5:1 — WCAG altı, KULLANMA */
}

/* Ana ürün kartı: seçici YOK (A4/D3), yalnız hangi varyasyonun sette olduğu
   + sayfanın kendi seçicisine bağlantı. Tek doğruluk kaynağı orasıdır. */
.velgrina-bundlepacks__slot--readonly {
    gap: 2px;
}

.velgrina-bundlepacks__slot-value {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #1E2022;
    line-height: 1.3;
}

.velgrina-bundlepacks__slot-change {
    padding: 0;
    border: none;
    background: none;
    color: #2E7D8C;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    text-decoration: underline;
    cursor: pointer;
    white-space: nowrap;
}

.velgrina-bundlepacks__slot-change:hover {
    color: #246876;
}

.velgrina-bundlepacks__slot-change:focus-visible {
    outline: 2px solid #2E7D8C;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Kart seçili DEĞİLKEN varyasyon değişirse "Ekle" kutusu bir kez vurgulanır
   (D2). 2026-07-21 `.velgrina-optin` deseniyle aynı: 0.3s teal, azaltılmış
   hareket tercihine saygılı. */
@keyframes velgrina-bp-pulse {
    0%   { background-color: transparent; }
    35%  { background-color: #E8F4F6; }
    100% { background-color: transparent; }
}

.velgrina-bundlepacks__checkbox--pulse {
    animation: velgrina-bp-pulse 0.4s ease-out;
}

/* Görsel değişimi sert olmasın (DESIGN.md: 0.18s image fade) */
.velgrina-bundlepacks__card-image img {
    transition: opacity 0.18s ease;
}

/* Ekran okuyucu duyurusu — görsel olarak gizli, erişilebilirlik ağacında var */
.velgrina-bundlepacks__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .velgrina-bundlepacks__checkbox--pulse {
        animation: none;
    }
    .velgrina-bundlepacks__card-image img {
        transition: none;
    }
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
    .velgrina-bundlepacks {
        border-left: none;
        border-right: none;
        border-radius: 0;
        margin: 1.5rem 0;
        padding: 1rem;
    }

    .velgrina-bundlepacks__title {
        font-size: 1.125rem;
    }

    .velgrina-bundlepacks__grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        gap: 0.75rem;
        padding-bottom: 4px;
    }

    .velgrina-bundlepacks__grid::-webkit-scrollbar {
        display: none;
    }

    .velgrina-bundlepacks__card {
        scroll-snap-align: start;
        flex: 0 0 180px;
        min-width: 180px;
        max-width: 180px;
    }

    .velgrina-bundlepacks__card-name {
        font-size: 11px;
        -webkit-line-clamp: 2;
    }

    .velgrina-bundlepacks__card-image {
        aspect-ratio: 4 / 5;
        height: auto;
    }

    .velgrina-bundlepacks__footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .velgrina-bundlepacks__atc-btn {
        justify-content: center;
        width: 100%;
        padding: 10px;
    }

    /* 180px kartta seçici — dokunma hedefi 44px KORUNUR, yalnız yazı küçülür.
       Kart yüksekliği ölçüldü: seçici tek satır olduğu için değişmiyor (405px). */
    .velgrina-bundlepacks__slot {
        padding: 0 10px 8px;
    }

    .velgrina-bundlepacks__slot-select {
        font-size: 12px;
        padding-right: 26px;
        background-position: right 8px center;
    }

    .velgrina-bundlepacks__slot-value {
        font-size: 12px;
    }
}
