@import url('./buttons-r25.css?v=4');

/* ============ CART PAGE — R25 Premium ============ */

:root {
    --cart-gold: #e8b923;
    --cart-gold-2: #f5d061;
    --cart-gold-soft: rgba(232, 185, 35, 0.1);
    --cart-line: rgba(255, 255, 255, 0.07);
    --cart-glass: rgba(255, 255, 255, 0.03);
    --cart-muted: #8b8b95;
    --cart-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body.cart-page::before {
    background:
        radial-gradient(ellipse 60% 40% at 50% -5%, rgba(232, 185, 35, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse 45% 30% at 8% 75%, rgba(37, 99, 235, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 40% 25% at 92% 35%, rgba(52, 211, 153, 0.04) 0%, transparent 50%);
}

.cart-wrap {
    max-width: 1080px;
}

.cart-back {
    margin-bottom: 1.25rem;
}

/* ── Hero ── */
.cart-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--cart-line);
}

.cart-hero__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    background: var(--cart-gold-soft);
    border: 1px solid rgba(232, 185, 35, 0.24);
    color: var(--cart-gold);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.cart-hero h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.65rem, 4vw, 2.15rem);
    font-weight: 900;
    background: linear-gradient(180deg, #fff 15%, rgba(255, 255, 255, 0.72));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cart-hero p {
    margin: 0;
    max-width: 520px;
    color: var(--cart-muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

.cart-hero__stats {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cart-stat {
    min-width: 110px;
    padding: 1rem 1.15rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--cart-line);
    text-align: center;
    backdrop-filter: blur(12px);
}

.cart-stat--gold {
    background: linear-gradient(145deg, rgba(232, 185, 35, 0.12), rgba(232, 185, 35, 0.04));
    border-color: rgba(232, 185, 35, 0.22);
    box-shadow: 0 12px 32px rgba(232, 185, 35, 0.08);
}

.cart-stat__value {
    display: block;
    font-size: 1.35rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
}

.cart-stat--gold .cart-stat__value {
    color: var(--cart-gold-2);
}

.cart-stat__label {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.72rem;
    color: var(--cart-muted);
    font-weight: 600;
}

/* ── Empty state ── */
.cart-empty {
    position: relative;
    text-align: center;
    padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 4vw, 2.5rem);
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(232, 185, 35, 0.14);
    box-shadow:
        0 28px 70px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.cart-empty__glow {
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(232, 185, 35, 0.12) 0%, transparent 68%);
    pointer-events: none;
}

.cart-empty__visual {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
}

.cart-empty__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(232, 185, 35, 0.18);
}

.cart-empty__ring--outer {
    animation: cartPulse 3.2s var(--cart-ease) infinite;
}

.cart-empty__ring--inner {
    inset: 14px;
    border-color: rgba(232, 185, 35, 0.28);
    animation: cartPulse 3.2s var(--cart-ease) infinite 0.4s;
}

.cart-empty__icon {
    position: absolute;
    inset: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(232, 185, 35, 0.18), rgba(201, 154, 26, 0.06));
    border: 1px solid rgba(232, 185, 35, 0.3);
    box-shadow: 0 10px 30px rgba(232, 185, 35, 0.15);
    font-size: 1.75rem;
    color: var(--cart-gold-2);
}

@keyframes cartPulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50% { transform: scale(1.06); opacity: 1; }
}

.cart-empty__pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--cart-line);
    color: var(--cart-muted);
    font-size: 0.75rem;
    font-weight: 700;
}

.cart-empty h2 {
    margin: 0 0 0.55rem;
    font-size: clamp(1.25rem, 3vw, 1.55rem);
    font-weight: 900;
    color: #fff;
}

.cart-empty p {
    margin: 0 auto 1.75rem;
    max-width: 420px;
    color: var(--cart-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

.cart-empty__steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    max-width: 560px;
    margin: 0 auto 1.75rem;
}

.cart-empty__step {
    padding: 0.85rem 0.65rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--cart-line);
    font-size: 0.78rem;
    color: #c8c8d0;
    line-height: 1.45;
}

.cart-empty__step-num {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.68rem;
    font-weight: 900;
    color: var(--cart-gold);
    letter-spacing: 0.5px;
}

.cart-empty__cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 50px;
    padding: 0 1.65rem;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 900;
    color: #0c0a04;
    background: linear-gradient(135deg, #f8df7a 0%, var(--cart-gold-2) 40%, var(--cart-gold) 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 10px 28px rgba(232, 185, 35, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
    overflow: hidden;
    transition: transform 0.25s var(--cart-ease), box-shadow 0.25s var(--cart-ease);
}

