/* =============================================
   CART PAGE - NEW UI (BEM)
   Scoped under #page-cart for specificity
   ============================================= */

/* --- Layout --- */
#page-cart .cart-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 0;
}



#page-cart .cart-page__title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #111827;
    line-height: 1.3;
}

#page-cart .cart-page__desc {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 28px;
}

#page-cart .cart-page__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

#page-cart .cart-page__grid.full {
    grid-template-columns: 1fr;
}

@media (min-width: 992px) {
    #page-cart .cart-page__grid {
        grid-template-columns: 8fr 4fr;
        gap: 32px;
        align-items: start;
    }
}

#page-cart .cart-page__left {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* --- Section Card --- */
#page-cart .cart-section {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    padding: 24px;
}

#page-cart .cart-section__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

#page-cart .cart-section__badge {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: var(--mainColor);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
}

#page-cart .cart-section__title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0;
    padding: 0;
    border: none;
    line-height: 1.3;
}

/* --- Cart Items List --- */
#page-cart .cart-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* --- Single Cart Item --- */
#page-cart .cart-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
    position: relative;
}

#page-cart .cart-item:first-child {
    padding-top: 0;
}

#page-cart .cart-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

#page-cart .cart-item__img {
    width: 96px;
    height: 96px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f3f4f6;
    border: 1px solid #f3f4f6;
}

#page-cart .cart-item__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* justify-content: space-between; */
    min-width: 0;
    gap: 11px 0px;
}

#page-cart .cart-item__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

#page-cart .cart-item__name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

#page-cart .cart-item__variant {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
}

#page-cart .cart-item__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 7px;
}

/* Quantity control */
#page-cart .cart-item__qty {
    display: flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

#page-cart .cart-item__qty-btn {
    width: 34px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border: none;
    color: #4b5563;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.15s;
    padding: 0;
    line-height: 1;
}

#page-cart .cart-item__qty-btn:hover {
    background: #f3f4f6;
}

#page-cart .cart-item__qty-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#page-cart .cart-item__qty-input {
    width: 44px;
    height: 32px;
    border: none;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    background: #fff;
    border-radius: 0;
    padding: 0;
    -moz-appearance: textfield;
}

#page-cart .cart-item__qty-input::-webkit-outer-spin-button,
#page-cart .cart-item__qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#page-cart .cart-item__qty-input:focus {
    outline: none;
    box-shadow: none;
}

/* Price block at right */
#page-cart .cart-item__price-block {
    text-align: right;
}

#page-cart .cart-item__price {
    font-size: 17px;
    font-weight: 700;
    color: var(--mainColor);
    display: block;
}

#page-cart .cart-item__price--old {
    font-size: 12px;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 400;
    display: block;
}

/* Remove button */
#page-cart .cart-item__remove {
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s;
    flex-shrink: 0;
}

#page-cart .cart-item__remove:hover {
    color: #ef4444;
}

#page-cart .cart-item__remove svg {
    width: 20px;
    height: 20px;
}

/* --- Back link --- */
#page-cart .cart-section__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--mainColor);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

#page-cart .cart-section__back:hover {
    opacity: 0.8;
}

#page-cart .cart-section__back svg {
    width: 16px;
    height: 16px;
}

/* --- Checkout bar (clear + total) --- */
#page-cart .cart-checkout {
    background: #fff;
    padding: 14px 0 0;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border-top: 1px solid #f3f4f6;
}

#page-cart .cart-checkout__clear-btn {
    background: #ef4444;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

#page-cart .cart-checkout__clear-btn:hover {
    background: #dc2626;
}

#page-cart .cart-checkout__summary {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

#page-cart .cart-checkout__summary-text {
    font-size: 14px;
    color: #374151;
}

#page-cart .cart-checkout__summary-amount {
    font-size: 18px;
    font-weight: 700;
    color: var(--mainColor);
}

/* --- Shipping / Buyer Info Form --- */
#page-cart .cart-form__row {
    display: flex;
    gap: 16px;
    margin-bottom: 0;
}

#page-cart .cart-form__group {
    margin-bottom: 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#page-cart .cart-form__label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    margin-bottom: 0;
}

#page-cart .cart-form__label .required {
    color: #ef4444;
}

#page-cart .cart-form__input,
#page-cart .cart-form__textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    background: #fff;
    height: 44px;
    box-sizing: border-box;
    color: #111827;
}

#page-cart .cart-form__textarea {
    min-height: 70px;
    resize: vertical;
    height: auto;
}

#page-cart .cart-form__input:focus,
#page-cart .cart-form__textarea:focus {
    outline: none;
    border-color: var(--mainColor);
    box-shadow: 0 0 0 2px rgba(27, 96, 96, 0.12);
}

/* --- Right Column --- */
#page-cart .cart-page__right {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* --- Order Summary --- */
#page-cart .cart-summary {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

@media (min-width: 992px) {
    #page-cart .cart-summary {
        position: sticky;
        top: 96px;
    }
}

#page-cart .cart-summary__title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #111827;
    padding: 0;
    border: none;
    line-height: 1.3;
}

#page-cart .cart-summary__rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
}

#page-cart .cart-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#page-cart .cart-summary__label {
    color: #6b7280;
}

#page-cart .cart-summary__value {
    font-weight: 500;
    color: #1f2937;
}

#page-cart .cart-summary__value--free {
    color: #16a34a;
    font-weight: 500;
}

/* Promo code */
#page-cart .cart-summary__promo {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

