/**
 * WooCommerce Enhanced Store - Frontend Styles
 */

/* ==========================================================================
   Main Container
   ========================================================================== */

.wc-enhanced-store-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

/* ==========================================================================
   Controls Section
   ========================================================================== */

.wc-enhanced-store-controls {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Search Bar */
.store-search {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    max-width: 400px;
}

.store-search input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 6px 0 0 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.store-search input[type="text"]:focus {
    border-color: #007cba;
}

.store-search .search-btn {
    padding: 12px 16px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.store-search .search-btn:hover {
    background: #005a87;
}

/* Filters */
.store-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.filter-group select,
.filter-group input[type="number"] {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: white;
    transition: border-color 0.3s ease;
}

.filter-group select:focus,
.filter-group input[type="number"]:focus {
    outline: none;
    border-color: #007cba;
}

/* Price Filter */
.price-filter .price-range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-filter .price-range-inputs input {
    flex: 1;
    min-width: 80px;
}

.price-filter .price-separator {
    color: #666;
    font-weight: bold;
}

.price-filter .currency {
    color: #666;
    font-size: 12px;
}

.price-range-slider {
    margin-top: 10px;
    height: 6px;
    background: #ddd;
    border-radius: 3px;
    position: relative;
}

/* Special Filters */
.special-filters {
    flex-direction: column;
    gap: 12px;
}

/* Category Constraint Indicator */
.category-constraint-indicator {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    margin-bottom: 20px;
    padding: 0;
    overflow: hidden;
}

.constraint-notice {
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #0073aa;
}

.constraint-notice .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.constraint-notice strong {
    color: #0073aa;
}

.constraint-notice em {
    color: #005177;
    font-weight: 500;
}

/* Category Filters Wrapper */
.category-filters-wrapper {
    width: 100%;
    margin-top: 15px;
}

/* Horizontal Category Filters Layout */
.category-filters-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    align-items: flex-start;
    justify-content: flex-start;
}

.special-filters label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.special-filters label:hover {
    background-color: #f8f9fa;
}

.special-filters input[type="checkbox"] {
    margin: 0;
}

/* Category Filter Items - Different Styles */
.category-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-bottom: 5px;
    flex-shrink: 0;
    white-space: nowrap;
}

.category-filter-item:hover {
    background-color: #f0f8ff;
    border-color: #007cba;
}

.category-filter-item input[type="checkbox"] {
    margin: 0;
}

