/**
 * TEATIA LOJA PRO - CSS COMPLETO
 * Grid 3 colunas + Página de produto profissional
 */

/* ===================================
   HERO DA LOJA
=================================== */
.shop-hero-pro {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    padding: 50px 20px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.shop-hero-pro::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    animation: float-hero 20s ease-in-out infinite;
}

@keyframes float-hero {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(5deg); }
}

.shop-page-title {
    font-family: 'Fredoka', sans-serif;
    font-size: clamp(2rem, 4vw, 2.6rem);
    font-weight: 700;
    margin: 0 0 10px;
    position: relative;
    z-index: 1;
}

.title-icon {
    font-size: 0.85em;
    margin-right: 8px;
}

.gradient-text {
    background: linear-gradient(135deg, #ffc107 0%, #ff4081 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shop-page-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    opacity: 0.95;
    margin: 0 0 24px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

.shop-hero-features {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.feature-icon {
    font-size: 1.2em;
}

/* ===================================
   LAYOUT PRINCIPAL
=================================== */
.shop-main-area {
    padding: 40px 0 60px;
    background: #f8f9fa;
}

.shop-container-full {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.shop-layout-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* ===================================
   BOTÃO MOBILE FILTROS
=================================== */
.mobile-filter-toggle {
    display: none;
    width: 100%;
    background: white;
    border: 2px solid #9c27b0;
    padding: 14px 20px;
    border-radius: 12px;
    color: #9c27b0;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.mobile-filter-toggle:hover {
    background: #9c27b0;
    color: white;
}

.filter-icon {
    font-size: 1.2em;
}

/* ===================================
   SIDEBAR DE FILTROS
=================================== */
.shop-sidebar {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 100px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.sidebar-header h3 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.3rem;
    color: #333;
    margin: 0;
}

.close-sidebar {
    display: none;
    background: #f0f0f0;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    color: #666;
    transition: all 0.3s ease;
}

.close-sidebar:hover {
    background: #9c27b0;
    color: white;
}

/* Seções de Filtro */
.filter-section {
    margin-bottom: 24px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
}

.filter-section:last-of-type {
    border-bottom: none;
}

.filter-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    margin: 0 0 16px;
    padding: 0;
    user-select: none;
}

.filter-title span:first-child {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.05rem;
    color: #333;
    font-weight: 600;
}

.toggle-icon {
    font-size: 1.3rem;
    color: #9c27b0;
    font-weight: 700;
}

.filter-section.collapsed .filter-content {
    display: none;
}

.filter-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Checkboxes Customizados */
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 6px 0;
    transition: all 0.2s ease;
}

.filter-checkbox:hover {
    padding-left: 4px;
}

.filter-checkbox input[type="checkbox"] {
    display: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.filter-checkbox input[type="checkbox"]:checked + .checkbox-custom {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    border-color: #9c27b0;
}

.filter-checkbox input[type="checkbox"]:checked + .checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: 700;
}

.checkbox-label {
    font-size: 0.95rem;
    color: #555;
}

/* Filtro de Preço - CORRIGIDO */
.price-filter-range {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.price-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.price-input-group label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.price-input-group input {
    padding: 10px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.price-input-group input:focus {
    outline: none;
    border-color: #9c27b0;
}

.btn-apply-price {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-apply-price:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
}

/* Filtro de Tags */
.filter-tag {
    display: inline-block;
    cursor: pointer;
}

.filter-tag input[type="checkbox"] {
    display: none;
}

.tag-badge {
    display: inline-block;
    padding: 6px 14px;
    background: #f0f0f0;
    border: 2px solid transparent;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #666;
    transition: all 0.3s ease;
}

.filter-tag:hover .tag-badge {
    background: #e8e8e8;
}

.filter-tag input[type="checkbox"]:checked + .tag-badge {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: white;
    border-color: #9c27b0;
}

/* Botão Limpar Filtros */
.btn-clear-filters {
    width: 100%;
    background: #f0f0f0;
    border: 2px solid #e0e0e0;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.btn-clear-filters:hover {
    background: #fee;
    border-color: #f44336;
    color: #f44336;
}

/* ===================================
   ÁREA DE PRODUTOS
=================================== */
.shop-products-area {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Toolbar */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 28px;
    border-bottom: 2px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 16px;
}

.toolbar-left .result-count {
    margin: 0;
    font-size: 0.95rem;
    color: #666;
}

.toolbar-left .result-count strong {
    color: #9c27b0;
    font-weight: 700;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* View Mode Toggle */
.view-mode {
    display: flex;
    gap: 8px;
    background: #f0f0f0;
    padding: 4px;
    border-radius: 10px;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    color: #666;
    transition: all 0.3s ease;
}

.view-btn.active {
    background: white;
    color: #9c27b0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.view-btn:hover {
    color: #9c27b0;
}

/* Sort Select */
.sort-select select,
.sort-select .orderby {
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    cursor: pointer;
    background: white;
    color: #333;
    transition: all 0.3s ease;
}

.sort-select select:focus,
.sort-select .orderby:focus {
    outline: none;
    border-color: #9c27b0;
}

/* ===================================
   GRID DE PRODUTOS - 3 COLUNAS FIXAS
=================================== */
.products-grid,
.products-grid-clean,
.woocommerce ul.products {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

/* Força Grid em TODAS as variações */
.woocommerce ul.products.columns-1,
.woocommerce ul.products.columns-2,
.woocommerce ul.products.columns-3,
.woocommerce ul.products.columns-4,
.woocommerce ul.products.columns-5,
.woocommerce ul.products.columns-6,
.woocommerce-page ul.products.columns-1,
.woocommerce-page ul.products.columns-2,
.woocommerce-page ul.products.columns-3,
.woocommerce-page ul.products.columns-4,
.woocommerce-page ul.products.columns-5,
.woocommerce-page ul.products.columns-6 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
    width: 100% !important;
    float: none !important;
}

/* Reset de floats e widths do WooCommerce */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    width: 100% !important;
    float: none !important;
    margin: 0 !important;
    clear: none !important;
}

/* ===================================
   CARDS PERSONALIZADOS TEATia
=================================== */
.product-card-teatia {
    background: white;
    border-radius: 16px;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #f0f0f0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.product-card-teatia::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(198, 163, 213, 0.05), rgba(178, 205, 214, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.product-card-teatia:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(198, 163, 213, 0.25);
    border-color: #c6a3d5;
}

.product-card-teatia:hover::before {
    opacity: 1;
}

.product-card-teatia .product-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    flex: 1;
}

.product-card-teatia .product-image {
    position: relative;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.product-card-teatia .product-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card-teatia:hover .product-image img {
    transform: scale(1.08);
}

.product-card-teatia .badge-sale {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
    animation: pulse-badge 2s infinite;
    z-index: 2;
}

.product-card-teatia .product-title {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.05rem;
    color: #2d3748;
    margin: 16px 16px 12px;
    font-weight: 600;
    line-height: 1.4;
    min-height: 50px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card-teatia .product-price {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #c6a3d5;
    margin: 0 16px 16px;
}

.product-card-teatia .product-price del {
    color: #999;
    font-size: 1rem;
    margin-right: 8px;
}

.product-card-teatia .product-price ins {
    text-decoration: none;
    color: #4caf50;
}

.product-card-teatia .btn-add-cart {
    width: calc(100% - 32px);
    margin: 0 16px 16px;
    padding: 14px;
    background: linear-gradient(135deg, #c6a3d5, #b2cdd6);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(198, 163, 213, 0.3);
}

.product-card-teatia .btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(198, 163, 213, 0.4);
    background: linear-gradient(135deg, #b292c4, #9bb5bf);
}

/* ===================================
   CARDS DE PRODUTOS
=================================== */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    background: white;
    border-radius: 16px;
    padding: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.woocommerce ul.products li.product::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.05), rgba(0, 188, 212, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(156, 39, 176, 0.2);
    border-color: #9c27b0;
}

.woocommerce ul.products li.product:hover::before {
    opacity: 1;
}

/* Imagem do Produto */
.woocommerce ul.products li.product img,
.woocommerce ul.products li.product .attachment-woocommerce_thumbnail {
    width: 100% !important;
    height: 220px !important;
    object-fit: cover !important;
    border-radius: 12px !important;
    margin-bottom: 14px !important;
    transition: all 0.4s ease !important;
}

.woocommerce ul.products li.product:hover img {
    transform: scale(1.05);
}

/* Badge de Desconto */
.woocommerce span.onsale {
    position: absolute !important;
    top: 24px !important;
    right: 24px !important;
    background: linear-gradient(135deg, #ffc107, #ff9800) !important;
    color: #fff !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
    z-index: 2 !important;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4) !important;
    animation: pulse-badge 2s infinite !important;
    min-height: auto !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

@keyframes pulse-badge {
    0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4); }
    50% { transform: scale(1.08); box-shadow: 0 6px 18px rgba(255, 152, 0, 0.6); }
}

/* Título do Produto */
.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce ul.products li.product h2,
.woocommerce ul.products li.product h3 {
    font-family: 'Fredoka', sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: #333 !important;
    margin: 0 0 10px !important;
    line-height: 1.4 !important;
    min-height: 2.8em !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.woocommerce ul.products li.product a {
    text-decoration: none !important;
}

.woocommerce ul.products li.product a:hover .woocommerce-loop-product__title {
    color: #9c27b0 !important;
}

/* Preço do Produto */
.woocommerce ul.products li.product .price {
    font-family: 'Poppins', sans-serif !important;
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #9c27b0 !important;
    margin: 0 0 14px !important;
    display: block !important;
}

.woocommerce ul.products li.product .price del {
    opacity: 0.5 !important;
    font-size: 0.85em !important;
    margin-right: 6px !important;
    color: #999 !important;
}

.woocommerce ul.products li.product .price ins {
    text-decoration: none !important;
    background: linear-gradient(135deg, #9c27b0, #7b1fa2) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* Botão Adicionar ao Carrinho */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button {
    width: 100% !important;
    background: linear-gradient(135deg, #9c27b0, #7b1fa2) !important;
    color: white !important;
    border: none !important;
    padding: 12px 20px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    text-transform: none !important;
}

.woocommerce ul.products li.product .button::before,
.woocommerce ul.products li.product .add_to_cart_button::before {
    content: '🛒' !important;
    font-size: 1.1em !important;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .add_to_cart_button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.4) !important;
}

.woocommerce ul.products li.product .added_to_cart {
    display: block !important;
    width: 100% !important;
    margin-top: 8px !important;
    padding: 8px !important;
    background: #4caf50 !important;
    color: white !important;
    text-align: center !important;
    border-radius: 8px !important;
    font-size: 0.85rem !important;
    text-decoration: none !important;
}

/* ===================================
   PAGINAÇÃO
=================================== */
.shop-pagination {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.shop-pagination .page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.shop-pagination .page-numbers li {
    list-style: none;
}

.shop-pagination .page-numbers a,
.shop-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    background: white;
    border: 2px solid #e0e0e0;
    color: #666;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.shop-pagination .page-numbers a:hover {
    background: #9c27b0;
    color: white;
    border-color: #9c27b0;
    transform: translateY(-2px);
}

.shop-pagination .page-numbers .current {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: white;
    border-color: #9c27b0;
}

/* ===================================
   SEM PRODUTOS
=================================== */
.no-products-found {
    text-align: center;
    padding: 60px 20px;
}

.no-products-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.no-products-found h2 {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.8rem;
    color: #333;
    margin: 0 0 12px;
}

.no-products-found p {
    color: #666;
    margin: 0 0 24px;
}

.btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
    color: white;
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.3);
}

/* ===================================
   RESPONSIVO
=================================== */
@media (max-width: 1024px) {
    .shop-layout-grid {
        grid-template-columns: 1fr;
    }
    
    .mobile-filter-toggle {
        display: flex;
    }
    
    .shop-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 320px;
        max-width: 85%;
        height: 100vh;
        z-index: 9999;
        overflow-y: auto;
        transition: left 0.4s ease;
        border-radius: 0;
    }
    
    .shop-sidebar.active {
        left: 0;
        box-shadow: 2px 0 30px rgba(0, 0, 0, 0.3);
    }
    
    .close-sidebar {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .products-grid,
    .products-grid-clean,
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .shop-hero-pro {
        padding: 40px 16px;
    }
    
    .shop-hero-features {
        gap: 12px;
    }
    
    .feature-item {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    
    .shop-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left,
    .toolbar-right {
        width: 100%;
    }
    
    .toolbar-right {
        justify-content: space-between;
    }
    
    .products-grid,
    .products-grid-clean,
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
    
    .woocommerce ul.products li.product img {
        height: 180px !important;
    }
}

@media (max-width: 480px) {
    .shop-page-title {
        font-size: 1.8rem;
    }
    
    .shop-hero-features {
        flex-direction: column;
        gap: 8px;
    }
    
    .feature-item {
        width: 100%;
        justify-content: center;
    }
    
    .products-grid,
    .products-grid-clean,
    .woocommerce ul.products {
        grid-template-columns: 1fr !important;
    }
    
    .view-mode {
        display: none;
    }
}
