/* ============================================
   برزیا - استایل سبد خرید
   ============================================ */

:root {
    --gold: #FDD504;
    --gold2: #E6C004;
    --dark: #0C0C0C;
    --card: rgba(26, 26, 26, 0.85);
    --text: #F0F0F0;
    --border: rgba(253, 213, 4, 0.15);
    --r: 14px;
    --danger: #DC2626;
    --success: #10B981;
    --muted: rgba(255, 255, 255, 0.4);
}

body {
    background: var(--dark) !important;
}

.ast-container, .site-content, .content-area, #primary, .site-main {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background: var(--dark) !important;
}

.brz-cart-wrapper {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    direction: rtl;
    color: var(--text);
    font-family: 'Vazirmatn', 'Vazir', 'IRANSans', Tahoma, sans-serif;
    background: var(--dark);
}

/* Progress Steps */
.brz-cart-progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    padding: 18px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 0 25px rgba(253, 213, 4, 0.04);
}

.brz-cart-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.brz-cart-step-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

.brz-cart-progress-step span {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

.brz-cart-progress-step.active .brz-cart-step-icon {
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 18px rgba(253, 213, 4, 0.4);
    animation: pulse 2s infinite;
}

.brz-cart-progress-step.active span {
    color: var(--gold);
    font-weight: 600;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 18px rgba(253, 213, 4, 0.4); }
    50% { box-shadow: 0 0 30px rgba(253, 213, 4, 0.7); }
}

.brz-cart-progress-connector {
    width: 50px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 8px;
    border-radius: 1px;
}

/* Header */
.brz-cart-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding: 16px 22px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 0 20px rgba(253, 213, 4, 0.04);
}

.brz-cart-back-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    transition: all 0.3s;
}

.brz-cart-back-btn:hover {
    background: rgba(253, 213, 4, 0.1);
    color: var(--gold);
    transform: translateX(-3px);
}

.brz-cart-header-center {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gold);
    font-weight: 500;
    font-size: 16px;
}

.brz-cart-badge {
    font-size: 13px;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 14px;
    border-radius: 20px;
}

/* Empty */
.brz-cart-empty {
    text-align: center;
    padding: 60px 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    display: none;
}

.brz-cart-empty-icon {
    font-size: 56px;
    color: var(--gold);
    opacity: 0.5;
    margin-bottom: 16px;
}

.brz-cart-empty-text {
    font-size: 18px;
    color: var(--text);
    margin-bottom: 8px;
    font-weight: 600;
}

.brz-cart-empty-sub {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 24px;
}

.brz-cart-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

.brz-cart-empty-btn:hover {
    background: var(--gold);
    color: var(--dark);
    transform: translateY(-3px);
}

/* Loading */
.brz-cart-loading {
    text-align: center;
    padding: 60px;
    color: var(--muted);
}

.brz-cart-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(253, 213, 4, 0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Content */
.brz-cart-content {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.brz-cart-main {
    flex: 1;
    min-width: 0;
}

/* Table Header */
.brz-cart-table-header {
    display: flex;
    padding: 14px 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--gold);
    font-weight: 500;
}

.brz-cart-col-product { flex: 2.5; }
.brz-cart-col-price { flex: 1; text-align: center; }
.brz-cart-col-qty { flex: 1.2; text-align: center; }
.brz-cart-col-total { flex: 1; text-align: center; }

/* Cart Items */
.brz-cart-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.brz-cart-item {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 16px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.brz-cart-item:hover {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(253, 213, 4, 0.1);
}

.brz-cart-item.removing {
    animation: slideOut 0.3s ease forwards;
}

@keyframes slideOut {
    to {
        opacity: 0;
        transform: translateX(40px);
        max-height: 0;
        padding: 0 16px;
        margin: 0;
        overflow: hidden;
    }
}

.brz-cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.brz-cart-item-info {
    flex: 2.5;
    min-width: 0;
}

.brz-cart-item-name {
    font-size: 14px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brz-cart-item-name a {
    color: #fff;
    text-decoration: none;
    transition: 0.2s;
}

.brz-cart-item-name a:hover {
    color: var(--gold);
}

.brz-cart-item-price {
    flex: 1;
    text-align: center;
    font-size: 14px;
    color: var(--text);
}

.brz-price-discount {
    display: block;
    text-decoration: line-through;
    font-size: 11px;
    color: #666;
    margin-bottom: 3px;
}

/* Quantity */
.brz-cart-item-qty {
    flex: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.brz-qty-btn {
    width: 34px;
    height: 34px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--muted);
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brz-qty-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(253, 213, 4, 0.08);
}

.brz-qty-btn.brz-qty-minus {
    border-radius: 0 8px 8px 0;
}

.brz-qty-btn.brz-qty-plus {
    border-radius: 8px 0 0 8px;
}

.brz-qty-input {
    width: 46px;
    min-width: 46px;
    height: 34px;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-left: none;
    border-right: none;
    color: #fff !important;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    -moz-appearance: textfield;
    appearance: none;
    padding: 0 !important;
    line-height: 34px;
    outline: none;
}

.brz-qty-input::-webkit-outer-spin-button,
.brz-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.brz-cart-item-total {
    flex: 1;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--gold);
}

.brz-cart-item-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 80, 80, 0.08);
    border: 1px solid rgba(255, 80, 80, 0.25);
    color: #ff5050;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
    font-family: inherit;
    padding: 0;
    flex-shrink: 0;
    margin-right: auto;
}

