#vetrina-quote-drawer,
#vetrina-quote-drawer * {
    box-sizing: border-box !important;
}

#vetrina-quote-drawer {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 99999;
    font-family: 'Inter', sans-serif;
    overflow: visible !important;
}

#vetrina-quote-drawer.is-empty {
    display: none !important;
}

/* Hide WooCommerce default "View cart" link */
.woocommerce a.added_to_cart {
    display: none !important;
}

.quote-drawer-toggle {
    background: #324e8a;
    color: #fff;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.quote-drawer-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.quote-drawer-toggle .quote-count {
    background: #2bd76e;
    color: #fff;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quote-drawer-content {
    position: fixed;
    bottom: 90px;
    left: 25px;
    width: 350px;
    max-width: calc(100vw - 50px);
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#vetrina-quote-drawer.open .quote-drawer-content {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.quote-drawer-header {
    background: #324e8a;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quote-drawer-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.close-drawer {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
}

.close-drawer:hover {
    opacity: 1;
}

.quote-drawer-body {
    max-height: 450px;
    overflow-y: auto;
    overflow-x: hidden !important;
    padding: 20px;
    scrollbar-width: thin;
}

.quote-item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quote-item {
    display: flex;
    gap: 15px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.q-item-img img {
    border-radius: 5px;
    width: 50px !important;
    height: 50px !important;
    object-fit: contain;
}

.q-item-info {
    flex: 1;
    min-width: 0;
    /* Prevent flex overflow */
}

.q-item-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 2px;
    white-space: normal !important;
    word-break: break-all !important;
}

.q-item-sku {
    font-size: 11px;
    color: #999;
}

.q-item-qty-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    height: 30px !important;
    overflow: hidden !important;
}

.q-item-qty {
    width: 60px !important;
    height: 30px !important;
    padding: 0 5px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    outline: none !important;
    flex-shrink: 0 !important;
}

.remove-q-item {
    background: none;
    border: none;
    color: #ff4d4d;
    cursor: pointer;
    font-size: 18px;
    flex-shrink: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.quote-form-divider {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin: 20px 0 15px;
    position: relative;
}

.quote-form-divider::before,
.quote-form-divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 20%;
    height: 1px;
    background: #eee;
}

.quote-form-divider::before {
    left: 0;
}

.quote-form-divider::after {
    right: 0;
}

.form-group {
    margin-bottom: 10px;
    position: relative;
}

.required-mark {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #ff4d4d;
    font-weight: bold;
    font-size: 16px;
    pointer-events: none;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 25px 10px 10px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-size: 14px;
}

.form-group textarea {
    height: 60px;
    resize: none;
}

.quote-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.quote-actions button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-send-whatsapp {
    background: #2bd76e;
    color: #fff;
}

.btn-send-whatsapp:hover {
    background: #25c162;
}

.btn-generate-quote {
    background: #fff !important;
    color: #324e8a !important;
    border: 2px solid #324e8a !important;
}

.btn-generate-quote:hover {
    background: #f0f7ff !important;
}

.btn-send-email {
    background: #324e8a;
    color: #fff;
}

.btn-send-email:hover {
    background: #2a4175;
}

.empty-quote-msg {
    text-align: center;
    color: #999;
    padding: 20px 0;
}

/* Animations */
#drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99998;
    display: none;
}

#vetrina-quote-drawer.open+#drawer-overlay {
    display: block;
}

#vetrina-quote-drawer.is-empty .quote-drawer-toggle {
    opacity: 0.6;
}

#vetrina-quote-drawer.is-empty .toggle-text {
    display: none;
}

/* Persistência de Dados */
.quote-persistence-notice {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 11px;
    color: #475569;
    display: none;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
}

.quote-persistence-notice.visible {
    display: flex;
}

.quote-persistence-notice i {
    color: #324e8a;
    font-size: 14px;
}

.btn-clear-persistence {
    color: #324e8a;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
    margin-left: 5px;
    white-space: nowrap;
}

.btn-clear-persistence:hover {
    color: #1e293b;
}

/* Efeito nos campos preenchidos */
.form-group select.auto-filled {
    background-color: #f0f7ff !important;
    border-color: #cbd5e1 !important;
}

/* Portal B2B: Profile Notice Styles */
.quote-persistence-notice.profile-notice {
    background: #ecfdf5;
    border-color: #10b981;
    color: #065f46;
}

.quote-persistence-notice.profile-notice i {
    color: #10b981;
}

.quote-persistence-notice.profile-notice a {
    color: #047857;
    font-weight: bold;
    text-decoration: underline;
}

/* Ocultar barra de busca lateral geral na página de Produto Único */
body.single-product .widget_search,
body.single-product .widget_product_search,
body.single-product .wp-search-form {
    display: none !important;
}

/* Success & Registration Nudge Styles */
.quote-success-msg {
    text-align: center;
    padding: 30px 20px;
    animation: slideUpFade 0.5s ease-out;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.success-icon-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.success-icon-container i {
    font-size: 60px;
    color: #25D366;
    display: block;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.quote-success-msg h4 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.quote-success-msg p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 25px;
}

.btn-complete-whatsapp,
.btn-complete-email {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 10px;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.btn-complete-whatsapp {
    background: #25D366;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.btn-complete-whatsapp:hover {
    background: #1eb954;
    transform: translateY(-2px);
}

.btn-complete-email {
    background: #324e8a;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(50, 78, 138, 0.2);
}

.btn-complete-email:hover {
    background: #2a4175;
    transform: translateY(-2px);
}

.btn-download-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #324e8a;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    background: #f1f5f9;
    transition: background 0.2s;
}

.btn-download-copy:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.registration-nudge {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.registration-nudge::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: rgba(14, 165, 233, 0.05);
    border-radius: 50%;
}

.registration-nudge p {
    font-size: 13px;
    color: #0c4a6e;
    margin-bottom: 15px;
    line-height: 1.4;
}

.registration-nudge .button {
    background: #0ea5e9 !important;
    color: #fff !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    display: inline-block !important;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.2);
    transition: all 0.2s !important;
}

.registration-nudge .button:hover {
    background: #0284c7 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.drawer-loading-overlay {
    backdrop-filter: blur(2px);
    border-radius: 10px;
    z-index: 100;
}

/* Field Validation Styles */
.field-error {
    border-color: #d9534f !important;
    background-color: #fff5f5 !important;
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
    40%, 60% { transform: translate3d(3px, 0, 0); }
}

.drawer-loading-overlay.requote-loading {
    background: rgba(255, 255, 255, 0.95);
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
}

.loading-content i {
    color: #324e8a;
    margin-bottom: 20px;
}

.loading-content p {
    font-size: 14px;
    color: #334155;
    line-height: 1.6;
    margin: 0;
}

.loading-content strong {
    color: #324e8a;
    font-size: 16px;
    display: block;
    margin-bottom: 10px;
}
