/* ============================================================
   mini-cart.css  —  Panel lateral de carrito + toast
   ============================================================ */

/* ── Overlay ─────────────────────────────────────────────── */
.mc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.42);
    z-index: 1200;
    opacity: 0;
    transition: opacity .22s;
}
.mc-overlay.is-open {
    display: block;
    opacity: 1;
}

/* ── Panel ───────────────────────────────────────────────── */
.mc-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(400px, 100vw);
    z-index: 1201;
    background: #fff;
    box-shadow: -6px 0 32px rgba(0,0,0,.14);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform .28s cubic-bezier(.32,.72,0,1);
}
.mc-panel.is-open {
    transform: translateX(0);
}
body.mc-open {
    overflow: hidden;
}

/* ── Header del panel ────────────────────────────────────── */
.mc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 14px;
    border-bottom: 1px solid #ede9e1;
    flex-shrink: 0;
}
.mc-title {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
    color: #1a1a1a;
    letter-spacing: -.01em;
}
.mc-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: #888;
    padding: 6px 8px;
    border-radius: 8px;
    line-height: 1;
    transition: background .15s, color .15s;
    font-family: inherit;
}
.mc-close:hover {
    background: #f0ece4;
    color: #333;
}

/* ── Toast de "agregado" ─────────────────────────────────── */
.mc-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 12px 16px 0;
    padding: 10px 14px;
    background: #f0faf4;
    border: 1.5px solid #86efac;
    border-radius: 10px;
    flex-shrink: 0;
    animation: mc-toast-in .22s ease;
}
.mc-toast-icon {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}
.mc-toast-text {
    font-size: .82rem;
    color: #166534;
    line-height: 1.4;
}
.mc-toast-text strong {
    display: block;
    font-size: .88rem;
}
@keyframes mc-toast-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Body (lista de items) ───────────────────────────────── */
.mc-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
}

/* Estado vacío */
.mc-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 100%;
    padding: 40px 24px;
    text-align: center;
    color: #999;
}
.mc-empty-icon {
    font-size: 2.4rem;
    opacity: .35;
}
.mc-empty p {
    font-size: .9rem;
    margin: 0;
}

/* Items */
.mc-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f0ece4;
    transition: background .12s;
}
.mc-item:last-child {
    border-bottom: none;
}
.mc-item-img {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f3f0ea;
}
.mc-item-img-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: #ede9e1;
    flex-shrink: 0;
}
.mc-item-info {
    flex: 1;
    min-width: 0;
}
.mc-item-pack {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 8px;
    margin: 0 0 5px;
}
.mc-item-name {
    font-size: .88rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mc-item-mods {
    font-size: .74rem;
    color: #2d6a4f;
    font-weight: 600;
    margin: 0 0 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mc-item-price {
    font-size: .78rem;
    color: #666;
}
.mc-item-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}
.mc-item-subtotal {
    font-size: .88rem;
    font-weight: 800;
    color: #1a1a1a;
    white-space: nowrap;
}
.mc-item-stepper {
    display: flex;
    align-items: center;
    border: 1.5px solid rgba(30,106,67,.25);
    border-radius: 999px;
    overflow: hidden;
    background: #fff;
}
.mc-item-btn {
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: #2d6a4f;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    flex-shrink: 0;
    transition: background .12s;
    font-family: inherit;
}
.mc-item-btn:hover {
    background: rgba(30,106,67,.1);
}
.mc-item-qty {
    font-size: .8rem;
    font-weight: 700;
    min-width: 20px;
    text-align: center;
    padding: 0 2px;
    color: #1a1a1a;
}

.mc-item-remove {
    background: none;
    border: none;
    color: #a86a62;
    font-size: .72rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    transition: color .15s;
}

.mc-item-remove:hover {
    color: #b64035;
}

/* ── Footer del panel ────────────────────────────────────── */
.mc-footer {
    flex-shrink: 0;
    padding: 14px 16px 24px;
    border-top: 1.5px solid #ede9e1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #faf8f4;
}
.mc-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .88rem;
}
.mc-total-label {
    color: #666;
    font-weight: 600;
}
.mc-total-amount {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1a1a1a;
}
.mc-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: #1e6a43;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: .95rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-decoration: none;
    cursor: pointer;
    transition: background .18s, transform .15s;
    font-family: inherit;
}
.mc-cta:hover {
    background: #155235;
    transform: translateY(-1px);
}
.mc-cta:active {
    transform: translateY(0);
}
.mc-continue {
    background: none;
    border: none;
    color: #888;
    font-size: .8rem;
    cursor: pointer;
    text-align: center;
    padding: 2px;
    font-family: inherit;
    transition: color .15s;
}
.mc-continue:hover {
    color: #444;
}
