:root {
    --aco-olive: #3b5d2a;
    --aco-green: #046b42;
    --aco-deep: #0f3b22;
    --aco-gold: #c9a227;
    --aco-pale: #eef2e4;
    --aco-border: #c4d9b3;
    --aco-ink: #2c2c2a;
    --aco-white: #ffffff;
}

html.aco-cart-open,
html.aco-cart-open body {
    overflow: hidden !important;
}

.aco-navbar-btn,
button.aco-navbar-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--aco-gold);
    box-shadow: none;
    cursor: pointer;
    transition: transform .2s ease, background-color .2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.aco-navbar-btn:hover,
.aco-navbar-btn:focus-visible {
    background: #b9911e;
    transform: translateY(-1px);
    outline: 3px solid rgba(201, 162, 39, .24);
    outline-offset: 3px;
}

.aco-navbar-icon,
.aco-navbar-icon img {
    display: block;
    width: 28px;
    height: 28px;
}

.aco-navbar-badge {
    position: absolute;
    top: -5px;
    right: -7px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border: 2px solid var(--aco-white);
    border-radius: 999px;
    background: var(--aco-green);
    color: var(--aco-white);
    font: 700 11px/18px Montserrat, Poppins, "Segoe UI", sans-serif;
    text-align: center;
}

.aco-navbar-badge[hidden] { display: none !important; }

.aco-overlay-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999998;
    background: rgba(15, 59, 34, .38);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity .25s ease;
}

.aco-overlay-backdrop.aco-active { opacity: 1; }
.aco-overlay-backdrop[hidden] { display: none !important; }

.aco-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    width: min(520px, 100vw);
    padding: 14px;
    pointer-events: none;
    transform: translateX(104%);
    opacity: 0;
    transition: transform .38s cubic-bezier(.22, 1, .36, 1), opacity .25s ease;
}

.aco-overlay.aco-active {
    pointer-events: auto;
    transform: translateX(0);
    opacity: 1;
}

.aco-overlay-inner,
.aco-overlay-inner * {
    box-sizing: border-box;
}

.aco-overlay-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(196, 217, 179, .9);
    border-radius: 22px;
    background: var(--aco-white);
    box-shadow: 0 24px 70px rgba(15, 59, 34, .2);
    color: var(--aco-ink);
    font-family: Montserrat, Poppins, "Segoe UI", sans-serif;
    line-height: 1.45;
}

.aco-top {
    flex: 1 1 auto;
    min-height: 0;
    padding: 34px 34px 28px;
    overflow-y: auto;
    scrollbar-color: var(--aco-border) transparent;
    scrollbar-width: thin;
}

.aco-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.aco-title {
    margin: 0;
    color: var(--aco-green);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(32px, 4vw, 42px);
    font-weight: 400;
    line-height: 1.1;
}

.aco-units {
    margin: 7px 0 0;
    color: #5b7538;
    font-size: 14px;
}

.aco-close-btn,
button.aco-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    transition: transform .18s ease;
    -webkit-appearance: none;
    appearance: none;
}

.aco-close-btn:hover { transform: rotate(4deg) scale(1.06); }
.aco-close-btn:focus-visible { outline: 3px solid rgba(201, 162, 39, .3); outline-offset: 2px; }
.aco-close-btn img { display: block; width: 48px; height: 48px; }

.aco-notice {
    display: none;
    margin: -12px 0 20px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff2f0;
    color: #8a251d;
    font-size: 13px;
}

.aco-notice.aco-visible { display: block; }

.aco-items-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
    transition: opacity .2s ease;
}

.aco-is-loading .aco-items-list { opacity: .45; pointer-events: none; }

.aco-cart-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px 16px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--aco-pale);
    animation: aco-fade-in .25s ease both;
}

.aco-cart-item:last-child { padding-bottom: 0; border-bottom: 0; }

