:root {
    --rfq-accent: #c62828;
    --rfq-dark: #111827;
    --rfq-light: #f9fafb;
    --rfq-border: #e5e7eb;
    --rfq-shadow: 0 24px 50px rgba(15, 23, 42, 0.25);
}

#rfq-cart-fab {
    position: fixed;
    right: 1rem;
    bottom: 6rem;
    z-index: 1035;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid #5a4a2a;
    background: #c9b27d;
    color: #111;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 16px 24px rgba(90, 74, 42, 0.25);
}

#rfq-cart-fab .rfq-fab-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
}

#rfq-cart-fab svg {
    width: 100%;
    height: 100%;
    fill: #111;
}

#rfq-cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--rfq-accent);
    color: #fff;
    font-size: 12px;
    line-height: 22px;
    text-align: center;
    box-shadow: 0 6px 14px rgba(198, 40, 40, 0.35);
}

#rfq-cart-badge.is-hidden {
    display: none;
}

#rfq-cart-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1040;
}

#rfq-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(420px, 92vw);
    height: 100vh;
    background: #fff;
    border-left: 1px solid var(--rfq-border);
    box-shadow: var(--rfq-shadow);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 1045;
    display: flex;
    flex-direction: column;
}

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

body.rfq-cart-open #rfq-cart-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.rfq-cart-header {
    padding: 18px 20px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--rfq-border);
}

.rfq-cart-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--rfq-dark);
}

.rfq-cart-subtitle {
    font-size: 13px;
    color: #6b7280;
}

.rfq-cart-close {
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: #6b7280;
}

.rfq-cart-body {
    padding: 16px 20px;
    overflow-y: auto;
    flex: 1;
    background: var(--rfq-light);
}

.rfq-cart-empty {
    text-align: center;
    color: #6b7280;
    padding: 40px 12px;
}

.rfq-cart-hint {
    font-size: 13px;
}

.rfq-cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rfq-cart-item {
    background: #fff;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid var(--rfq-border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rfq-cart-item-wrapper {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.rfq-cart-item-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rfq-cart-item-thumbnail {
    width: 140px;
    height: 140px;
    max-width: 140px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--rfq-border);
    object-fit: contain;
    background: #f9fafb;
    padding: 4px;
    display: block;
}

.rfq-cart-item-title {
    font-weight: 600;
    color: var(--rfq-dark);
    font-size: 14px;
}

.rfq-cart-item-meta {
    font-size: 12px;
    color: #6b7280;
}

.rfq-cart-item-price {
    font-size: 14px;
    font-weight: 600;
    color: var(--rfq-accent);
}

.rfq-cart-config {
    margin-top: 4px;
    padding: 6px;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 11px;
}

.rfq-cart-item-config {
    margin-top: 4px;
    padding: 6px;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 11px;
}

.rfq-cart-item-total {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid var(--rfq-border);
}

.config-detail {
    color: #374151;
    margin-bottom: 2px;
}

.config-detail:last-child {
    margin-bottom: 0;
}

.rfq-cart-item-link {
    font-size: 12px;
    color: #2563eb;
    text-decoration: none;
    align-self: flex-start;
}

.rfq-cart-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--rfq-border);
}

.rfq-cart-item-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--rfq-border);
}

.rfq-cart-qty {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6b7280;
}

.rfq-cart-qty input {
    width: 64px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--rfq-border);
}

.rfq-cart-remove {
    border: none;
    background: none;
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
}

.rfq-cart-note {
    display: grid;
    gap: 6px;
    font-size: 12px;
    color: #6b7280;
}

.rfq-cart-note textarea {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--rfq-border);
    padding: 8px 10px;
    font-size: 13px;
}

.rfq-cart-footer {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--rfq-border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rfq-cart-subtotal {
    font-weight: 600;
    color: var(--rfq-dark);
    font-size: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--rfq-border);
}

.rfq-cart-clear {
    flex: 1;
    border: 1px solid var(--rfq-border);
    background: #fff;
    color: #6b7280;
    border-radius: 999px;
    padding: 10px 12px;
    font-weight: 600;
}

.rfq-cart-send {
    flex: 1.2;
    border: none;
    background: var(--rfq-dark);
    color: #fff;
    border-radius: 999px;
    padding: 10px 12px;
    font-weight: 600;
}

@media (max-width: 576px) {
    #rfq-cart-fab {
        right: 0.75rem;
        bottom: 3rem;
    }
    .rfq-cart-item-wrapper {
        flex-direction: column;
        align-items: center;
    }
    .rfq-cart-item-thumbnail {
        width: 150px;
        height: 150px;
        max-width: 150px;
        min-width: unset;
    }
    .rfq-cart-item-main {
        width: 100%;
        text-align: center;
    }
    .rfq-cart-footer {
        flex-direction: column;
    }
    .rfq-cart-clear,
    .rfq-cart-send {
        width: 100%;
    }
}
