/**
 * Estilos Frontend - Sistema de Unidades Zantrix
 */

/* Classes Tailwind para o botão de compra */
.text-foreground { color: #0f172a; }
.text-muted-foreground { color: #64748b; }
.border-border { border-color: #e2e8f0; }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.from-green-500 { --tw-gradient-from: #10b981; --tw-gradient-to: rgba(16, 185, 129, 0); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to); }
.to-emerald-600 { --tw-gradient-to: #059669; }
.hover\:from-green-600:hover { --tw-gradient-from: #059669; }
.hover\:to-emerald-700:hover { --tw-gradient-to: #047857; }
.border-green-400\/20 { border-color: rgba(52, 211, 153, 0.2); }
.hover\:-translate-y-0\.5:hover { transform: translateY(-0.125rem); }
.hover\:scale-105:hover { transform: scale(1.05); }
.active\:scale-95:active { transform: scale(0.95); }
.text-red-500 { color: #ef4444; }

/* Layout do botão de compra - ORGANIZADO E LIMPO */
.zantrix-buy-unit {
    margin-bottom: 24px;
}

.zantrix-buy-unit .mb-6 {
    margin-bottom: 24px;
}

.zantrix-buy-unit .flex {
    display: flex;
}

.zantrix-buy-unit .items-center {
    align-items: center;
}

.zantrix-buy-unit .mb-4 {
    margin-bottom: 16px;
}

.zantrix-buy-unit .mr-4 {
    margin-right: 16px;
}

.zantrix-buy-unit .ml-4 {
    margin-left: 16px;
}

.zantrix-buy-unit .text-sm {
    font-size: 14px;
}

.zantrix-buy-unit .space-y-4 > * + * {
    margin-top: 16px;
}

.zantrix-buy-unit .flex-col {
    flex-direction: column;
}

.zantrix-buy-unit .sm\:flex-row {
    flex-direction: row;
}

.zantrix-buy-unit .gap-4 {
    gap: 16px;
}

.zantrix-buy-unit .items-stretch {
    align-items: stretch;
}

.zantrix-buy-unit .sm\:items-center {
    align-items: center;
}

.zantrix-buy-unit .flex-1 {
    flex: 1;
}

.zantrix-buy-unit .gap-3 {
    gap: 12px;
}

.zantrix-buy-unit .gap-2 {
    gap: 8px;
}

/* Controles de quantidade - ESTILO PERSONALIZADO */
.quantity-decrease, .quantity-increase {
    background: white;
    border: 1px solid #d1d5db;
    color: #6b7280;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
    font-size: 16px;
    font-weight: 500;
}

/* Personalizações específicas para os botões */
.quantity-decrease {
    border-radius: 10px 0px 0px 10px !important;
}

.quantity-increase {
    border-radius: 0px 10px 10px 0px !important;
}

.quantity-decrease:hover, .quantity-increase:hover,
.quantity-decrease:focus, .quantity-increase:focus,
.quantity-decrease:active, .quantity-increase:active {
    background: #F7BB3B !important;
    color: white !important;
}

.quantity-display {
    background: white;
    border: 1px solid #d1d5db;
    color: #111827;
    padding: 8px 12px;
    min-width: 50px;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
}

/* Botão principal - COR VERDE CORRETA COM GRADIENTE E !IMPORTANT */
.zantrix-buy-unit .btn-buy-unit {
    background: linear-gradient(to right, #10b981, #059669) !important;
    color: white !important;
    border: none !important;
    padding: 16px 32px !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 1 !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2) !important;
    border: 1px solid rgba(52, 211, 153, 0.2) !important;
}

.zantrix-buy-unit .btn-buy-unit:hover {
    background: linear-gradient(to right, #059669, #047857) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3) !important;
}

/* Classes Tailwind para gradiente COM !IMPORTANT */
.zantrix-buy-unit .bg-gradient-to-r {
    background-image: linear-gradient(to right, var(--tw-gradient-stops)) !important;
}

.zantrix-buy-unit .from-green-500 {
    --tw-gradient-from: #10b981 !important;
    --tw-gradient-to: rgba(16, 185, 129, 0) !important;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

.zantrix-buy-unit .to-emerald-600 {
    --tw-gradient-to: #059669 !important;
}

.zantrix-buy-unit .hover\:from-green-600:hover {
    --tw-gradient-from: #059669 !important;
}

.zantrix-buy-unit .hover\:to-emerald-700:hover {
    --tw-gradient-to: #047857 !important;
}

.zantrix-buy-unit .hover\:shadow-xl:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
}

.zantrix-buy-unit .btn-buy-unit svg {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* Botões de curtir e compartilhar - ESTILO LIMPO */
.like-button, .share-button {
    background: white;
    border: 1px solid #d1d5db;
    color: #6b7280;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 14px;
}

.like-button:hover, .share-button:hover {
    background: #f9fafb;
    color: #374151;
    transform: scale(1.05);
    border-color: #9ca3af;
}

.like-button:active, .share-button:active {
    transform: scale(0.95);
}

.like-button svg, .share-button svg {
    width: 20px;
    height: 20px;
}

/* Responsividade */
@media (min-width: 640px) {
    .zantrix-buy-unit .sm\:flex-row {
        flex-direction: row;
    }
    
    .zantrix-buy-unit .sm\:items-center {
        align-items: center;
    }
}

/* Mobile: esconder texto "Compartilhar" */
@media (max-width: 768px) {
    .share-text {
        display: none;
    }
}

/* Botão WhatsApp Flutuante */
.zantrix-whatsapp-float {
    position: fixed;
    z-index: 1000;
    transition: all 0.3s ease;
}

.zantrix-whatsapp-trigger {
    background: #25d366;
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.zantrix-whatsapp-trigger:hover {
    background: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.zantrix-whatsapp-trigger svg {
    width: 24px;
    height: 24px;
}

.zantrix-whatsapp-float.bottom-right {
    bottom: 20px;
    right: 20px;
}

.zantrix-whatsapp-float.bottom-left {
    bottom: 20px;
    left: 20px;
}

.zantrix-whatsapp-float.top-right {
    top: 20px;
    right: 20px;
}

.zantrix-whatsapp-float.top-left {
    top: 20px;
    left: 20px;
}

.whatsapp-float-link {
    display: flex;
    align-items: center;
    background: #25d366;
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.whatsapp-float-link:hover {
    background: #128c7e;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
    color: white;
    text-decoration: none;
}

.whatsapp-icon {
    margin-right: 10px;
    width: 24px;
    height: 24px;
}

.whatsapp-text {
    font-weight: bold;
}

/* Responsividade do botão flutuante */
.show-mobile-only {
    display: none;
}

.show-desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .show-mobile-only {
        display: block;
    }
    
    .show-desktop-only {
        display: none;
    }
    
    .whatsapp-float-link {
        padding: 12px 16px;
    }
    
    .whatsapp-text {
        display: none;
    }
}

/* Modal WhatsApp - VERSÃO UNIFICADA E CORRIGIDA */
.zantrix-units-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    border: none;
}

.zantrix-units-modal.active {
    display: flex !important;
    opacity: 1;
    align-items: center;
    justify-content: center;
    z-index: 9999 !important;
}

/* Garantir que o modal tenha prioridade máxima */
.zantrix-units-modal {
    z-index: 9999 !important;
}

/* Para Safari iOS - garantir que funcione */
@supports (-webkit-touch-callout: none) {
    .zantrix-units-modal {
        position: fixed !important;
        z-index: 9999 !important;
    }
    
    .zantrix-units-modal.active {
        display: flex !important;
        z-index: 9999 !important;
    }
}

.zantrix-units-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.zantrix-units-modal .modal-header h3 {
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    font-size: 16px;
}

.zantrix-units-modal .close-btn {
    color: #6b7280;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zantrix-units-modal .close-btn:hover {
    color: #374151;
}

.zantrix-units-modal .units-list {
    max-height: 320px;
    overflow-y: auto;
}

.zantrix-units-modal .units-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.zantrix-units-modal .unit-item {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
    margin-bottom: 12px;
}

.zantrix-units-modal .unit-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.zantrix-units-modal .unit-name {
    font-weight: 500;
    color: #1f2937;
    margin: 0 0 4px 0;
    font-size: 14px;
}

.zantrix-units-modal .unit-address {
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.zantrix-units-modal .unit-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.zantrix-units-modal .unit-whatsapp,
.zantrix-units-modal .unit-maps {
    margin-top: 4px;
    display: inline-block;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.zantrix-units-modal .unit-whatsapp {
    color: #059669;
    background: #f0fdf4;
}

.zantrix-units-modal .unit-whatsapp:hover {
    color: #047857;
    background: #dcfce7;
}

.zantrix-units-modal .unit-maps {
    color: #6b7280;
    background: #f9fafb;
}

.zantrix-units-modal .unit-maps:hover {
    color: #374151;
    background: #f3f4f6;
}

.zantrix-units-modal .loading {
    text-align: center;
    padding: 20px;
    color: #6b7280;
    font-size: 14px;
}

.zantrix-units-modal .error {
    text-align: center;
    padding: 20px;
    color: #dc2626;
    font-size: 14px;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    /* Background removido conforme solicitado - regras específicas mantidas abaixo */
    
    .zantrix-units-modal .modal-header h3 {
        color: white;
    }
    
    .zantrix-units-modal .close-btn {
        color: #9ca3af;
    }
    
    .zantrix-units-modal .close-btn:hover {
        color: #d1d5db;
    }
    
    .zantrix-units-modal .unit-item {
        border-bottom-color: #374151;
    }
    
    .zantrix-units-modal .unit-name {
        color: white;
    }
    
    .zantrix-units-modal .unit-address {
        color: #9ca3af;
    }
    
    .zantrix-units-modal .unit-whatsapp {
        color: #10b981;
        background: #064e3b;
    }
    
    .zantrix-units-modal .unit-whatsapp:hover {
        color: #059669;
        background: #065f46;
    }
    
    .zantrix-units-modal .unit-maps {
        color: #9ca3af;
        background: #374151;
    }
    
    .zantrix-units-modal .unit-maps:hover {
        color: #d1d5db;
        background: #4b5563;
    }
}

@media (max-width: 768px) {
    .zantrix-units-modal {
        width: 280px;
        right: 10px;
        bottom: 90px;
    }
}

/* Botão Comprar na Unidade - REGRA DUPLICADA REMOVIDA */

/* Definições duplicadas removidas - usando apenas a versão unificada acima */

/* Desabilitar scroll quando modal estiver ativo - COMPATÍVEL COM SAFARI iOS */
body.modal-open {
    position: fixed !important;
    width: 100% !important;
    overflow: hidden !important;
    -webkit-overflow-scrolling: touch;
}

/* Para Safari iOS especificamente */
@supports (-webkit-touch-callout: none) {
    body.modal-open {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        overflow: hidden !important;
        -webkit-overflow-scrolling: touch;
    }
}

.modal-overlay {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 0;
}

.modal-content {
    position: relative;
    background: #F3F4F7;
    border-radius: 8px;
    max-width: 550px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.modal-title-section {
    flex: 1;
}

.modal-title {
    margin: 0 0 8px 0;
    font-size: 1.5em;
    color: #1f2937 !important;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.modal-icon {
    width: 20px;
    height: 20px;
    color: #10b981;
}

.modal-description {
    margin: 0;
    color: #666;
    font-size: 0.9em;
    line-height: 1.4;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: #333;
    background: #f5f5f5;
}

.modal-close svg {
    width: 16px;
    height: 16px;
}

.modal-body {
    padding: 20px;
}

.quantity-selector,
.message-selector {
    margin-bottom: 20px;
}

.quantity-selector label,
.message-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.quantity-input {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.message-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}

.units-list {
    max-height: 400px;
    overflow-y: auto;
}

.unit-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    background: white;
}

.unit-item:hover {
    border-color: #10b981;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
    transform: translateY(-2px);
    border: 2px solid #10b981;
}

.unit-info {
    flex: 1;
}

.unit-info h4 {
    margin: 0 0 8px 0;
    font-size: 1.1em;
    color: #1f2937;
    font-weight: 600;
}

.unit-location {
    color: #6b7280;
    font-size: 0.9em;
    margin-bottom: 8px;
}

.unit-price {
    font-weight: 600;
}

.price-old {
    text-decoration: line-through;
    color: #9ca3af;
    margin-right: 8px;
    font-size: 0.9em;
}

.price-new {
    color: #dc2626;
    font-size: 1.1em;
}

.price-label {
    color: #6b7280;
    font-size: 0.9em;
    font-weight: 500;
}

.unit-actions {
    display: flex;
    align-items: center;
}

.btn-select-unit {
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    gap: 8px;
    white-space: nowrap;
}

.btn-select-unit:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-select-unit svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Preço por Unidade */
.zantrix-unit-price {
    margin: 10px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
}

.price-label {
    display: block;
    font-size: 0.9em;
    color: #666;
}

.price-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #F7BB3B;
}

.price-note {
    display: block;
    font-size: 0.8em;
    color: #999;
    margin-top: 5px;
}

/* Cards de Unidades */
.zantrix-units-cards .units-filters {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.botao-filtro{
    background-color: #F7BB3B;
}
.search-form,
.filters-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-form input,
.filters-form select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-form button,
.filters-form button {
    background: #F7BB3B;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.search-form button:hover,
.filters-form button:hover {
    background: #005a87;
}

.clear-filters {
    color: #666;
    text-decoration: none;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.clear-filters:hover {
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
}

.units-grid {
    display: grid;
    gap: 20px;
}

.units-grid[data-columns="1"] {
    grid-template-columns: 1fr;
}

.units-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.units-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.units-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .units-grid[data-columns="2"],
    .units-grid[data-columns="3"],
    .units-grid[data-columns="4"] {
        grid-template-columns: 1fr;
    }   
    
    .search-form,
    .filters-form {
        align-items: stretch;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
}

.unit-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.unit-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.unit-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.unit-content {
    padding: 20px;
}

.unit-name {
    margin: 0 0 15px 0;
    font-size: 1.3em;
    color: #333;
}

.unit-location,
.unit-address,
.unit-phone,
.unit-whatsapp,
.unit-hours {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    color: #666;
}

.location-icon,
.address-icon,
.phone-icon,
.whatsapp-icon,
.hours-icon {
    margin-right: 8px;
    width: 16px;
}

.unit-phone a,
.unit-whatsapp a {
    color: #F7BB3B;
    text-decoration: none;
}

.unit-phone a:hover,
.unit-whatsapp a:hover {
    text-decoration: underline;
}

.unit-description {
    margin: 15px 0;
    color: #666;
    line-height: 1.5;
}

.unit-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* --- Horários nas cards --- */
.unit-hours { display:flex; align-items:center; gap:8px; }
.unit-hours .hours-icon svg { color:#6b7280; opacity:.8; }
.btn-toggle-hours {
    display: inline-block;
    margin-left: 6px;
    padding: 4px 10px;
    font-size: 12px;
    color: #0369a1;
    text-decoration: none;
    font-weight: 600;
    background: #e0f2fe;
    border: 1px solid #93c5fd;
    border-radius: 999px;
}

.btn-toggle-hours:hover {
    background: #dbeafe;
    border-color: #60a5fa;
}

.unit-card .hours-details {
    display: none !important;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}
.unit-card .hours-details.active { display: block !important; }

.hours-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.hours-grid .day-open,
.hours-grid .day-closed {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 12px;
}

.hours-grid .day-open { color: #047857 !important; background: #ecfdf5; }
.hours-grid .day-closed { color: #dc2626 !important; background: #fef2f2; }

.hours-grid .status-icon { width: 14px; height: 14px; fill: currentColor; }
.hours-grid .status-icon.open { color: #047857; }
.hours-grid .status-icon.closed { color: #dc2626; }

/* Ocultar os botões principais quando a área de horários estiver aberta */
.unit-content .hours-details.active ~ .unit-actions { display: none !important; }

.btn-whatsapp,
.btn-maps {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-whatsapp {
    background: #25d366;
    color: white;
}

.btn-whatsapp:hover {
    background: #128c7e;
    color: white;
    text-decoration: none;
}

.btn-maps {
    background: #F7BB3B;
    color: white;
}

.btn-maps:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

.no-units {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    grid-column: 1 / -1;
}

/* Seletor de Unidades na Página do Produto */
.zantrix-units-selector {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.zantrix-units-selector h3 {
    margin: 0 0 20px 0;
    color: #333;
}

.zantrix-units-selector .units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.zantrix-units-selector .unit-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.zantrix-units-selector .unit-info h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.zantrix-units-selector .unit-location {
    color: #666;
    margin-bottom: 10px;
}

.zantrix-units-selector .unit-price {
    font-weight: bold;
    margin-bottom: 10px;
}

.zantrix-units-selector .unit-stock {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 15px;
}

/* Preços por Unidade na Página do Produto */
.zantrix-unit-pricing {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #F7BB3B;
}

.unit-price-info {
    margin: 0;
}

/* Animações */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.unit-card {
    animation: fadeIn 0.5s ease-out;
}

/* Estados de carregamento */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #F7BB3B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Botão WhatsApp Flutuante - Estilo Original Elegante */
.zantrix-whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.zantrix-whatsapp-trigger {
    background: #25d366 !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 60px !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4) !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    animation: pulse-whatsapp 2s infinite !important;
}

.zantrix-whatsapp-trigger:hover {
    background: #128c7e !important;
    transform: scale(1.1) !important;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6) !important;
    animation: none !important;
}

.zantrix-whatsapp-trigger:active {
    transform: scale(0.95) !important;
}

.zantrix-whatsapp-trigger svg {
    width: 28px !important;
    height: 28px !important;
    fill: currentColor !important;
}

/* Animação de pulsação elegante */
@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6), 0 0 0 10px rgba(37, 211, 102, 0.1);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
        transform: scale(1);
    }
}

/* CSS duplicado removido - usando apenas a definição acima */

.zantrix-units-modal h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.zantrix-units-modal .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.zantrix-units-modal .close-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.zantrix-units-modal ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.zantrix-units-modal li {
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.zantrix-units-modal li:last-child {
    border-bottom: none;
}

.zantrix-units-modal .unit-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
    font-size: 14px;
}

.zantrix-units-modal .unit-address {
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.zantrix-units-modal .unit-whatsapp {
    color: #25d366;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s ease;
}

.zantrix-units-modal .unit-whatsapp:hover {
    color: #128c7e;
    text-decoration: none;
}

/* Cards de Unidades */
.zantrix-units-cards {
    margin: 20px 0;
}

.units-filters {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-box {
    margin-bottom: 15px;
}

.filters-box {
    margin-bottom: 0;
}

.search-form,
.filters-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.search-form input[type="search"],
.filters-form select {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    color: #374151;
    transition: all 0.2s ease;
    min-width: 150px;
}

.search-form input[type="search"]:focus,
.filters-form select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-form button,
.filters-form button {
    background: #3b82f6;
    color: white;
    border: 1px solid #3b82f6;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.search-form button:hover,
.filters-form button:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.clear-filters {
    background: #6b7280;
    color: white;
    border: 1px solid #6b7280;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    display: inline-block;
}

.clear-filters:hover {
    background: #4b5563;
    border-color: #4b5563;
    color: white;
    text-decoration: none;
}

.filters-box {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filters-form {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.filters-form select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    min-width: 150px;
}

.filters-form button {
    background: #F7BB3B;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s ease;
}

.filters-form button:hover {
    background: #005a87;
}

.clear-filters {
    background: #6c757d;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease;
}

.clear-filters:hover {
    background: #545b62;
    color: white;
    text-decoration: none;
}

.units-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.unit-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.unit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.unit-image {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
}

.unit-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.unit-content {
    color: #333;
}

.unit-name {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #2c3e50;
}

.unit-location,
.unit-address,
.unit-phone,
.unit-whatsapp,
.unit-hours {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
}

.unit-location span,
.unit-address span,
.unit-phone span,
.unit-whatsapp span,
.unit-hours span {
    margin-right: 8px;
    font-size: 16px;
}

.unit-phone a,
.unit-whatsapp a {
    color: #F7BB3B;
    text-decoration: none;
    font-weight: 500;
}

.unit-phone a:hover,
.unit-whatsapp a:hover {
    color: #005a87;
    text-decoration: underline;
}

.hours-content {
    flex: 1;
}

.day-hours {
    margin-bottom: 4px;
    font-size: 13px;
}

.day-hours strong {
    color: #2c3e50;
    margin-right: 5px;
}

.unit-description {
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

.unit-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-whatsapp,
.btn-maps {
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
}

.btn-whatsapp {
    background: #25d366;
    color: white;
    border: none;
}

.btn-whatsapp:hover {
    background: #128c7e;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

.btn-maps {
    background: #F7BB3B;
    color: white;
    border: none;
}

.btn-maps:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

.no-units {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

/* Responsividade */
@media (max-width: 768px) {
    .zantrix-whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
    
    .zantrix-whatsapp-trigger {
        width: 55px !important;
        height: 55px !important;
    }
    
    .zantrix-whatsapp-trigger svg {
        width: 24px !important;
        height: 24px !important;
    }
    
    /* Modal ocupa toda a tela no mobile */
    .zantrix-units-modal {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        right: 0 !important;
        bottom: 0 !important;
        padding: 16px !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .units-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .filters-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filters-form select {
        min-width: auto;
    }
    
    .unit-actions {
        flex-direction: row;
        width: 100%;
        gap: 12px;
    }
    /* Garante dois botões lado a lado dentro dos cards */
    .unit-card .unit-actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        width: 100% !important;
    }
    .unit-actions .btn-whatsapp,
    .unit-actions .btn-maps {
        flex: 1 1 50%;
        min-width: 0;
        width: 100% !important;
        text-align: center;
        justify-content: center;
    }
}

.zantrix-units-modal.hidden {
    display: none !important;
}

/* Animações */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Classes de visibilidade */
.show-mobile-only {
    display: none;
}

.show-desktop-only {
    display: block;
}

@media (max-width: 768px) {
    .show-mobile-only {
        display: block;
    }
    
    .show-desktop-only {
        display: none;
    }
    
    .zantrix-units-modal {
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
        max-height: 90vh;
    }
    
    .modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 16px;
    }
    
    .modal-title {
        font-size: 1.2em;
        line-height: 1.3;
    }
    
    .modal-description {
        font-size: 0.8em;
        line-height: 1.4;
        margin-bottom: 0;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .unit-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0px;
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .unit-info h4 {
        font-size: 1em;
        margin-bottom: 4px;
    }
    
    .unit-location {
        font-size: 0.8em;
        margin-bottom: 6px;
    }
    
    .unit-price {
        margin-bottom: 8px;
    }
    
    .price-label {
        font-size: 0.8em;
    }
    
    .unit-actions {
        margin-left: 0;
        justify-content: center;
        margin-top: 8px;
    }
    
    .btn-select-unit {
        width: 100%;
        min-width: auto;
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .modal-close {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 28px;
        height: 28px;
        padding: 6px;
    }
    
    .modal-close svg {
        width: 14px;
        height: 14px;
    }
    
    
    .zantrix-buy-unit .btn-buy-unit {
        width: 100%;
        padding: 12px 16px;
        font-size: 14px;
        min-height: 44px;
    }
    
    .zantrix-buy-unit .btn-buy-unit svg {
        width: 18px;
        height: 18px;
        margin-right: 6px;
    }
    
    .like-button, .share-button {
        width: 100%;
        padding: 10px 16px;
        font-size: 13px;
        min-height: 44px;
        justify-content: center;
    }
    
    .like-button svg, .share-button svg {
        width: 18px;
        height: 18px;
        margin-right: 6px;
    }
    
    /* Ajustes para seletor de quantidade no mobile */
    .zantrix-buy-unit .quantity-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .zantrix-buy-unit .quantity-controls {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 8px 12px;
        border: 1px solid #d1d5db;
        border-radius: 6px;
        background: white;
    }
    
    .zantrix-buy-unit .quantity-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 1px solid #d1d5db;
        background: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        font-weight: bold;
        color: #374151;
    }
    
    .zantrix-buy-unit .quantity-input {
        flex: 1;
        text-align: center;
        border: none;
        background: transparent;
        font-size: 16px;
        font-weight: 600;
        color: #374151;
        margin: 0 12px;
    }
    
    .zantrix-buy-unit .availability-text {
        text-align: center;
        font-size: 13px;
        color: #6b7280;
        margin-top: 4px;
    }
}
