/*
 Theme Name:   Twenty Twenty-Five Child
 Theme URI:    http://example.com/twentytwentyfive-child/
 Description:  My custom theme based on Twenty Twenty-Five.
 Author:       Your Name
 Author URI:   http://example.com
 Template:     twentytwentyfive
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         block-patterns, block-styles, full-site-editing
 Text Domain:  tt5child
*/


main.wp-block-group-is-layout-constrained {
    margin-top:0 !important;
}

div.wp-block-group-is-layout-constrained{
    padding-top: 20px !important;
}

/* ============================================================================
   HEADER SEARCH BOX POSITIONING
   ============================================================================ */

/* Make the header row container use flex and center items */
.wp-block-group.alignwide.is-content-justification-space-between {
    display: flex !important;
    align-items: center !important;
    gap: 20px !important;
}

/* Search container in header - let it take available space */
.wp-block-group.alignwide .meilisearch-container {
    flex: 1 1 auto;
    min-width: 0; /* Allow it to shrink if needed */
}

/* Ensure the right side (navigation + account + cart) stays together */
.wp-block-group.alignwide > .wp-block-group.is-content-justification-right {
    flex-shrink: 0;
}

/* ============================================================================
   CUSTOM CATEGORY MENU
   ============================================================================ */

.custom-category-menu {
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 0;
    margin-top: 0 !important;
}

.custom-category-menu-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 .5rem;
}

.custom-category-menu-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.custom-category-menu-item {
    margin: 0;
    padding: 0;
}

.custom-category-menu-link {
    display: block;
    padding: 1rem 1.5rem;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.custom-category-menu-link:hover {
    color: #1976d2;
    background: #fff;
    border-bottom-color: #1976d2;
}

.custom-category-menu-link:focus {
    outline: 2px solid #1976d2;
    outline-offset: -2px;
}

/* Active state for current category */
.custom-category-menu-link.active {
    color: #1976d2;
    border-bottom-color: #1976d2;
    font-weight: 600;
}

main .wp-block-group.wp-block-group-is-layout-constrained{
    padding-bottom: 10px !important;
}

footer.wp-block-template-part{
    border-top: 1px solid rgb(224, 224, 224);
    padding-top: 5px;
}

footer.wp-block-template-part .wp-block-group{
    padding-top: 0 !important;
    margin-top: 0 !important;
    
}

footer.wp-block-template-part h2{
    text-align: left;
}

footer nav a span {

    color: rgb(51, 51, 51);
}

.wp-block-site-title {
    white-space: nowrap; /* Prevents wrapping */
}

.wp-block-site-title:before {
    content: "";
    display: inline-block;
    width: 80px;
    height: 80px;
    background-image: url('/wp-content/themes/twentytwentyfive-child/assets/img/spare-parts-icon-no-bg.png');
    background-size: contain;
    margin-right: 8px;
    vertical-align: middle;
    position: relative;
    top: -10px;
}

.wp-block-site-title a{
    color: var(--color-primary-dark) !important;
    font-size: 2.1rem !important;
}


/* Responsive adjustments */
@media (max-width: 968px) {
    .custom-category-menu-link {
        padding: 0.875rem 1.25rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .custom-category-menu-list {
        justify-content: flex-start;
        gap: 0.5rem;
    }
    
    .custom-category-menu-link {
        padding: 0.75rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 600px) {
    /* Stack vertically on mobile */
    .wp-block-group.alignwide.is-content-justification-space-between {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .wp-block-group.alignwide .meilisearch-container {
        width: 100%;
        order: 2;
    }
    
    .wp-block-site-title {
        order: 1;
    }
    
    .wp-block-group.alignwide > .wp-block-group.is-content-justification-right {
        order: 3;
    }
    
    /* Category menu mobile styles */
    .custom-category-menu-wrapper {
        padding: 0 0.5rem;
    }
    
    .custom-category-menu-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    
    .custom-category-menu-item {
        border-bottom: 1px solid #e0e0e0;
    }
    
    .custom-category-menu-item:last-child {
        border-bottom: none;
    }
    
    .custom-category-menu-link {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
        white-space: normal;
        border-bottom: none;
        border-left: 3px solid transparent;
    }
    
    .custom-category-menu-link:hover,
    .custom-category-menu-link.active {
        border-bottom: none;
        border-left-color: #1976d2;
    }
}
