/* ============================================
   Cart Page — matches PDP glass theme
   ============================================ */

.cart-section {
    padding: 5.25rem 0 2.5rem;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 50% 40% at 85% 10%, rgba(0, 87, 168, 0.28) 0%, transparent 60%),
        radial-gradient(ellipse 40% 35% at 10% 90%, rgba(0, 63, 122, 0.2) 0%, transparent 65%),
        #060a12;
    min-height: calc(100vh - 8rem);
}

.cart-container {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cart-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.cart-breadcrumb a {
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: color 0.2s;
}

.cart-breadcrumb a:hover { color: #fff; }

.cart-breadcrumb .sep { color: rgba(255, 255, 255, 0.25); }

.cart-breadcrumb .current {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 600;
}

.cart-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.cart-header h1 {
    font-family: Outfit, sans-serif;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 800;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.cart-header-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.65);
}

.cart-header-meta strong {
    color: #fff;
    font-weight: 700;
}

.cart-alert {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.cart-alert-success {
    background: rgba(39, 174, 96, 0.2);
    border: 1px solid rgba(39, 174, 96, 0.35);
    color: #9af0bc;
}

.cart-alert-error {
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.35);
    color: #ffb4ab;
}

.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 1.25rem;
    align-items: start;
}

.cart-panel,
.cart-summary,
.cart-empty {
    position: relative;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    overflow: hidden;
}

.cart-panel::before,
.cart-summary::before,
.cart-empty::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.22) 0%,
        rgba(255, 255, 255, 0.06) 42%,
        rgba(255, 255, 255, 0.02) 100%
    );
    pointer-events: none;
    z-index: 0;
}

.cart-panel > *,
.cart-summary > *,
.cart-empty > * {
    position: relative;
    z-index: 1;
}

.cart-panel {
    padding: 0.35rem;
}

.cart-line {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: center;
    padding: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-line:last-child {
    border-bottom: none;
}

.cart-line-thumb {
    width: 88px;
    height: 88px;
    border-radius: 0.75rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
}

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

.cart-line-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    font-family: Outfit, sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    color: #fff;
    background: linear-gradient(145deg, #0b2345, #0057A8);
}

.cart-line-body h3 {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}

.cart-line-body h3 a {
    color: inherit;
    text-decoration: none;
}

.cart-line-body h3 a:hover {
    text-decoration: underline;
}

.cart-line-price {
    margin: 0 0 0.55rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.68);
}

.cart-line-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.cart-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 0.65rem;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.12);
}

.cart-qty-btn {
    width: 2rem;
    height: 2.15rem;
    border: none;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 700;
}

.cart-qty-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.cart-qty-control input {
    width: 2.5rem;
    height: 2.15rem;
    padding: 0;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    border-right: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    color: #fff;
    background: transparent;
    outline: none;
    -moz-appearance: textfield;
    appearance: textfield;
}

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

.cart-line-remove {
    border: none;
    background: transparent;
    color: #ffb4ab;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.35rem 0.45rem;
    border-radius: 0.5rem;
    transition: background 0.15s;
}

.cart-line-remove:hover {
    background: rgba(231, 76, 60, 0.18);
}

.cart-line-total {
    font-family: Outfit, sans-serif;
    font-size: 0.98rem;
    font-weight: 800;
    color: #fff;
    text-align: right;
    min-width: 6.5rem;
}

.cart-summary {
    padding: 1.25rem 1.2rem 1.3rem;
    position: sticky;
    top: 5rem;
}

.cart-summary h2 {
    font-family: Outfit, sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 1rem;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.55rem;
}

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

.cart-summary-note {
    font-size: 0.75rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.55);
    margin: 0.75rem 0 1.1rem;
}

.cart-summary-actions {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.cart-summary-actions .btn {
    width: 100%;
    justify-content: center;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
}

.cart-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-family: Outfit, sans-serif;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}

.cart-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.cart-empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.cart-empty p {
    margin: 0 0 1.25rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.95rem;
}

.cart-empty .btn {
    border-radius: 0.75rem;
}

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

    .cart-summary {
        position: static;
    }

    .cart-line {
        grid-template-columns: 72px minmax(0, 1fr);
        grid-template-areas:
            "thumb body"
            "thumb total";
    }

    .cart-line-thumb { grid-area: thumb; width: 72px; height: 72px; }
    .cart-line-body { grid-area: body; }
    .cart-line-total {
        grid-area: total;
        text-align: left;
        margin-top: 0.35rem;
    }
}

@media (max-width: 480px) {
    .cart-section {
        padding: 4.75rem 0 2rem;
    }

    .cart-line-actions {
        width: 100%;
    }
}
