/* ============================================================
   MINI CART - Slide-in Panel
   ============================================================ */

/* Backdrop */
.mini-cart-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1049;
}
.mini-cart-backdrop.is-open {
    display: block;
}

/* Panel */
.mini-cart-panel,
.mini-cart-panel * {
    font-family: "Inter", sans-serif;
}

.mini-cart-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 465px;
    height: 100vh;
    background: #FFFFFF;
    border-radius: 7px 0 0 7px;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow: hidden;
}
.mini-cart-panel.is-open {
    transform: translateX(0);
}

/* ---- Header Bar ---- */
.mini-cart-header {
    flex-shrink: 0;
    background: #000000;
    border-radius: 7px 0 0 0;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    gap: 12px;
}
.mini-cart-header__icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.mini-cart-header__icon svg {
    fill: #FFFFFF;
    width: 24px;
    height: 24px;
}
.mini-cart-header__icon .h-icon-cart {
    filter: brightness(0) invert(1);
}
.mini-cart-header__title {
    flex: 1;
    font: normal normal normal 16px/20px "Inter", sans-serif;
    color: #FFFFFF;
    text-align: center;
    margin: 0;
}
.mini-cart-header__close {
    flex-shrink: 0;
    width: 21px;
    height: 21px;
    background: rgba(255, 255, 255, 0.39);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.mini-cart-header__close i {
    font: normal normal 300 14px/17px "Font Awesome 6 Pro";
    color: #FFFFFF;
    opacity: 1;
    width: 9px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Body (scrollable) ---- */
.mini-cart-body {
    flex: 1;
    overflow: hidden;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
}

.mini-cart-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 0;
    overflow: hidden;
}

/* ---- Free Shipping Block ---- */
.mini-cart-shipping {
    width: 100%;
    min-height: 94px;
    background: #F5F5F5;
    border-radius: 7px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
}
.mini-cart-shipping__truck {
    align-self: center;
    opacity: 0.6;
}
.mini-cart-shipping__truck svg {
    width: 42px;
    height: auto;
}
.mini-cart-shipping__text {
    font: normal normal normal 13px/16px "Inter", sans-serif;
    color: #000000;
    text-align: center;
    letter-spacing: 0;
    margin: 0;
}
.mini-cart-shipping__text strong {
    font-weight: bold;
}
.mini-cart-shipping__bar-wrap {
    position: relative;
    width: 100%;
    max-width: 359px;
    margin: 0 auto;
}
.mini-cart-shipping__bar {
    position: relative;
    width: 100%;
    height: 8px;
    background: #FFFFFF;
    border-radius: 15px;
    overflow: hidden;
}
.mini-cart-shipping__bar-fill {
    height: 100%;
    width: 0;
    background: #000000;
    border-radius: 15px;
    /* Left-to-right fill animation. Slightly longer + ease-out so the
       fill feels intentional, not snappy, when the user opens the
       mini cart or after add/remove. */
    transition: width 700ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.mini-cart-shipping__check {
    /* Sits on top of the bar at the right edge of the fill - same
       pattern as the full cart page (cart-shipping-bar-check).
       Position via `left: calc(... )` driven by the same percent
       the fill animates to, so the badge slides in lockstep. */
    position: absolute;
    top: 50%;
    left: 0;
    width: 18px;
    height: 18px;
    background: #C0C0C0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    transition: left 700ms cubic-bezier(0.22, 0.61, 0.36, 1),
                background 240ms ease;
}
.mini-cart-shipping--met .mini-cart-shipping__check {
    background: #48BB51;
}
.mini-cart-shipping__check i {
    font: normal normal 300 7px/20px "Font Awesome 6 Pro";
    color: #FFFFFF;
    width: 6px;
    height: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---- Products Counter ---- */
.mini-cart-count {
    font: normal normal bold 16px/19px "Inter", sans-serif;
    letter-spacing: -0.48px;
    color: #000000;
    text-align: left;
}

/* ---- Product Cards ---- */
.mini-cart-products {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    padding-right: 6px;
}
.mini-cart-products::-webkit-scrollbar {
    width: 4px;
}
.mini-cart-products::-webkit-scrollbar-track {
    background: #f1f1f1;
}
.mini-cart-products::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}
.mini-cart-card {
    width: 100%;
    background: #FFFFFF;
    border: 1px solid #E1E1E1;
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    align-items: stretch;
    gap: 12px;
    box-sizing: border-box;
    position: relative;
}
.mini-cart-card__image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
}
.mini-cart-card__image img {
    width: 80px;
    height: 80px;
    border-radius: 7px;
    object-fit: cover;
    border: 1px solid #E8E8E8;
}
.mini-cart-card__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    padding-top: 2px;
}
.mini-cart-card__name {
    font: normal normal bold 14px/20px "Inter", sans-serif;
    letter-spacing: -0.42px;
    color: #000000;
    text-transform: uppercase;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-decoration: none;
    display: block;
}
.mini-cart-card__name:hover {
    color: #000000;
    text-decoration: underline;
}
.mini-cart-card__sku {
    font: normal normal normal 12px/20px "Inter", sans-serif;
    color: #8A8A8A;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mini-cart-card__actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    padding-left: 6px;
    align-self: stretch;
}
.mini-cart-card__top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mini-cart-card__wishlist {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mini-cart-card__wishlist i {
    font: normal normal normal 16px/19px "Font Awesome 6 Pro";
    color: #8A8A8A;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}
.mini-cart-card__wishlist:hover i,
.mini-cart-card__wishlist.wished i {
    color: #e74c3c;
}
.mini-cart-card__remove {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mini-cart-card__remove i {
    font: normal normal 300 14px/20px "Font Awesome 6 Pro";
    color: #808080;
    width: 11px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}
.mini-cart-card__remove:hover i {
    color: #333333;
}
.mini-cart-card__bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
}
.mini-cart-card__qty {
    font: normal normal bold 12px/20px "Inter", sans-serif;
    color: #181E28;
    text-align: right;
}
.mini-cart-card__price {
    font: normal normal bold 15px/14px "Inter", sans-serif;
    letter-spacing: -0.45px;
    color: #000000;
    text-align: right;
}

/* ---- Empty State ---- */
.mini-cart-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font: normal normal bold 16px/20px "Inter", sans-serif;
    color: #8A8A8A;
    text-align: center;
    padding: 40px 20px;
}

/* ---- Totals Block (black box) ---- */
.mini-cart-totals {
    flex-shrink: 0;
    width: 100%;
    background: #000000;
    border-radius: 15px;
    padding: 20px 18px 18px;
    margin-top: auto;
    box-sizing: border-box;
}
.mini-cart-totals__rows {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}
.mini-cart-totals__row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
/* Row immediately before the grand total gets a solid border */
.mini-cart-totals__row.is-pretotal {
    border-bottom: 1px solid #FFFFFF;
}
.mini-cart-totals__row.is-grandtotal {
    border-bottom: none;
}
.mini-cart-totals__label {
    font: normal normal bold 14px/20px "Inter", sans-serif;
    letter-spacing: -0.42px;
    color: #FFFFFF;
}
.mini-cart-totals__value {
    font: normal normal bold 14px/20px "Inter", sans-serif;
    letter-spacing: -0.42px;
    color: #FFFFFF;
    text-align: right;
}
.mini-cart-totals__row.is-grandtotal .mini-cart-totals__label {
    font-size: 14px;
}
.mini-cart-totals__row.is-grandtotal .mini-cart-totals__value {
    font: normal normal bold 28px/20px "Inter", sans-serif;
    letter-spacing: -0.84px;
}
.mini-cart-totals__buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.mini-cart-btn-view {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    background: #000000;
    border: 2px solid #FFFFFF;
    border-radius: 7px;
    font: normal normal bold 15px/20px "Inter", sans-serif;
    letter-spacing: -0.45px;
    color: #FFFFFF;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
.mini-cart-btn-view:hover {
    background: #FFFFFF;
    border-color: #FFFFFF;
    color: #000000;
    text-decoration: none;
}
.mini-cart-btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 46px;
    background: #48BB51;
    border: none;
    border-radius: 7px;
    font: normal normal bold 17px/20px "Inter", sans-serif;
    letter-spacing: -0.51px;
    color: #FFFFFF;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease;
    box-sizing: border-box;
}
.mini-cart-btn-checkout:hover {
    background: #3FA847;
    color: #FFFFFF;
    text-decoration: none;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .mini-cart-panel {
        width: 100%;
        border-radius: 0;
    }
    .mini-cart-header {
        border-radius: 0;
    }
}