.category-filter-label {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.category-filter-count {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

/* Checkbox Style (Default) */
.category-filter-item[data-style="checkboxes"] {
    /* Default checkbox styling - already handled above */
}

/* Button Style */
.category-filter-item[data-style="buttons"] {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 6px;
    justify-content: center;
    text-align: center;
    padding: 10px 15px;
}

.category-filter-item[data-style="buttons"] input[type="checkbox"] {
    display: none;
}

.category-filter-item[data-style="buttons"]:hover {
    background: #e9ecef;
    border-color: #007cba;
}

.category-filter-item[data-style="buttons"].active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.category-filter-item[data-style="buttons"].active .category-filter-label,
.category-filter-item[data-style="buttons"].active .category-filter-count {
    color: white;
}

/* Pills Style */
.category-filter-item[data-style="pills"] {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 20px;
    justify-content: center;
    text-align: center;
    padding: 8px 16px;
    display: inline-flex;
    margin-right: 10px;
    margin-bottom: 8px;
}

.category-filter-item[data-style="pills"] input[type="checkbox"] {
    display: none;
}

.category-filter-item[data-style="pills"]:hover {
    background: #e9ecef;
    border-color: #007cba;
}

.category-filter-item[data-style="pills"].active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.category-filter-item[data-style="pills"].active .category-filter-label,
.category-filter-item[data-style="pills"].active .category-filter-count {
    color: white;
}

/* Tabs Style */
.category-filter-item[data-style="tabs"] {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-bottom: 3px solid transparent;
    border-radius: 4px 4px 0 0;
    justify-content: center;
    text-align: center;
    padding: 12px 20px;
    display: inline-flex;
    margin-right: 2px;
    margin-bottom: 0;
}

.category-filter-item[data-style="tabs"] input[type="checkbox"] {
    display: none;
}

.category-filter-item[data-style="tabs"]:hover {
    background: #e9ecef;
    border-bottom-color: #007cba;
}

.category-filter-item[data-style="tabs"].active {
    background: white;
    border-bottom-color: #007cba;
    color: #007cba;
    font-weight: 600;
}

.category-filter-item[data-style="tabs"].active .category-filter-label {
    color: #007cba;
}

/* Laptop Screen Optimizations for Category Filters */
@media (min-width: 1024px) {
    .category-filters-wrapper {
        width: 100%;
        margin-top: 15px;
    }
    
    .category-filters-horizontal {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-top: 10px;
        align-items: flex-start;
        max-width: 100%;
        justify-content: flex-start;
    }
    
    .category-filter-item {
        flex: 0 0 auto;
        min-width: fit-content;
        max-width: 200px;
    }
    
    .category-filter-item[data-style="buttons"],
    .category-filter-item[data-style="pills"] {
        margin-right: 8px;
        margin-bottom: 8px;
    }
    
    .category-filter-item[data-style="tabs"] {
        margin-right: 3px;
    }
}

/* Responsive Design for Category Filters */
@media (max-width: 768px) {
    .special-filters {
        gap: 8px;
    }
    
    .category-filter-item {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .category-filter-item[data-style="buttons"],
    .category-filter-item[data-style="pills"] {
        padding: 6px 12px;
        margin-right: 5px;
        margin-bottom: 5px;
    }
    
    .category-filter-item[data-style="tabs"] {
        padding: 8px 12px;
        margin-right: 1px;
    }
}

/* Filter Actions */
.filter-actions {
    display: flex;
    justify-content: flex-end;
    grid-column: 1 / -1;
}

.clear-filters-btn {
    padding: 10px 20px;
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.clear-filters-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* Toolbar */
.store-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
}

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

.product-count #products-found {
    font-weight: bold;
    color: #333;
}

.sort-options,
.view-options,
.per-page-options {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-options label,
.view-options label,
.per-page-options label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.view-btn {
    padding: 8px 10px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover,
.view-btn.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* ==========================================================================
   Loading Indicator
   ========================================================================== */

.loading-indicator {
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    margin: 20px 0;
}

.loading-indicator .spinner {
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

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

/* Fix for grayed out products - ensure full opacity and proper colors */
.wc-enhanced-store-products {
    opacity: 1 !important;
}

.wc-enhanced-store-products .products-grid {
    opacity: 1 !important;
}

.wc-enhanced-store-product-card {
    opacity: 1 !important;
    background: white !important;
    color: #333 !important;
}

/* Ensure products are never stuck in loading state */
.wc-enhanced-store-wrapper:not(.loading) .wc-enhanced-store-products,
.wc-enhanced-store-wrapper:not(.loading) .products-grid,
.wc-enhanced-store-wrapper:not(.loading) .wc-enhanced-store-product-card {
    opacity: 1 !important;
    filter: none !important;
}

/* Override any theme styles that might be causing graying */
.wc-enhanced-store-product-card * {
    opacity: inherit !important;
}

.wc-enhanced-store-product-card .product-title a,
.wc-enhanced-store-product-card .product-price,
.wc-enhanced-store-product-card .product-info {
    color: inherit !important;
    opacity: 1 !important;
}

/* ==========================================================================
   Products Grid
   ========================================================================== */

.wc-enhanced-store-products {
    margin-bottom: 30px;
}

.products-grid {
    display: grid;
    gap: 20px;
    transition: all 0.3s ease;
}

.products-grid.grid-view {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

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

/* Product Card */
.wc-enhanced-store-product-card {
    background: white;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

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

/* Product Image */
.product-image-wrapper {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.product-image-wrapper .product-link {
    display: block;
    aspect-ratio: 1;
}

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

.wc-enhanced-store-product-card:hover .product-image {
    transform: scale(1.05);
}

.product-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    color: #999;
    background: #f8f9fa;
}

.product-image-placeholder .dashicons {
    font-size: 48px;
    margin-bottom: 10px;
}

.product-image-placeholder .no-image-text {
    font-size: 14px;
}

/* Product Badges */
.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 2;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sale-badge {
    background: #e74c3c;
    color: white;
}

.featured-badge {
    background: #f39c12;
    color: white;
}

/* Print-on-demand: Stock badges removed */

/* Quick Actions */
.product-quick-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    z-index: 2;
}

.wc-enhanced-store-product-card:hover .product-quick-actions {
    opacity: 1;
    transform: translateX(0);
}

.product-quick-actions button,
.product-quick-actions a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-quick-actions button:hover,
.product-quick-actions a:hover {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* Product Info */
.product-info {
    padding: 20px;
}

.product-categories {
    margin-bottom: 8px;
}

.product-categories .category-link {
    color: #666;
    text-decoration: none;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-categories .category-link:hover {
    color: #007cba;
}

.product-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    line-height: 1.4;
}

.product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: #007cba;
}

/* Product Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.star-rating {
    display: flex;
    gap: 2px;
}

.star {
    color: #ddd;
    font-size: 14px;
}

.star.full-star {
    color: #ffc107;
}

.star.half-star {
    color: #ffc107;
}

.rating-count {
    font-size: 12px;
    color: #666;
}

/* Product Price */
.product-price {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.product-price del {
    color: #999;
    font-weight: normal;
    margin-right: 8px;
}

.product-price ins {
    text-decoration: none;
    color: #e74c3c;
}

/* Short Description */
.product-short-description {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

/* Product Actions */
.product-actions {
    display: flex;
    gap: 10px;
}

.product-actions button,
.product-actions a {
    flex: 1;
    padding: 10px 16px;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart-btn {
    background: #007cba;
    color: white;
}

.add-to-cart-btn:hover {
    background: #005a87;
}

.select-options-btn,
.view-details-btn {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.select-options-btn:hover,
.view-details-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

/* Print-on-demand: Out-of-stock buttons removed */

.read-more-btn {
    background: #17a2b8;
    color: white;
}

.read-more-btn:hover {
    background: #138496;
}

/* Button Loading State */
.btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-loading .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ==========================================================================
   List View Styles
   ========================================================================== */

.products-grid.list-view .wc-enhanced-store-product-card {
    display: flex;
    align-items: stretch;
}

.products-grid.list-view .product-image-wrapper {
    flex: 0 0 200px;
    aspect-ratio: 1;
}

.products-grid.list-view .product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.products-grid.list-view .product-short-description {
    display: block;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.wc-enhanced-store-pagination-wrapper {
    margin-top: 30px;
}

.wc-enhanced-store-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.pagination-btn {
    padding: 10px 15px;
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: #e9ecef;
    color: #0056b3;
    text-decoration: none;
}

.pagination-btn.current {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

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

.pagination-dots {
    padding: 10px 5px;
    color: #6c757d;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Load More Button */
.load-more-wrapper {
    text-align: center;
}

.load-more-btn {
    padding: 12px 30px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.load-more-btn:hover {
    background: #005a87;
}

.load-more-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1200px) {
    .products-grid.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 992px) {
    .wc-enhanced-store-wrapper {
        padding: 15px;
    }
    
    .store-filters {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 15px;
    }
    
    .store-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .products-grid.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .wc-enhanced-store-controls {
        padding: 15px;
    }
    
    .store-filters {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .special-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .products-grid.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .products-grid.list-view .wc-enhanced-store-product-card {
        flex-direction: column;
    }
    
    .products-grid.list-view .product-image-wrapper {
        flex: none;
        aspect-ratio: 16/9;
    }
    
    .wc-enhanced-store-pagination {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .pagination-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .wc-enhanced-store-wrapper {
        padding: 10px;
    }
    
    .products-grid.grid-view {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .store-search {
        max-width: 100%;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.wc-enhanced-store-wrapper *:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Category Display Modes
   ========================================================================== */

/* Tabbed Display Mode */
.category-tabs-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-tabs-nav {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
    overflow-x: auto;
}

.category-tab {
    padding: 15px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    white-space: nowrap;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.category-tab:hover {
    background: #e9ecef;
    color: #333;
}

.category-tab.active {
    background: white;
    color: #007cba;
    border-bottom-color: #007cba;
}

.category-tab .tab-count {
    font-size: 12px;
    color: #999;
    margin-left: 5px;
}

.category-tabs-content {
    padding: 20px;
}

.category-tab-content {
    display: none;
}

.category-tab-content.active {
    display: block;
}

/* Grouped Display Mode */
.category-groups-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.category-group {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-group-header {
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
}

.category-title {
    margin: 0 0 5px 0;
    font-size: 1.5rem;
    color: #333;
    font-weight: 600;
}

.category-product-count {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.category-description {
    margin: 10px 0 0 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.category-group .products-grid {
    padding: 20px;
}

/* Carousel Display Mode */
.category-carousel-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.category-carousel-section {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e1e5e9;
}

.carousel-controls {
    display: flex;
    gap: 10px;
}

.carousel-prev,
.carousel-next {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #007cba;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: #005a87;
    transform: scale(1.1);
}

.carousel-prev:disabled,
.carousel-next:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.category-carousel-wrapper {
    padding: 20px;
    overflow: hidden;
}

.category-carousel {
    display: flex;
    gap: 20px;
    transition: transform 0.3s ease;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 10px;
}

.carousel-item {
    flex: 0 0 280px;
    max-width: 280px;
}

.carousel-item .wc-enhanced-store-product-card {
    height: 100%;
}

/* Responsive Design for Display Modes */
@media (max-width: 768px) {
    .category-tabs-nav {
        flex-wrap: wrap;
    }
    
    .category-tab {
        flex: 1;
        min-width: 120px;
        text-align: center;
        padding: 12px 15px;
    }
    
    .category-carousel-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .carousel-item {
        flex: 0 0 250px;
        max-width: 250px;
    }
    
    .category-groups-container {
        gap: 25px;
    }
    
    .category-group-header {
        padding: 15px;
    }
    
    .category-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .category-tabs-content,
    .category-group .products-grid,
    .category-carousel-wrapper {
        padding: 15px;
    }
    
    .carousel-item {
        flex: 0 0 220px;
        max-width: 220px;
    }
    
    .category-tab {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Enhanced No Products Found for Category Display */
.no-products-found {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

.no-products-found .no-products-icon {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 20px;
}

.no-products-found h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 24px;
}

.no-products-found p {
    color: #666;
    margin-bottom: 15px;
    font-size: 16px;
    line-height: 1.5;
}

.no-products-found p strong {
    color: #007cba;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .wc-enhanced-store-controls,
    .product-quick-actions,
    .wc-enhanced-store-pagination-wrapper,
    .carousel-controls,
    .category-tabs-nav {
        display: none;
    }
    
    .wc-enhanced-store-product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .category-tab-content {
        display: block !important;
    }
    
    .category-carousel {
        flex-wrap: wrap;
    }
    
    .carousel-item {
        flex: 0 0 48%;
    }
}