/* Dynamic Family - Banner + Subcategory Card Grid */

/* Breadcrumb spacing on category pages */
.wc-block-breadcrumbs .woocommerce-breadcrumb {
    margin-top: 16px;
    margin-bottom: 12px;
    font-size: 15px;
}

/* Container: sets category color as CSS custom property */
.dynamic-family-container {
    padding: 20px 0;
    overflow-x: clip;
}

/* === BANNER === */
.dynamic-family-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 36px 48px;
    background-color: #f0f0f0;
    margin-bottom: 32px;
    /* Break out of constrained parent to span full viewport width */
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.dynamic-family-banner-image {
    flex-shrink: 0;
    height: 150px;
    max-height: 150px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
}

.dynamic-family-banner-title {
    color: var(--category-color, #d4821f);
    font-size: 28px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0.5px;
}

/* === GRID === */
.dynamic-family-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* === CARD === */
.dynamic-family-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f7f7f7;
    border-radius: 12px;
    padding: 28px 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.dynamic-family-card-image {
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.dynamic-family-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Placeholder when no image */
.dynamic-family-card-image-placeholder {
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    background: #e8e8e8;
    border-radius: 8px;
}

.dynamic-family-card-name {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    margin: 0 0 8px 0;
    color: #1b3a4b;
}

.dynamic-family-card-desc {
    font-size: 13px;
    color: #666;
    text-align: center;
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.dynamic-family-card-btn {
    margin-top: auto;
    display: inline-block;
    font-size: 15px;
    font-weight: 600;
    color: #1b3a4b;
    text-decoration: none;
    border: 1.5px solid #1b3a4b;
    border-radius: 6px;
    padding: 10px 22px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.dynamic-family-card-btn:hover {
    background-color: #1b3a4b;
    color: #fff;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .dynamic-family-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .dynamic-family-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dynamic-family-banner {
        flex-direction: column;
        padding: 28px 24px;
    }

    .dynamic-family-banner-image {
        height: 120px;
        max-height: 120px;
    }

    .dynamic-family-banner-title {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .dynamic-family-grid {
        grid-template-columns: 1fr;
    }

    .dynamic-family-banner-title {
        font-size: 20px;
    }

    .dynamic-family-banner-image {
        height: 90px;
        max-height: 90px;
    }

    .dynamic-family-card {
        padding: 20px 12px;
    }
}
