/* Cart drawer (header icon) */
.cartModal .modal-dialog.cart-drawer-dialog {
    margin: 0 0 0 auto;
    max-width: 420px;
    width: 100%;
    height: 100%;
    transform: translateX(100%);
    transition: transform 0.28s ease-out;
}

.cartModal.show .modal-dialog.cart-drawer-dialog {
    transform: translateX(0);
}

.hra-cart--icon {
    position: relative;
    display: inline-flex;
}

.hra-cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--color-primary, #f7a729);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.cart-drawer {
    border: none;
    border-radius: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.cart-drawer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid #eee;
}

.cart-drawer-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #181818;
}

.cart-drawer-sub {
    font-size: 13px;
    color: #777;
    margin-top: 2px;
}

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

.cart-drawer-item {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    padding: 14px 28px 14px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.cart-drawer-item.is-error {
    background: #fff8f8;
    border-radius: 8px;
    padding-left: 8px;
    margin-bottom: 8px;
}

.cart-drawer-remove {
    position: absolute;
    top: 10px;
    right: 0;
    border: none;
    background: #f5f5f5;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.cart-drawer-remove:hover {
    background: #ffe8e0;
    color: #c0392b;
}

.cart-drawer-thumb {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    background: #fafafa;
}

.cart-drawer-thumb img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    display: block;
}

.cart-drawer-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 4px;
}

.cart-drawer-name a {
    color: #181818;
    text-decoration: none;
}

.cart-drawer-name a:hover {
    color: var(--color-primary, #f7a729);
}

.cart-drawer-meta {
    font-size: 12px;
    color: #888;
}

.cart-drawer-price-row {
    margin-top: 8px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.cart-drawer-price {
    font-size: 15px;
    font-weight: 700;
    color: #181818;
}

.cart-drawer-price-old {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
}

.cart-drawer-error {
    font-size: 12px;
    color: #c0392b;
    margin: -4px 0 10px;
}

.cart-drawer-footer {
    padding: 16px 20px 24px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.cart-drawer-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    margin-bottom: 4px;
}

.cart-drawer-total strong {
    font-size: 1.15rem;
    color: #181818;
}

.cart-drawer-note {
    font-size: 12px;
    color: #888;
    margin: 0 0 14px;
}

.cart-drawer-checkout {
    margin-bottom: 0;
}

.cart-drawer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 280px;
    padding: 32px 24px;
}

.cart-drawer-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff3e0;
    color: var(--color-primary, #f7a729);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
}

@media (max-width: 480px) {
    .cartModal .modal-dialog.cart-drawer-dialog {
        max-width: 100%;
    }
}
