.carcat-widget * {
    box-sizing: border-box;
    font-family: "Century Gothic", AppleGothic, sans-serif !important;
}
.carcat-widget {
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    color: #333;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0 !important;
    margin-bottom: 20px;
}
.carcat-widget-collapse.carcat-collapsed {
    display: none !important;
}
/* Header */
.carcat-header {
    padding: 0 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 50px;
    flex-shrink: 0;
}
/* Header buttons */
.carcat-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}
.carcat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
    height: 30px;
    background: #ffffff;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #ddd;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}
.carcat-btn:hover {
    transform: translateY(-1px);
    border-color: transparent;
    color: #fff;
}
.carcat-btn-tg:hover { background: #0088cc; }
.carcat-btn-ym:hover { background: #fc3f1d; }
.carcat-btn-oz:hover { background: #005bff; }
.carcat-btn-av:hover { background: #96e053; color: #000; }
/* Widget body */
.carcat-body {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f8f9fa;
}
.carcat-body::-webkit-scrollbar {
    width: 4px;
}
.carcat-body::-webkit-scrollbar-track {
    background: transparent;
}
.carcat-body::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}
/* Widget data */
.carcat-level-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.carcat-level-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    font-weight: 700;
}
.carcat-category-description {
    text-align: justify;
    margin: 20px 0;
    box-sizing: border-box;
    font-size: 14px;
}
/* Back button */
.carcat-back-wrapper {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 12px;
}
.carcat-back-wrapper .carcat-back-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: inherit;
}
.carcat-back-wrapper .carcat-back-btn:hover {
    background: #5a6268;
}
/* Categories grid */
.carcat-categories-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
}
.carcat-category-btn {
    display: block;
    background: #f8f7f7;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 4px;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    height: 34px;
    overflow: hidden;
    width: 100%;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.carcat-category-btn:hover {
    border-color: #007bff;
    color: #007bff;
    background: #ffffff;
    transform: translateY(-1px);
}
.carcat-category-title {
    overflow: hidden;
    width: 100%;
    display: block;
    white-space: nowrap;
    text-overflow: ellipsis;
}
/* last categories tree */
.carcat-tree {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.carcat-section {
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: #fafafa;
    overflow: hidden;
}
.carcat-section-title {
    font-size: 16px;
    font-weight: 700;
    padding: 10px 15px;
    background: #f0f0f0;
    border-bottom: 1px solid #e5e5e5;
}
.carcat-section-keys {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 12px;
}
.carcat-key-group {
    flex: 1;
    min-width: 150px;
}
.carcat-key-title {
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 6px;
    color: #555;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 3px;
}
.carcat-key-values {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.carcat-value-link {
    color: #666;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s;
}
.carcat-value-link:hover {
    color: #007bff;
    text-decoration: underline;
}
/* Bottom search button */
.carcat-bottom-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 13px;
}
.carcat-btn-products {
    padding: 8px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: inherit;
    transition: all 0.2s;
}
.carcat-btn-products {
    background: #1a1a1a;
    color: white;
}
.carcat-btn-products:hover {
    background: #5a6268;
    color: white;
}
/* Empty state */
.carcat-empty {
    text-align: center;
    padding: 30px;
    color: #888;
}
/* Errors */
.carcat-loading, .carcat-error {
    text-align: center;
    padding: 30px;
}
.carcat-error {
    color: #dc3545;
}
/* Show/hide button */
.carcat-mobile-toggle {
    display: none;
    width: calc(100% - 30px);
    margin: 0 15px 10px 15px;
    padding: 10px 16px;
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
    border-radius: 4px !important;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    text-align: center;
    transition: all 0.25s ease;
    font-family: inherit;
}
.carcat-mobile-toggle:hover {
    background: #2a2a2a;
    border-color: #555;
}
/* Dark theme basic */
html.dark-theme .carcat-widget {
    background: #111;
    color: #fff;
    border-color: #333;
}
html.dark-theme .carcat-header {
    background: #161616;
    border-bottom-color: #2a2a2a;
}
html.dark-theme .carcat-btn {
    background: #252525;
    border-color: #333;
    color: #ccc;
}
html.dark-theme .carcat-category-btn {
    background: #222;
    border-color: #333;
    color: #ccc;
}
html.dark-theme .carcat-category-btn:hover {
    background: #007bff;
    color: #fff;
}
html.dark-theme .carcat-section {
    background: #1a1a1a;
    border-color: #333;
}
html.dark-theme .carcat-section-title {
    background: #252525;
    border-bottom-color: #333;
    color: #fff;
}
html.dark-theme .carcat-key-title {
    color: #ccc;
    border-bottom-color: #444;
}
html.dark-theme .carcat-value-link {
    color: #999;
}
html.dark-theme .carcat-value-link:hover {
    color: #007bff;
}
html.dark-theme .carcat-bottom-buttons {
    border-top-color: #2a2a2a;
}
html.dark-theme .carcat-mobile-toggle {
    background: #1a1a1a;
    border-color: #2a2a2a;
    color: #eee;
}
html.dark-theme .carcat-mobile-toggle:hover {
    background: #2a2a2a;
    border-color: #444;
}
.carcat-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 30px;
}
.carcat-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background:  #2a2a2a;
    animation: bounce 1.4s infinite ease-in-out;
}
.carcat-dots span:nth-child(2) {
    animation-delay: .2s;
}
.carcat-dots span:nth-child(3) {
    animation-delay: .4s;
}
@keyframes bounce {
    0%,80%,100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}
