
.cart-page-modern {
    padding: 1rem;
    background: #f4f5f7;
    color: #333;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
}


.cart-notice-item.error {
    background-color: #fde8e8;
    border: 1px solid #f8c5c5;
    color: #b00020;
    padding: 20px;
    border-radius: 6px;
}
.cart-notice-item.success {
    background-color: #e6f5ea;
    border: 1px solid #8fd19e;
    color: #238636;
    padding: 20px;
    border-radius: 6px;
}

#cart-notice {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
    z-index: 9999;
}
.cart-notice-item {
    background: #27ae60;
    color: #fff;
    padding: 0.9rem 1.8rem;
    border-radius: 20px;
    font-size: 1rem;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    margin-bottom: 12px;
}





:root {
    /* رنگ صورتی لوکس برای فروشگاه لباس زنانه یا آبی شرکتی */
    --primary-gradient: linear-gradient(135deg, #ff7eb3 0%, #ff758c 100%);
    --bg-soft: #f8fafc;
    --text-dark: #1e293b;
    --text-light: #94a3b8;
    --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.stepper-wrapper {
    width: 100%;
    margin: 0 auto 0 auto;
    padding: 15px 20px;
    direction: rtl;
    background:#f4f5f7;
}

.modern-stepper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
}

/* خط پیشرفت سراسری پشت دایره‌ها */
.progress-track {
    position: absolute;
    top: 25px; /* مرکز دایره */
    left: 0;
    right: 0;
    height: 4px;
    background: #e2e8f0;
    border-radius: 10px;
    z-index: 1;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 10px;
    transition: width 0.8s ease-in-out;
    box-shadow: 0 2px 10px rgba(255, 117, 140, 0.3);
}

.step-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.step-icon {
    width: 50px;
    height: 50px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 18px; /* گوشه‌های گرد مدرن (Squircle) */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-light);
    transition: var(--transition);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.step-content {
    margin-top: 15px;
    text-align: center;
}

.step-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-light);
    transition: var(--transition);
}

/* وضعیت Done (انجام شده) */
.step-item.done .step-icon {
    background: var(--primary-gradient);
    border-color: transparent;
    color: white;
    transform: translateY(-5px);
}

.step-item.done .step-check {
    display: block;
    width: 24px;
    fill: white;
}

.step-item.done .step-number {
    display: none;
}

.step-item.done .step-title {
    color: var(--text-dark);
}

/* وضعیت Active (در حال انجام) */
.step-item.active .step-icon {
    border-color: #ff758c;
    color: #ff758c;
    transform: scale(1.15);
    background: white;
    box-shadow: 0 20px 25px -5px rgba(255, 117, 140, 0.2);
}

.step-item.active .step-title {
    color: #ff758c;
    font-weight: 800;
}

.step-check {
    display: none;
}

/* افکت‌های انیمیشن */
.step-item:hover .step-icon {
    transform: translateY(-3px);
}

@media (max-width: 1024px) {
    .stepper-wrapper {
        width: 100%;
        max-width: 100%;
        margin: 18px auto 0 auto;
        padding: 10px 10px;
        display: flex;
        justify-content: center;
        box-sizing: border-box;
    }

    .modern-stepper {
        width: 100%;
        max-width: 680px;
        margin: 0 auto;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        gap: 6px;
        position: relative;
    }

    .progress-track {
        top: 19px;     /* نصف ارتفاع آیکون 38px */
        left: 19px;    /* نصف عرض آیکون */
        right: 19px;   /* نصف عرض آیکون */
        height: 3px;
    }

    .step-item {
        flex: 1 1 0;
        min-width: 0;
        text-align: center;
    }

    .step-icon {
        width: 38px;
        height: 38px;
        border-radius: 11px;
        font-size: 12px;
    }

    .step-content {
        margin-top: 7px;
        width: 100%;
    }

    .step-title {
        font-size: 10.5px;
        line-height: 1.35;
        white-space: normal;
        word-break: break-word;
    }

    .step-item.active .step-icon {
        transform: scale(1.05);
    }

    .step-item.done .step-icon,
    .step-item:hover .step-icon {
        transform: none;
    }

    .step-item.done .step-check {
        width: 16px;
        height: 16px;
    }
}




