/* Sağdan açılan sepet çekmecesi */
.yer6-cart-root {
    position: fixed;
    inset: 0;
    z-index: 100050;
    pointer-events: none;
}

.yer6-cart-root.is-open {
    pointer-events: auto;
}

.yer6-cart-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    opacity: 0;
    transition: opacity 0.28s ease;
}

.yer6-cart-root.is-open .yer6-cart-overlay {
    opacity: 1;
}

.yer6-cart-drawer {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
    width: min(420px, 100%);
    max-width: 100%;
    height: 100%;
    background: #141518;
    border-top: none;
    border-left: 1px solid var(--header-strip-border, #2d3139);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    color: #e8eaed;
    color-scheme: dark;
}

/* Ürünler ayrı kaymaz; ürün+indirim+özet tek blokta kayar — footer sabit */
.yer6-cart-main-scroll {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: #4b5563 #1a1d24;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

.yer6-cart-main-scroll::-webkit-scrollbar {
    width: 8px;
}

.yer6-cart-main-scroll::-webkit-scrollbar-track {
    background: #1a1d24;
    border-radius: 4px;
}

.yer6-cart-main-scroll::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
    border: 2px solid #1a1d24;
}

.yer6-cart-main-scroll::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.yer6-cart-root.is-open .yer6-cart-drawer {
    transform: translateX(0);
}

.yer6-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-top: none;
    border-bottom: 1px solid var(--header-strip-border, #2d3139);
    flex-shrink: 0;
}

.yer6-cart-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 17px;
}

/* Sadece sepet ikon kutusu: logo mavisi, saydam */
.yer6-cart-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 9px;
    background: rgba(74, 158, 255, 0.18);
}

.yer6-cart-title-icon i {
    color: #4a9eff;
    font-size: 16px;
}

.yer6-cart-close {
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #9ca3af;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.yer6-cart-close:hover,
.yer6-cart-close:focus-visible {
    background: transparent !important;
    color: #ffffff;
    outline: none;
}

.yer6-cart-drawer .yer6-cart-close-svg {
    display: block;
    flex-shrink: 0;
    pointer-events: none;
}

body.dark-mode .yer6-cart-drawer .yer6-cart-close,
body.light-mode .yer6-cart-drawer .yer6-cart-close {
    background: transparent !important;
    border: none !important;
    color: #9ca3af;
}

body.dark-mode .yer6-cart-drawer .yer6-cart-close:hover,
body.light-mode .yer6-cart-drawer .yer6-cart-close:hover {
    background: transparent !important;
    color: #ffffff;
}

.yer6-cart-body {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.yer6-cart-items {
    flex: 0 0 auto;
    overflow: visible;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.yer6-cart-empty {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 20px;
    color: #8a94a6;
    gap: 8px;
}

.yer6-cart-empty i {
    font-size: 40px;
    opacity: 0.45;
    margin-bottom: 8px;
}

.yer6-cart-empty-hint {
    font-size: 13px;
    opacity: 0.85;
}

.yer6-cart-root[data-empty="1"] .yer6-cart-empty {
    display: flex;
}

.yer6-cart-root[data-empty="1"] .yer6-cart-items {
    display: none;
}

.yer6-cart-line {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    padding: 12px;
    background: #1c1f26;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    position: relative;
}

.yer6-cart-line-thumb {
    width: 72px;
    height: 72px;
    border-radius: 10px;
    overflow: hidden;
    background: #0f1115;
    flex-shrink: 0;
}

.yer6-cart-line-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yer6-cart-line-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.yer6-cart-line-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.yer6-cart-line-title {
    font-weight: 700;
    font-size: 13px;
    line-height: 1.35;
    color: #f1f5f9;
    margin: 0;
}

.yer6-cart-line-remove {
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    line-height: 1;
    flex-shrink: 0;
}

.yer6-cart-line-remove:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.12);
}

.yer6-cart-line-badge {
    display: inline-block;
    font-size: 11px;
    color: #94a3b8;
    background: rgba(255, 255, 255, 0.06);
    padding: 3px 8px;
    border-radius: 6px;
    align-self: flex-start;
}

.yer6-cart-line-badge-label {
    font-weight: 600;
    color: #cbd5e1;
    margin-right: 4px;
}

.yer6-cart-line-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    gap: 10px;
}

.yer6-cart-line-price {
    font-weight: 700;
    font-size: 15px;
    color: #4a9eff;
}

/* Miktar: tek koyu ton — global dark-mode button gri arka planı ezilir */
.yer6-cart-drawer .yer6-cart-qty {
    display: inline-flex;
    align-items: stretch;
    background: #1a1d24;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    overflow: hidden;
}

.yer6-cart-drawer .yer6-cart-qty .yer6-cart-qty-btn {
    width: 32px;
    min-height: 32px;
    padding: 0;
    margin: 0;
    border: none !important;
    border-radius: 0 !important;
    background: #1a1d24 !important;
    color: #e2e8f0 !important;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
}

.yer6-cart-drawer .yer6-cart-qty .yer6-cart-qty-btn:hover,
.yer6-cart-drawer .yer6-cart-qty .yer6-cart-qty-btn:active,
.yer6-cart-drawer .yer6-cart-qty .yer6-cart-qty-btn:focus {
    background: #22262f !important;
    color: #f1f5f9 !important;
}

