/* Header Actions */
.header__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Cart Button */
.cart-btn {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.cart-btn svg {
    display: block;
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #B0907A;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Overlay */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(64, 63, 61, 0.5);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    max-width: 100vw;
    height: 100%;
    background: #E1D4C9;
    z-index: 300;
    display: flex;
    flex-direction: column;
    transition: right 0.35s ease;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
}

.cart-sidebar.open {
    right: 0;
}

/* Sidebar Header */
.cart-sidebar__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 20px;
    border-bottom: 1px solid #C1B6AD;
}

.cart-sidebar__title {
    font-size: 22px;
    font-weight: 600;
    color: #403F3D;
    margin: 0;
}

.cart-sidebar__close {
    background: none;
    border: 1px solid #C1B6AD;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    color: #403F3D;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.cart-sidebar__close:hover {
    background: #665F55;
    color: #E1D4C9;
    border-color: #665F55;
}

/* Items List */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}

.cart-items::-webkit-scrollbar {
    width: 4px;
}

.cart-items::-webkit-scrollbar-track {
    background: transparent;
}

.cart-items::-webkit-scrollbar-thumb {
    background: #C1B6AD;
    border-radius: 2px;
}

.cart-empty {
    text-align: center;
    color: #665F55;
    margin-top: 60px;
    font-size: 16px;
}

/* Cart Item */
.cart-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #C1B6AD;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item__img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255,255,255,0.5);
    flex-shrink: 0;
}

.cart-item__info {
    flex: 1;
    min-width: 0;
}