.cart-main-wrapper {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.cart-left {
    flex: 1 1 65%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-card-responsive {
    display: flex;
    gap: 12px;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    align-items: center;
    height: 80px;
    margin-bottom: 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}


.thumb-col {
    width: 15%;
    height: 100%;
    background: #fff;
}
.thumb-col img {
    width: 100%;
    height: 100%;
     object-fit: contain;
    aspect-ratio: 1/1;
    background: #fff;
    border-radius: 6px;
}

.info-col {
    width: 80%;
    display: flex;
    gap: 8px;
    flex-direction: column;
    justify-content: space-between;
    font-size: 13px;
}
.line-1 {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    gap: 8px !important;
}

.product-name {
    display: flex;
    align-items: center;
    gap: 4px;
}

.product-variation {
    background-color: rgba(39, 174, 96, 0.2);
    color: #27ae60;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}


.line-1 .product-price {
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important; 
    text-align: left !important;
}

.price-subtotal-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1px 10px;
    align-items: center;
}

.price-subtotal-wrapper .product-subtotal {
    color: #b00020; /* رنگ قرمز برای جمع جز */
}

.line-2 {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    width: 100%;
    font-size: 12px;
    gap: 8px;
}

.product-sku {
margin: 0 !important;
    padding: 0 !important;
    text-align: left !important;}

.product-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-quantity {
    display: flex;
    align-items: center;
    gap: 5px;
}
.product-quantity input {
    width: 25px;
    text-align: center;
    font-size: 12px;
    padding: 2px;
    -moz-appearance: textfield;
}
.product-quantity input::-webkit-outer-spin-button,
.product-quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.qty-btn {
    background: #eee;
    border: none;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
}
.qty-btn:hover {
    background: #ddd;
}

.product-remove {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 28px;
    height: 28px;
}

.product-remove svg path {
    stroke: #e74c3c;
    transition: 0.2s;
}

.cart-update-row {
  display: flex;
  justify-content: center; 
  margin-top: 8px; 
}
.update-cart-btn {
    background: #EF394EE3;
    color: #fff;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease, opacity 0.3s ease;
}  

.update-cart-btn:hover:not(:disabled) {
    background: #d2324ccf;
}

.update-cart-btn:disabled {
    background: #607d8b;
    color: #eee;
    cursor: not-allowed;
    opacity: 0.7;
     display: none;
    pointer-events: none;
    transition: background 0.3s ease, opacity 0.3s ease;
}


.cart-summary {
    flex: 1 1 30%;
    background: #ffffffcc;
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.2s, box-shadow 0.2s;

    position: sticky;
    top: 150px;
    align-self: flex-start;
    height: fit-content;
    max-height: calc(100vh - 40px); 
    overflow-y: auto;
    z-index: 10;
}

.cart-summary h2 {
    font-size: 18px;
    margin-bottom: 12px;
    font-weight: 700;
    color: #2c3e50;
}

.cart-summary p {
    font-size: 14px;
    margin: 6px 0;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-summary .order-total {
    font-weight: 700;
    font-size: 18px;
    color: #27ae60;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.checkout-button {
    display: inline-block;
    background: #27ae60;
    color: #fff;
    padding: 10px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: 0.2s;
}

.checkout-button:hover {
    background: #1e8449;
}


@media (max-width:1024px){
    .cart-main-wrapper{
        flex-direction: column;
        gap: 10px;
    }
    .cart-left {
        padding-bottom: 100px;
        box-sizing: border-box;
                width: 100%;
    }
        .update-cart-btn {
        position: fixed;
        bottom: 167px;
        width: 90%;
            left: 50%; 
    transform: translateX(-50%);
        padding: 6px 0;
        background-color: #EF394EE3;
        font-weight: 600;
        text-align: center;
        border-radius: 6px;
        z-index: 1000;
    }
     .product-sku {font-size:10px;}
    .product-variation {font-size: 9px !important;  }
    .cart-left {
        padding-bottom: 100px;
        box-sizing: border-box;
    }
    .product-name {
        font-size: 10px !important;
    }
    .product-price {
        font-size: 11px !important;
    }
    
    .cart-summary {
        position: fixed;
        bottom: 0;
        left: 0;
        top: auto;
        width: 100%;
        background: #fff;
        padding: 8px 10px;
        border-radius: 10px 10px 0 0;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.12);
        display: flex;
        flex-direction: column;
        gap: 4px;
        box-sizing: border-box;
        z-index: 999;
        max-height: 32vh;
        overflow-y: auto;
    }

    .cart-summary h2 {
        display: none;
    }

    .cart-summary p {
        font-size: 13px;
        margin: 1px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .cart-summary .order-total {
        font-weight: 600;
        font-size: 14px;
        padding: 5px 6px;
        border: 1px solid #e74c3c;
        border-radius: 6px;
        background: #fff5f5;
        display: flex;
        justify-content: space-between;
    }

    .checkout-button {
        width: 100%;
        text-align: center;
        padding: 8px 0;
        font-size: 13px;
        border-radius: 6px;
        background: #27ae60;
        color: #fff;
        text-decoration: none;
        font-weight: 600;
        transition: 0.2s;
    }

    .checkout-button:hover {
        background: #1e8449;
    }
}


.cart-stock-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;}
.cart-stock-modal.show {
    opacity: 1;
    visibility: visible;}
.cart-stock-modal-content {
    background: #fff;
    padding: 28px 24px;
    border-radius: 16px;
    max-width: 480px;
    width: 90%;
    max-height: 75vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    text-align: center;
    transform: translateY(-20px) scale(0.95);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;}
.cart-stock-modal.show .cart-stock-modal-content {transform: translateY(0) scale(1);opacity: 1;}
.cart-stock-modal-content h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #b00020;
    font-weight: 600;}
.cart-stock-modal-content p {
    font-size: 15px;
    color: #7a0d0d;
    background-color: #fde8e8;
    border: 1px solid #f8c5c5;
    padding: 12px 14px;
    border-radius: 8px;
    margin: 10px 0;
    line-height: 1.6;
    text-align: center;
    animation: fadeInMessage 0.4s ease;}
.acknowledge-btn {
    margin-top: 20px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #ff7575, #ff4b4b);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(255, 0, 0, 0.3);
    transition: all 0.3s ease;}
.acknowledge-btn:hover {
    background: linear-gradient(135deg, #ff5252, #ff3030);
    transform: scale(1.05);}
.cart-stock-modal-content::-webkit-scrollbar {
    width: 8px;}
.cart-stock-modal-content::-webkit-scrollbar-thumb {
    background-color: rgba(255, 0, 0, 0.3);
    border-radius: 4px;}
.cart-stock-modal-content::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 0, 0, 0.5);}
@keyframes fadeInMessage {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }}
@media (max-width: 768px) {
    .cart-stock-modal-content { padding: 22px 18px; }
    .cart-stock-modal-content h3 {font-size: 18px;}
    .cart-stock-modal-content p {font-size: 14px;}
    .acknowledge-btn {padding: 10px 22px;font-size: 14px;}}
@media (max-width: 480px) {
    .cart-stock-modal-content {padding: 18px 14px;border-radius: 12px;}
    .cart-stock-modal-content h3 {font-size: 16px;}
    .cart-stock-modal-content p {font-size: 13px;}
    .acknowledge-btn {padding: 9px 18px;font-size: 13px;}}
    


p:has(#cart-weight) {
    display: none;
}
