/* ===== Mini-cart toggle (header beli ikon) ===== */
.mini-cart { position: relative; display: inline-flex; }

.mini-cart-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: inherit;
    cursor: pointer;
    transition: background 0.15s;
}

.mini-cart-toggle:hover { background: rgba(0,0,0,0.05); }

.mini-cart-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #dc2626;
    color: #fff;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    pointer-events: none;
}

/* ===== Dropdown panel ===== */
.mini-cart-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-width: calc(100vw - 32px);
    max-height: 70vh;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mini-cart-dropdown[hidden] { display: none; }

.mini-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
}

.mini-cart-header-title { font-weight: 700; font-size: 15px; color: #1f2937; }

.mini-cart-close {
    width: 28px;
    height: 28px;
    background: transparent;
    border: 0;
    font-size: 22px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    border-radius: 50%;
}
.mini-cart-close:hover { background: #f3f4f6; color: #1f2937; }

.mini-cart-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.mini-cart-loading,
.mini-cart-empty {
    padding: 32px 20px;
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

/* ===== Items list ===== */
.mini-cart-items { padding: 8px 0; }

.mini-cart-item {
    display: grid;
    grid-template-columns: 48px 1fr 28px;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
}

.mini-cart-item + .mini-cart-item { border-top: 1px solid #f3f4f6; }

.mini-cart-item-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    overflow: hidden;
    background: #f9fafb;
    display: block;
}
.mini-cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.mini-cart-item-info { min-width: 0; }

.mini-cart-item-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mini-cart-item-name:hover { color: #2563eb; }

.mini-cart-item-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.mini-cart-item-remove {
    width: 24px;
    height: 24px;
    background: transparent;
    border: 0;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
}
.mini-cart-item-remove:hover { color: #dc2626; background: #fef2f2; }

/* ===== Footer ===== */
.mini-cart-footer {
    border-top: 1px solid #e5e7eb;
    padding: 14px 18px;
    background: #fafafa;
}

.mini-cart-subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.mini-cart-actions { display: flex; gap: 8px; }

.mini-cart-btn {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}

.mini-cart-btn-secondary {
    background: #fff;
    color: #1f2937;
    border: 1px solid #d1d5db;
}
.mini-cart-btn-secondary:hover { background: #f9fafb; }

.mini-cart-btn-primary {
    background: #2563eb;
    color: #fff;
}
.mini-cart-btn-primary:hover { background: #1d4ed8; }

/* ===== Toast (add-to-cart visszajelzés) ===== */
.cart-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    background: #1f2937;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    z-index: 9999;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}
.cart-toast.is-error { background: #dc2626; }
.cart-toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 576px) {
    .mini-cart-dropdown { right: -8px; width: calc(100vw - 16px); }
}