/* Products Archive Styles */

.products-archive {
    padding: 1rem;
}



/* Simple Page Header - Machinery Archive Style */
.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.taxonomy-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
    margin-top: 0.5rem;
}

/* Main content area */
.products-content {
    margin-top: 2rem;
}

/* Controls bar */
.products-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

/* View Switcher */
.view-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-switcher span {
    font-size: 0.9rem;
    color: #666;
    margin-right: 0.5rem;
}

.view-switcher button {
    background: #fff;
    border: 1px solid #ddd;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-switcher button:hover,
.view-switcher button.active {
    background: var(--primary-color, #e74c3c);
    border-color: var(--primary-color, #e74c3c);
    color: white;
}

/* Sort filter */
.sort-filter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sort-filter label {
    font-size: 0.9rem;
    color: #666;
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 0.9rem;
    min-width: 160px;
}

/* Products Makes Grid (Initial View) */
.products-makes-grid {
    margin-bottom: 3rem;
}

.makes-heading {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color, #2c3e50);
    text-align: center;
}

.makes-items {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.25rem;
}

.make-item {
    background: white;
    border-radius: 10px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0 1.25rem;
    border: 1px solid #eee;
}

.make-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
    text-decoration: none;
}

.make-image {
    width: 140px;
    height: 140px;
    overflow: hidden;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid #eee;
    margin: 1rem auto 0.75rem;
}

.make-image img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

.make-name {
    padding: 0.25rem 1rem 0;
    margin: 0;
    font-size: 1rem;
    color: var(--secondary-color, #2c3e50);
    font-weight: 600;
    text-align: center;
}

.make-count {
    display: none;
}

/* Products Section */
.products-section {
    margin-top: 2rem;
}

/* Hide products section only on main products archive page (not taxonomy pages) */
.page-template-page-products .products-section {
    display: none !important;
}

.page-template-page-products .products-pagination {
    display: none !important;
}

/* Subcategory styling for taxonomy pages - Simple machinery archive style */
.tax-make .makes-items {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.tax-make .make-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
}

.tax-make .make-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color, #e74c3c);
}

.tax-make .make-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    position: relative;
}

.tax-make .make-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.3s ease;
}

.tax-make .make-item:hover .make-image img {
    transform: scale(1.08);
    filter: brightness(1.1);
}

