/* 
 * GoodJava Suture Selector Styles
 * Matches the design from the screenshot
 */

/* ============================================
   Layout & Container
   ============================================ */
.gj-suture-selector-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Toggle Wrapper */
.ss-view-toggle {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
    gap: 10px;
}

.ss-view-btn {
    background: #f1f1f1;
    border: 1px solid #ddd;
    padding: 7px 14px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
}

.ss-view-btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* GRID VIEW - your existing style */
.gj-grid.grid-view .gj-product-card {
    width: calc(33.333% - 20px);
    display: inline-block;
    vertical-align: top;
}

/* LIST VIEW */
.gj-grid.list-view .gj-product-card {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

/* Product image resizing for list view */
.gj-grid.list-view .gj-product-card .gj-thumb {
    width: 140px !important;
    height: 140px !important;
    flex-shrink: 0;
}

.gj-grid.list-view .gj-product-card .gj-info {
    flex-grow: 1;
}

.suture-selector-layout {
    display: flex;
    gap: 30px;
    margin: 0 auto;
    padding: 0px 0px;
    border-top: 1px solid #E6E6E8;
}
.suture-selector-sidebar {
    width: 350px;
    flex-shrink: 0;
    border-right: 1px solid #E6E6E8;
    padding-top: 20px;
}
.suture-selector-main {
    flex: 1;
    min-width: 0;
    padding-top: 20px;
}
.gj-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin: 20px 0;
}
.ss-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 0;
}
.ss-checkbox-label:hover {
    color: #2563eb;
}
.ss-hidden {
    display: none !important;
}
.ss-show-more, .ss-show-less {
    color: #2563eb;
    background: none;
    border: none;
    cursor: pointer;
    margin-top: 10px;
    font-weight: 500;
}
.ss-show-more:hover, .ss-show-less:hover {
    text-decoration: underline;
}

/* Quick Filter Buttons */
.quick-filter-btn {
    transition: all 0.2s ease;
    box-shadow: 0 1px 6px rgba(0,0,0,0.1);
}
.quick-filter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    opacity: 0.9;
}
.quick-filter-btn.active {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
    transform: scale(1.05);
}
.material-btn:hover {
    filter: brightness(1.1);
}

/* Active Filter Tags */
.filter-tag {
    transition: all 0.2s ease;
}
.dynamic-tag:hover {
    background: #1d4ed8 !important;
    transform: scale(1.05);
}
.remove-filter-tag:hover {
    background: rgba(255,255,255,0.2) !important;
    border-radius: 50%;
}

/* Range Sliders - Archive Page Style */
.ss-range-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.ss-range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ss-range-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ss-range-slider::-webkit-slider-thumb:hover {
    background: #1d4ed8;
    transform: scale(1.1);
}

.ss-range-slider::-moz-range-thumb:hover {
    background: #1d4ed8;
    transform: scale(1.1);
}

.ss-slider-value {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@media (max-width: 992px) {
    .suture-selector-layout {
        flex-direction: column;
    }
    .suture-selector-sidebar {
        width: 100%;
    }
}
.woocommerce-result-count-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: transparent;
    margin: 0 auto;
}
/* ============================================
   Breadcrumb
   ============================================ */
.breadcrumb {
    font-size: 16px;
    color: #666;
    margin-bottom: 20px;
    background: transparent;
    margin-top: 30px;
}

.breadcrumb a {
    color: #5B5B5B;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #999;
}

.breadcrumb span {
    color: #235582;
    font-weight: 700;
    font-size: 16px;
    text-decoration: underline;
}

/* ============================================
   Header Section
   ============================================ */
