/* Grid WooCommerce Products - Styles */

* {
    box-sizing: border-box;
}

.gwp-container {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: transparent;
}

/* Sidebar - Filtros */
.gwp-sidebar {
    flex: 0 0 240px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    padding: 18px;
    height: fit-content;
    position: sticky;
    top: 20px;
    border-radius: 2px;
}

.gwp-sidebar.gwp-sidebar-has-banner {
    position: static;
    top: auto;
}

.gwp-sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: #000;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.gwp-filter-group {
    margin-bottom: 12px;
    border-bottom: 1px solid #f5f5f5;
    padding-bottom: 10px;
}

.gwp-filter-group:last-of-type {
    border-bottom: none;
}

.gwp-filter-toggle {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    letter-spacing: 0.3px;
}

.gwp-toggle-icon {
    font-size: 10px;
    transition: transform 0.3s ease;
    color: #999;
}

.gwp-filter-toggle.active .gwp-toggle-icon {
    transform: rotate(180deg);
}

.gwp-filter-content {
    padding: 8px 0 5px;
    display: none;
}

.gwp-filter-content.active {
    display: block;
}

.gwp-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gwp-category-list li {
    margin-bottom: 6px;
}

.gwp-category-list label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 11px;
    color: #555;
    font-weight: 400;
}

.gwp-category-list input[type="checkbox"] {
    margin-right: 6px;
    cursor: pointer;
    width: 14px;
    height: 14px;
}

.gwp-count {
    margin-left: auto;
    color: #aaa;
    font-size: 10px;
}

.gwp-price-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gwp-price-inputs input {
    padding: 8px;
    border: 1px solid #e5e5e5;
    font-size: 11px;
    border-radius: 2px;
}

.gwp-price-apply {
    padding: 8px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: background 0.3s ease;
    border-radius: 2px;
}

.gwp-price-apply:hover {
    background: #333;
}

#gwp-search-name {
    width: 100%;
    padding: 8px;
    border: 1px solid #e5e5e5;
    font-size: 11px;
    border-radius: 2px;
}

.gwp-clear-filters {
    width: 100%;
    padding: 10px;
    background: #fff;
    color: #000;
    border: 1px solid #e5e5e5;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 15px;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.gwp-clear-filters:hover {
    background: #f5f5f5;
    border-color: #000;
}

.gwp-sidebar-banner {
    margin-top: 14px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    will-change: transform;
}

.gwp-sidebar-banner a {
    display: block;
}

.gwp-sidebar-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.gwp-sidebar-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

/* Main Content */
.gwp-main-content {
    flex: 1;
}

.gwp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.gwp-results-count {
    font-size: 16px;
    color: #000;
    font-weight: 500;
}

.gwp-sort-select {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gwp-sort-select label {
    font-size: 14px;
    color: #000;
    font-weight: 500;
}

.gwp-sort-select select {
    padding: 8px 30px 8px 12px;
    border: 1px solid #ddd;
    font-size: 14px;
    cursor: pointer;
    background: #fff;
}

/* Products Grid */
.gwp-products-wrapper {
    display: flex;
    gap: 30px;
}

.gwp-products-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    grid-auto-rows: minmax(100px, auto);
    grid-auto-flow: dense;
}

.gwp-grid-columns-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.gwp-grid-columns-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.gwp-grid-columns-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

/* Product Card */
.gwp-product-card {
    background: #fff;
    border: none;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gwp-product-image-wrapper {
    position: relative;
    overflow: hidden;
    background: #fff;
    aspect-ratio: 1;
}

.gwp-product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.5s ease;
}

.gwp-product-image-main {
    opacity: 1;
}

.gwp-product-image-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
}

.gwp-product-card:hover .gwp-product-image-main {
    opacity: 0;
    transform: scale(1.03);
}

.gwp-product-card:hover .gwp-product-image-hover {
    opacity: 1;
    transform: scale(1.03);
}

.gwp-sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #000;
    color: #fff;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 2px;
    z-index: 2;
}

