/* Buttons */
.btn {
    display: inline-block;
    background: #0071e3;
    color: #fff;
    padding: 12px 22px;
    border-radius: 980px;
    font-size: 17px;
    font-weight: 400;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 113, 227, 0.2);
}

.btn:hover {
    background: #0077ed;
    box-shadow: 0 4px 8px rgba(0, 113, 227, 0.3);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 113, 227, 0.2);
}

.btn-primary {
    background: #0071e3;
    margin-top: 20px;
}

.btn-secondary {
    background: transparent;
    color: #0071e3;
    border: 2px solid #0071e3;
    box-shadow: none;
}

.btn-secondary:hover {
    background: #0071e3;
    color: #fff;
    box-shadow: 0 4px 8px rgba(0, 113, 227, 0.3);
}

.btn-checkout {
    background: #000;
    font-size: 18px;
    padding: 15px 40px;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-checkout:hover {
    background: #1d1d1f;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-remove {
    background: transparent;
    color: #d70015;
    border: 1px solid #d70015;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: none;
}

.btn-remove:hover {
    background: #d70015;
    color: #fff;
    box-shadow: 0 2px 4px rgba(215, 0, 21, 0.3);
    transform: translateY(-1px);
}

.btn-copy {
    background: #0071e3;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0, 113, 227, 0.2);
}

.btn-copy:hover {
    background: #0077ed;
    box-shadow: 0 2px 4px rgba(0, 113, 227, 0.3);
    transform: translateY(-1px);
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #0071e3;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 113, 227, 0.3);
    animation: badgePop 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes badgePop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.cart-badge.update {
    animation: badgePulse 0.4s;
}

@keyframes badgePulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* Cart Container */
.cart-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 20px 60px;
    min-height: 60vh;
}

.cart-title {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 20px;
    border-bottom: 1px solid #d2d2d7;
    padding-bottom: 20px;
}

.empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.cart-subtitle {
    font-size: 17px;
    color: #86868b;
    margin-bottom: 30px;
}

.cart-items {
    margin-bottom: 40px;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid #d2d2d7;
    padding: 20px 0;
}

.cart-item-image {
    width: 100px;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: auto;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.item-price {
    font-weight: 600;
    font-size: 17px;
    margin-bottom: 4px;
}

.item-crypto {
    font-size: 12px;
    color: #86868b;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    padding: 4px;
}

.qty-btn {
    background: #f5f5f7;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.qty-btn:hover {
    background: #e8e8ed;
}

.qty-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
}

/* Cart Summary */
.cart-summary {
    text-align: right;
}

.summary-row {
    font-size: 20px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.summary-amount {
    font-weight: 600;
}

.crypto-totals {
    font-size: 14px;
    color: #86868b;
    margin-bottom: 30px;
}

/* Checkout Container */
.checkout-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 20px 60px;
}

.checkout-title {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 40px;
    text-align: center;
}

.checkout-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.order-summary,
.shipping-info,
.billing-info,
.payment-section {
    background: #f5f5f7;
    padding: 30px;
    border-radius: 18px;
}

.order-summary h2,
.shipping-info h2,
.billing-info h2,
.payment-section h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

.summary-items {
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #d2d2d7;
}

.summary-item-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 10px;
}

.summary-item-details {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-item-name {
    font-size: 16px;
    font-weight: 500;
}

.summary-item-price {
    font-size: 16px;
    font-weight: 600;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    font-size: 24px;
    font-weight: 600;
    padding-top: 20px;
    border-top: 2px solid #1d1d1f;
}

/* Checkout Forms */
.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.checkout-form label {
    font-size: 14px;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: -12px;
}

.checkout-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background: #fff;
}

.checkout-form input:focus {
    outline: none;
    border-color: #0071e3;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.checkout-form input:hover {
    border-color: #86868b;
}

