/* Cart Page Template Styles - Advanced Minimal Design */

/* ============================================
   Cart Page Container
   ============================================ */
.cart-page {
    width: 100%;
    min-height: 100vh;
    background-color: #f8f8f8;
    font-family: 'IRANSans', sans-serif;
}

/* ============================================
   Cart Hero Section
   ============================================ */
.cart-hero {
    width: 100%;
    background-color: #000000;
    padding: 50px 0;
}

.cart-hero__container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    text-align: center;
}

/* Breadcrumb */
.cart-hero__breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.cart-hero__breadcrumb-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s ease;
}

.cart-hero__breadcrumb-link:hover {
    color: #ffffff;
}

.cart-hero__breadcrumb-separator {
    color: rgba(255, 255, 255, 0.3);
    display: flex;
    transform: rotate(180deg);
}

.cart-hero__breadcrumb-current {
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
}

/* Hero Title */
.cart-hero__title {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 30px 0;
    letter-spacing: 1px;
}

/* ============================================
   Cart Steps
   ============================================ */
.cart-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    max-width: 500px;
    margin: 0 auto;
}

.cart-steps__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.cart-steps__number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.cart-steps__item--active .cart-steps__number {
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.cart-steps__item--completed .cart-steps__number {
    background-color: #22c55e;
    color: #ffffff;
    border-color: #22c55e;
}

.cart-steps__label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    white-space: nowrap;
}

.cart-steps__item--active .cart-steps__label {
    color: #ffffff;
}

.cart-steps__line {
    width: 60px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.2);
    margin: 0 15px;
    margin-bottom: 24px;
}

.cart-steps__item--completed + .cart-steps__line {
    background-color: #22c55e;
}

/* ============================================
   Cart Content Section
   ============================================ */
.cart-content {
    width: 100%;
    padding: 50px 0 80px;
}

.cart-content__container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ============================================
   Empty Cart
   ============================================ */
.cart-empty {
    text-align: center;
    padding: 80px 30px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.cart-empty__icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
    border-radius: 50%;
    color: #999999;
}

.cart-empty__title {
    font-size: 28px;
    font-weight: 700;
    color: #000000;
    margin: 0 0 15px 0;
}

.cart-empty__text {
    font-size: 16px;
    color: #666666;
    margin: 0 0 30px 0;
    line-height: 1.7;
}

.cart-empty__button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    background-color: #000000;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cart-empty__button:hover {
    background-color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.cart-empty__button svg {
    transform: rotate(180deg);
}

/* ============================================
   Cart Wrapper (Items + Summary)
   ============================================ */
.cart-wrapper {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

/* ============================================
   Cart Items
   ============================================ */
.cart-items {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.cart-items__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 30px;
    border-bottom: 1px solid #f0f0f0;
}

.cart-items__title {
    font-size: 20px;
    font-weight: 700;
    color: #000000;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-items__count {
    font-size: 16px;
    font-weight: 400;
    color: #666666;
}

.cart-items__continue {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666666;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.cart-items__continue:hover {
    color: #000000;
}

.cart-items__continue svg {
    transform: rotate(180deg);
}

/* Cart Items List */
.cart-items__list {
    padding: 0;
}

/* ============================================
   Cart Item
   ============================================ */
.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr 120px 120px;
    gap: 20px;
    padding: 25px 30px;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    transition: background-color 0.3s ease;
}

.cart-item:hover {
    background-color: #fafafa;
}

.cart-item:last-child {
    border-bottom: none;
}

/* Cart Item Image */
.cart-item__image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.cart-item__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item__image a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Cart Item Details */
.cart-item__details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-item__info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cart-item__name {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin: 0;
    line-height: 1.4;
}

.cart-item__name a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.cart-item__name a:hover {
    color: #666666;
}

.cart-item__sku {
    font-size: 12px;
    color: #999999;
}

.cart-item__price-mobile {
    display: none;
    font-size: 14px;
    font-weight: 600;
    color: #000000;
}

/* Variation Data */
.cart-item .variation {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.cart-item .variation dt,
.cart-item .variation dd {
    font-size: 13px;
    margin: 0;
}

.cart-item .variation dt {
    color: #666666;
}

.cart-item .variation dd {
    color: #000000;
    font-weight: 500;
}

.cart-item .variation dd p {
    margin: 0;
}

/* Cart Item Actions */
.cart-item__actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Quantity Control */
.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff;
}

.quantity-control__btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: #666666;
    transition: all 0.2s ease;
}

.quantity-control__btn:hover {
    background-color: #f5f5f5;
    color: #000000;
}

.quantity-control__input {
    width: 50px;
    height: 36px;
    border: none;
    border-right: 1px solid #e0e0e0;
    border-left: 1px solid #e0e0e0;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    color: #000000;
    -moz-appearance: textfield;
}

.quantity-control__input::-webkit-outer-spin-button,
.quantity-control__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Remove Button */
.cart-item__remove {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff5f5;
    color: #dc2626;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cart-item__remove:hover {
    background-color: #dc2626;
    color: #ffffff;
}

/* Cart Item Price */
.cart-item__price,
.cart-item__subtotal {
    text-align: center;
}

.cart-item__price-label,
.cart-item__subtotal-label {
    display: block;
    font-size: 11px;
    color: #999999;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cart-item__price-value,
.cart-item__subtotal-value {
    font-size: 15px;
    font-weight: 700;
    color: #000000;
}

.cart-item__subtotal-value {
    color: #000000;
}

/* ============================================
   Cart Actions
   ============================================ */
.cart-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 30px;
    background-color: #fafafa;
    border-top: 1px solid #f0f0f0;
}

