/* --- Container Geral --- */
#speedwoo-app { width: 100%; display: flex; flex-direction: column; align-items: center; }
#sw-menu-container, #sw-grid-container, #sw-pagination-wrapper, .sw-search-wrapper { width: 90vw; max-width: 1440px; }

/* --- Search Bar --- */
.sw-search-wrapper { position: relative; margin: 20px auto; display: flex; align-items: center; max-width: 600px; }
#sw-search-input { width: 100%; padding: 15px 25px; border: 1px solid #e0e0e0; border-radius: 12px; font-size: 16px; outline: none; font-weight: 500; background-color: #f9f9f9; transition: all 0.3s ease; padding-right: 60px; }
#sw-search-input:focus { border-color: #cccccc; background-color: #ffffff; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
#sw-btn-clear { position: absolute; right: 10px; background: #8B0000; color: #fff; border: none; border-radius: 4px; padding: 4px 8px; cursor: pointer; font-size: 14px; font-weight: 500; }

/* --- Search Results --- */
#sw-search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: #ffffff; z-index: 9999; box-shadow: 0 10px 30px rgba(0,0,0,0.15); max-height: 450px; overflow-y: auto; border-radius: 12px; border: 1px solid #eee; }
.sw-hidden { display: none; }
.sw-search-item { display: flex; align-items: center; padding: 12px; border-bottom: 1px solid #f5f5f5; cursor: pointer; }
.sw-search-item:last-child { border-bottom: none; }
.sw-search-item:hover { background: #fafafa; }
.sw-search-item img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; margin-right: 15px; flex-shrink: 0; }
.sw-search-info { display: flex; flex-direction: column; }
.sw-search-title { font-weight: 600; font-size: 14px; color: #333; margin-bottom: 4px; line-height: 1.3; }
.sw-search-price { color: #27ae60; font-weight: 700; font-size: 15px; }

/* --- Menu de Categorias --- */
#sw-menu-container { background: #fff; border-bottom: 1px solid #eee; position: sticky; top: 0; z-index: 10; margin-bottom: 15px; }
#sw-nav-wrapper { width: 100%; overflow-x: auto; white-space: nowrap; padding: 15px 0; cursor: grab; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
#sw-nav-wrapper::-webkit-scrollbar { display: none; }
.sw-scroll-h { display: inline-flex; gap: 12px; }
.sw-cat-btn { display: inline-block; padding: 10px 24px; background: #f5f5f5; border-radius: 30px; cursor: pointer; font-weight: 700; font-size: 15px; border: 1px solid #ddd; flex-shrink: 0; user-select: none; }
.sw-cat-btn.active { background: #000; color: #fff; border-color: #000; }

/* --- Grid Produtos --- */
.sw-grid { display: flex; flex-wrap: wrap; gap: 1.33%; padding: 20px 0; }
.sw-card { display: flex; align-items: flex-start; gap: 12px; padding: 15px; width: 24%; border: 1px solid #eee; border-radius: 12px; background: #fff; box-sizing: border-box; margin-bottom: 1.33%; transition: all 0.2s ease; text-decoration: none; color: inherit; }
.sw-card:hover { transform: translateY(-2px); border-color: #bbb; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.sw-img-box { width: 100px; height: 100px; flex-shrink: 0; border-radius: 8px; overflow: hidden; }
.sw-img-box img { width: 100%; height: 100%; object-fit: cover; }
.sw-prod-info { flex: 1; min-width: 0; }
.sw-prod-name { font-size: 17px; font-weight: 800; margin: 0 0 6px 0; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-prod-desc { font-size: 14px; color: #555; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4; }
.sw-prod-price { font-weight: 900; color: #1b5e20; font-size: 18px; }

/* --- Paginação --- */
#sw-pagination-wrapper { margin: 20px 0 40px; width: 100%; display: flex; justify-content: center; }
.sw-scroll-h-pag { display: flex; justify-content: center; overflow-x: auto; scroll-behavior: smooth; gap: 8px; padding: 10px 20px; width: 100%; max-width: 1440px; scrollbar-width: none; }
.sw-scroll-h-pag::-webkit-scrollbar { display: none; }
.sw-page-btn { flex: 0 0 auto; min-width: 45px; height: 45px; display: flex; align-items: center; justify-content: center; border: 1px solid #eee; cursor: pointer; border-radius: 6px; font-size: 15px; font-weight: bold; background: #fff; }
.sw-page-btn.active { background: #000; color: #fff; border-color: #000; }

/* --- Responsivo --- */
@media (max-width: 1100px) { .sw-card { width: 49%; } }
@media (max-width: 650px) { 
    .sw-card { width: 100%; } 
    .sw-scroll-h-pag { justify-content: flex-start; padding-left: calc(50% - 22.5px); padding-right: calc(50% - 22.5px); }
}