/* Frontend Styles with CSS Variables */
.wc-header-categories {
    --wc-header-cats-gap: 25px;
    --wc-header-cats-image-size: 70px;
    --wc-header-cats-border-radius: 50%;
    width: 100%;
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    box-sizing: border-box;
}

.wc-header-cats-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--wc-header-cats-gap);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.wc-header-cats-item {
    text-align: center;
    min-width: 100px;
}

.wc-header-cats-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.wc-header-cats-link:hover {
    color: var(--primary-color, #007cba);
}

/* Hover Effects */
.wc-header-categories.hover-lift .wc-header-cats-link:hover {
    transform: translateY(-5px);
}

.wc-header-categories.hover-zoom .wc-header-cats-link:hover {
    transform: scale(1.05);
}

.wc-header-categories.hover-color .wc-header-cats-link:hover {
    color: #007cba;
}

.wc-header-categories.hover-color .wc-header-cats-link:hover .wc-header-cats-image {
    border-color: #007cba;
}

.wc-header-categories.hover-none .wc-header-cats-link:hover {
    transform: none;
    color: inherit;
}

.wc-header-categories.hover-none .wc-header-cats-link:hover .wc-header-cats-image {
    border-color: #f0f0f0;
}

.wc-header-cats-image {
    width: var(--wc-header-cats-image-size);
    height: var(--wc-header-cats-image-size);
    border-radius: var(--wc-header-cats-border-radius);
    overflow: hidden;
    margin-bottom: 10px;
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f8f8;
}

.wc-header-cats-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wc-header-cats-image.placeholder {
    color: #999;
}

.wc-header-cats-image.placeholder .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
}

.wc-header-cats-link:hover .wc-header-cats-image {
    border-color: var(--primary-color, #007cba);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wc-header-cats-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wc-header-cats-name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
}

.wc-header-cats-count {
    font-size: 12px;
    color: #666;
    opacity: 0.8;
    font-weight: normal;
}

/* Hover effect for count */
.wc-header-cats-link:hover .wc-header-cats-count {
    color: var(--primary-color, #007cba);
    opacity: 1;
}

/* List Style */
.wc-header-cats-list .wc-header-cats-container {
    flex-direction: column;
    gap: 10px;
    max-width: 300px;
}

.wc-header-cats-list .wc-header-cats-item {
    min-width: auto;
}

.wc-header-cats-list .wc-header-cats-link {
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #eee;
}

.wc-header-cats-list .wc-header-cats-link:hover {
    background: #f9f9f9;
}

.wc-header-cats-list .wc-header-cats-image {
    width: 40px;
    height: 40px;
    margin-bottom: 0;
    margin-right: 15px;
}

.wc-header-cats-list .wc-header-cats-content {
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.wc-header-cats-list .wc-header-cats-count {
    font-size: 11px;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Block Alignment Styles */
.wc-header-cats-block.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.wc-header-cats-block.alignfull {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.wc-header-cats-block.alignfull .wc-header-cats-container {
    max-width: 100%;
    padding-left: 30px;
    padding-right: 30px;
}

/* WordPress Color Classes Support */
.wc-header-cats-block.has-background {
    padding: 30px;
}

.wc-header-cats-block.has-text-color .wc-header-cats-name,
.wc-header-cats-block.has-text-color .wc-header-cats-count {
    color: inherit;
}

.wc-header-cats-block.has-text-color .wc-header-cats-link:hover {
    color: inherit;
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
    .wc-header-cats-container {
        gap: 15px;
        justify-content: flex-start;
        overflow-x: auto;
        padding: 0 10px 10px;
        -webkit-overflow-scrolling: touch;
    }
    
    .wc-header-cats-item {
        min-width: 80px;
        flex-shrink: 0;
    }
    
    .wc-header-cats-image {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .wc-header-cats-container {
        gap: 12px;
    }
    
    .wc-header-cats-item {
        min-width: 70px;
    }
    
    .wc-header-cats-image {
        width: 50px;
        height: 50px;
    }
    
    .wc-header-cats-name {
        font-size: 13px;
    }
    
    .wc-header-cats-count {
        font-size: 11px;
    }
}