.cart-item__name {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item__size {
    font-size: 12px;
    color: #665F55;
    display: block;
    margin-bottom: 5px;
}

.cart-item__price {
    font-weight: 600;
    font-size: 14px;
    color: #B0907A;
    margin: 0;
}

.cart-item__controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.qty-btn {
    background: #C1B6AD;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #403F3D;
    transition: background 0.2s;
    line-height: 1;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

.qty-btn:hover {
    background: #665F55;
    color: #fff;
}

.qty-count {
    font-weight: 600;
    font-size: 15px;
    min-width: 22px;
    text-align: center;
}

.cart-item__remove {
    background: none;
    border: none;
    cursor: pointer;
    color: #C1B6AD;
    font-size: 16px;
    padding: 4px;
    transition: color 0.2s;
    flex-shrink: 0;
    line-height: 1;
    font-family: 'Inter', sans-serif;
}

.cart-item__remove:hover {
    color: #B0907A;
}

/* Sidebar Footer */
.cart-sidebar__footer {
    padding: 16px 24px 28px;
    border-top: 1px solid #C1B6AD;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #403F3D;
}

.cart-total {
    color: #B0907A;
}

.cart-checkout-btn {
    width: 100%;
    padding: 14px;
    background: #665F55;
    color: #E1D4C9;
    border: none;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
}

.cart-checkout-btn:hover:not(:disabled) {
    background: #403F3D;
}

.cart-checkout-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Add to Cart Button (in modals) */
.add-to-cart-btn {
    width: 100%;
    padding: 13px;
    background: #B0907A;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    font-family: 'Inter', sans-serif;
    margin-top: 16px;
    margin-bottom: 8px;
    display: block;
}

.add-to-cart-btn:hover {
    background: #665F55;
}

@media (max-width: 600px) {
    .cart-sidebar {
        width: 100vw;
        right: -100vw;
    }
}

/* ================================
   CHECKOUT MODAL
   ================================ */

.checkout-modal {
    position: fixed;
    inset: 0;
    z-index: 400;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.checkout-modal.open {
    opacity: 1;
    visibility: visible;
}

.checkout-modal__body {
    position: absolute;
    inset: 0;
    background: rgba(64, 63, 61, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.checkout-modal__dialog {
    background: #E1D4C9;
    border-radius: 32px;
    padding: 40px;
    width: 100%;
    max-width: 520px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.checkout-modal__dialog::-webkit-scrollbar {
    width: 4px;
}

.checkout-modal__dialog::-webkit-scrollbar-thumb {
    background: #C1B6AD;
    border-radius: 2px;
}

.checkout-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: 1px solid #C1B6AD;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 16px;
    cursor: pointer;
    color: #403F3D;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.checkout-modal__close:hover {
    background: #665F55;
    color: #E1D4C9;
    border-color: #665F55;
}

.checkout-modal__title {
    font-size: 28px;
    font-weight: 600;
    color: #403F3D;
    margin: 0 0 28px 0;
}

/* Form */
.checkout-form__field {
    margin-bottom: 20px;
}

.checkout-form__label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #665F55;
    margin-bottom: 8px;
}

.checkout-form__input,
.checkout-form__textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid #C1B6AD;
    border-radius: 16px;
    background: rgba(255,255,255,0.5);
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: #403F3D;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.checkout-form__input:focus,
.checkout-form__textarea:focus {
    border-color: #B0907A;
}

.checkout-form__textarea {
    resize: vertical;
    min-height: 90px;
}

/* Payment options */
.payment-options {
    display: flex;
    gap: 12px;
}

.payment-option {
    flex: 1;
    cursor: pointer;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-option__label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid #C1B6AD;
    border-radius: 16px;
    font-weight: 600;
    font-size: 15px;
    color: #403F3D;
    background: rgba(255,255,255,0.5);
    transition: all 0.2s;
    text-align: center;
}

.payment-option input[type="radio"]:checked + .payment-option__label {
    background: #665F55;
    color: #E1D4C9;
    border-color: #665F55;
}

.payment-option:hover .payment-option__label {
    border-color: #B0907A;
}

/* Bank details panel */
.bank-details {
    display: none;
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid #C1B6AD;
    border-radius: 16px;
    padding: 16px 18px;
    animation: fadeUp 0.25s ease both;
}

.bank-details.visible {
    display: block;
}

.bank-details__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(193, 182, 173, 0.4);
}

.bank-details__row:last-of-type {
    border-bottom: none;
}

.bank-details__key {
    font-size: 12px;
    font-weight: 600;
    color: #9E8E84;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    flex-shrink: 0;
}

.bank-details__val {
    font-size: 14px;
    font-weight: 600;
    color: #403F3D;
    text-align: right;
}

.bank-details__val--mono {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.03em;
    font-size: 13px;
}

.bank-details__note {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #C1B6AD;
    font-size: 13px;
    color: #665F55;
    line-height: 1.5;
}

/* Order summary in checkout */
.checkout-summary {
    background: rgba(193, 182, 173, 0.3);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 20px;
}

.checkout-summary__title {
    font-weight: 600;
    font-size: 14px;
    color: #665F55;
    margin: 0 0 10px 0;
}

.checkout-summary__list {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
}

.checkout-summary__item {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(193, 182, 173, 0.5);
    gap: 10px;
}

.checkout-summary__item:last-child {
    border-bottom: none;
}

.checkout-summary__detail {
    font-size: 12px;
    color: #7A6F68;
    font-style: italic;
    border-bottom: none !important;
    padding: 2px 0;
}

.checkout-summary__total {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 16px;
    color: #B0907A;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #C1B6AD;
}

/* Submit button */
.checkout-submit-btn {
    width: 100%;
    padding: 15px;
    background: #B0907A;
    color: #fff;
    border: none;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    font-family: 'Inter', sans-serif;
    margin-top: 8px;
}

.checkout-submit-btn:hover:not(:disabled) {
    background: #665F55;
}

.checkout-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Animations */
@keyframes checkPop {
    0%   { transform: scale(0) rotate(-10deg); opacity: 0; }
    60%  { transform: scale(1.15) rotate(3deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes fadeUp {
    from { transform: translateY(18px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

@keyframes ringPulse {
    0%   { transform: scale(1);    opacity: 0.5; }
    100% { transform: scale(1.55); opacity: 0; }
}

/* Success state */
.checkout-success {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 0 8px;
}

/* Outer ring pulse */
.checkout-success__checkmark-wrap {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 28px;
}

.checkout-success__checkmark-wrap::before,
.checkout-success__checkmark-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid #B0907A;
    animation: ringPulse 1.8s ease-out infinite;
}

.checkout-success__checkmark-wrap::after {
    animation-delay: 0.6s;
}

.checkout-success__checkmark {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #B0907A, #665F55);
    color: #fff;
    border-radius: 50%;
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(102, 95, 85, 0.35);
    animation: checkPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.checkout-success__emoji {
    font-size: 28px;
    margin-bottom: 4px;
    animation: fadeUp 0.5s 0.3s ease both;
    display: block;
}

.checkout-success__title {
    font-size: 26px;
    font-weight: 700;
    color: #2D2B29;
    margin: 0 0 10px;
    animation: fadeUp 0.5s 0.4s ease both;
}

.checkout-success__text {
    font-size: 14px;
    color: #7A6F68;
    line-height: 1.7;
    margin-bottom: 32px;
    max-width: 300px;
    animation: fadeUp 0.5s 0.5s ease both;
}

.checkout-success__btn {
    padding: 14px 48px;
    background: #665F55;
    color: #E1D4C9;
    border: none;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.25s, transform 0.2s;
    font-family: 'Inter', sans-serif;
    animation: fadeUp 0.5s 0.6s ease both;
    letter-spacing: 0.02em;
}

.checkout-success__btn:hover {
    background: #403F3D;
    transform: translateY(-2px);
}

@media (max-width: 560px) {
    .checkout-modal__dialog {
        padding: 28px 20px;
        border-radius: 24px;
    }

    .checkout-modal__title {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .payment-options {
        flex-direction: column;
    }
}