/* Coupon Form */
.coupon-form {
    display: flex;
    gap: 10px;
}

.coupon-form__input {
    width: 200px;
    height: 44px;
    padding: 0 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background-color: #ffffff;
    transition: border-color 0.3s ease;
}

.coupon-form__input:focus {
    outline: none;
    border-color: #000000;
}

.coupon-form__input::placeholder {
    color: #999999;
}

.coupon-form__button {
    height: 44px;
    padding: 0 25px;
    background-color: #000000;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.coupon-form__button:hover {
    background-color: #1a1a1a;
}

/* Update Cart Button */
.cart-actions__update {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 25px;
    background-color: transparent;
    color: #000000;
    border: 1px solid #000000;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-actions__update:hover {
    background-color: #000000;
    color: #ffffff;
}

/* ============================================
   Cart Summary
   ============================================ */
.cart-summary {
    position: sticky;
    top: 100px;
}

.cart-summary__card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.cart-summary__title {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    margin: 0;
    padding: 25px 25px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.cart-summary__rows {
    padding: 20px 25px;
}

.cart-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.cart-summary__row:last-child {
    border-bottom: none;
}

.cart-summary__label {
    font-size: 14px;
    color: #666666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-summary__value {
    font-size: 14px;
    font-weight: 600;
    color: #000000;
}

.cart-summary__value--discount {
    color: #22c55e;
}

.cart-summary__coupon-code {
    background-color: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.cart-summary__coupon-remove {
    color: #dc2626;
    display: flex;
    align-items: center;
}

.cart-summary__coupon-remove:hover {
    color: #b91c1c;
}

/* Total */
.cart-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background-color: #000000;
    color: #ffffff;
}

.cart-summary__total-label {
    font-size: 16px;
    font-weight: 600;
}

.cart-summary__total-value {
    font-size: 20px;
    font-weight: 700;
}

/* Checkout Button */
.cart-summary__checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: calc(100% - 50px);
    margin: 25px;
    padding: 16px 30px;
    background-color: #000000;
    color: #ffffff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cart-summary__checkout:hover {
    background-color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.cart-summary__checkout svg {
    transform: rotate(180deg);
}

/* Trust Badges */
.cart-summary__trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 20px 25px;
    border-top: 1px solid #f0f0f0;
}

.cart-summary__trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666666;
}

.cart-summary__trust-item svg {
    color: #22c55e;
}

/* ============================================
   Responsive Styles
   ============================================ */

/* Large Devices (Desktops, less than 1200px) */
@media (max-width: 1199.98px) {
    .cart-wrapper {
        grid-template-columns: 1fr 340px;
    }
}

/* Medium Devices (Tablets, less than 992px) */
@media (max-width: 991.98px) {
    .cart-wrapper {
        grid-template-columns: 1fr;
    }
    
    .cart-summary {
        position: static;
    }
    
    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 15px;
    }
    
    .cart-item__price,
    .cart-item__subtotal {
        display: none;
    }
    
    .cart-item__price-mobile {
        display: block;
    }
    
    .cart-steps__line {
        width: 40px;
        margin: 0 10px;
    }
}

/* Small Devices (Landscape Phones, less than 768px) */
@media (max-width: 767.98px) {
    .cart-hero {
        padding: 40px 0;
    }
    
    .cart-hero__container {
        padding: 0 20px;
    }
    
    .cart-hero__title {
        font-size: 28px;
    }
    
    .cart-steps__number {
        width: 35px;
        height: 35px;
        font-size: 13px;
    }
    
    .cart-steps__label {
        font-size: 11px;
    }
    
    .cart-steps__line {
        width: 30px;
        margin: 0 8px;
        margin-bottom: 20px;
    }
    
    .cart-content {
        padding: 30px 0 60px;
    }
    
    .cart-content__container {
        padding: 0 15px;
    }
    
    .cart-items__header {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .cart-item {
        padding: 20px;
        grid-template-columns: 70px 1fr;
        gap: 12px;
    }
    
    .cart-item__image {
        width: 70px;
        height: 70px;
    }
    
    .cart-item__name {
        font-size: 14px;
    }
    
    .cart-item__actions {
        flex-wrap: wrap;
    }
    
    .cart-actions {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .coupon-form {
        width: 100%;
    }
    
    .coupon-form__input {
        flex: 1;
        width: auto;
    }
    
    .cart-actions__update {
        width: 100%;
        justify-content: center;
    }
    
    .cart-summary__card {
        border-radius: 8px;
    }
    
    .cart-summary__checkout {
        width: calc(100% - 40px);
        margin: 20px;
    }
}

/* Extra Small Devices (Portrait Phones, less than 576px) */
@media (max-width: 575.98px) {
    .cart-hero__title {
        font-size: 24px;
    }
    
    .cart-steps {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .cart-steps__line {
        display: none;
    }
    
    .cart-steps__item {
        flex: 1;
        min-width: 80px;
    }
    
    .cart-empty {
        padding: 50px 20px;
    }
    
    .cart-empty__title {
        font-size: 22px;
    }
    
    .cart-empty__text {
        font-size: 14px;
    }
    
    .cart-item__details {
        gap: 10px;
    }
    
    .quantity-control__btn {
        width: 32px;
        height: 32px;
    }
    
    .quantity-control__input {
        width: 40px;
        height: 32px;
        font-size: 13px;
    }
    
    .cart-item__remove {
        width: 32px;
        height: 32px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .cart-empty__button,
    .cart-item__remove,
    .cart-summary__checkout,
    .coupon-form__button,
    .cart-actions__update {
        transition: none;
    }
}
