/* Products Showcase Styles */

/* Hero Section */
/* Top spacing from global #header-container + main rule in style.css */
.products-hero {
    position: relative;
    background: linear-gradient(135deg, var(--white) 0%, #f3f7ff 100%);
    color: var(--text-primary);
    padding: 0 0 64px 0;
    text-align: center;
    overflow: hidden;
}

/* Subtle decorative glow */
.products-hero::after {
    content: '';
    position: absolute;
    bottom: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(closest-side, rgba(30,58,138,0.08), transparent 70%);
    pointer-events: none;
}

.products-hero .hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.products-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.products-hero p {
    font-size: 1.25rem;
    opacity: 1;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .products-hero {
        padding: 100px 0 48px 0; /* Slightly reduced on mobile */
    }
    .products-hero h1 {
        font-size: 2.25rem;
    }
    .products-hero p {
        font-size: 1rem;
    }
}

/* Filter Section */
.products-filter-section {
    padding: 3rem 0;
    background: #F8FAFC;
    border-bottom: 1px solid #E5E7EB;
}

.filter-container {
    max-width: 1200px;
    margin: 0 auto;
}

.filter-header {
    text-align: center;
    margin-bottom: 2rem;
}

.filter-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 0.5rem;
}

.filter-header p {
    color: #6B7280;
    font-size: 1.125rem;
}

.filters {
    display: flex;
    gap: 2rem;
    align-items: end;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 200px;
}

.filter-group label {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.filter-group select,
.filter-group input {
    padding: 0.75rem 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
    background: white;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-actions {
    display: flex;
    align-items: center;
}

/* Products Grid Section */
.products-grid-section {
    padding: 4rem 0;
    background: white;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.products-info h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 0.5rem;
}

.products-info p {
    color: #6B7280;
    font-size: 1rem;
}

.view-options {
    display: flex;
    gap: 0.5rem;
    background: #F3F4F6;
    padding: 0.25rem;
    border-radius: 8px;
}

.view-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    color: #6B7280;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.view-btn.active {
    background: white;
    color: #3B82F6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.view-btn:hover {
    color: #3B82F6;
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 4rem 0;
    color: #6B7280;
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #3B82F6;
}

.loading-spinner p {
    font-size: 1.125rem;
    margin: 0;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.products-grid.list-view {
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Product Card */
.product-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #E5E7EB;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.product-card.list-view {
    display: flex;
    align-items: stretch;
    padding: 2rem;
    gap: 2rem;
}

.product-image {
    width: 100%;
    height: 240px;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-card.list-view .product-image {
    width: 220px;
    height: 100%;
    min-height: 220px;
    flex-shrink: 0;
    margin-right: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    align-self: stretch;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image .placeholder {
    color: #9CA3AF;
    font-size: 3rem;
}

.product-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(59, 130, 246, 0.9);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.customizable-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(16, 185, 129, 0.9);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.product-content {
    padding: 0.75rem 1rem;
}

.product-card.list-view .product-content {
    flex: 1;
    padding: 0;
}

.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.product-description {
    color: #6B7280;
    font-size: 0.75rem;
    line-height: 1.45;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card.list-view .product-description {
    -webkit-line-clamp: 2;
}

.product-features {
    margin-bottom: 0.75rem;
}

.product-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.product-features li {
    background: #F3F4F6;
    color: #374151;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-features li i {
    color: #10B981;
    font-size: 0.625rem;
}

.more-features {
    font-style: italic;
    color: #6B7280 !important;
}

/* Product Specifications */
.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: #F8FAFC;
    color: #374151;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #E5E7EB;
}

.spec-item i {
    color: #6B7280;
    font-size: 0.625rem;
}

.spec-item.stock {
    background: #F0FDF4;
    color: #059669;
    border-color: #BBF7D0;
}

.spec-item.stock i {
    color: #059669;
}

.spec-item.out-of-stock {
    background: #FEF2F2;
    color: #DC2626;
    border-color: #FECACA;
}

.spec-item.out-of-stock i {
    color: #DC2626;
}

.spec-item.made-to-order {
    background: #FEF3C7;
    color: #D97706;
    border-color: #FDE68A;
}

.spec-item.made-to-order i {
    color: #D97706;
}

/* Product Price */
.product-price {
    margin-bottom: 0.75rem;
    text-align: center;
    padding: 0.5rem 0.625rem;
    background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 100%);
    border-radius: 6px;
    border: 1px solid #BBF7D0;
}

.price-label {
    display: block;
    font-size: 0.75rem;
    color: #6B7280;
    margin-bottom: 0.125rem;
}

.price-value {
    display: block;
    font-size: 1.0625rem;
    font-weight: 700;
    color: #059669;
}

/* Product Options */
.product-options {
    margin-bottom: 1rem;
}

.product-options h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #F8FAFC;
    border-radius: 4px;
    border: 1px solid #E5E7EB;
}

.option-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6B7280;
    min-width: 60px;
}

.option-values {
    font-size: 0.75rem;
    color: #374151;
    flex: 1;
}

.product-variants {
    margin-bottom: 1.5rem;
}

.product-variants h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.variants-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.variant-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #F9FAFB;
    border-radius: 4px;
    font-size: 0.875rem;
}

