/* ============================================================
   İndirim Kuralları Pro – Frontend
   ============================================================ */

.ik-discount-box {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    margin: 18px 0 22px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    overflow: hidden;
    font-size: 14px;
    line-height: 1.5;
}

/* ── Başlık ── */
.ik-discount-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 18px;
    background: #fff5f5;
    border-bottom: 1px solid #fecaca;
}

.ik-discount-icon { font-size: 16px; }

.ik-discount-title {
    font-size: 12px;
    font-weight: 700;
    color: #b91c1c;
    text-transform: uppercase;
    letter-spacing: .6px;
}

/* ── Aktif bildirim ── */
.ik-discount-active-notice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 12px 16px 0;
    padding: 10px 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    color: #15803d;
    animation: ik-slide-in .25s ease;
}

.ik-notice-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }

@keyframes ik-slide-in {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Tablo ── */
.ik-tiers-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    table-layout: fixed;
}

.ik-tiers-table thead tr {
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
}

.ik-tiers-table thead th {
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .5px;
    text-align: left;
}

.ik-tier-row {
    border-bottom: 1px solid #f5f5f5;
    transition: background .15s;
}

.ik-tier-row:last-child { border-bottom: none; }

.ik-tiers-table td {
    padding: 11px 14px;
    vertical-align: middle;
}

/* ── Aktif satır: yalnızca 1 satır vurgulanır ── */
.ik-tier-row.ik-tier-active {
    background: #fff5f5;
    border-left: 3px solid #ef4444;
}

.ik-tier-row.ik-tier-active .ik-qty-badge {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
}

.ik-tier-row.ik-tier-active .ik-discount-badge {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
    font-weight: 700;
}

/* ── Adet sütunu ── */
.ik-td-qty {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.ik-qty-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    padding: 3px 10px;
    background: #f9fafb;
    border: 1.5px solid #d1d5db;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    transition: background .2s, color .2s, border-color .2s;
    white-space: nowrap;
}

.ik-tier-label {
    font-size: 11px;
    color: #9ca3af;
    font-style: italic;
}

/* ── Birim Fiyat: sadece indirimli fiyat, net ve büyük ── */
.ik-new-price {
    font-weight: 700;
    font-size: 15px;
    color: #111827;
    white-space: nowrap;
}

/* ── İndirim badge ── */
.ik-discount-badge {
    display: inline-block;
    padding: 3px 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
}

/* wc_price() içindeki span'ları inline tut */
.ik-discount-badge .woocommerce-Price-amount,
.ik-discount-badge bdi { display: inline; }

/* ── Footer ── */
.ik-discount-footer {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 9px 16px 11px;
    font-size: 11px;
    color: #9ca3af;
    border-top: 1px solid #f5f5f5;
    background: #fafafa;
}

/* ── Ürün sayfası ana fiyat ── */
.ik-page-orig {
    color: #9ca3af;
    font-size: 14px;
    text-decoration: line-through;
    margin-right: 4px;
}

.ik-page-new {
    text-decoration: none;
    font-weight: 700;
    font-size: 20px;
    color: #111827;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .ik-tiers-table { font-size: 13px; }
    .ik-tiers-table td { padding: 9px 10px; }
}

/* ============================================================
   Sepet & Ödeme Sayfası
   ============================================================ */

/* Birim fiyat sütunu */
.ik-cart-price-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.3;
}

.ik-cart-new {
    font-weight: 700;
    color: #111827;
    font-size: 14px;
}

.ik-cart-orig {
    font-size: 12px;
    color: #aaa;
    text-decoration: line-through;
}

/* Alt toplam sütunu */
.ik-cart-subtotal-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.ik-cart-subtotal-prices {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ik-cart-subtotal-prices .ik-cart-new {
    font-size: 15px;
}

.ik-cart-subtotal-prices .ik-cart-orig {
    font-size: 12px;
}

/* İndirim etiketi (alt toplam altında) */
.ik-cart-discount-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #b91c1c;
    white-space: nowrap;
}

/* Toplam tablosu: İndirim Tutarı satırı */
.ik-savings-total-row th,
.ik-savings-total-row td {
    padding-top: 8px;
    padding-bottom: 8px;
    border-top: 1px dashed #e5e7eb;
}

.ik-savings-total-row th {
    font-weight: 600;
    color: #374151;
}

.ik-savings-amount {
    color: #b91c1c !important;
    font-size: 15px;
    font-weight: 700;
}