.brz-cart-item-remove:hover {
    background: #ff5050;
    color: #fff;
    border-color: #ff5050;
    transform: scale(1.1);
}

/* Coupon */
.brz-cart-coupon-section {
    margin-top: 15px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.brz-cart-coupon-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    cursor: pointer;
    transition: 0.3s;
}

.brz-cart-coupon-toggle:hover {
    background: rgba(253, 213, 4, 0.05);
}

.brz-cart-coupon-toggle i:first-child {
    color: var(--gold);
}

.brz-cart-coupon-toggle span {
    flex: 1;
    font-size: 14px;
}

.brz-coupon-arrow {
    transition: transform 0.3s;
    font-size: 12px;
    color: var(--muted);
}

.brz-cart-coupon-section.active .brz-coupon-arrow {
    transform: rotate(180deg);
}

.brz-cart-coupon-form {
    padding: 0 20px 20px;
    display: none;
}

.brz-cart-coupon-input-group {
    display: flex;
    gap: 10px;
}

.brz-cart-coupon-input-group input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 15px;
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.brz-cart-coupon-input-group input:focus {
    border-color: var(--gold);
}

.brz-cart-coupon-input-group button {
    background: var(--gold);
    color: var(--dark);
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: 0.3s;
}

.brz-cart-coupon-input-group button:hover {
    background: var(--gold2);
}

.brz-coupon-message {
    margin-top: 10px;
    font-size: 13px;
}

/* Sidebar */
.brz-cart-sidebar {
    width: 350px;
    flex-shrink: 0;
}

.brz-cart-totals-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--r);
    padding: 25px;
    position: sticky;
    top: 100px;
    box-shadow: 0 0 25px rgba(253, 213, 4, 0.04);
}

.brz-cart-totals-title {
    font-size: 17px;
    color: var(--gold);
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(253, 213, 4, 0.2);
}

.brz-cart-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text);
}

.brz-cart-discount-row {
    color: var(--success);
}

.brz-cart-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 14px 0;
}

.brz-cart-final-row {
    font-size: 17px;
    font-weight: 700;
    color: var(--gold);
}

.brz-cart-final-row span:last-child {
    font-size: 19px;
}

.brz-cart-checkout-btn {
    display: flex;
    width: 100%;
    background: #FDD504;
    color: #0C0C0C;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    margin-top: 18px;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.brz-cart-checkout-btn:hover {
    background: #E6C004;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(253, 213, 4, 0.3);
    color: #0C0C0C;
    text-decoration: none;
}

.brz-cart-continue-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    color: var(--muted);
    text-decoration: none;
    transition: 0.2s;
}

.brz-cart-continue-link:hover {
    color: var(--gold);
}

/* Toast Notification */
.brz-cart-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1A1A1A;
    border: 1px solid var(--gold);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 13px;
    z-index: 9999;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: inherit;
    white-space: nowrap;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.brz-cart-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.brz-cart-toast-error {
    border-color: var(--danger);
}

.brz-cart-toast-error i {
    color: var(--danger);
}

/* Responsive */
@media (max-width: 900px) {
    .brz-cart-content {
        flex-direction: column;
    }
    .brz-cart-sidebar {
        width: 100%;
    }
    .brz-cart-totals-card {
        position: static;
    }
    .brz-cart-table-header {
        display: none;
    }
    .brz-cart-item {
        flex-wrap: wrap;
        padding: 20px 15px;
        gap: 12px;
    }
    .brz-cart-item-img {
        width: 60px;
        height: 60px;
    }
    .brz-cart-item-info {
        flex: 1 1 calc(100% - 80px);
    }
    .brz-cart-item-price {
        flex: none;
        text-align: right;
        font-size: 12px;
        margin-top: 8px;
        width: 100%;
    }
    .brz-cart-item-price::before {
        content: 'قیمت واحد: ';
        color: #666;
    }
    .brz-cart-item-qty {
        flex: none;
        margin-top: 8px;
    }
    .brz-cart-item-total {
        flex: 1;
        text-align: left;
        margin-top: 8px;
        font-size: 16px;
    }
    .brz-cart-item-total::before {
        content: 'جمع: ';
        color: #666;
        font-size: 12px;
        font-weight: 400;
    }
    .brz-cart-item-remove {
        position: absolute;
        top: 12px;
        left: 12px;
        margin-right: 0;
    }
    .brz-cart-progress-connector {
        width: 30px;
    }
}

@media (max-width: 480px) {
    .brz-cart-wrapper {
        padding: 10px;
        margin: 15px auto;
    }
    .brz-cart-progress-bar {
        padding: 12px 10px;
        gap: 5px;
    }
    .brz-cart-step-icon {
        width: 35px;
        height: 35px;
        font-size: 15px;
    }
    .brz-cart-progress-step span {
        font-size: 10px;
    }
    .brz-cart-progress-connector {
        width: 20px;
    }
    .brz-cart-header-row {
        flex-direction: column;
        gap: 10px;
        padding: 12px 15px;
    }
    .brz-cart-item {
        gap: 10px;
        padding: 12px;
    }
    .brz-cart-item-img {
        width: 50px;
        height: 50px;
    }
    .brz-cart-item-name {
        font-size: 12px;
    }
    .brz-cart-coupon-input-group {
        flex-direction: column;
    }
    .brz-cart-toast {
        white-space: normal;
        text-align: center;
        max-width: 90%;
    }
}