.tax-make .make-name {
    padding: 1.25rem;
    margin: 0;
    font-size: 1rem;
    color: var(--secondary-color, #2c3e50);
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
    height: 3rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Section Header - Simple Style */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 1.8rem;
    margin: 0;
    color: var(--secondary-color, #2c3e50);
}

.products-count {
    display: flex;
    align-items: center;
}

.count-badge {
    background: var(--primary-color, #e74c3c);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.product-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-item:hover .product-image img {
    transform: scale(1.05);
}

.quick-view-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-weight: 600;
}

.product-item:hover .quick-view-btn {
    opacity: 1;
}

.product-details {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.1rem;
    line-height: 1.4;
}

.product-title a {
    color: var(--secondary-color, #2c3e50);
    text-decoration: none;
    font-weight: 600;
}

.product-title a:hover {
    color: var(--primary-color, #e74c3c);
}

.product-meta {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.product-meta span {
    display: block;
    margin-bottom: 0.25rem;
}

.product-meta i {
    width: 16px;
    margin-right: 0.5rem;
}

.btn-view-details {
    background: var(--secondary-color);
    color: white;
    padding: 0.75rem;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: auto;
    transition: background-color 0.2s ease;
    display: inline-block;
}

.btn-view-details:hover {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

/* List View Styles */
.products-grid.list-view-active {
    grid-template-columns: 1fr;
}

.products-grid.list-view-active .product-item {
    margin-bottom: 1.5rem;
}

.products-grid.list-view-active .product-card {
    flex-direction: row;
    width: 100%;
}

.products-grid.list-view-active .product-image {
    width: 300px;
    height: auto;
    min-height: 220px;
    flex-shrink: 0;
}

.products-grid.list-view-active .product-details {
    flex: 0 0 30%;
    border-right: 1px solid #eee;
}

.product-list-details {
    display: none;
    padding: 1rem;
    flex: 1;
}

.products-grid.list-view-active .product-list-details {
    display: block;
}

.product-desc {
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
}

.specs-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.spec-preview-item {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.spec-label {
    font-weight: 500;
    color: #666;
    margin-bottom: 0.25rem;
}

.spec-value {
    color: var(--secondary-color, #2c3e50);
    font-weight: 600;
}

.list-view-btn {
    width: auto;
    display: inline-block;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 2rem 0;
}

.no-results h3 {
    color: var(--secondary-color, #2c3e50);
    margin-bottom: 1rem;
}

.no-results p {
    color: #666;
    margin: 0;
}

/* Pagination */
.products-pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.products-pagination .page-numbers {
    display: inline-block;
    padding: 0.75rem 1rem;
    margin: 0 0.25rem;
    background: white;
    border: 1px solid #ddd;
    color: var(--secondary-color, #2c3e50);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.products-pagination .page-numbers:hover,
.products-pagination .page-numbers.current {
    background: var(--primary-color, #e74c3c);
    border-color: var(--primary-color, #e74c3c);
    color: white;
}

/* Quick View Modal */
.quick-view-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-view-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.quick-view-content {
    background: white;
    border-radius: 8px;
    max-width: 90vw;
    width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    z-index: 10;
}

.quick-view-container {
    padding: 2rem;
    min-height: 200px;
}

.quick-view-loading {
    text-align: center;
    padding: 2rem;
}

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color, #e74c3c);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* Quick View Product Layout */
.quick-view-product {
    display: flex;
    gap: 2rem;
}

.quick-view-image {
    flex: 0 0 50%;
}

.quick-view-image img {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.quick-view-info {
    flex: 1;
}

.quick-view-info h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--secondary-color, #2c3e50);
}

.quick-view-details {
    margin-bottom: 1.5rem;
}

/* Product Inquiry Section */
.product-inquiry-container {
    background: #f9f9f9;
    padding: 3rem 0;
    margin-top: 3rem;
}

.inquiry-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.inquiry-content h2 {
    margin-bottom: 1rem;
    color: var(--secondary-color, #2c3e50);
}

.inquiry-content p {
    margin-bottom: 1.5rem;
    color: #666;
}

/* Inquiry Modal */
.inquiry-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.inquiry-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.inquiry-modal-content {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    padding: 2rem;
    position: relative;
}

.close-inquiry {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.inquiry-modal-content h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--secondary-color, #2c3e50);
    text-align: center;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.form-success {
    text-align: center;
    padding: 2rem;
}

.form-success i {
    font-size: 3rem;
    color: #28a745;
    margin-bottom: 1rem;
}

.form-success p {
    color: #333;
    font-size: 1.1rem;
}

/* Product Comparison Feature */
.comparison-feature {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid #eee;
}

.comparison-feature h2 {
    margin-bottom: 1rem;
    color: var(--secondary-color, #2c3e50);
}

.comparison-feature p {
    max-width: 700px;
    margin: 0 auto 1.5rem;
    color: #666;
}

.btn-primary {
    background: var(--primary-color, #e74c3c);
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: inline-block;
}

.btn-primary:hover {
    background: var(--primary-hover, #c0392b);
    color: white;
}

.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .makes-items {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
    
    .tax-make .makes-items {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
    
    .products-grid.list-view-active {
        grid-template-columns: 1fr;
    }
    
    .quick-view-product {
        flex-direction: column;
    }
    
    .quick-view-image {
        flex: 0 0 100%;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 992px) {
    .makes-items {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .tax-make .makes-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .products-grid.list-view-active .product-card {
        flex-direction: column;
    }
    
    .products-grid.list-view-active .product-image {
        width: 100%;
        height: 200px;
    }
    
    .products-grid.list-view-active .product-details {
        border-right: none;
        border-bottom: 1px solid #eee;
    }
}

@media (max-width: 768px) {
    .products-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .products-grid {
        gap: 1rem;
    }
    
    .products-grid.list-view-active .product-list-details {
        padding: 1rem;
    }
    
    .specs-preview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .makes-items,
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .tax-make .makes-items {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    
    .tax-make .make-image {
        height: 100px;
    }
    
    .make-image {
        width: 80px;
        height: 80px;
        margin: 0.25rem auto;
    }
    
    .make-name {
        font-size: 0.8rem;
        padding: 0.25rem;
        line-height: 1.2;
    }
    
    .section-title,
    .makes-heading {
        font-size: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
} 