/* WooCommerce mini cart drawer */
.ananeoo-mini-cart-open {
    overflow: hidden;
}

.ananeoo-mini-cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 190;
    background: oklch(26% 0.03 232 / 0.52);
    opacity: 0;
    transition: opacity 0.24s ease;
}

.ananeoo-mini-cart-overlay.is-open {
    opacity: 1;
}

.ananeoo-mini-cart-drawer {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 200;
    width: min(448px, 100vw);
    display: flex;
    flex-direction: column;
    background: var(--surface-2);
    box-shadow: none;
    transform: translateX(102%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.28s ease;
}

.ananeoo-mini-cart-drawer.is-open {
    box-shadow: -14px 0 54px oklch(26% 0.03 232 / 0.28);
    transform: translateX(0);
}

.ananeoo-mini-cart-drawer__head {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    min-height: 88px;
    padding: calc(22px + env(safe-area-inset-top, 0px)) 42px 18px;
    border-bottom: 1px solid var(--border);
    background: var(--teal-soft);
}

.ananeoo-mini-cart-title {
    margin: 0;
    color: var(--ink);
    font-size: 1.34rem;
    font-weight: 700;
    line-height: 1.4;
}

.ananeoo-mini-cart-drawer__close {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    box-shadow: 0 2px 4px oklch(26% 0.03 232 / 0.05);
}

.ananeoo-mini-cart-drawer__close:hover {
    border-color: var(--ink);
}

.ananeoo-mini-cart-drawer__content {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.ananeoo-mini-cart-drawer__content.is-updating {
    opacity: 0.62;
    pointer-events: none;
}

.ananeoo-cart-panel {
    min-height: 100%;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
}

.ananeoo-cart-items {
    min-height: 0;
    overflow-y: auto;
    padding: 44px 42px;
    background: var(--surface);
}

.ananeoo-cart-item {
    display: grid;
    grid-template-columns: 72px 1fr auto;
    gap: 14px;
    align-items: start;
}

.ananeoo-cart-item__image,
.ananeoo-cart-item__image a {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ananeoo-cart-item__image {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
    padding: 6px;
}

.ananeoo-cart-item__image img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

.ananeoo-cart-item__main {
    min-width: 0;
}

.ananeoo-cart-item__name {
    display: block;
    color: var(--ink);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
}

.ananeoo-cart-item__meta,
.ananeoo-cart-item__data {
    display: block;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.35;
}

.ananeoo-cart-item__meta {
    margin-top: 5px;
    font-variant-numeric: tabular-nums;
}

.ananeoo-cart-item__data {
    margin-top: 6px;
}

.ananeoo-cart-item__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.ananeoo-cart-qty {
    display: inline-grid;
    grid-template-columns: 44px 44px 44px;
    min-height: 48px;
    overflow: hidden;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--ink);
}

.ananeoo-cart-qty button,
.ananeoo-cart-qty strong {
    min-width: 0;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
    font: inherit;
    font-size: 1.06rem;
    font-weight: 700;
}

.ananeoo-cart-qty button {
    border: 0;
    background: var(--surface-2);
    cursor: pointer;
}

.ananeoo-cart-qty button:hover,
.ananeoo-cart-qty button:focus-visible {
    background: var(--blue-soft);
}

.ananeoo-cart-qty.is-loading button,
.ananeoo-cart-qty button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.woocommerce a.remove.ananeoo-cart-remove,
.ananeoo-cart-remove {
    display: inline-flex;
    width: auto;
    height: auto;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    font: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    font-size: 20px;
    color: #b42318;
}

.woocommerce a.remove.ananeoo-cart-remove:hover,
.woocommerce a.remove.ananeoo-cart-remove:focus-visible,
.ananeoo-cart-remove:focus-visible {
    width: auto;
    height: auto;
    line-height: 1.4;
    border-radius: 10px;
    border-color: var(--border);
    background: var(--blue-soft);
    color: var(--blue) !important;
}

.ananeoo-cart-item__price {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ananeoo-cart-item__price strong {
    display: block;
    color: var(--ink);
    font-size: 1.3rem;
    line-height: 1.4;
    font-weight: 700;
}

.ananeoo-cart-item__price s {
    color: #b42318;
    font-size: 0.96rem;
}

.ananeoo-cart-summary {
    padding: 44px 42px 46px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
}

.ananeoo-cart-rows {
    display: grid;
    gap: 11px;
    font-size: 1rem;
}

.ananeoo-cart-rows div,
.ananeoo-cart-total {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.ananeoo-cart-rows strong {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.ananeoo-cart-rows .is-muted span,
.ananeoo-cart-rows .is-muted strong {
    color: var(--muted);
}

.ananeoo-cart-rows .is-savings span,
.ananeoo-cart-rows .is-savings strong,
.ananeoo-cart-rows .is-free {
    color: var(--green);
}

.ananeoo-cart-total {
    align-items: baseline;
    margin: 16px 0 22px;
    padding-top: 24px;
    border-top: 2px solid var(--border);
}

.ananeoo-cart-total span {
    font-size: 1.4rem;
    font-weight: 700;
}

.ananeoo-cart-total strong {
    color: var(--ink);
    font-size: 2rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.ananeoo-cart-buttons {
    display: grid;
    gap: 10px;
    margin: 0 0 10px;
}

.ananeoo-cart-buttons .checkout {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: capitalize;
    border-radius: 12px;
    background: var(--accent-gradient) !important;
    color: var(--accent-ink) !important;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.7;
    text-decoration: none;
    text-align: center;
}

.ananeoo-cart-continue {
    width: 100%;
    min-height: 56px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: transparent;
    color: var(--ink);
    font-weight: 700;
}

.ananeoo-cart-micro {
    margin-top: 14px;
    color: var(--muted);
    font-size: 0.94rem;
    line-height: 1.45;
    text-align: center;
}

.ananeoo-cart-micro svg {
    margin-right: 5px;
    color: var(--green);
    vertical-align: -3px;
}

.ananeoo-cart-empty {
    margin: auto;
    padding: 38px 20px;
    color: var(--muted);
    font-size: 1.08rem;
    text-align: center;
}

@media (max-width: 1024px) {
    .ananeoo-mini-cart-drawer {
        overflow-y: auto;
    }

    .ananeoo-mini-cart-drawer__content,
    .ananeoo-cart-panel {
        min-height: auto;
    }

    .ananeoo-cart-panel {
        display: block;
    }

    .ananeoo-cart-items {
        min-height: auto;
        overflow: visible;
    }

    .ananeoo-mini-cart-drawer__head {
        padding: calc(36px + env(safe-area-inset-top, 0px)) 32px 20px;
    }

    .ananeoo-mini-cart-title {
        padding-top: 6px;
    }
}

@media (max-width: 520px) {
    .ananeoo-mini-cart-drawer__head,
    .ananeoo-cart-items,
    .ananeoo-cart-summary {
        padding-inline: 22px;
    }

    .ananeoo-mini-cart-drawer__head {
        padding-top: calc(38px + env(safe-area-inset-top, 0px));
    }

    .ananeoo-cart-item {
        grid-template-columns: 72px 1fr;
    }

    .ananeoo-cart-item__price {
        grid-column: 2;
        text-align: left;
    }
}