.variant-name {
    color: #374151;
    font-weight: 500;
}

.variant-price {
    color: #059669;
    font-weight: 600;
}

.product-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.product-actions .btn {
    flex: 1;
    min-width: 100px;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}

/* No Products */
.no-products {
    text-align: center;
    padding: 4rem 2rem;
    color: #6B7280;
}

.no-products-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.no-products h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
}

.no-products p {
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Categories Section */
.categories-section {
    padding: 4rem 0;
    background: #F8FAFC;
}

.categories-header {
    text-align: center;
    margin-bottom: 3rem;
}

.categories-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 1rem;
}

.categories-header p {
    font-size: 1.125rem;
    color: #6B7280;
    max-width: 600px;
    margin: 0 auto;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #E5E7EB;
    transition: all 0.3s ease;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.category-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.category-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 0.75rem;
}

.category-description {
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.category-products-count {
    color: #3B82F6;
    font-weight: 600;
    font-size: 0.875rem;
}

/* CTA Section */
.products-cta {
    padding: 4rem 0;
    background: linear-gradient(135deg, #1F2937 0%, #374151 100%);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

.modal-content.large {
    max-width: 1000px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #E5E7EB;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1F2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6B7280;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background: #F3F4F6;
}

.modal-body {
    padding: 1.5rem;
}

.product-modal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.product-images {
    position: relative;
}

.main-image {
    width: 100%;
    height: 300px;
    background: #F3F4F6;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-image .placeholder {
    color: #9CA3AF;
    font-size: 4rem;
}

.product-details h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 1rem;
}

.product-details p {
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.product-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.product-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #F3F4F6;
    color: #374151;
}

.product-features li:last-child {
    border-bottom: none;
}

/* Modal Specifications */
.product-specifications {
    margin-top: 1rem;
}

.product-specifications h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #E5E7EB;
}

.specs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #F8FAFC;
    border-radius: 6px;
    border: 1px solid #E5E7EB;
}

.spec-label {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.spec-value {
    color: #6B7280;
    font-size: 0.875rem;
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #F0FDF4;
    border-radius: 6px;
    border: 1px solid #BBF7D0;
}

.option-label {
    font-weight: 600;
    color: #059669;
    font-size: 0.875rem;
}

.option-value {
    color: #047857;
    font-size: 0.875rem;
}

.made-to-order-info {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border-radius: 8px;
    border: 1px solid #F59E0B;
    margin-top: 1.5rem;
}

.info-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: #F59E0B;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.info-content h5 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #92400E;
}

.info-content p {
    margin: 0;
    color: #B45309;
    font-size: 0.875rem;
    line-height: 1.5;
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.product-actions .btn {
    flex: 1;
    padding: 1rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Button Styles - scoped to products areas to avoid overriding global header */
.products-grid-section .btn,
.products-cta .btn,
.product-actions .btn,
.modal-content .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.products-grid-section .btn.btn-primary,
.products-cta .btn.btn-primary,
.product-actions .btn.btn-primary,
.modal-content .btn.btn-primary {
    background: #3B82F6;
    color: white;
}

.products-grid-section .btn.btn-primary:hover,
.products-cta .btn.btn-primary:hover,
.product-actions .btn.btn-primary:hover,
.modal-content .btn.btn-primary:hover {
    background: #2563EB;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.products-grid-section .btn.btn-secondary,
.products-cta .btn.btn-secondary,
.product-actions .btn.btn-secondary,
.modal-content .btn.btn-secondary {
    background: #6B7280;
    color: white;
}

.products-grid-section .btn.btn-secondary:hover,
.products-cta .btn.btn-secondary:hover,
.product-actions .btn.btn-secondary:hover,
.modal-content .btn.btn-secondary:hover {
    background: #4B5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

.products-grid-section .btn.btn-large,
.products-cta .btn.btn-large,
.product-actions .btn.btn-large,
.modal-content .btn.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .products-hero h1 {
        font-size: 2rem;
    }
    
    .products-hero p {
        font-size: 1rem;
    }
    
    .filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .products-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-card.list-view {
        flex-direction: column;
        align-items: stretch;
    }
    
    .product-card.list-view .product-image {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .product-card.list-view .product-content {
        padding: 0;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-actions {
        flex-direction: column;
    }
    
    .product-modal-content {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .products-hero {
        padding: 2rem 0;
    }
    
    .products-filter-section {
        padding: 2rem 0;
    }
    
    .products-grid-section {
        padding: 2rem 0;
    }
    
    .categories-section {
        padding: 2rem 0;
    }
    
    .products-cta {
        padding: 2rem 0;
    }
    
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
    }
    
    .modal-body {
        padding: 1rem;
    }
}