#page-cart .cart-summary__promo-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

#page-cart .cart-summary__promo-row {
    display: flex;
    gap: 8px;
}

#page-cart .cart-summary__promo-input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    background: #fff;
    height: auto;
}

#page-cart .cart-summary__promo-input:focus {
    outline: none;
    border-color: var(--mainColor);
}

#page-cart .cart-summary__promo-btn {
    background: #111827;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

#page-cart .cart-summary__promo-btn:hover {
    background: #000;
}

/* Total */
#page-cart .cart-summary__total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
    margin-top: 16px;
    margin-bottom: 4px;
}

#page-cart .cart-summary__total-label {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
}

#page-cart .cart-summary__total-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--mainColor);
    display: block;
    line-height: 1.2;
}

#page-cart .cart-summary__vat {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 400;
    text-align: right;
    display: block;
    margin-top: 2px;
}

/* --- Payment Methods --- */
#page-cart .cart-payment {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
}

#page-cart .cart-payment__title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

#page-cart .cart-payment__title-icon {
    width: 20px;
    height: 20px;
    color: var(--mainColor);
}

#page-cart .cart-payment__list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#page-cart .cart-payment__option {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    padding: 16px 16px 4px;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 9px 12px;
    margin: 0;
    font-weight: normal;
    position: relative;
}

#page-cart .cart-payment__option:hover {
    border-color: var(--mainColor);
    background: rgba(27, 96, 96, 0.02);
}

#page-cart .cart-payment__option--active {
    border-color: var(--mainColor);
    background: linear-gradient(135deg, rgba(27, 96, 96, 0.04) 0%, rgba(27, 96, 96, 0.08) 100%);
    border-width: 2px;
    padding: 15.5px;
    box-shadow: 0 0 0 3px rgba(27, 96, 96, 0.08);
}

/* Hide native radio */
#page-cart .cart-payment__input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Custom radio circle */
#page-cart .cart-payment__radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

#page-cart .cart-payment__radio::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--mainColor);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#page-cart .cart-payment__option--active .cart-payment__radio {
    border-color: var(--mainColor);
}

#page-cart .cart-payment__option--active .cart-payment__radio::after {
    transform: translate(-50%, -50%) scale(1);
}

#page-cart .cart-payment__info {
    flex: 1;
    min-width: 0;
}

#page-cart .cart-payment__name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    display: block;
    line-height: 1.4;
}

/* Description - revealed on select */
#page-cart .cart-payment__desc {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.6;
    padding: 0 0 0 32px;
    transition: max-height 0.3s ease, opacity 0.25s ease, margin 0.3s ease, padding 0.3s ease;
    margin-top: 0;
}

#page-cart .cart-payment__option--active .cart-payment__desc {
    max-height: 200px;
    opacity: 1;
    margin-top: 0;
    padding-top: 0;
    padding-left: 0;
    border-top: 1px dashed #e5e7eb;
}

#page-cart .cart-payment__desc p {
    margin: 0 0 4px;
}

#page-cart .cart-payment__desc ul {
    margin: 4px 0 0 0;
    padding: 0;
}

#page-cart .cart-payment__desc-full {
    display: none;
}

#page-cart .cart-payment__desc-full ul {
    margin-left: 16px;
}

/* Checkout button */
#page-cart .cart-summary__checkout-btn {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--mainColor);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 14px rgba(27, 96, 96, 0.2);
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    margin-top: 24px;
}

#page-cart .cart-summary__checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 96, 96, 0.3);
    opacity: 0.95;
}

#page-cart .cart-summary__checkout-btn:active {
    transform: translateY(0);
}

#page-cart .cart-summary__checkout-btn svg {
    width: 18px;
    height: 18px;
}

#page-cart .cart-summary__terms {
    font-size: 11px;
    color: #9ca3af;
    text-align: center;
    margin-top: 14px;
    line-height: 1.5;
}

#page-cart .cart-summary__terms a {
    text-decoration: underline;
    color: #6b7280;
}

/* --- Empty Cart --- */
#page-cart .cart-empty {
    text-align: center;
    padding: 40px 20px;
}

#page-cart .cart-empty img {
    display: block;
    margin: 0 auto 16px;
    max-width: 200px;
    padding: 0;
}

#page-cart .cart-empty p {
    font-size: 16px;
    color: #6b7280;
}
#page-cart .cart-section__back {
    padding: 10px 20px;
    background: #01796f;
    color: #fff;
    border-radius: 5px;
}
#page-cart .cart-payment ul li {
    list-style: disc;
    margin-left: 20px;
}
/* --- Responsive --- */
@media (max-width: 991px) {
    #page-cart .cart-page {
        padding: 0 12px 40px;
    }

    #page-cart .cart-page__title {
        font-size: 22px;
    }

    #page-cart .cart-section {
        padding: 16px;
    }

    #page-cart .cart-form__row {
        display: block;
    }

    #page-cart .cart-item__img {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 575px) {
    #page-cart .cart-item {
        gap: 12px;
    }

    #page-cart .cart-item__img {
        width: 72px;
        height: 72px;
        border-radius: 8px;
    }

    #page-cart .cart-item__name {
        font-size: 14px;
    }

    #page-cart .cart-item__price {
        font-size: 15px;
    }

    #page-cart .cart-checkout__summary-amount {
        font-size: 16px;
    }

    #page-cart .cart-summary {
        padding: 16px;
    }

    #page-cart .cart-summary__total-price {
        font-size: 20px;
    }
}
