/**
 * Perfilmil - Shop Archive Page
 * Página da loja com grid de produtos
 * @version 1.0
 */

/* ==================== CONTAINER PRINCIPAL ==================== */
.perfilmil-shop-page {
    background: #f8f9fa;
    padding: 40px 0 80px;
    min-height: 70vh;
}

.perfilmil-shop-page .bd-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== BREADCRUMB ==================== */
.shop-breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    margin-bottom: 20px;
    color: #6c757d;
}

.shop-breadcrumb a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s;
}

.shop-breadcrumb a:hover {
    color: #2980b9;
}

.shop-breadcrumb i.fa-chevron-right {
    font-size: 10px;
}

/* ==================== HEADER ==================== */
.shop-header {
    text-align: center;
    margin-bottom: 40px;
}

.shop-title {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
}

.shop-title i {
    color: #3498db;
}

.shop-description {
    font-size: 16px;
    color: #6c757d;
    margin: 0;
}

/* ==================== TOOLBAR ==================== */
.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 16px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.result-count {
    font-size: 14px;
    color: #495057;
}

.result-count strong {
    color: #2c3e50;
    font-weight: 700;
}

.woocommerce-ordering {
    position: relative;
    display: inline-block;
}

.woocommerce-ordering select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 8px 40px 8px 16px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 13px;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s;
    background: #fff;
    font-weight: 500;
    min-width: 200px;
}

.woocommerce-ordering select:hover {
    border-color: #3498db;
    background: #f8fbff;
}

.woocommerce-ordering select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.woocommerce-ordering::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
    font-size: 11px;
    transition: transform 0.3s;
}

.woocommerce-ordering:hover::after {
    color: #3498db;
}

/* ==================== LAYOUT ==================== */
.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* ==================== SIDEBAR ==================== */
.shop-sidebar {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 20px;
}

.filter-widget {
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 2px solid #f8f9fa;
}

.filter-widget:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title i {
    color: #3498db;
}

.product-categories {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-categories li {
    margin-bottom: 10px;
}

.product-categories a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 14px;
}

.product-categories a:hover {
    background: #f8fbff;
    color: #3498db;
    transform: translateX(5px);
}

.product-categories a i {
    margin-right: 8px;
    font-size: 10px;
}

.product-categories .count {
    background: #e9ecef;
    color: #6c757d;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* ==================== FILTRO DE PREÇO ==================== */
.widget_price_filter .widget-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
}

.widget_price_filter .price_slider_wrapper {
    padding: 10px 0;
}

.widget_price_filter .price_slider {
    margin-bottom: 20px;
    height: 4px;
    background: #e9ecef;
    border-radius: 4px;
    position: relative;
}

.widget_price_filter .ui-slider-range {
    background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
    border-radius: 4px;
    height: 4px;
}

.widget_price_filter .ui-slider-handle {
    width: 16px;
    height: 16px;
    background: #fff;
    border: 3px solid #3498db;
    border-radius: 50%;
    cursor: pointer;
    top: -6px;
    outline: none;
    transition: all 0.3s;
}

.widget_price_filter .ui-slider-handle:hover,
.widget_price_filter .ui-slider-handle:focus {
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.4);
}