.gwp-product-info {
    padding: 18px 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.gwp-product-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 4px 0;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.gwp-product-title a {
    color: #000;
    text-decoration: none;
    transition: color 0.3s ease;
}

.gwp-product-title a:hover {
    color: #DEFFC2;
}

.gwp-product-description {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 6px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.gwp-product-description p {
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.gwp-product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.gwp-stars {
    display: flex;
    gap: 1px;
}

.gwp-star {
    font-size: 13px;
}

.gwp-star-full {
    color: #FFC107;
}

.gwp-star-half {
    color: #FFC107;
    opacity: 0.5;
}

.gwp-star-empty {
    color: #d0d0d0;
}

.gwp-review-count {
    font-size: 11px;
    color: #666;
    font-weight: 500;
}

.gwp-product-description {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.gwp-product-description p {
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.gwp-product-extras {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
    align-items: flex-start;
}

.gwp-extra-tag {
    padding: 0;
    background: transparent;
    font-size: 11px;
    color: #666;
    border: none;
    line-height: 1.3;
    display: block;
}

.gwp-product-price {
    font-size: 22px;
    font-weight: 700;
    color: #000;
    margin-bottom: 3px;
    margin-top: auto;
}

.gwp-product-installment {
    font-size: 11px;
    color: #999;
    margin-bottom: 8px;
}

.gwp-product-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

.gwp-add-to-cart {
    width: 100%;
    padding: 12px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.gwp-add-to-cart:hover {
    background: #333;
}

.gwp-view-details {
    width: 100%;
    padding: 12px;
    background: #fff;
    color: #000;
    border: 2px solid #000;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: block;
}

.gwp-view-details:hover {
    background: #000;
    color: #fff;
}

/* Banner Column */
.gwp-banner-column {
    flex: 0 0 280px;
    width: 280px;
}

.gwp-banner-sticky {
    position: sticky;
    top: 20px;
    width: 280px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    will-change: transform;
}

.gwp-banner-sticky img {
    width: 280px;
    height: 570px;
    object-fit: cover;
    display: block;
}

.gwp-banner-sticky a {
    display: block;
}

.gwp-banner-sticky:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

/* Banner Inline (entre produtos) */
.gwp-banner-inline {
    background: transparent;
    padding: 0;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    will-change: transform;
}

.gwp-banner-inline img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gwp-banner-inline a {
    display: block;
    height: 100%;
}

.gwp-banner-inline a img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gwp-banner-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

/* Loading */
.gwp-loading {
    text-align: center;
    padding: 40px;
}

.gwp-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #000;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: gwp-spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes gwp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gwp-no-products {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #999;
    grid-column: 1 / -1;
}

/* Responsive */
@media (max-width: 1200px) {
    .gwp-products-grid {
        order: 1;
    }
    
    .gwp-banner-column {
        flex: 1;
        width: 100%;
        max-width: 600px;
        margin: 30px auto 0;
        order: 2;
        display: block;
    }
    
    .gwp-banner-sticky {
        position: static;
        width: 100%;
    }
    
    .gwp-banner-sticky img {
        width: 100%;
        height: auto;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .gwp-products-wrapper {
        flex-direction: column;
    }
}

@media (max-width: 992px) {
    .gwp-container {
        flex-direction: column;
    }
    
    .gwp-sidebar {
        position: static;
        flex: 1;
        max-width: 100%;
    }
    
    .gwp-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gwp-products-grid {
        grid-template-columns: 1fr;
    }
    
    .gwp-banner-column {
        width: 100%;
        max-width: 600px;
        margin: 24px auto 0;
        order: 2;
        display: block;
    }
    
    .gwp-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    /* Filtros retraídos no mobile */
    .gwp-sidebar {
        padding: 15px;
    }
    
    .gwp-sidebar-title {
        font-size: 13px;
        margin-bottom: 10px;
    }
    
    .gwp-filter-group {
        margin-bottom: 8px;
        padding-bottom: 8px;
    }
    
    .gwp-filter-toggle {
        font-size: 11px;
        padding: 5px 0;
    }
    
    .gwp-toggle-icon {
        font-size: 9px;
    }
    
    .gwp-filter-content {
        padding: 6px 0 3px;
    }
    
    .gwp-category-list li {
        margin-bottom: 5px;
    }
    
    .gwp-category-list label {
        font-size: 10px;
    }
    
    .gwp-category-list input[type="checkbox"] {
        width: 12px;
        height: 12px;
    }
    
    .gwp-count {
        font-size: 9px;
    }
    
    .gwp-price-inputs {
        gap: 6px;
    }
    
    .gwp-price-inputs input,
    #gwp-search-name,
    .gwp-price-apply {
        padding: 7px;
        font-size: 10px;
    }
    
    .gwp-clear-filters {
        padding: 8px;
        font-size: 10px;
        margin-top: 10px;
    }
    
    /* Filtros começam fechados no mobile */
    .gwp-filter-content.active {
        max-height: 300px;
        overflow-y: auto;
    }
}

/* Horizontal Layout Styles */
.gwp-container-horizontal {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: transparent;
}

.gwp-horizontal-filters {
    background: #fff;
    border: 1px solid #e8e8e8;
    padding: 18px;
    margin-bottom: 30px;
    border-radius: 2px;
}

.gwp-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 15px;
}

.gwp-filter-horizontal {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gwp-filter-horizontal label {
    font-size: 11px;
    font-weight: 600;
    color: #333;
    letter-spacing: 0.3px;
}

.gwp-horizontal-select,
.gwp-horizontal-input {
    padding: 8px 10px;
    border: 1px solid #e5e5e5;
    font-size: 11px;
    min-width: 160px;
    background: #fff;
    border-radius: 2px;
}

.gwp-horizontal-clear {
    padding: 8px 16px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: background 0.3s ease;
    align-self: flex-end;
    border-radius: 2px;
}

.gwp-horizontal-clear:hover {
    background: #333;
}

.gwp-horizontal-results {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.gwp-horizontal-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

@media (max-width: 1200px) {
    .gwp-horizontal-products {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .gwp-grid-columns-4 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 992px) {
    .gwp-horizontal-products {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gwp-grid-columns-3,
    .gwp-grid-columns-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .gwp-filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .gwp-filter-horizontal {
        width: 100%;
    }
    
    .gwp-horizontal-select,
    .gwp-horizontal-input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .gwp-horizontal-products {
        grid-template-columns: 1fr;
    }
    
    .gwp-grid-columns-2,
    .gwp-grid-columns-3,
    .gwp-grid-columns-4 {
        grid-template-columns: 1fr !important;
    }
    
    /* Filtros horizontais compactos no mobile */
    .gwp-horizontal-filters {
        padding: 15px;
    }
    
    .gwp-filters-row {
        gap: 10px;
        margin-bottom: 12px;
    }
    
    .gwp-filter-horizontal {
        gap: 5px;
    }
    
    .gwp-filter-horizontal label {
        font-size: 10px;
    }
    
    .gwp-horizontal-select,
    .gwp-horizontal-input {
        padding: 7px 8px;
        font-size: 10px;
        min-width: 100%;
    }
    
    .gwp-horizontal-clear {
        padding: 7px 12px;
        font-size: 10px;
    }
    
    .gwp-horizontal-results {
        font-size: 12px;
        padding-top: 10px;
    }
}

/* Simple Grid Layout (Sem Filtros) */
.gwp-container-simple {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: transparent;
}

.gwp-simple-products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

@media (max-width: 1200px) {
    .gwp-simple-products.gwp-grid-columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .gwp-simple-products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gwp-simple-products {
        grid-template-columns: 1fr;
    }
}

/* Modal de Feedback */
.gwp-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    display: flex;
}

.gwp-modal[style*="display: none"] {
    display: none !important;
}

.gwp-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.gwp-modal-content {
    position: relative;
    background: #fff;
    max-width: 480px;
    width: 90%;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: gwp-modal-slide-in 0.3s ease-out;
    z-index: 10000;
}

@keyframes gwp-modal-slide-in {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gwp-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
    z-index: 1;
}

.gwp-modal-close:hover {
    color: #000;
}

.gwp-modal-body {
    padding: 40px 30px;
    text-align: center;
}

.gwp-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.gwp-modal-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #000;
    border-radius: 50%;
    animation: gwp-modal-spin 0.8s linear infinite;
}

@keyframes gwp-modal-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gwp-modal-loading p {
    font-size: 15px;
    color: #666;
    margin: 0;
}

.gwp-modal-success,
.gwp-modal-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.gwp-modal-icon-success,
.gwp-modal-icon-error {
    animation: gwp-success-pop 0.5s ease-out;
}

@keyframes gwp-success-pop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}

.gwp-modal-success h3,
.gwp-error-title {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin: 0;
}

.gwp-error-message {
    color: #666;
    margin: 0;
    font-size: 14px;
}

.gwp-modal-actions {
    display: flex;
    gap: 12px;
    width: 100%;
    margin-top: 10px;
}

.gwp-modal-continue {
    flex: 1;
    padding: 12px 20px;
    background: #fff;
    color: #000;
    border: 2px solid #000;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.gwp-modal-continue:hover {
    background: #f5f5f5;
}

.gwp-modal-cart {
    flex: 1;
    padding: 12px 20px;
    background: #000;
    color: #fff;
    border: 2px solid #000;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.gwp-modal-cart:hover {
    background: #333;
    border-color: #333;
}