/* ============================================================
   CART PAGE — Delsa Shop
   (تمام استایل‌های اختصاصی صفحه سبد خرید)
   ============================================================ */

.cart-page {
    padding-top: 3rem;
    padding-bottom: 5rem;
    min-height: 70vh;
}

/* ===== Breadcrumb ===== */
.cart-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.cart-breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color 0.3s; }
.cart-breadcrumb a:hover { color: var(--primary-dark); }
.cart-breadcrumb i { font-size: 0.75rem; opacity: 0.5; }
.cart-breadcrumb span { color: var(--secondary); font-weight: 600; }
[data-theme="dark"] .cart-breadcrumb span { color: #eee; }

/* ===== Head ===== */
.cart-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.cart-title {
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--secondary);
    margin: 0 0 0.35rem;
}
[data-theme="dark"] .cart-title { color: #f2f2f2; }

.cart-sub { color: var(--text-muted); font-size: 0.9rem; margin: 0; }
.cart-sub strong { color: var(--primary-dark); }

.cart-continue {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 0.6rem 1.1rem;
    border: 1.5px solid rgba(201, 168, 154, 0.35);
    border-radius: 100px;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-continue:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateX(3px);
    box-shadow: 0 10px 25px -8px rgba(201, 168, 154, 0.6);
}

/* ===== Shipping Progress ===== */
.ship-bar {
    position: relative;
    background: linear-gradient(135deg, rgba(201, 168, 154, 0.1), rgba(201, 168, 154, 0.04));
    border: 1px solid rgba(201, 168, 154, 0.22);
    border-radius: 16px;
    padding: 1rem 1.25rem 1.35rem;
    display: grid;
    grid-template-columns: 44px 1fr;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 2rem;
    overflow: hidden;
}

.ship-bar__icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 1.15rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px -6px rgba(201, 168, 154, 0.55);
    flex-shrink: 0;
}

.ship-bar__text { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }
.ship-bar__text strong { color: var(--secondary); font-weight: 700; }
[data-theme="dark"] .ship-bar__text strong { color: #fff; }
.ship-hl { color: var(--primary-dark); font-weight: 700; }
[data-theme="dark"] .ship-hl { color: var(--primary); }
.ship-hl i { margin-left: 0.25rem; }

.ship-bar__track {
    grid-column: 1 / -1;
    height: 6px;
    background: rgba(201, 168, 154, 0.2);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
}
.ship-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 100px;
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
}
.ship-bar__fill::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: translateX(-100%);
    animation: shipShine 2.5s ease-in-out infinite;
}
@keyframes shipShine { to { transform: translateX(100%); } }

/* ===== Layout ===== */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2rem;
    align-items: flex-start;
}

/* ===== Cart Item ===== */
.ci {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    gap: 1.25rem;
    background: var(--surface);
    border-radius: 18px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(201, 168, 154, 0.12);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
}
.ci:hover {
    border-color: rgba(201, 168, 154, 0.3);
    box-shadow: 0 15px 40px -20px rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
}
.ci.removing { opacity: 0; transform: translateX(-30px) scale(0.96); }

.ci__img {
    display: block;
    position: relative;
    width: 110px; height: 130px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-soft);
    flex-shrink: 0;
}
.ci__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.ci__img:hover img { transform: scale(1.08); }

.ci__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    opacity: 0;
    transition: opacity 0.3s;
}
.ci__img:hover .ci__overlay { opacity: 1; }

.ci__info { display: flex; flex-direction: column; gap: 0.5rem; min-width: 0; }

.ci__name {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ci__name a { color: var(--secondary); text-decoration: none; transition: color 0.3s; }
[data-theme="dark"] .ci__name a { color: #eee; }
.ci__name a:hover { color: var(--primary-dark); }

.ci__unit { font-size: 0.8rem; color: var(--text-muted); }

.ci__bottom {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    padding-top: 0.5rem;
    flex-wrap: wrap;
}

/* Qty */
.qty {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.25rem;
    background: var(--bg-soft);
    border-radius: 100px;
    border: 1px solid var(--border);
}
.qty__btn {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--surface);
    border: none;
    color: var(--secondary);
    font-size: 0.85rem;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    -webkit-tap-highlight-color: transparent;
}
[data-theme="dark"] .qty__btn { background: #2a2a2a; color: #eee; }
.qty__btn:hover { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; transform: scale(1.1); }
.qty__btn:active { transform: scale(0.92); }

.qty__val {
    min-width: 32px;
    text-align: center;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--secondary);
    padding: 0 0.35rem;
    transition: transform 0.3s;
    display: inline-block;
}
[data-theme="dark"] .qty__val { color: #eee; }
.qty__val.bump { animation: qtyBump 0.35s cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes qtyBump {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.25); color: var(--primary-dark); }
    100% { transform: scale(1); }
}

.ci__remove {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 100px;
    transition: all 0.3s;
}
.ci__remove:hover { background: rgba(229, 57, 53, 0.1); color: #e53935; }
.ci__remove i { font-size: 0.95rem; }

.ci__total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    text-align: left;
    flex-shrink: 0;
}
.ci__line-total {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--secondary);
    letter-spacing: -0.02em;
    white-space: nowrap;
}
[data-theme="dark"] .ci__line-total { color: #fff; }

/* ===== Summary ===== */
.cart-summary {
    background: var(--surface);
    border-radius: 20px;
    padding: 1.75rem 1.5rem 1.5rem;
    border: 1px solid rgba(201, 168, 154, 0.15);
    box-shadow: 0 20px 45px -25px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 100px;
    overflow: hidden;
    isolation: isolate;
}
.cart-summary::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 168, 154, 0.2), transparent 70%);
    filter: blur(40px);
    z-index: -1;
}