/* Payment Instructions */
.payment-instructions {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.payment-instructions p {
    font-size: 16px;
    color: #1d1d1f;
    margin-bottom: 20px;
}

.crypto-addresses {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.crypto-address-item {
    background: #f5f5f7;
    padding: 15px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.crypto-address-item strong {
    font-size: 16px;
    color: #1d1d1f;
    display: flex;
    align-items: center;
    gap: 8px;
}

.crypto-address-item strong {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.crypto-address-item strong i {
    font-size: 20px;
    color: #0071e3;
}

.payment-amount {
    font-size: 18px;
    color: #1d1d1f;
    margin-bottom: 12px;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    border: 2px solid #0071e3;
}

.payment-amount strong {
    color: #0071e3;
    font-size: 20px;
    display: inline;
}

.address-label {
    font-size: 13px;
    color: #86868b;
    margin-bottom: 6px;
    font-weight: 600;
}

.crypto-address-item code {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #1d1d1f;
    background: #fff;
    padding: 10px;
    border-radius: 6px;
    word-break: break-all;
    display: block;
    border: 1px solid #d2d2d7;
}

.btn-confirm {
    width: 100%;
    margin-top: 20px;
    background: #000;
    font-size: 18px;
    padding: 15px 40px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-confirm:hover {
    background: #1d1d1f;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #fff;
    border-radius: 18px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: #86868b;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #1d1d1f;
}

.modal-header {
    margin-bottom: 30px;
}

.modal h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    margin: 0;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}

.confirmation-icon {
    font-size: 80px;
    color: #34c759;
    margin: 20px 0;
}

.modal-body h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0 0 15px 0;
}

.modal-body p {
    font-size: 17px;
    color: #86868b;
    line-height: 1.5;
    margin: 0 0 10px 0;
}

.confirmation-time {
    background: #f5f5f7;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0 !important;
}

.confirmation-time strong {
    color: #1d1d1f;
}

/* Toast */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: #1d1d1f;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 10001;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.toast.show {
    visibility: visible;
    animation: fadein 0.5s, fadeout 0.5s 2.5s;
}

@keyframes fadein {
    from {
        top: 60px;
        opacity: 0;
    }

    to {
        top: 80px;
        opacity: 1;
    }
}

@keyframes fadeout {
    from {
        top: 80px;
        opacity: 1;
    }

    to {
        top: 60px;
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 1068px) {
    .crypto-addresses {
        gap: 12px;
    }
}

@media (max-width: 734px) {
    .checkout-container {
        padding: 60px 15px 40px;
    }

    .checkout-title {
        font-size: 32px;
        margin-bottom: 30px;
    }

    .checkout-content {
        gap: 20px;
    }

    .order-summary,
    .shipping-info,
    .billing-info,
    .payment-section {
        padding: 20px;
    }

    .order-summary h2,
    .shipping-info h2,
    .billing-info h2,
    .payment-section h2 {
        font-size: 20px;
    }

    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .summary-item-image {
        width: 100%;
        height: auto;
        max-height: 200px;
    }

    .summary-item-details {
        width: 100%;
    }

    .crypto-address-item {
        padding: 12px;
    }

    .crypto-address-item code {
        font-size: 11px;
        padding: 8px;
    }

    .confirmation-icon {
        font-size: 60px;
    }

    .modal-body h3 {
        font-size: 20px;
    }

    .modal-body p {
        font-size: 15px;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .cart-item-image {
        width: 100%;
    }

    .cart-item-image img {
        max-height: 200px;
        object-fit: contain;
    }

    .cart-item-actions {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .modal-content {
        padding: 30px 20px;
        max-width: 95%;
    }

    .modal h2 {
        font-size: 24px;
    }

    .wallet-address-box {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .btn-copy {
        margin-left: 0;
        width: 100%;
    }

    .qr-code img {
        max-width: 180px;
    }

    .crypto-amount {
        font-size: 20px;
    }
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Improved Focus States */
button:focus-visible,
.btn:focus-visible,
input:focus-visible {
    outline: 2px solid #0071e3;
    outline-offset: 2px;
}

/* Smooth Transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-duration: 0.2s;
    transition-timing-function: ease-in-out;
}

*:where(:not(input):not(textarea):not(select)) {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
}
