/* Container */
.nts-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Arial', 'Helvetica', sans-serif;
    background-color: #fff;
    box-sizing: border-box;
}

@media (min-width: 769px) {
    .nts-container {
        width: 95vw !important;
        max-width: 1700px !important;
        position: relative !important;
        left: 50% !important;
        transform: translate(-50%, 0) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Header */
.nts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.nts-results-count {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.nts-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nts-sort {
    padding: 8px 35px 8px 12px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 10px center;
    background-size: 12px;
    cursor: pointer;
    appearance: none;
}

.nts-view-toggle {
    display: inline-flex !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    height: 38px !important;
    width: 82px !important;
    min-width: 82px !important;
    max-width: 82px !important;
    align-items: center !important;
    box-sizing: border-box !important;
}

.nts-view-toggle button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    border-left: 1px solid #ccc !important;
    background: #fff !important;
    color: #444 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    box-sizing: border-box !important;
}

.nts-view-toggle button:first-child {
    border-left: none !important;
}

.nts-view-toggle button.active {
    background: #cc0000 !important;
    color: #fff !important;
}

.nts-view-toggle button:hover:not(.active) {
    background: #f5f5f5 !important;
}

.nts-view-toggle button svg,
.nts-view-toggle button svg rect,
.nts-view-toggle button svg path {
    fill: currentColor !important;
}

/* Content Layout */
.nts-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.nts-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.nts-products {
    flex: 1;
    min-width: 0;
}

/* Filters */
.nts-filter-group {
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 15px;
    overflow: hidden;
}

.nts-filter-title {
    padding: 12px 15px;
    margin: 0;
    background: #f0f0f0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

.nts-filter-title .nts-toggle {
    font-size: 10px;
    transition: transform 0.3s;
}

.nts-filter-title.collapsed .nts-toggle {
    transform: rotate(-90deg);
}

.nts-filter-content {
    padding: 15px;
    background: #fff;
}

.nts-filter-content.hidden {
    display: none;
}

.nts-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
}

.nts-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: #cc0000;
}

.nts-checkbox span {
    cursor: pointer;
    line-height: 1.3;
}

.nts-checkbox span:last-child {
    color: #666;
}

.nts-price-range {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.nts-price-input {
    width: 70px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
}

.nts-price-input::placeholder {
    color: #999;
}

.nts-go-btn {
    padding: 6px 16px;
    background: #cc0000;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.nts-go-btn:hover {
    background: #990000;
}

.nts-price-presets .nts-checkbox {
    margin-bottom: 6px;
}

/* Products Grid - 4 COLUMNAS */
.nts-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Product Card */
.nts-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.2s;
    display: flex;
    flex-direction: column;
}

.nts-product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.nts-product-image {
    padding: 20px;
    text-align: center;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nts-product-image img {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    transition: transform 0.3s;
}

.nts-product-card:hover .nts-product-image img {
    transform: scale(1.05);
}

.nts-product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nts-product-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.4;
    min-height: 42px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nts-product-title a {
    display: block;
}

/* Force colors for links and titles to prevent themes from overriding them to white */
/* Using ID #nts-products-grid to ensure higher specificity than any theme selector */
#nts-products-grid .nts-product-card .nts-product-title,
#nts-products-grid .nts-product-card .nts-product-title a,
#nts-products-grid .nts-product-card .nts-product-title a:link,
#nts-products-grid .nts-product-card .nts-product-title a:visited,
body #nts-products-grid .nts-product-title a,
body #nts-products-grid .nts-product-title a:link,
body #nts-products-grid .nts-product-title a:visited,
.nts-product-card .nts-product-title a,
.nts-product-title a {
    color: #0066cc !important;
    -webkit-text-fill-color: #0066cc !important;
    text-decoration: none !important;
}

#nts-products-grid .nts-product-card .nts-product-title:hover,
#nts-products-grid .nts-product-card .nts-product-title a:hover,
#nts-products-grid .nts-product-card .nts-product-title a:focus,
#nts-products-grid .nts-product-card .nts-product-title a:active,
body #nts-products-grid .nts-product-title a:hover,
body #nts-products-grid .nts-product-title a:focus,
body #nts-products-grid .nts-product-title a:active,
.nts-product-card .nts-product-title a:hover,
.nts-product-title a:hover {
    color: #004b99 !important;
    -webkit-text-fill-color: #004b99 !important;
    text-decoration: underline !important;
    cursor: pointer;
}

.nts-item-number {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 500;
}

.nts-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.nts-stars {
    display: flex;
    gap: 2px;
}

.nts-star {
    color: #ccc;
    font-size: 18px;
    line-height: 1;
}

.nts-star.filled {
    color: #ff9900;
}

.nts-review-count {
    font-size: 13px;
    color: #555;
    line-height: 1;
    margin-left: 2px;
}

.nts-price {
    font-size: 22px;
    font-weight: 700;
    color: #000;
    margin-bottom: 12px;
}

.nts-shipping-info {
    margin-bottom: 12px;
    font-size: 12px;
}

.nts-shipping-row {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 4px;
    color: #333;
}

.nts-shipping-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.nts-shipping-text {
    flex: 1;
    line-height: 1.3;
}

.nts-shipping-link {
    color: #0066cc;
    text-decoration: underline;
    cursor: pointer;
    margin-left: 4px;
}

.nts-shipping-link:hover {
    text-decoration: none;
}

.nts-pickup-icon {
    color: #cc0000;
    font-size: 12px;
}

.nts-add-to-cart {
    width: 100%;
    padding: 12px;
    background: #cc0000;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nts-add-to-cart:hover {
    background: #990000;
}

.nts-product-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.nts-action-item {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 12px;
    color: #666;
}

.nts-action-item input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: #cc0000;
}

.nts-action-item span {
    cursor: pointer;
}

.nts-action-item:hover {
    color: #333;
}

/* No products */
.nts-no-products {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* Loading */
.nts-products-grid.nts-loading {
    position: relative;
    min-height: 400px;
}

.nts-products-grid.nts-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top-color: #cc0000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Modal */
.nts-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    overflow-y: auto;
}

.nts-modal-content {
    background: #fff;
    margin: 50px auto;
    padding: 30px;
    width: 90%;
    max-width: 1100px;
    border-radius: 4px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.nts-modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 32px;
    cursor: pointer;
    color: #999;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.nts-modal-close:hover {
    color: #333;
    background: #f0f0f0;
}

.nts-modal h2 {
    margin: 0 0 25px 0;
    font-size: 22px;
    color: #333;
    padding-right: 40px;
}

/* Compare Table */
.nts-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.nts-compare-table th,
.nts-compare-table td {
    padding: 15px;
    border: 1px solid #e0e0e0;
    text-align: left;
    vertical-align: top;
}

.nts-compare-table th {
    background: #f8f8f8;
    font-weight: 600;
    color: #333;
    min-width: 150px;
}

.nts-compare-table th.nts-compare-image-heading {
    background: #fff;
    min-width: 150px;
}

.nts-compare-table td {
    background: #fff;
}

.nts-compare-table img {
    max-width: 150px;
    display: block;
    margin: 0 auto 10px;
}

/* List View */
.nts-products-grid.nts-list-view {
    grid-template-columns: 1fr;
}

.nts-products-grid.nts-list-view .nts-product-card {
    flex-direction: row;
}

.nts-products-grid.nts-list-view .nts-product-image {
    min-height: auto;
    min-width: 250px;
    border-bottom: none;
    border-right: 1px solid #f0f0f0;
}

.nts-products-grid.nts-list-view .nts-product-info {
    flex: 1;
}

/* Responsive */
@media (max-width: 1200px) {
    .nts-products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .nts-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nts-content {
        flex-direction: column;
    }
    
    .nts-sidebar {
        width: 100%;
    }
    
    .nts-products-grid {
        grid-template-columns: 1fr;
    }
    
    .nts-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .nts-controls {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .nts-products-grid.nts-list-view .nts-product-card {
        flex-direction: column;
    }
    
    .nts-products-grid.nts-list-view .nts-product-image {
        min-width: auto;
        border-right: none;
        border-bottom: 1px solid #f0f0f0;
    }
}

/* Floating controls container */
#nts-floating-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    right: auto;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    z-index: 99999;
}

#nts-compare-btn,
#nts-saved-list-btn {
    position: static !important; /* Override absolute positioning */
    padding: 15px 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s;
    width: auto;
    text-align: center;
}