.widget_price_filter .price_slider_amount {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.widget_price_filter .price_label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.widget_price_filter .price_label::before {
    content: '\f02b';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #3498db;
}

.widget_price_filter .button {
    width: 100%;
    padding: 10px 20px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.widget_price_filter .button::before {
    content: '\f0b0';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.widget_price_filter .button:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f6391 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Inputs de preço (se existirem) */
.widget_price_filter input[type="text"],
.widget_price_filter input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 13px;
    color: #495057;
    transition: all 0.3s;
}

.widget_price_filter input[type="text"]:focus,
.widget_price_filter input[type="number"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Label "Filtrar por preço" duplicado - ocultar */
.widget_price_filter form > .screen-reader-text {
    display: none;
}

/* Banner Sidebar */
.sidebar-banner {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    color: #fff;
    margin-top: 20px;
}

.banner-content i {
    font-size: 40px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.banner-content h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.banner-content p {
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.95;
}

.banner-btn {
    display: inline-block;
    padding: 10px 25px;
    background: #fff;
    color: #3498db;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s;
}

.banner-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ==================== GRID DE PRODUTOS ==================== */
.shop-products {
    width: 100%;
}

/* Resetar estilos padrão do WooCommerce */
.shop-products ul.products {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 25px !important;
    width: 100% !important;
    max-width: none !important;
    clear: both !important;
}

.shop-products ul.products::before,
.shop-products ul.products::after {
    display: none !important;
}

.shop-products ul.products li {
    margin: 0 !important;
    padding: 0 !important;
    width: auto !important;
    float: none !important;
    display: block !important;
}

/* Remove classes de coluna do WooCommerce */
.shop-products ul.products.columns-1,
.shop-products ul.products.columns-2,
.shop-products ul.products.columns-3,
.shop-products ul.products.columns-4,
.shop-products ul.products.columns-5,
.shop-products ul.products.columns-6 {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Imagem */
.product-image {
    position: relative;
    background: #f8f9fa;
    overflow: hidden;
    aspect-ratio: 1;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

/* Badges */
.badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
}

.sale-badge {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
}

.out-of-stock-badge {
    background: #95a5a6;
    color: #fff;
}

/* Ações Rápidas */
.product-actions-quick {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
}

.product-card:hover .product-actions-quick {
    opacity: 1;
    transform: translateX(0);
}

.quick-view {
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
    color: #495057;
}

.quick-view:hover {
    background: #3498db;
    color: #fff;
    transform: scale(1.1);
}

/* Informações do Produto */
.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.product-category {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
}

.product-category i {
    margin-right: 5px;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.product-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s;
}

.product-title a:hover {
    color: #3498db;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.rating-count {
    color: #6c757d;
    font-size: 12px;
}

.product-price {
    font-size: 24px;
    font-weight: 700;
    color: #27ae60;
}

.product-price del {
    font-size: 16px;
    color: #95a5a6;
    margin-right: 8px;
}

.product-installment {
    font-size: 13px;
    color: #6c757d;
}

.product-installment i {
    margin-right: 5px;
    color: #3498db;
}

.product-add-to-cart {
    margin-top: auto;
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
}

.add-to-cart-btn:hover {
    background: linear-gradient(135deg, #229954 0%, #1e8449 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.add-to-cart-btn.disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.add-to-cart-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* ==================== PAGINAÇÃO ==================== */
.shop-pagination {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.shop-pagination a,
.shop-pagination span {
    padding: 12px 20px;
    background: #fff;
    color: #495057;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid #e9ecef;
}

.shop-pagination a:hover,
.shop-pagination .current {
    background: #3498db;
    color: #fff;
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* ==================== NENHUM PRODUTO ==================== */
.no-products-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.no-products-found i {
    font-size: 80px;
    color: #e9ecef;
    margin-bottom: 20px;
}

.no-products-found h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.no-products-found p {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 25px;
}

.back-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.back-home-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1f6391 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* ==================== RESPONSIVIDADE ==================== */
@media (max-width: 1024px) {
    .shop-layout {
        grid-template-columns: 250px 1fr;
    }
    
    .shop-products ul.products {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
        gap: 20px !important;
    }
}

@media (max-width: 768px) {
    .perfilmil-shop-page {
        padding: 20px 0 40px;
    }
    
    .shop-title {
        font-size: 28px;
        flex-direction: column;
        gap: 10px;
    }
    
    .shop-toolbar {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .shop-layout {
        grid-template-columns: 1fr;
    }
    
    .shop-sidebar {
        position: relative;
        top: 0;
        order: 2;
    }
    
    .shop-products ul.products {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
        gap: 15px !important;
        order: 1;
    }
    
    .sidebar-banner {
        display: none;
    }
}

@media (max-width: 480px) {
    .shop-title {
        font-size: 24px;
    }
    
    .shop-products ul.products {
        grid-template-columns: 1fr !important;
    }
}