.cart-summary__title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--secondary);
    margin: 0 0 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .cart-summary__title { color: #f2f2f2; }
.cart-summary__title i {
    width: 32px; height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
}

.cs-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.9rem;
    padding: 0.65rem 0;
    color: var(--text-muted);
}
.cs-row strong { color: var(--secondary); font-weight: 700; }
[data-theme="dark"] .cs-row strong { color: #eee; }

.cs-discount { color: #e53935 !important; }
.cs-free { color: #34c759; font-weight: 700; }

.cs-divider { height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); margin: 0.5rem 0; }

.cs-row--total {
    padding-top: 0.85rem;
    padding-bottom: 1.1rem;
    font-size: 1rem;
    color: var(--secondary);
    font-weight: 700;
}
[data-theme="dark"] .cs-row--total { color: #f2f2f2; }
.cs-row--total strong {
    font-size: 1.25rem;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
}
[data-theme="dark"] .cs-row--total strong { color: var(--primary); }

.cs-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: 14px;
    border: none;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    box-shadow:
        0 12px 30px -10px rgba(201, 168, 154, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    overflow: hidden;
    position: relative;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.cs-checkout::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
    transform: translateX(-150%) skewX(-15deg);
    transition: transform 0.7s;
}
.cs-checkout:hover {
    transform: translateY(-3px);
    box-shadow:
        0 18px 40px -12px rgba(201, 168, 154, 0.9),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
    color: #fff;
}
.cs-checkout:hover::before { transform: translateX(150%) skewX(-15deg); }
.cs-checkout i { font-size: 1.1rem; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.cs-checkout:hover i { transform: translateX(-5px); }

.cs-trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--border);
}
.cs-trust__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    color: var(--text-muted);
    text-align: center;
    padding: 0.5rem 0.25rem;
    border-radius: 10px;
    transition: all 0.3s;
}
.cs-trust__item i {
    font-size: 1.15rem;
    color: var(--primary-dark);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cs-trust__item:hover { background: rgba(201, 168, 154, 0.06); }
.cs-trust__item:hover i { transform: scale(1.15) rotate(-6deg); }

/* ===== Empty ===== */
.cart-empty {
    text-align: center;
    padding: 4rem 1rem;
    max-width: 520px;
    margin: 2rem auto;
}
.cart-empty__illu {
    position: relative;
    width: 140px; height: 140px;
    margin: 0 auto 2rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 3.5rem;
    color: var(--primary);
}
.cart-empty__circle {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 168, 154, 0.28), transparent 70%);
    filter: blur(20px);
    animation: emptyPulse 3s ease-in-out infinite;
}
@keyframes emptyPulse {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50%      { transform: scale(1.15); opacity: 1; }
}
.cart-empty h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}
[data-theme="dark"] .cart-empty h2 { color: #f2f2f2; }
.cart-empty p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 2rem; line-height: 1.9; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 991.98px) {
    .cart-layout { grid-template-columns: 1fr; }
    .cart-summary { position: static; order: -1; }
}

@media (max-width: 575.98px) {
    .cart-page { padding-top: 1.5rem; padding-bottom: 3rem; }

    .ci { grid-template-columns: 90px 1fr; padding: 1rem; gap: 0.85rem; }
    .ci__img { width: 90px; height: 110px; border-radius: 12px; }
    .ci__total {
        grid-column: 1 / -1;
        align-items: flex-start;
        padding-top: 0.75rem;
        border-top: 1px dashed var(--border);
        flex-direction: row;
        justify-content: space-between;
    }
    .ci__name { font-size: 0.92rem; }
    .ci__unit { font-size: 0.72rem; }
    .ci__line-total { font-size: 0.95rem; }

    .qty__btn { width: 28px; height: 28px; font-size: 0.75rem; }
    .qty__val { min-width: 26px; font-size: 0.85rem; }

    .ci__remove span { display: none; }
    .ci__remove { padding: 0.4rem; }

    .cart-summary { padding: 1.25rem 1.1rem; }
    .cart-summary__title { font-size: 0.95rem; }
    .cs-row--total strong { font-size: 1.1rem; }

    .ship-bar { grid-template-columns: 36px 1fr; padding: 0.85rem 1rem 1.15rem; }
    .ship-bar__icon { width: 36px; height: 36px; font-size: 1rem; border-radius: 10px; }
    .ship-bar__text { font-size: 0.82rem; }

    .cart-head { flex-direction: column; align-items: flex-start; }
    .cart-continue { width: 100%; justify-content: center; }
}