.cart-empty__cta:hover {
    transform: translateY(-2px);
    box-shadow:
        0 14px 36px rgba(232, 185, 35, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.cart-empty__cta-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
    transform: translateX(-120%);
    animation: cartShine 4s ease-in-out infinite;
}

@keyframes cartShine {
    0%, 70%, 100% { transform: translateX(-120%); }
    85% { transform: translateX(120%); }
}

/* ── Layout (filled cart) ── */
.cart-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1.35rem;
    align-items: start;
}

.cart-panel {
    background: rgba(20, 20, 25, 0.62);
    backdrop-filter: blur(18px);
    border: 1px solid var(--cart-line);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
    overflow: hidden;
}

.cart-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
}

.cart-panel__title {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.cart-panel__icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cart-gold-soft);
    border: 1px solid rgba(232, 185, 35, 0.22);
    color: var(--cart-gold);
    font-size: 1rem;
}

.cart-panel__title h2 {
    margin: 0;
    font-size: 1.05rem;
    color: #fff;
    font-weight: 800;
}

.cart-panel__title p {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    color: var(--cart-muted);
}

.cart-panel__clear {
    font-size: 0.78rem;
    color: var(--cart-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.cart-panel__clear:hover {
    color: #ff6b7a;
    background: rgba(255, 71, 87, 0.08);
    border-color: rgba(255, 71, 87, 0.2);
}

.cart-list {
    display: flex;
    flex-direction: column;
}

.cart-item {
    position: relative;
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.25s var(--cart-ease);
}

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

.cart-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.cart-item--owned {
    opacity: 0.82;
}

.cart-item__index {
    position: absolute;
    top: 1rem;
    inset-inline-start: 0.65rem;
    font-size: 0.62rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.18);
    letter-spacing: 0.5px;
}

.cart-item__media {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 16px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.cart-item__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s var(--cart-ease);
}

.cart-item:hover .cart-item__media img {
    transform: scale(1.05);
}

.cart-item__off {
    position: absolute;
    top: 6px;
    inset-inline-start: 6px;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 71, 87, 0.9);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 900;
}

.cart-item__body {
    flex: 1;
    min-width: 0;
    padding-top: 0.15rem;
}

.cart-item__top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.cart-item__info h3 {
    margin: 0 0 0.3rem;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

.cart-item__type {
    font-size: 0.76rem;
    color: var(--cart-muted);
}

.cart-item__price {
    text-align: end;
    flex-shrink: 0;
}

.cart-item__old {
    display: block;
    font-size: 0.76rem;
    color: #666;
    text-decoration: line-through;
}

.cart-item__final {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--cart-gold-2);
}

.cart-item__warn {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    margin-top: 0.7rem;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    background: rgba(255, 179, 71, 0.08);
    border: 1px solid rgba(255, 179, 71, 0.18);
    font-size: 0.78rem;
    color: #ffb347;
    line-height: 1.45;
}

.cart-item__warn i {
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.cart-item__actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.9rem;
}

.cart-item__buy {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.95rem;
    border-radius: 11px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #0c0a04;
    background: linear-gradient(135deg, #f8df7a, var(--cart-gold));
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
}

.cart-item__buy:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(232, 185, 35, 0.25);
}

.cart-item__remove {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    color: #ff6b7a;
    background: rgba(255, 71, 87, 0.08);
    border: 1px solid rgba(255, 71, 87, 0.2);
    transition: background 0.2s, transform 0.2s;
}

.cart-item__remove:hover {
    background: rgba(255, 71, 87, 0.15);
    transform: translateY(-1px);
}

.cart-item__remove--text {
    width: auto;
    height: auto;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    gap: 0.35rem;
}

/* ── Sidebar ── */
.cart-sidebar {
    position: sticky;
    top: calc(var(--header-h, 72px) + 1rem);
}

.cart-summary {
    background: rgba(20, 20, 25, 0.72);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(232, 185, 35, 0.12);
    border-radius: 24px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.32),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.cart-summary__head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--cart-line);
}

.cart-summary__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.12);
    border: 1px solid rgba(37, 99, 235, 0.22);
    color: #60a5fa;
}

.cart-summary__head h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

.cart-summary__rows {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.cart-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.86rem;
    color: var(--cart-muted);
}

.cart-summary__row strong {
    color: #e8e8ec;
    font-weight: 700;
}

.cart-summary__row--muted strong {
    font-size: 0.82rem;
    color: #9ca3af;
    direction: ltr;
    unicode-bidi: isolate;
}

