/* © 2025 Spwig. All rights reserved. */

/* ==========================================================================
   Product Grid Element - Section Wrapper Styles
   Layout-specific styles come from the category CSS files:
     category-grid.css, category-list.css, category-carousel.css,
     category-masonry.css, category-featured.css
   ========================================================================== */

.product-grid-section {
    padding: var(--theme-spacing-section-y, 3rem) 0;
}

.product-grid-section__container {
    max-width: var(--theme-container-max-width, 1280px);
    margin: 0 auto;
    padding: 0 var(--theme-spacing-container-x, 1.5rem);
}

/* ==========================================================================
   Section Header
   ========================================================================== */

.product-grid-section__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.product-grid-section__title {
    font-size: 1.75rem;
    font-weight: var(--theme-font-weight-bold, 700);
    color: var(--theme-color-text, #1a1a1a);
    margin: 0;
    line-height: 1.2;
}

.product-grid-section__subtitle {
    font-size: var(--theme-font-size-base, 1rem);
    color: var(--theme-color-text-light, #666);
    margin: 0.25rem 0 0;
    line-height: 1.5;
}

/* ==========================================================================
   Carousel Navigation Arrows (in header)
   ========================================================================== */

.product-grid-section__nav {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.product-grid-section__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--theme-color-border, #e5e5e5);
    border-radius: 50%;
    background: var(--theme-color-surface, #fff);
    cursor: pointer;
    transition: all var(--theme-transition-duration-base, 200ms) var(--theme-transition-easing-default, ease);
    color: var(--theme-color-text, #1a1a1a);
    font-size: 0.875rem;
    padding: 0;
}

.product-grid-section__arrow:hover:not(:disabled) {
    background: var(--theme-color-primary, #2563eb);
    border-color: var(--theme-color-primary, #2563eb);
    color: var(--theme-color-text-inverse, #fff);
}

.product-grid-section__arrow:disabled {
    opacity: 0.3;
    cursor: default;
}

/* ==========================================================================
   Grid Spacing Variants
   ========================================================================== */

.product-grid--spacing-tight {
    gap: 0.75rem;
}

.product-grid--spacing-normal {
    gap: 1.5rem;
}

.product-grid--spacing-loose {
    gap: 2.5rem;
}

/* ==========================================================================
   Footer / View All
   ========================================================================== */

.product-grid-section__footer {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.product-grid-section__footer .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: var(--theme-font-size-base, 1rem);
    font-weight: var(--theme-font-weight-medium, 500);
    border-radius: var(--theme-radius-base, 0.375rem);
    text-decoration: none;
    transition: all var(--theme-transition-duration-base, 200ms) var(--theme-transition-easing-default, ease);
}

.product-grid-section__footer .btn--secondary {
    background: transparent;
    border: 1px solid var(--theme-color-primary, #2563eb);
    color: var(--theme-color-primary, #2563eb);
}

.product-grid-section__footer .btn--secondary:hover {
    background: var(--theme-color-primary, #2563eb);
    color: var(--theme-color-text-inverse, #fff);
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.product-grid-section__empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--theme-color-text-muted, #888);
}

.product-grid-section__empty i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.4;
    display: block;
}

.product-grid-section__empty p {
    font-size: var(--theme-font-size-lg, 1.125rem);
    font-weight: var(--theme-font-weight-medium, 500);
    margin: 0 0 0.25rem;
}

.product-grid-section__empty small {
    font-size: var(--theme-font-size-sm, 0.875rem);
    opacity: 0.7;
}

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

@media (max-width: 640px) {
    .product-grid-section__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-grid-section__title {
        font-size: 1.375rem;
    }
}
