.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1000;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 92%;
    height: 100vh;
    background: #fff;
    transform: translateX(100%);
    transition: transform 0.28s ease;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.18);
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 18px 14px;
    border-bottom: 1px solid #e5e5e5;
}

.cart-drawer-header h2 {
    margin: 0;
    font-size: 16px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.cart-count-badge {
    font-weight: 400;
    color: #666;
}

.cart-drawer-close {
    border: none;
    background: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0 6px;
}

.cart-drawer-items {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
}

.cart-drawer-footer {
    border-top: 1px solid #e5e5e5;
    padding: 16px 18px 22px;
}

.cart-subtotal-row {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 14px;
}

.cart-checkout-btn {
    width: 100%;
    display: block;
    text-align: center;
    text-decoration: none;
}

.cart-item {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cart-item-image {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    background: #f5f5f5;
    display: block;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-body {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    text-decoration: none;
    margin-bottom: 4px;
}

.cart-item-meta,
.cart-item-notes {
    font-size: 11px;
    color: #666;
    line-height: 1.4;
    margin: 0 0 4px;
}

.cart-item-badge {
    display: inline-block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #000;
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.cart-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 6px;
}

.cart-item-price {
    font-size: 14px;
    font-weight: 600;
}

.cart-remove-btn {
    margin-top: 6px;
    border: none;
    background: none;
    padding: 0;
    font-size: 12px;
    color: #666;
    text-decoration: underline;
    cursor: pointer;
}

.cart-empty {
    text-align: center;
    color: #666;
    padding: 40px 12px;
    font-size: 14px;
}

.cart-qty-control,
.product-qty-control {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
}

.cart-qty-btn,
.product-qty-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.cart-qty-input,
.product-qty-input {
    width: 44px;
    height: 32px;
    border: none;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    text-align: center;
    font-size: 14px;
    -moz-appearance: textfield;
}

.cart-qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button,
.product-qty-input::-webkit-outer-spin-button,
.product-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.product-qty-field {
    margin-bottom: 14px;
}

.product-qty-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.nav-cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #000;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.nav-icon-cart {
    position: relative;
}

body.cart-open .cart-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

body.cart-open .cart-drawer {
    transform: translateX(0);
}

body.cart-open .cart-overlay,
body.drawer-open .drawer-overlay {
    z-index: 998;
}

body.cart-open.cart-open .cart-drawer {
    z-index: 1001;
}

.cart-form-feedback {
    font-size: 13px;
    color: #b00020;
    margin-bottom: 10px;
    min-height: 18px;
}

.cart-form-feedback.success {
    color: #0a5f0a;
}
