/* Professional mini-cart dropdown */

.site-header {
    z-index: 200 !important;
    overflow: visible !important;
}

.header-actions {
    position: relative;
    z-index: 2;
}

.mc-wrap {
    position: relative;
    display: inline-flex;
}

.mc-trigger {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid #ececec;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4d4d4d;
    position: relative;
    transition: border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.mc-trigger:hover,
.mc-wrap.is-open .mc-trigger,
.mc-wrap:hover .mc-trigger {
    border-color: #7fc945;
    color: #62a832;
    box-shadow: 0 0 0 3px rgba(127, 201, 69, .12);
}

.mc-badge {
    position: absolute;
    top: -6px;
    left: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: linear-gradient(180deg, #8fd84f, #62a832);
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(127, 201, 69, .35);
    line-height: 1;
}

.mc-panel {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    width: 340px;
    max-width: min(340px, calc(100vw - 16px));
    background: #fff;
    border: 1px solid #e6e9ee;
    border-radius: 18px;
    box-shadow:
        0 24px 60px rgba(15, 23, 42, .18),
        0 4px 14px rgba(15, 23, 42, .07);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    z-index: 300;
    overflow: hidden;
}

.mc-wrap::before {
    content: "";
    position: absolute;
    top: 100%;
    left: -12px;
    width: 66px;
    height: 16px;
}

.mc-wrap:hover .mc-panel,
.mc-wrap:focus-within .mc-panel,
.mc-wrap.is-open .mc-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.mc-arrow {
    position: absolute;
    top: -6px;
    left: 16px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid #e6e9ee;
    border-top: 1px solid #e6e9ee;
    transform: rotate(45deg);
}

.mc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem 1.05rem .9rem;
    border-bottom: 1px solid #f0f2f5;
    background: linear-gradient(180deg, #fcfdfb, #fff);
}

.mc-head-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 800;
    color: #222;
    font-size: .95rem;
}

.mc-head-title .ico {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #f2fae8;
    color: #62a832;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mc-count {
    background: #f2fae8;
    color: #3f7a18;
    border-radius: 999px;
    padding: .2rem .65rem;
    font-size: .75rem;
    font-weight: 800;
}

.mc-list {
    max-height: 290px;
    overflow: auto;
    padding: .35rem 0;
}

.mc-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: .7rem;
    align-items: center;
    padding: .75rem 1.05rem;
    text-decoration: none;
    color: inherit;
    transition: background .15s ease;
}

.mc-item:hover {
    background: #f7faf3;
}

.mc-thumb {
    width: 58px;
    height: 46px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eceff3;
    background: linear-gradient(145deg, #eef2f7, #e4e9f0);
    display: grid;
    place-items: center;
}

.mc-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mc-thumb .ph {
    font-weight: 800;
    color: #9aa3af;
    font-size: 1rem;
}

.mc-item-title {
    font-size: .86rem;
    font-weight: 700;
    color: #222;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mc-item-meta {
    margin-top: .2rem;
    color: #8b919a;
    font-size: .75rem;
    font-weight: 600;
}

.mc-item-side {
    display: grid;
    gap: .35rem;
    justify-items: end;
}

.mc-price {
    font-weight: 800;
    color: #62a832;
    font-size: .86rem;
    white-space: nowrap;
}

.mc-remove {
    border: 0;
    background: #fff1f2;
    color: #e11d48;
    border-radius: 8px;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-size: .85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mc-remove:hover {
    background: #ffe4e6;
}

.mc-empty {
    padding: 1.6rem 1.2rem 1.3rem;
    text-align: center;
}

.mc-empty .bubble {
    width: 64px;
    height: 64px;
    margin: 0 auto .85rem;
    border-radius: 20px;
    background: #f2fae8;
    color: #62a832;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,.04);
}

.mc-empty h4 {
    margin: 0 0 .35rem;
    font-size: .98rem;
    color: #222;
    font-weight: 800;
}

.mc-empty p {
    margin: 0;
    color: #8b919a;
    font-size: .84rem;
    line-height: 1.7;
}

.mc-foot {
    padding: .95rem 1.05rem 1.1rem;
    border-top: 1px solid #eef1f4;
    background: #f8faf7;
}

.mc-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .8rem;
}

.mc-total span {
    color: #667085;
    font-size: .86rem;
    font-weight: 700;
}

.mc-total strong {
    color: #62a832;
    font-size: 1.05rem;
    font-weight: 800;
}

.mc-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
}

.mc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    border-radius: 12px;
    padding: .7rem .8rem;
    font-weight: 800;
    font-size: .84rem;
    text-decoration: none;
    border: 0;
    cursor: pointer;
}

.mc-btn.primary {
    background: linear-gradient(180deg, #8fd84f, #62a832);
    color: #fff;
    box-shadow: 0 8px 16px rgba(127, 201, 69, .28);
}

.mc-btn.primary:hover {
    filter: brightness(.97);
    color: #fff;
}

.mc-btn.ghost {
    background: #fff;
    color: #333;
    border: 1px solid #e5e7eb;
}

.mc-btn.ghost:hover {
    border-color: #7fc945;
    color: #62a832;
}

.mc-note {
    margin-top: .65rem;
    text-align: center;
    color: #98a2b3;
    font-size: .74rem;
    font-weight: 600;
}

@media (max-width: 480px) {
    .mc-panel {
        width: min(320px, calc(100vw - 16px));
    }
}