@keyframes aco-fade-in {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

.aco-item-image {
    grid-row: 1 / 3;
    width: 76px;
    height: 76px;
    overflow: hidden;
    border: 1px solid var(--aco-pale);
    border-radius: 12px;
    background: #f7f7f4;
}

.aco-item-image a,
.aco-item-image img { display: block; width: 100%; height: 100%; }
.aco-item-image img { object-fit: contain; }

.aco-product-details { min-width: 0; }

.aco-product-name {
    margin: 0 0 7px;
    color: var(--aco-deep);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.3;
}

.aco-product-name a { color: inherit; text-decoration: none; }
.aco-product-name a:hover { color: var(--aco-green); }

.aco-product-details dl.variation {
    margin: 0 0 6px;
    color: #5d675d;
    font-size: 12px;
}

.aco-remove-btn,
button.aco-remove-btn {
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--aco-green);
    font: 600 12px/1.4 Montserrat, Poppins, "Segoe UI", sans-serif;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.aco-remove-btn:hover { color: var(--aco-deep); }

.aco-item-actions {
    grid-column: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.aco-qty-control {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border: 1px solid var(--aco-border);
    border-radius: 999px;
    background: var(--aco-white);
}

.aco-qty-btn,
button.aco-qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--aco-pale);
    box-shadow: none;
    color: var(--aco-green);
    font: 600 17px/1 Montserrat, Poppins, "Segoe UI", sans-serif;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.aco-qty-btn:hover { background: var(--aco-border); }
.aco-qty-btn:focus-visible { outline: 2px solid var(--aco-gold); outline-offset: 1px; }

.aco-qty-input,
input.aco-qty-input {
    width: 36px;
    min-width: 36px;
    height: 30px;
    margin: 0;
    padding: 0 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--aco-deep);
    font: 700 13px/30px Montserrat, Poppins, "Segoe UI", sans-serif;
    text-align: center;
    outline: 0;
}

.aco-item-price,
.aco-item-price .woocommerce-Price-amount {
    color: var(--aco-deep);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.aco-empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 270px;
    padding: 36px 18px;
    border-radius: 16px;
    background: var(--aco-pale);
    text-align: center;
}

.aco-empty-cart img { width: 48px; height: 48px; margin-bottom: 16px; }
.aco-empty-cart p { margin: 0 0 5px; color: var(--aco-green); font: 400 23px/1.25 Georgia, "Times New Roman", serif; }
.aco-empty-cart span { max-width: 320px; color: #5d675d; font-size: 13px; }

.aco-bottom {
    flex: 0 0 auto;
    padding: 24px 34px 28px;
    border-top: 1px solid var(--aco-border);
    background: #f8fdf8;
}

.aco-subtotal-row { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.aco-subtotal-label { color: var(--aco-olive); font: 400 21px/1.2 Georgia, "Times New Roman", serif; }
.aco-subtotal-amount,
.aco-subtotal-amount .woocommerce-Price-amount { color: var(--aco-deep); font-size: 24px; font-weight: 700; }
.aco-shipping-note { margin: 6px 0 20px; color: #5d675d; font-size: 11px; }
.aco-buttons-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.aco-btn-continue,
button.aco-btn-continue,
.aco-btn-checkout,
a.aco-btn-checkout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 999px;
    box-shadow: none;
    font: 700 13px/1.2 Montserrat, Poppins, "Segoe UI", sans-serif;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.aco-btn-continue,
button.aco-btn-continue {
    border: 1px solid var(--aco-green);
    background: var(--aco-white);
    color: var(--aco-green);
}

.aco-btn-continue:hover { background: var(--aco-pale); color: var(--aco-deep); }

.aco-btn-checkout,
a.aco-btn-checkout {
    border: 1px solid var(--aco-green);
    background: var(--aco-green);
    color: var(--aco-white);
}

.aco-btn-checkout:hover { background: var(--aco-deep); color: var(--aco-white); transform: translateY(-1px); }

@media (max-width: 600px) {
    .aco-overlay { width: 100vw; padding: 0; }
    .aco-overlay-inner { border-width: 0; border-radius: 0; }
    .aco-top { padding: 26px 20px 22px; }
    .aco-header { margin-bottom: 22px; }
    .aco-bottom { padding: 20px; }
    .aco-buttons-row { grid-template-columns: 1fr; }
    .aco-btn-checkout { grid-row: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .aco-overlay,
    .aco-overlay-backdrop,
    .aco-cart-item,
    .aco-navbar-btn { transition: none !important; animation: none !important; }
}
