/* ── Oldal fejléc (checkout-tal konzisztens) ── */
.cart-page-header {
    padding: 20px 0 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
}

.cart-page-title {
    font-family: var(--fd);
    font-weight: 800;
    font-size: clamp(22px, 3vw, 30px);
    text-transform: uppercase;
    color: var(--text);
}

/* ============================================================
   kosar.css – Kosár oldal stílusok
   Osztályok a kosar.php HTML struktúrájához igazítva
   ============================================================ */

/* ── Layout ── */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    align-items: start;
    padding-bottom: 60px;
}

@media (max-width: 900px) {
    .cart-layout { grid-template-columns: 1fr; }
}

/* ── Üres kosár ── */
.cart-empty {
    padding: 64px 0 80px;
    text-align: center;
}

.cart-empty__icon {
    color: var(--text-4);
    margin-bottom: 20px;
}

.cart-empty__title {
    font-family: var(--fd);
    font-weight: 800;
    font-size: 22px;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 10px;
}

.cart-empty__desc {
    color: var(--text-3);
    font-size: 15px;
    margin-bottom: 28px;
}

/* ── Ingyenes szállítás progress ── */
.shipping-progress-bar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 14px 18px;
    margin-bottom: 20px;
}

.shipping-progress-bar__track {
    height: 6px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 8px;
}

.shipping-progress-bar__fill {
    display: block;
    height: 6px;
    background: var(--gold);
    border-radius: 99px;
    transition: width 0.6s ease 0.1s;
    width: 0%;
    min-height: 6px;
}

.shipping-progress-bar__text {
    font-size: 13px;
    color: var(--text-3);
    margin: 0;
}

.shipping-progress-bar__text strong {
    color: var(--gold);
}

/* ── Kosár fejléc (asztali oszlopok) ── */
.cart-header {
    display: grid;
    grid-template-columns: 80px 1fr 140px 100px;
    gap: 16px;
    padding: 0 12px 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-4);
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

@media (max-width: 640px) {
    .cart-header { display: none; }
}

/* ── Tételsor ── */
.cart-row {
    display: grid;
    grid-template-columns: 80px 1fr 140px 100px;
    gap: 16px;
    align-items: center;
    padding: 16px 12px;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}

.cart-row:hover {
    background: var(--surface);
}

.cart-row--unavailable {
    opacity: .6;
}

@media (max-width: 640px) {
    .cart-row {
        grid-template-columns: 72px 1fr;
        grid-template-rows: auto auto;
        gap: 10px;
    }
}

/* Termék kép */
.cart-item__img-link {
    display: block;
    border-radius: var(--r-sm);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 1;
}

.cart-item__thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.cart-item__thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-2);
    color: var(--text-4);
    width: 80px;
    height: 80px;
}

/* Termék infó */
.cart-item__info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.cart-item__name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item__name:hover {
    color: var(--gold);
}

.cart-item__variant {
    font-size: 12px;
    color: var(--text-4);
    background: var(--bg-2);
    border-radius: var(--r-sm);
    padding: 2px 7px;
    display: inline-block;
    width: fit-content;
}

.cart-item__unit-price {
    font-size: 12px;
    color: var(--text-4);
}

.cart-item__unavailable {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--red, #e53e3e);
    background: rgba(229,62,62,.08);
    border-radius: var(--r-sm);
    padding: 4px 8px;
    width: fit-content;
}

/* Mennyiség selector */
.qty-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    overflow: hidden;
    width: fit-content;
}

.qty-btn {
    background: var(--surface);
    border: none;
    width: 32px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-3);
    transition: background .15s, color .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.qty-btn:hover:not(:disabled) {
    background: var(--bg-2);
    color: var(--text);
}

.qty-btn:disabled {
    opacity: .35;
    cursor: default;
}

.qty-input {
    width: 48px;
    height: 36px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    background: var(--bg);
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.cart-item__qty-disabled {
    font-size: 14px;
    color: var(--text-4);
}

/* Összeg + törlés */
.cart-item__controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.cart-item__subtotal {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.cart-item__price {
    font-weight: 700;
    font-size: 15px;
    color: var(--text);
    white-space: nowrap;
}

.cart-item__price--unavailable {
    color: var(--text-4);
}

.cart-item__remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-4);
    padding: 4px;
    border-radius: var(--r-sm);
    transition: color .15s, background .15s;
    display: flex;
    align-items: center;
}

.cart-item__remove:hover {
    color: var(--red, #e53e3e);
    background: rgba(229,62,62,.08);
}

/* Vásárlás folytatása */
.cart-continue {
    padding: 16px 12px 0;
}

.cart-continue__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-3);
    text-decoration: none;
    transition: color .15s;
}

.cart-continue__link:hover {
    color: var(--gold);
}

/* ── Skeleton betöltés ── */
.cart-skeleton {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cart-row--skeleton {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 12px;
    border-bottom: 1px solid var(--border);
}

.skeleton-box {
    background: linear-gradient(90deg, var(--border) 25%, var(--bg-2) 50%, var(--border) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s infinite;
    border-radius: var(--r-sm);
}

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Összesítő kártya (jobb oldal) ── */
.cart-summary {
    position: sticky;
    top: calc(var(--header-h, 70px) + 16px);
}

.summary-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 22px;
    box-shadow: var(--sh-sm);
}

.summary-card__title {
    font-family: var(--fd);
    font-weight: 800;
    font-size: 16px;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.summary-rows {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-3);
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--fd);
    font-weight: 800;
    font-size: 18px;
    color: var(--text);
    padding: 14px 0;
    border-top: 2px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}

.summary-total__amount {
    color: var(--gold);
}

.summary-vat-note {
    font-size: 11px;
    color: var(--text-4);
    margin-bottom: 18px;
}

.free-shipping {
    color: var(--green, #38a169);
    font-weight: 600;
}

.text-red {
    color: var(--red, #e53e3e);
}

/* Kupon mező */
.coupon-area {
    margin-bottom: 18px;
}

.coupon-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-3);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.coupon-input-group {
    display: flex;
    gap: 8px;
}

.coupon-input {
    flex: 1;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    padding: 0 12px;
    font-size: 13px;
    color: var(--text);
    background: var(--bg);
    text-transform: uppercase;
    letter-spacing: .05em;
    transition: border-color .15s;
}

.coupon-input:focus {
    outline: none;
    border-color: var(--gold);
}

.coupon-error {
    font-size: 12px;
    color: var(--red, #e53e3e);
    margin-top: 6px;
    margin-bottom: 0;
}

.coupon-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(var(--gold-rgb, 184,125,30), .08);
    border: 1px solid var(--gold);
    border-radius: var(--r-sm);
    padding: 10px 12px;
    margin-top: 8px;
}

.coupon-badge__info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gold);
}

.coupon-code {
    font-weight: 700;
    font-size: 13px;
    display: block;
}

.coupon-type {
    font-size: 11px;
    color: var(--text-3);
    display: block;
}

.coupon-badge__remove {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-4);
    font-size: 14px;
    padding: 2px 6px;
    border-radius: var(--r-sm);
    transition: color .15s, background .15s;
}

.coupon-badge__remove:hover {
    color: var(--red, #e53e3e);
    background: rgba(229,62,62,.08);
}

/* Checkout gomb */
.cart-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 16px;
    text-decoration: none;
}

.cart-checkout-btn:disabled,
.cart-checkout-btn[disabled] {
    opacity: .5;
    pointer-events: none;
}

/* Bizalmi sáv */
.summary-trust {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-4);
}

.trust-item svg {
    flex-shrink: 0;
}

/* ── Btn spinner animáció ── */
.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

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