.gj-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.gj-results-info {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.gj-results-title {
    font-size: 32px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.gj-product-count {
    font-size: 14px;
    color: #666;
}

.gj-header-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.gj-toggle-stock {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.gj-toggle-stock input[type="checkbox"] {
    width: 40px;
    height: 20px;
    cursor: pointer;
}

.gj-sort-by {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.gj-sort-by select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

.gj-view-toggle {
    display: flex;
    gap: 8px;
}

.gj-view-toggle button {
    padding: 8px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.gj-view-toggle button:hover,
.gj-view-toggle button.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.gj-view-toggle svg {
    display: block;
    fill: currentColor;
}

/* ============================================
   Main Content Layout (Sidebar + Products)
   ============================================ */
.gj-selector-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
}

@media (max-width: 1024px) {
    .gj-selector-content {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Sidebar Filters
   ============================================ */
.gj-filters-sidebar {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.gj-filter-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.gj-filter-section:last-child {
    border-bottom: none;
}

.gj-filter-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gj-toggle-icon {
    font-size: 12px;
    transition: transform 0.3s;
}

.gj-filter-section.collapsed .gj-toggle-icon {
    transform: rotate(-90deg);
}

.gj-filter-section.collapsed .gj-filter-options {
    display: none;
}

/* Search Box */
.gj-search-box {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.gj-search-box input {
    flex: 1;
    padding: 10px;
    border: none;
    outline: none;
    font-size: 14px;
}

.gj-search-box button {
    padding: 10px 15px;
    background: #2271b1;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s;
}

.gj-search-box button:hover {
    background: #135e96;
}

.gj-search-box svg {
    display: block;
}

/* Checkbox Labels */
.gj-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.gj-checkbox-label:hover {
    color: #2271b1;
}

.gj-checkbox-label input[type="checkbox"] {
    cursor: pointer;
}

.gj-checkbox-label small {
    color: #999;
    font-size: 12px;
}

/* Sliders */
.gj-slider-container {
    margin: 15px 0;
}

.gj-slider-container label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
}

.gj-slider-container input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

.gj-slider-container output {
    display: block;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #2271b1;
}

/* ============================================
   Products Area
   ============================================ */
.gj-products-area {
    min-height: 500px;
}

/* Active Filters */
.gj-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.gj-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #1e3a5f;
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.gj-filter-tag.gj-filter-permanent {
    background: #135e96;
}

.gj-remove-filter {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    margin: 0 0 0 4px;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gj-remove-filter:hover:not(:disabled) {
    opacity: 0.7;
}

.gj-remove-filter:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Description */
.gj-selector-description {
    margin-bottom: 30px;
}

.gj-selector-description h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
}

.gj-selector-description p {
    font-size: 15px;
    color: #666;
    margin: 0;
}

/* Quick Filters */
.gj-quick-filters-section {
    margin-bottom: 30px;
}

.gj-quick-filters-section p {
    font-size: 15px;
    color: #666;
    margin: 0 0 15px 0;
}

.gj-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.gj-quick-filter-btn {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.gj-quick-filter-btn:hover {
    background: #f0f0f0;
    border-color: #2271b1;
}

.gj-quick-filter-btn.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

/* Manufacturer buttons colors */
.gj-manufacturers-quick .gj-quick-filter-btn {
    background: #e8f0f7;
    border-color: #b8d4e8;
}

.gj-manufacturers-quick .gj-quick-filter-btn:hover {
    background: #d0e3f2;
}

/* Material buttons colors */
.gj-materials-quick .gj-quick-filter-btn:nth-child(1) { background: #8b9aaf; color: #fff; border-color: #8b9aaf; }
.gj-materials-quick .gj-quick-filter-btn:nth-child(2) { background: #b8785a; color: #fff; border-color: #b8785a; }
.gj-materials-quick .gj-quick-filter-btn:nth-child(3) { background: #9b8db5; color: #fff; border-color: #9b8db5; }
.gj-materials-quick .gj-quick-filter-btn:nth-child(4) { background: #9b8db5; color: #fff; border-color: #9b8db5; }
.gj-materials-quick .gj-quick-filter-btn:nth-child(5) { background: #6b7f5a; color: #fff; border-color: #6b7f5a; }
.gj-materials-quick .gj-quick-filter-btn:nth-child(6) { background: #c4b55e; color: #333; border-color: #c4b55e; }
.gj-materials-quick .gj-quick-filter-btn:nth-child(7) { background: #7a8a9e; color: #fff; border-color: #7a8a9e; }
.gj-materials-quick .gj-quick-filter-btn:nth-child(8) { background: #b8785a; color: #fff; border-color: #b8785a; }
.gj-materials-quick .gj-quick-filter-btn:nth-child(9) { background: #5a7a8e; color: #fff; border-color: #5a7a8e; }
.gj-materials-quick .gj-quick-filter-btn:nth-child(10) { background: #7b9b6e; color: #fff; border-color: #7b9b6e; }
.gj-materials-quick .gj-quick-filter-btn:nth-child(11) { background: #4a7a9e; color: #fff; border-color: #4a7a9e; }
.gj-materials-quick .gj-quick-filter-btn:nth-child(12) { background: #7a8a5e; color: #fff; border-color: #7a8a5e; }
.gj-materials-quick .gj-quick-filter-btn:nth-child(13) { background: #a67b5a; color: #fff; border-color: #a67b5a; }
.gj-materials-quick .gj-quick-filter-btn:nth-child(14) { background: #8a6b8e; color: #fff; border-color: #8a6b8e; }
.gj-materials-quick .gj-quick-filter-btn:nth-child(15) { background: #7a9a7e; color: #fff; border-color: #7a9a7e; }

/* ============================================
   Products Grid
   ============================================ */
.gj-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.gj-products-grid.view-list {
    grid-template-columns: 1fr;
}

.gj-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.gj-product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.gj-product-image {
    position: relative;
    padding-top: 100%;
    background: #f5f5f5;
    overflow: hidden;
}

.gj-product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.gj-product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
}

.gj-product-badge.in-stock {
    background: #27ae60;
}

.gj-product-badge.out-of-stock {
    background: #95a5a6;
}

.gj-product-info {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gj-product-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.4;
    flex: 1;
}

.gj-product-title a {
    color: inherit;
    text-decoration: none;
}

.gj-product-title a:hover {
    color: #2271b1;
}

.gj-product-sku {
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.gj-product-attributes {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.gj-product-attribute {
    margin: 2px 0;
}

.gj-product-attribute strong {
    color: #333;
}

.gj-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.gj-product-price {
    font-size: 18px;
    font-weight: 600;
    color: #2271b1;
}

.gj-product-price .regular-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    margin-right: 5px;
}

.gj-add-to-cart {
    padding: 8px 16px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.gj-add-to-cart:hover {
    background: #135e96;
}

.gj-add-to-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* List View */
.gj-products-grid.view-list .gj-product-card {
    flex-direction: row;
    align-items: center;
}

.gj-products-grid.view-list .gj-product-image {
    width: 150px;
    padding-top: 0;
    height: 150px;
    flex-shrink: 0;
}

.gj-products-grid.view-list .gj-product-image img {
    position: relative;
}

.gj-products-grid.view-list .gj-product-info {
    flex: 1;
    padding: 20px;
}

/* ============================================
   Pagination
   ============================================ */
.gj-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 30px;
}

.gj-pagination button {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.gj-pagination button:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #2271b1;
}

.gj-pagination button.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.gj-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   Loading State
   ============================================ */
.gj-loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

.gj-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
    .gj-selector-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .gj-header-controls {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .gj-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .gj-filters-sidebar {
        position: relative;
        top: 0;
    }
}

@media (max-width: 480px) {
    .gj-products-grid {
        grid-template-columns: 1fr;
    }
    
    .gj-quick-filters {
        justify-content: center;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .gj-filters-sidebar,
    .gj-header-controls,
    .gj-pagination {
        display: none;
    }
}