.cart-summary__total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 0;
    margin-bottom: 0.25rem;
    border-top: 1px dashed rgba(232, 185, 35, 0.2);
    border-bottom: 1px dashed rgba(232, 185, 35, 0.2);
    font-size: 0.92rem;
    color: #fff;
}

.cart-summary__total strong {
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--cart-gold-2);
}

.cart-summary__alert {
    display: flex;
    gap: 0.65rem;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: rgba(255, 179, 71, 0.08);
    border: 1px solid rgba(255, 179, 71, 0.18);
    color: #ffb347;
    font-size: 0.82rem;
    line-height: 1.5;
}

.cart-summary__alert p {
    margin: 0;
}

.cart-checkout-btn {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 55%, #1e40af 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.28);
    transition: transform 0.25s var(--cart-ease), box-shadow 0.25s var(--cart-ease);
}

.cart-checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.38);
}

.cart-checkout-btn__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    font-size: 1.15rem;
    flex-shrink: 0;
}

.cart-checkout-btn__text {
    flex: 1;
    min-width: 0;
    text-align: start;
}

.cart-checkout-btn__text strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 800;
}

.cart-checkout-btn__text small {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.72rem;
    opacity: 0.85;
    line-height: 1.35;
}

.cart-checkout-btn__arrow {
    opacity: 0.7;
    font-size: 0.85rem;
}

.cart-summary__secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1rem;
    font-size: 0.74rem;
    color: #34d399;
    font-weight: 700;
}

.cart-user {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--cart-line);
}

.cart-user__avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    border: 2px solid rgba(232, 185, 35, 0.25);
    object-fit: cover;
}

.cart-user__label {
    display: block;
    font-size: 0.72rem;
    color: var(--cart-muted);
    margin-bottom: 0.15rem;
}

.cart-user__info strong {
    display: block;
    font-size: 0.88rem;
    color: #fff;
    margin-bottom: 0.2rem;
}

.cart-user__info code {
    font-size: 0.68rem;
    color: #888;
    direction: ltr;
    unicode-bidi: isolate;
}

/* Header cart icon (product cards) */
.header-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #e8e8e8;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}

.header-cart:hover {
    background: rgba(245, 184, 65, 0.12);
    color: #f5b841;
}

.header-cart__badge {
    position: absolute;
    top: -4px;
    inset-inline-end: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #f5b841;
    color: #0c0a04;
    font-size: 0.68rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.st-card__cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 14px;
    border-radius: 13px;
    font-size: 0.84rem;
    font-weight: 800;
    color: #f5b841;
    background: rgba(245, 184, 65, 0.1);
    border: 1px solid rgba(245, 184, 65, 0.35);
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.st-card__cart:hover {
    background: rgba(245, 184, 65, 0.18);
    transform: translateY(-1px);
}

.st-card__cart--in {
    flex: 1;
    min-width: 0;
    padding: 0 14px;
    cursor: default;
    pointer-events: none;
    user-select: none;
    color: #34d399;
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.28);
    transform: none;
}

.st-card__cart--in,
.st-card__cart--in * {
    cursor: default;
    user-select: none;
}

.st-card__cart--in:hover {
    background: rgba(52, 211, 153, 0.1);
    transform: none;
}

.st-card__cart-in {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    direction: ltr;
    width: 100%;
}

.st-card__cart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    color: #34d399;
    background: rgba(52, 211, 153, 0.16);
    border: 1px solid rgba(52, 211, 153, 0.38);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.08);
}

.st-card__cart-icon i {
    font-size: 0.62rem;
    line-height: 1;
}

.st-card__cart-text {
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 118px;
}

.st-card__cart--in .st-card__cart-text {
    max-width: none;
    white-space: normal;
    text-align: start;
    direction: rtl;
}

.st-card__cart:not(.st-card__cart--in) i {
    font-size: 0.95rem;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .cart-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-hero__stats {
        width: 100%;
    }

    .cart-stat {
        flex: 1;
    }

    .cart-layout {
        grid-template-columns: 1fr;
    }

    .cart-sidebar {
        position: static;
    }
}

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

    .cart-item {
        flex-direction: column;
        padding-top: 1.75rem;
    }

    .cart-item__index {
        top: 0.75rem;
    }

    .cart-item__media {
        width: 100%;
        height: 160px;
    }

    .cart-item__top {
        flex-direction: column;
    }

    .cart-item__price {
        text-align: start;
    }

    .cart-panel__head {
        flex-direction: column;
        align-items: stretch;
    }

    .cart-panel__clear {
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cart-empty__ring--outer,
    .cart-empty__ring--inner,
    .cart-empty__cta-shine {
        animation: none;
    }
}
