.basket-add-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.45rem;
    border-radius: 0.9rem;
    padding: 0.55rem 0.9rem;
    background: var(--bg-accent, #2f5d50);
    color: var(--text-on-accent, #fff);
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(47, 93, 80, 0.18);
}

.basket-add-button:hover {
    transform: translateY(-1px);
    opacity: 0.96;
}

.basket-add-button:disabled {
    cursor: not-allowed;
    background: var(--status-danger-bg, #f7dfdf);
    color: var(--status-danger-text, #8a3d3f);
    box-shadow: none;
}

.basket-add-button.is-added {
    background: #2f8f62;
    color: #fff;
}

.basket-fab {
    position: fixed;
    right: clamp(1rem, 3vw, 1.6rem);
    bottom: clamp(1rem, 3vw, 1.6rem);
    z-index: 70;
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 3.25rem;
    border-radius: 999px;
    padding: 0.85rem 1.05rem;
    border: 1px solid rgba(255, 255, 255, 0.48);
    background: linear-gradient(135deg, #2f5d50, #3c7665);
    color: #fff;
    font-weight: 900;
    box-shadow: 0 18px 42px rgba(29, 26, 22, 0.24);
}

.basket-fab:hover {
    transform: translateY(-2px);
}

.basket-fab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    background: #fff;
    color: #2f5d50;
    font-size: 0.78rem;
}

.basket-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(15, 23, 42, 0.34);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.basket-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    width: min(92vw, 26rem);
    height: 100vh;
    padding: 1.1rem;
    background: rgba(255, 251, 247, 0.96);
    border-left: 1px solid rgba(96, 75, 51, 0.14);
    box-shadow: -22px 0 48px rgba(29, 26, 22, 0.2);
    transform: translateX(104%);
    transition: transform 220ms ease;
}

.basket-root.is-open .basket-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.basket-root.is-open .basket-drawer {
    transform: translateX(0);
}

.basket-open {
    overflow: hidden;
}

.basket-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(96, 75, 51, 0.12);
}

.basket-drawer-header h2 {
    margin: 0.1rem 0 0;
    font-size: 1.55rem;
    font-weight: 900;
    color: var(--text-main, #1d1a16);
}

.basket-eyebrow {
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--text-muted, #8c7f72);
}

.basket-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 999px;
    background: rgba(116, 97, 71, 0.08);
    font-weight: 900;
    color: var(--text-main, #1d1a16);
}

.basket-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.basket-item {
    display: grid;
    gap: 0.75rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(96, 75, 51, 0.12);
}

.basket-item-name {
    font-weight: 900;
    color: var(--text-main, #1d1a16);
}

.basket-item-price,
.basket-item-total {
    margin-top: 0.15rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-soft, #66594b);
}

.basket-item-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.basket-item-controls button,
.basket-item-controls input {
    height: 2.2rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(96, 75, 51, 0.16);
    background: rgba(255, 255, 255, 0.76);
    color: var(--text-main, #1d1a16);
    font-weight: 800;
}

.basket-item-controls button {
    min-width: 2.2rem;
    padding: 0 0.75rem;
}

.basket-item-controls input {
    width: 4.2rem;
    text-align: center;
}

.basket-remove {
    color: #9d484c !important;
}

.basket-empty {
    flex: 1;
    display: grid;
    place-content: center;
    gap: 0.4rem;
    text-align: center;
    color: var(--text-soft, #66594b);
}

.basket-empty-title {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--text-main, #1d1a16);
}

.basket-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(96, 75, 51, 0.12);
}

.basket-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 900;
}

.basket-actions {
    display: grid;
    grid-template-columns: 0.75fr 1.25fr;
    gap: 0.75rem;
    margin-top: 1rem;
}

.basket-primary,
.basket-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.8rem;
    border-radius: 0.95rem;
    padding: 0.75rem 1rem;
    font-weight: 900;
    text-align: center;
}

.basket-primary {
    background: #25d366;
    color: #0d2f1a;
}

.basket-primary.is-disabled {
    pointer-events: none;
    opacity: 0.5;
}

.basket-secondary {
    background: rgba(116, 97, 71, 0.08);
    color: var(--text-soft, #66594b);
}

.basket-secondary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.theme-dark .basket-drawer {
    background: rgba(33, 28, 23, 0.98);
    border-color: rgba(212, 192, 163, 0.16);
}

.theme-dark .basket-item-controls button,
.theme-dark .basket-item-controls input,
.theme-dark .basket-close,
.theme-dark .basket-secondary {
    background: rgba(212, 192, 163, 0.08);
    border-color: rgba(212, 192, 163, 0.16);
    color: var(--text-main, #f4ede5);
}

@media (max-width: 640px) {
    .basket-fab {
        left: 1rem;
        right: 1rem;
        justify-content: center;
        bottom: 0.9rem;
    }

    .basket-drawer {
        width: 100vw;
    }
}