body.dark-mode .yer6-cart-drawer .yer6-cart-qty .yer6-cart-qty-btn,
body.light-mode .yer6-cart-drawer .yer6-cart-qty .yer6-cart-qty-btn {
    background: #1a1d24 !important;
    border: none !important;
}

body.dark-mode .yer6-cart-drawer .yer6-cart-qty .yer6-cart-qty-btn:hover,
body.light-mode .yer6-cart-drawer .yer6-cart-qty .yer6-cart-qty-btn:hover {
    background: #22262f !important;
}

.yer6-cart-drawer .yer6-cart-qty span {
    min-width: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #f1f5f9;
    background: #1a1d24;
    padding: 0 6px;
    line-height: 1;
}

.yer6-cart-discount {
    padding: 0 14px 12px;
    flex: 0 0 auto;
}

.yer6-cart-discount-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #cbd5e1;
}

.yer6-cart-discount-label i {
    color: #4a9eff;
    font-size: 14px;
}

/* Tek satır: sol alan + sağ yeşil şerit (referans düzeni) */
.yer6-cart-discount-row {
    width: 100%;
}

.yer6-cart-discount-combo {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    border-radius: 10px !important;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #1c1f26;
    box-sizing: border-box;
    flex: 0 0 auto;
}

.yer6-cart-drawer .yer6-cart-discount-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 0;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    margin: 0;
    padding: 10px 12px;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #e2e8f0;
    font-size: 14px;
    line-height: 1.35;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    display: block;
}

.yer6-cart-discount-input:focus {
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(74, 158, 255, 0.35);
}

.yer6-cart-discount-input::placeholder {
    color: #64748b;
}

.yer6-cart-drawer .yer6-cart-discount-apply {
    flex: 0 0 auto;
    align-self: stretch;
    min-width: 88px;
    max-height: 44px !important;
    padding: 0 14px;
    margin: 0;
    border: none !important;
    border-radius: 0 !important;
    background: #10d473 !important;
    color: #0b1220;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: filter 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    line-height: 1.2;
    box-sizing: border-box;
}

.yer6-cart-discount-apply:hover {
    filter: brightness(1.06);
}

.yer6-cart-discount-msg {
    font-size: 12px;
    margin: 8px 0 0;
    color: #fbbf24;
}

.yer6-cart-discount-msg--success {
    color: #4ade80;
}

.yer6-cart-discount-msg--error {
    color: #f87171;
}

.yer6-cart-discount-msg--warn {
    color: #fbbf24;
}

.yer6-cart-discount-hint {
    margin: 6px 0 0;
    font-size: 11px;
    line-height: 1.4;
    color: #64748b;
}

.yer6-cart-summary {
    margin: 0 14px 12px;
    padding: 14px;
    background: #1a1d24;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    flex-shrink: 0;
}

.yer6-cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 10px;
}

.yer6-cart-summary-row:last-child {
    margin-bottom: 0;
}

.yer6-cart-summary-row--strong {
    font-weight: 700;
    color: #e2e8f0;
}

.yer6-cart-summary-row--strong span:last-child {
    color: #4a9eff;
}

.yer6-cart-summary-row--danger span:last-child {
    color: #f87171;
    font-weight: 700;
}

.yer6-cart-summary-row--shortage-ok span:last-child {
    color: #10d473;
    font-weight: 700;
}

.yer6-cart-summary-row--discount span:last-child {
    color: #34d399;
}

.yer6-cart-summary-dashed {
    border: none;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    margin: 12px 0;
}

.yer6-cart-footer {
    display: flex;
    gap: 10px;
    padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    background: #141518;
}

.yer6-cart-drawer .yer6-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 10px !important;
    -webkit-border-radius: 10px !important;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    padding: 14px 16px;
    font-family: inherit;
    transition: none;
}

.yer6-cart-drawer .yer6-cart-btn--ghost {
    flex: 0 0 auto;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.22) !important;
    color: #e2e8f0;
    border-radius: 10px !important;
}

.yer6-cart-drawer .yer6-cart-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px !important;
}

/* Global body.dark-mode button gri arka planı burada ezilmeli */
.yer6-cart-drawer .yer6-cart-btn--primary,
body.dark-mode .yer6-cart-drawer button.yer6-cart-btn--primary,
body.light-mode .yer6-cart-drawer button.yer6-cart-btn--primary {
    flex: 1;
    background: #2563eb !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    -webkit-border-radius: 10px !important;
    box-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;
    transition: none !important;
}

.yer6-cart-drawer .yer6-cart-btn--primary:hover,
.yer6-cart-drawer .yer6-cart-btn--primary:active,
.yer6-cart-drawer .yer6-cart-btn--primary:focus,
.yer6-cart-drawer .yer6-cart-btn--primary:focus-visible,
body.dark-mode .yer6-cart-drawer button.yer6-cart-btn--primary:hover,
body.dark-mode .yer6-cart-drawer button.yer6-cart-btn--primary:active,
body.dark-mode .yer6-cart-drawer button.yer6-cart-btn--primary:focus {
    background: #2563eb !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    -webkit-border-radius: 10px !important;
    box-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;
    outline: none;
}

html.yer6-cart-open,
body.yer6-cart-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

body.yer6-cart-open {
    width: 100%;
}

/* Header sepet rozeti */
.header-cart-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    flex-shrink: 0;
}

.header-cart-wrap .header-cart-link {
    margin-right: 0 !important;
}

.yer6-header-cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.yer6-header-cart-badge[hidden] {
    display: none !important;
}