#nts-compare-btn {
    background: #cc0000;
    color: #fff;
}

#nts-compare-btn:hover {
    background: #990000;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

#nts-saved-list-btn {
    background: #0066cc;
    color: #fff;
}

#nts-saved-list-btn:hover {
    background: #004b99;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

/* Saved List Table */
.nts-saved-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-family: 'Arial', 'Helvetica', sans-serif;
}

.nts-saved-list-table th,
.nts-saved-list-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
    vertical-align: middle;
}

.nts-saved-list-table th {
    background: #f8f8f8;
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nts-saved-list-table td {
    background: #fff;
}

.nts-col-image {
    width: 70px;
    text-align: center;
}

.nts-col-image img {
    max-width: 60px;
    max-height: 60px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.nts-saved-title-link {
    font-size: 14px;
    font-weight: 600;
    color: #0066cc !important;
    -webkit-text-fill-color: #0066cc !important;
    text-decoration: none !important;
}

.nts-saved-title-link:hover {
    color: #004b99 !important;
    -webkit-text-fill-color: #004b99 !important;
    text-decoration: underline !important;
}

.nts-saved-sku {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

.nts-saved-price {
    font-size: 16px;
    font-weight: 700;
    color: #000;
}

.nts-saved-action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nts-saved-add-to-cart {
    padding: 8px 16px !important;
    font-size: 12px !important;
    width: auto !important;
    margin: 0 !important;
}

.nts-saved-remove-btn {
    background: none !important;
    border: none !important;
    color: #cc0000 !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    padding: 5px !important;
    transition: color 0.2s !important;
    display: flex !important;
    align-items: center !important;
}

.nts-saved-remove-btn:hover {
    color: #990000 !important;
    text-decoration: underline !important;
}

.nts-no-saved-items {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 15px;
}

.nts-modal-loading {
    text-align: center;
    padding: 30px;
    color: #666;
    font-size: 14px;
}

@media (max-width: 768px) {
    #nts-floating-container {
        left: 10px !important;
        right: 10px !important;
        bottom: 15px !important;
        flex-direction: row !important;
        gap: 10px !important;
        width: calc(100% - 20px) !important;
    }
    
    #nts-compare-btn,
    #nts-saved-list-btn {
        flex: 1 !important;
        width: 100% !important;
        padding: 13px 10px !important;
    }
    
    .nts-saved-list-table th, 
    .nts-saved-list-table td {
        padding: 8px 10px;
    }
    
    .nts-saved-action-buttons {
        flex-direction: column;
        gap: 5px;
        align-items: flex-start;
    }
}