/* mini-cart  */

/* Container & Slide Setup */
.custom-mini-cart-container {
    position: fixed;
    top: 0;
    right: -420px; /* Hidden off-screen */
    width: 100%;
    max-width: 420px;
    height: 100vh;
    background: #fdfaf9;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    z-index: 999999;
    transition: right 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-sizing: border-box;
}

.custom-mini-cart-container * { box-sizing: border-box; }

/* Open State */
.custom-mini-cart-container.cmc-open { right: 0; }

/* Header */
.cmc-header {
    background-color: #6a2c2a; 
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cmc-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #ffffff;
}
.cmc-close-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    font-weight: 300;
}

/* Items Area */
.cmc-items {
    flex-grow: 1;
    overflow-y: auto;
    background: #f8f8f8;
}
.cmc-empty {
    padding: 30px 20px;
    text-align: center;
    color: #555;
}
.cmc-item {
    display: flex;
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
    background: #f4f4f4;
}
.cmc-item:nth-child(even) { background: #ffffff; }

.cmc-item-img {
    width: 80px;
    min-width: 80px;
    margin-right: 15px;
    background: #fff;
    border: 1px solid #eaeaea;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cmc-item-img img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.cmc-item-details { flex: 1; }
.cmc-item-title {
    font-size: 14px;
    margin: 0 0 12px 0;
    color: #7b332c; 
    font-weight: 500;
    line-height: 1.4;
}

/* Pricing Row */
.cmc-item-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}
.cmc-price-regular {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}
.cmc-price-current {
    font-weight: 600;
    font-size: 18px;
    color: #333;
}
.cmc-price-save {
    background: #6a2c2a;
    color: #ffffff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 2px;
    margin-left: auto;
}

/* Quantity Controls */
.cmc-item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}
.cmc-qty-selector {
    display: flex;
    border: 1px solid #d4d4d4;
    background: #f9f9f9;
}
.cmc-qty-btn {
    background: #f4eee9;
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    color: #555;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cmc-qty-input {
    width: 40px;
    text-align: center;
    border: none;
    border-left: 1px solid #d4d4d4;
    border-right: 1px solid #d4d4d4;
    background: #ffffff;
    font-size: 14px;
    padding: 0;
    margin: 0;
    -moz-appearance: textfield;
}
.cmc-qty-input::-webkit-outer-spin-button,
.cmc-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cmc-remove { color: #333; display: flex; align-items: center; }
.cmc-remove svg { width: 18px; height: 18px; }
.cmc-remove:hover { color: #d9534f; }

/* Footer */
.cmc-footer {
    padding: 20px;
    background: #fbf5f4; 
    border-top: 1px solid #e5e5e5;
}
.cmc-subtotal-row {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 8px;
    color: #333;
}
.cmc-subtotal-val { font-size: 18px; }
.cmc-shipping-text {
    font-size: 13px;
    color: #666;
    margin: 0 0 20px 0;
}
.cmc-buttons { display: flex; gap: 15px; }
.cmc-btn {
    flex: 1;
    padding: 14px;
    text-align: center;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    border-radius: 2px;
    transition: background 0.2s;
}
.cmc-btn-cart {
    background: transparent;
    border: 1px solid #333;
}
.cmc-btn-cart:hover { background: #eaeaea; }
.cmc-btn-checkout {
    background: #dfb9b6;
    border: 1px solid transparent;
}
.cmc-btn-checkout:hover { background: #d4aba7; }

/* Loading State */
.cmc-loading { opacity: 0.5; pointer-events: none; }

/* Background Overlay */
.cmc-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(2px);
}
.cmc-overlay.cmc-open {
    opacity: 1;
    visibility: visible;
}

/* Trigger Icon & Badge */
.cmc-trigger-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 5px;
}
.cmc-bag-icon {
    width: 26px;
    height: auto;
    display: block;
    transition: transform 0.2s ease;
}
.cmc-trigger-button:hover .cmc-bag-icon { transform: scale(1.05); }
.cmc-cart-badge {
    position: absolute;
    top: 0px;
    right: -4px;
    background-color: #6a2c2a; 
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    height: 18px;
    min-width: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    box-sizing: border-box;
}

/* mini-cart  */