/* Reset do catálogo */
.cwp-standalone-body {
    margin: 0 !important;
    padding: 0 !important;
    background-color: var(--cwp-header-bg, #faf7f5);
}

.cwp-catalogo, 
.cwp-catalogo * {
    box-sizing: border-box !important;
}

.cwp-catalogo { font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }

/* Header - full width */
.cwp-header {
    padding: 20px 24px;
    border-bottom: none;
}
.cwp-header-content {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between; width: 100%;
}
.cwp-header h1 { margin: 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.03em; }
.cwp-logo { max-height: 48px; width: auto; display: block; object-fit: contain; }

/* Filtros */
.cwp-filters { 
    display: flex; gap: 8px; padding: 20px 24px; 
    flex-wrap: nowrap; overflow-x: auto; 
    -webkit-overflow-scrolling: touch; scrollbar-width: thin; 
    scrollbar-color: #d6d0c9 transparent;
    max-width: 1200px; margin: 0 auto;
}
.cwp-filters::-webkit-scrollbar { height: 6px; }
.cwp-filters::-webkit-scrollbar-track { background: transparent; }
.cwp-filters::-webkit-scrollbar-thumb { background: #d6d0c9; border-radius: 6px; }
.cwp-filters::-webkit-scrollbar-thumb:hover { background: #c0542b; }

.cwp-filter-btn {
    flex: 0 0 auto;
    padding: 8px 20px; border: none; border-radius: 999px;
    background: transparent; cursor: pointer; font-size: 0.8125rem;
    font-family: inherit; transition: all 0.2s ease; font-weight: 500;
    color: #666; white-space: nowrap;
}
.cwp-filter-btn:hover { color: #333; opacity: 0.85; }
.cwp-filter-btn.active { color: #fff; }

/* Busca */
.cwp-search-container {
    padding: 0 24px 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.cwp-search-input {
    width: 100%; max-width: 400px; padding: 12px 16px;
    border: 1px solid #d6d0c9; border-radius: 8px; font-family: inherit;
    font-size: 0.9375rem; color: #333; transition: border-color 0.2s;
    background: #fff;
}
.cwp-search-input:focus { outline: none; border-color: #999; }

/* Content wrapper */
.cwp-content { max-width: 1200px; margin: 0 auto; }

/* Grid de produtos */
.cwp-products-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px; padding: 20px 24px; max-width: 1200px; margin: 0 auto;
}

/* Card */
.cwp-product-card {
    background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease; cursor: pointer;
    display: flex; flex-direction: column;
}
.cwp-product-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.1); transform: translateY(-2px); }

.cwp-product-image { aspect-ratio: 1; overflow: hidden; background: #f5f3f0; position: relative; display: block; width: 100%; }
.cwp-product-image img { 
    position: absolute !important; top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important; 
    max-width: 100% !important; max-height: 100% !important;
    object-fit: cover !important; display: block !important;
    margin: 0 !important; padding: 0 !important; border: none !important;
    transition: transform 0.5s ease; 
}
.cwp-product-card:hover .cwp-product-image img { transform: scale(1.05); }

.cwp-product-info { padding: 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }

.cwp-product-category {
    font-size: 0.6875rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.06em; color: #999; margin: 0; 
    border: none !important; outline: none !important; box-shadow: none !important;
}

.cwp-product-name { 
    margin: 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; text-overflow: ellipsis; height: 2.6em;
}
.cwp-product-desc { margin: 0; font-size: 0.8125rem; color: #888; line-height: 1.5; }

.cwp-product-bottom {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: auto; padding-top: 12px;
}

.cwp-product-price { margin: 0; font-size: 1.0625rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.cwp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 20px; border: none; border-radius: 8px;
    font-size: 0.8125rem; font-weight: 500; cursor: pointer; text-align: center;
    transition: opacity 0.2s ease, transform 0.1s ease; font-family: inherit;
}
.cwp-btn:active { transform: scale(0.97); }

.cwp-btn-round {
    width: 36px; height: 36px; border-radius: 50%; border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s ease; flex-shrink: 0;
}
.cwp-btn-round:active { transform: scale(0.92); }
.cwp-btn-round:hover { opacity: 0.85; }

/* .cwp-add-cart { width: 100%; } removido para não esticar o botão redondo */

/* Footer - full width */
.cwp-footer {
    padding: 40px 32px; text-align: center; margin-top: 48px;
}
.cwp-footer-content { max-width: 1200px; margin: 0 auto; }
.cwp-footer p { margin: 0 0 16px; font-size: 0.875rem; opacity: 0.8; }
.cwp-social { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.cwp-social a {
    color: inherit; text-decoration: none; font-size: 0.8125rem;
    opacity: 0.7; transition: opacity 0.2s; font-weight: 500;
    display: inline-flex; align-items: center; gap: 6px;
}
.cwp-social a:hover { opacity: 1; }
.cwp-social a svg { width: 16px; height: 16px; }

/* Cart overlay with transition */
.cwp-cart-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0); z-index: 9998;
    transition: background 0.3s ease;
}
.cwp-cart-overlay.cwp-visible { background: rgba(0,0,0,0.4); }

/* Cart drawer with slide */
.cwp-cart-drawer {
    position: fixed; top: 0; right: 0; width: 380px; max-width: 90vw; 
    height: 100vh; height: 100dvh;
    background: #fff; z-index: 9999; display: flex; flex-direction: column;
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.cwp-cart-drawer.cwp-visible { transform: translateX(0); }

.cwp-cart-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 24px; border-bottom: 1px solid #f0f0f0; }
.cwp-cart-header h3 { margin: 0; font-size: 1.0625rem; font-weight: 600; }
.cwp-cart-header button { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #999; width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
.cwp-cart-header button:hover { background: #f5f5f5; }
.cwp-cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cwp-cart-empty { text-align: center; color: #bbb; padding: 48px 0; font-size: 0.875rem; }
.cwp-cart-footer { padding: 16px 24px; border-top: 1px solid #f0f0f0; }
.cwp-cart-total { margin: 0 0 12px; font-size: 0.9375rem; text-align: right; }
.cwp-cart-total strong { font-weight: 700; }
.cwp-cart-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 0; border-bottom: 1px solid #f7f7f7; }
.cwp-cart-item-info { flex: 1; }
.cwp-cart-item-name { font-weight: 500; font-size: 0.875rem; }
.cwp-cart-item-price { font-size: 0.8125rem; color: #888; margin-top: 2px; }
.cwp-cart-item-qty { display: flex; align-items: center; gap: 8px; }
.cwp-cart-item-qty button { width: 28px; height: 28px; border: 1px solid #e5e5e5; border-radius: 8px; background: #fff; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.cwp-cart-item-qty button:hover { border-color: #ccc; background: #fafafa; }
.cwp-cart-item-qty span { min-width: 20px; text-align: center; font-size: 0.875rem; font-weight: 500; }

/* Botão flutuante */
.cwp-cart-toggle {
    position: fixed; bottom: 24px; right: 24px; width: 56px; height: 56px;
    border-radius: 50%; border: none; cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15); z-index: 9997;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cwp-cart-toggle:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
.cwp-cart-toggle:active { transform: scale(0.95); }
.cwp-cart-toggle svg { width: 22px; height: 22px; }
#cwp-cart-count {
    position: absolute; top: -2px; right: -2px;
    min-width: 20px; height: 20px; border-radius: 10px;
    font-size: 0.6875rem; font-weight: 700; line-height: 20px; text-align: center;
    background: #ef4444; color: #fff;
    display: none;
}
.cwp-cart-toggle.cwp-has-items #cwp-cart-count { display: block; }

/* Responsivo */
@media (max-width: 640px) {
    .cwp-products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 12px; }
    .cwp-product-info { padding: 10px; }
    .cwp-product-name { font-size: 0.8125rem; }
    .cwp-product-price { font-size: 0.9375rem; }
    .cwp-header { padding: 16px; }
    .cwp-footer { padding: 32px 16px; }
    .cwp-product-desc { display: none; }

    /* Modal Mobile */
    .cwp-modal-body { flex-direction: column; }
    .cwp-modal-image { min-width: 100%; min-height: 300px; }
    .cwp-modal-info { padding: 20px; }
    .cwp-modal-container { max-height: 95vh; margin: 0; }

    /* Carrinho Mobile Fixo */
    .cwp-cart-drawer { width: 100%; height: 100dvh; max-width: 100vw; }
    .cwp-cart-body { padding-bottom: 140px; flex: 1; overflow-y: auto; } /* Mais espaço e flex */
    .cwp-cart-footer { 
        position: fixed; bottom: 0; left: 0; right: 0; 
        background: #fff; box-shadow: 0 -4px 15px rgba(0,0,0,0.08); 
        padding: 20px; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
        z-index: 10; border-top: 1px solid #f0ede9;
    }
}

/* Modal de Produto */
.cwp-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0); z-index: 10000;
    display: none; align-items: center; justify-content: center;
    transition: background 0.3s ease; padding: 20px;
}
.cwp-modal-overlay.cwp-visible { background: rgba(0,0,0,0.6); display: flex; }

.cwp-modal-container {
    background: #fff; border-radius: 16px; width: 100%; max-width: 800px;
    max-height: 90vh; overflow-y: auto; position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transform: scale(0.95); opacity: 0; transition: all 0.3s ease;
}
.cwp-modal-overlay.cwp-visible .cwp-modal-container { transform: scale(1); opacity: 1; }

.cwp-modal-close {
    position: absolute; top: 16px; right: 16px; width: 32px; height: 32px;
    border: none; background: #fff; border-radius: 50%; font-size: 24px;
    line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: #333; box-shadow: 0 2px 8px rgba(0,0,0,0.1); transition: all 0.2s ease; z-index: 2;
}
.cwp-modal-close:hover { background: #f0f0f0; transform: scale(1.1); }

.cwp-modal-body { display: flex; flex-direction: row; }
.cwp-modal-image { flex: 1; min-width: 300px; background: #f5f3f0; position: relative; min-height: 400px; }
.cwp-modal-image img { width: 100%; height: 100%; object-fit: contain; display: block; position: absolute; max-height: 100%; background: #f5f3f0; }
.cwp-modal-info { flex: 1; padding: 32px; display: flex; flex-direction: column; }
.cwp-modal-info h2 { margin: 0 0 16px; font-size: 1.5rem; }
.cwp-modal-desc { font-size: 0.9375rem; color: #555; line-height: 1.6; margin-bottom: 24px; flex: 1; }
.cwp-modal-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 20px; border-top: 1px solid #eee; }

@media (max-width: 768px) {
    .cwp-modal-body { flex-direction: column; }
    .cwp-modal-image { min-height: 250px; }
    .cwp-modal-image img { position: relative; }
    .cwp-modal-info { padding: 24px; }
}

/* Esgotado */
.cwp-out-of-stock {
    opacity: 0.6;
    filter: grayscale(100%);
}
.cwp-out-of-stock .cwp-product-image {
    position: relative;
}
.cwp-badge-esgotado {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}
.cwp-btn-disabled {
    cursor: not-allowed !important;
    background: #ccc !important;
    color: #fff !important;
}

/* Delivery Section */
.cwp-delivery-section { background: #faf8f5; }
.cwp-delivery-option {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px; background: #fff; border: 1px solid #e5e0db;
    border-radius: 6px; cursor: pointer; transition: 0.2s; font-size: 0.9375rem;
}
.cwp-delivery-option:hover { border-color: #c0542b; }
.cwp-delivery-option input { margin: 0 10px 0 0; accent-color: #c0542b; }

/* Sidebar Menu */
.cwp-sidebar-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5); z-index: 9991;
    opacity: 0; transition: opacity 0.3s;
}
.cwp-sidebar-overlay.cwp-visible { opacity: 1; }

.cwp-sidebar-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: 100%; max-width: 300px;
    background: #fff; z-index: 9992; box-shadow: -4px 0 24px rgba(0,0,0,0.1);
    transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column;
}
.cwp-sidebar-drawer.cwp-visible { transform: translateX(0); }

.cwp-sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #e5e0db;
}
.cwp-sidebar-header h3 { margin: 0; font-size: 1.125rem; }
.cwp-sidebar-header button {
    background: none; border: none; cursor: pointer; padding: 4px; color: #666;
    display: flex; align-items: center; justify-content: center; border-radius: 4px; transition: 0.2s;
}
.cwp-sidebar-header button:hover { background: #f5f3f0; color: #000; }

.cwp-sidebar-body {
    flex: 1; overflow-y: auto; padding: 24px 20px;
}

/* Sidebar Social Buttons */
.cwp-social-btn {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: 8px;
    border: 1px solid #e5e0db;
    text-decoration: none; font-size: 0.9375rem; font-weight: 600;
    transition: all 0.2s ease;
}
.cwp-social-btn svg { width: 22px; height: 22px; }

.cwp-instagram { background: #fcf1f3; color: #E1306C; border-color: #f7d7e0; }
.cwp-instagram:hover { background: #E1306C; color: #fff; border-color: #E1306C; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(225, 48, 108, 0.2); }

.cwp-facebook { background: #f0f5fc; color: #1877F2; border-color: #d8e5f8; }
.cwp-facebook:hover { background: #1877F2; color: #fff; border-color: #1877F2; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(24, 119, 242, 0.2); }

.cwp-whatsapp { background: #eef9f1; color: #25D366; border-color: #d3ecd9; }
.cwp-whatsapp:hover { background: #25D366; color: #fff; border-color: #25D366; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2); }

/* Custom Login Form Overrides inside Modal */
#cwp-login-modal #loginform input.input:focus { border-color: #c0542b; outline: none; }

/* Alternador de Layout */
.cwp-layout-toggle {
    background: #fff; border: 1px solid #d6d0c9; border-radius: 8px; padding: 10px;
    cursor: pointer; color: #666; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    height: 44px; width: 44px;
}
.cwp-layout-toggle:hover { border-color: #999; color: #333; }
.cwp-layout-toggle[data-layout="grid"] .cwp-icon-grid { display: none !important; }
.cwp-layout-toggle[data-layout="grid"] .cwp-icon-list { display: block !important; }
.cwp-layout-toggle[data-layout="list"] .cwp-icon-list { display: none !important; }
.cwp-layout-toggle[data-layout="list"] .cwp-icon-grid { display: block !important; }

/* Modifier de Layout "Lista" */
.cwp-products-grid.cwp-layout-list {
    display: flex; flex-direction: column; gap: 16px;
}
.cwp-products-grid.cwp-layout-list .cwp-product-card {
    flex-direction: row; align-items: stretch; height: auto; min-height: 120px;
}
.cwp-products-grid.cwp-layout-list .cwp-product-image {
    width: 130px; flex-shrink: 0; border-right: 1px solid #f0f0f0; aspect-ratio: unset;
}
.cwp-products-grid.cwp-layout-list .cwp-product-info {
    flex: 1; padding: 16px; justify-content: center; min-width: 0;
}
.cwp-products-grid.cwp-layout-list .cwp-product-category {
    margin-bottom: 4px;
}
.cwp-products-grid.cwp-layout-list .cwp-product-name {
    height: auto; -webkit-line-clamp: 1; margin-bottom: 6px; font-size: 1rem;
}
.cwp-products-grid.cwp-layout-list .cwp-product-desc {
    -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden;
}
.cwp-products-grid.cwp-layout-list .cwp-product-bottom {
    padding-top: 12px; margin-top: auto; justify-content: space-between; gap: 12px;
}
@media (max-width: 480px) {
    .cwp-products-grid.cwp-layout-list .cwp-product-image { width: 100px; }
    .cwp-products-grid.cwp-layout-list .cwp-product-info { padding: 12px; }
    .cwp-products-grid.cwp-layout-list .cwp-product-name { font-size: 0.875rem; margin-bottom: 4px; }
    .cwp-products-grid.cwp-layout-list .cwp-product-desc { display: none; }
}
