/**
 * Cart Modal & Notifications Styles
 */


#coupon_code {
    padding: 12px 14px;
}

.cart-totals__coupon button[type="submit"] {
    width: 100%;
    height: 40px;
    line-height: 40px;
    background: #176daa;
    color: #fff;
    text-align: center;
    font-family: Manrope, sans-serif;
    font-weight: 700;
    margin-top: 10px;
}

/* ===========================
   Empty Cart Styles
   =========================== */

/* Hide default WooCommerce empty cart message */
.wc-empty-cart-message,
.woocommerce-info.wc-empty-cart-message {
    display: none !important;
}

.cart-page--empty {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

.cart-empty {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    padding: 40px 20px;
}

.cart-empty__icon {
    margin: 0 auto 32px;
    animation: fadeInUp 0.6s ease;
}

.cart-empty__icon svg {
    display: block;
    margin: 0 auto;
}

.cart-empty__title {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 16px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.cart-empty__description {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin: 0 0 40px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.cart-empty__actions {
    animation: fadeInUp 0.6s ease 0.3s both;
}

.btn--large {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn--large:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn--large svg {
    transition: transform 0.3s ease;
}

.btn--large:hover svg {
    transform: translateX(-4px);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   Modal Styles
   =========================== */

.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}

.cart-modal__content {
    position: relative;
    background: #fff;
    /* border-radius: 12px; */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: 90%;
    margin: 20px;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.2s ease;
}

.cart-modal__content--active {
    transform: scale(1);
    opacity: 1;
}

.cart-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e5e5;
}

.cart-modal__title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.cart-modal__close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    /* border-radius: 6px; */
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-modal__close:hover {
    background: #f5f5f5;
    color: #1a1a1a;
}

.cart-modal__body {
    padding: 24px;
}

.cart-modal__body p {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    color: #4a4a4a;
}

.cart-modal__footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px;
}

.cart-modal__footer .btn {
    flex: 1;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-modal__cancel {
    background: #f5f5f5;
    color: #1a1a1a;
}

.cart-modal__cancel:hover {
    background: #e5e5e5;
}

.cart-modal__confirm {
    background: #f52222;
    color: #fff;
}

.cart-modal__confirm:hover {
    background: #d91d1d;
}

.btn--danger {
    background: #f52222;
    color: #fff;
}

.btn--danger:hover {
    background: #d91d1d;
}

.btn--secondary {
    background: #f5f5f5;
    color: #1a1a1a;
}

.btn--secondary:hover {
    background: #e5e5e5;
}

/* ===========================
   Notification Styles
   =========================== */

.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    /* border-radius: 8px; */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 15px;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 320px;
}

.cart-notification--show {
    transform: translateX(0);
}

.cart-notification--success {
    background: #10b981;
    color: #fff;
}

.cart-notification--error {
    background: #ef4444;
    color: #fff;
}

.cart-notification--warning {
    background: #f59e0b;
    color: #fff;
}

.cart-notification--info {
    background: #3b82f6;
    color: #fff;
}

/* ===========================
   Custom Quantity Counter Styles
   =========================== */

.cart-item__quantity {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f5f5f5;
    /* border-radius: 8px; */
    padding: 4px;
}

.qty-display {
    min-width: 40px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    user-select: none;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #fff;
    color: #1a1a1a;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); */
}

.qty-btn:hover {
    background: #1a1a1a;
    color: #fff;
    transform: scale(1.05);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===========================
   Loading States
   =========================== */

.cart-item__quantity.updating {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.cart-item__quantity.updating::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #e5e5e5;
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.cart-item.removing {
    opacity: 0.4;
    pointer-events: none;
}

/* ===========================
   Animations
   =========================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===========================
   Responsive
   =========================== */

@media (max-width: 768px) {
    .cart-modal__content {
        width: 95%;
        margin: 10px;
    }

    .cart-modal__header {
        padding: 20px 20px 12px;
    }

    .cart-modal__title {
        font-size: 18px;
    }

    .cart-modal__body {
        padding: 20px;
    }

    .cart-modal__footer {
        padding: 12px 20px 20px;
        flex-direction: column;
    }

    .cart-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .cart-item__attribute {
        border-bottom: none !important;
    }
}
