/* NM Side Mini Cart Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&display=swap');

:root {
    --nm-cart-width: 400px;
    --nm-primary-color: #1a1a1a;
    --nm-accent-color: #222;
    --nm-text-color: #333;
    --nm-bg-color: #ffffff;
    --nm-border-color: #f0f0f0;
    --nm-shadow: 0 15px 45px rgba(0, 0, 0, 0.08);
    --nm-font: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#nm-side-mini-cart,
#nm-mini-cart-trigger {
    font-family: var(--nm-font);
}

#nm-side-mini-cart {
    position: fixed;
    top: 0;
    right: -400px;
    /* Initially hidden */
    width: var(--nm-cart-width);
    height: 100vh;
    background: var(--nm-bg-color);
    z-index: 99999;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
}

#nm-side-mini-cart.open {
    transform: translateX(-400px);
}

.nm-mini-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* Header */
.nm-mini-cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--nm-border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nm-mini-cart-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nm-mini-cart-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    color: #999;
    transition: color 0.2s;
    padding: 5px 10px;
}

.nm-mini-cart-close:hover {
    color: var(--nm-accent-color);
    background: #f0f0f0;
}

/* Content */
.nm-mini-cart-content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.nm-cart-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nm-cart-item {
    display: flex;
    gap: 15px;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--nm-border-color);
    position: relative;
}

.nm-item-thumbnail img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.nm-item-details {
    flex: 1;
}

.nm-item-title {
    margin: 0 0 5px;
    font-size: 1.1rem;
    font-weight: 500;
}

.nm-item-title a {
    text-decoration: none;
    color: inherit;
}

.nm-item-price {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--nm-primary-color);
}

/* Variation Data Styling */
.nm-item-details dl.variation {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin: 5px 0 10px;
    font-size: 0.95rem;
    color: #666;
}

.nm-item-details dl.variation dt {
    font-weight: 600;
    margin: 0;
    width: 25%;
}

.nm-item-details dl.variation dd {
    margin: 0;
    width: 65%;
}

.nm-item-details dl.variation p {
    margin: 0;
}

/* Quantity Control */
.nm-item-quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--nm-border-color);
    width: fit-content;
    border-radius: 4px;
}

.nm-qty-btn {
    background: none;
    border: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.nm-qty-input {
    width: 35px;
    border: none;
    text-align: center;
    font-weight: 600;
    background: transparent;
    -moz-appearance: textfield;
    appearance: textfield;
    padding: 0;
}

.nm-qty-input::-webkit-outer-spin-button,
.nm-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Remove Button */
.nm-item-remove {
    position: absolute;
    top: 0;
    right: 0;
}

.nm-remove-btn {
    background: none;
    border: none;
    color: #ccc;
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
    padding: 5px 10px;
}

.nm-remove-btn:hover {
    color: #ff4d4d;
    background: #f0f0f0;
}

/* Footer */
.nm-mini-cart-footer {
    padding: 20px;
    background: #f9f9f9;
    border-top: 1px solid var(--nm-border-color);
}

.nm-mini-cart-subtotal {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 700;
}

.nm-mini-cart-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nm-mini-cart-buttons .button {
    display: block;
    text-align: center;
    padding: 12px;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 1rem;
    letter-spacing: 1px;
    transition: all 0.3s;
    border-radius: 4px;
}

.nm-view-cart-btn {
    background: #fff;
    color: #000;
    border: 1px solid #000;
}

.nm-view-cart-btn:hover {
    background: #f0f0f0;
}

.nm-checkout-btn {
    background: #000;
    color: #fff !important;
}

.nm-checkout-btn:hover {
    opacity: 0.8;
}

/* Floating Trigger */
.nm-mini-cart-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #000;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 9999;
    transition: transform 0.3s;
}

.nm-mini-cart-trigger:hover {
    transform: scale(1.1);
}

.nm-cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4d4d;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* Empty State */
.nm-empty-cart {
    text-align: center;
    padding: 50px 0;
    color: #888;
}

/* Loading State Overlay (Optional) */
.nm-cart-loading {
    pointer-events: none;
    opacity: 0.5;
}

@media (max-width: 480px) {
    :root {
        --nm-cart-width: 100%;
    }

    #nm-side-mini-cart {
        right: -100%;
    }

    #nm-side-mini-cart.open {
        transform: translateX(-100%);
    }
}