@media (max-width: 1200px) {
    .carcat-categories-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}
@media (max-width: 992px) {
    .carcat-categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
@media (max-width: 768px) {
    .carcat-widget {
        padding: 0;
        max-height: 500px;
        margin-top: 0 !important;
        margin-bottom: 15px;
    }
    .carcat-widget.carcat-collapsed {
        max-height: 52px !important;
        margin-bottom: 5px;
    }
    .carcat-header {
        padding: 8px 12px;
        justify-content: center;
        height: auto;
    }
    .carcat-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .carcat-btn {
        height: 40px;
        font-size: 10px;
    }
    .carcat-categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .carcat-category-btn {
        height: 38px;
        font-size: 11px;
        padding: 0 6px;
    }
    .carcat-level-header {
        flex-wrap: wrap;
        gap: 10px;
    }
    .carcat-bottom-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .carcat-btn-products, .carcat-btn-accessories {
        text-align: center;
    }
    .carcat-mobile-toggle {
        align-self: center;
        position: relative;
        display: block;
        width: calc(100% - 5px);
        margin: 5px;
        padding: 12px 14px;
        font-size: 12px;
        border-radius: 30px;
    }
}
@media (max-width: 480px) {
    .carcat-body {
        flex: 1;
        padding: 12px;
        overflow-y: scroll;
        max-height: 340px;
    }
    .carcat-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .carcat-key-group {
        min-width: 100%;
    }
    .carcat-section-keys {
        flex-direction: column;
    }
}
/* Categories with background img */
.carcat-category-btn.has-image {
    position: relative;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    min-height: 100px;
    height: auto !important;
    padding: 0 !important;
    color: #fff !important;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.carcat-category-btn.has-image:hover {
    transform: translateY(-3px);
    border-color: #007bff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}
.carcat-category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.7) 100%);
    transition: background 0.3s ease;
    z-index: 1;
    border-radius: 8px;
}
.carcat-category-btn.has-image:hover .carcat-category-overlay {
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,123,255,0.5) 100%);
}
.carcat-category-btn.has-image .carcat-category-title {
    position: relative;
    z-index: 2;
    font-size: 12px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    padding: 8px 10px;
    line-height: 1.3;
    word-break: break-word;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
    width: 90%;
    margin: 0 auto;
}
/*  Dark theme */
html.dark-theme .carcat-category-btn.has-image {
    border-color: #333;
}
html.dark-theme .carcat-category-btn.has-image:hover {
    border-color: #007bff;
}
html.dark-theme .carcat-category-btn.has-image .carcat-category-title {
    background: rgba(0,0,0,0.4);
}
@media (max-width: 768px) {
    .carcat-category-btn.has-image {
        min-height: 80px;
        border-radius: 6px;
    }
    .carcat-category-btn.has-image .carcat-category-title {
        font-size: 10px;
        padding: 6px 8px;
    }
}
@media (max-width: 480px) {
    .carcat-category-btn.has-image {
        min-height: 70px;
    }
    .carcat-category-btn.has-image .carcat-category-title {
        font-size: 9px;
        padding: 4px 6px;
    }
}