/* ═══════════════════════════════════════════════
   Unicategory — Frontend Catalog Styles
   ═══════════════════════════════════════════════ */

/* Override Woodmart container max-width on catalog pages */
body.tax-unicategory .container,
body.tax-unicategory .website-wrapper > .container,
body.tax-unicategory .main-page-wrapper > .container,
body.tax-unicategory .content-area,
body.tax-unicategory .site-content .container,
body.tax-unicategory .website-wrapper,
body.tax-unicategory .main-page-wrapper {
    max-width: 100% !important;
    width: 100% !important;
}

body.tax-unicategory .wd-page-content.main-page-wrapper {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
body.tax-unicategory .wd-content-layout.content-layout-wrapper {
    padding-top: 6px !important;
    margin-top: 0 !important;
}
body.tax-unicategory .wd-content-area.site-content {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
body.tax-unicategory .page-title,
body.tax-unicategory .wd-page-title,
body.tax-unicategory .title-size-default,
body.tax-unicategory .shop-title-wrapper {
    display: none !important;
}

.uc-catalog-page {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 16px;
    box-sizing: border-box;
}

.uc-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 18px 0 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.uc-seo-desc {
    color: #555;
    font-size: 0.92rem;
    margin: 0 0 16px;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════
   BREADCRUMB
   ═══════════════════════════════════════════════ */

.uc-breadcrumb {
    font-size: 0.85rem;
    margin: 6px 0 8px;
    color: #888;
}
.uc-breadcrumb a { color: #555; text-decoration: none; font-weight: 500; }
.uc-breadcrumb a:hover { color: #222; text-decoration: underline; }
.uc-sep { display: inline-block; margin: 0 6px; color: #bbb; }
.uc-current { color: #333; font-weight: 600; }

/* Elementor Breadcrumb Widget */
.uc-el-breadcrumb {
    font-size: 0.85rem;
    line-height: 1.5;
}
.uc-el-breadcrumb a { text-decoration: none; font-weight: 500; transition: color .15s; }
.uc-el-breadcrumb a:hover { text-decoration: underline; }
.uc-el-bc-sep { display: inline-block; margin: 0 6px; }
.uc-el-bc-current { font-weight: 600; }

/* ═══════════════════════════════════════════════
   CATALOG LANDING — UNICAT cards
   ═══════════════════════════════════════════════ */

.uc-unicat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 16px;
    margin: 20px 0 40px;
}

.uc-unicat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    color: inherit !important;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 16px 12px 14px;
    transition: border-color .2s, box-shadow .25s, transform .2s;
}
.uc-unicat-card:hover {
    border-color: #222;
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
    transform: translateY(-3px);
}

.uc-unicat-card-img-wrap {
    width: 110px; height: 110px;
    border-radius: 10px; overflow: hidden;
    margin-bottom: 10px; background: #f8f8f8;
    display: flex; align-items: center; justify-content: center;
}
.uc-unicat-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.uc-unicat-card-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg,#f0f0f0,#e0e0e0); }
.uc-unicat-card-name {
    font-size: .82rem; font-weight: 700; text-align: center;
    text-transform: uppercase; letter-spacing: .3px; line-height: 1.3;
    word-break: break-word;
}

/* ═══════════════════════════════════════════════
   NAV STRIP — DETACAT chips
   ═══════════════════════════════════════════════ */

.uc-nav-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}

.uc-nav-chip {
    display: flex; flex-direction: column; align-items: center;
    text-decoration: none !important; color: inherit !important;
    background: #fff; border: 1px solid #e5e5e5;
    border-radius: 10px; padding: 10px 6px 8px;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.uc-nav-chip:hover {
    border-color: #222; box-shadow: 0 4px 12px rgba(0,0,0,.08);
    transform: translateY(-2px);
}

.uc-nav-chip-img-wrap {
    width: 64px; height: 64px;
    border-radius: 8px; overflow: hidden;
    margin-bottom: 6px; background: #f8f8f8;
    display: flex; align-items: center; justify-content: center;
}
.uc-nav-chip-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.uc-nav-chip-placeholder { width: 100%; height: 100%; background: linear-gradient(135deg,#f0f0f0,#e0e0e0); }
.uc-nav-chip-name {
    font-size: .65rem; font-weight: 600; text-align: center;
    line-height: 1.25; text-transform: uppercase; letter-spacing: .3px;
    word-break: break-word; max-width: 100%;
}

/* ═══════════════════════════════════════════════
   SIBLINGS SECTION
   ═══════════════════════════════════════════════ */

.uc-siblings-section { margin-bottom: 10px; }
.uc-siblings-label {
    font-size: .86rem; color: #555;
    margin: 0 0 10px; letter-spacing: .2px;
}
.uc-siblings-section .uc-nav-strip { margin-bottom: 20px; }

/* ═══════════════════════════════════════════════
   DETACAT HEADER — stacked (image + title + desc)
   ═══════════════════════════════════════════════ */

.uc-detacat-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 10px;
}

.uc-detacat-header-text { flex: 1; }
.uc-detacat-header-text .uc-page-title { margin-top: 0; }

.uc-detacat-hero {
    width: 100px; height: 100px;
    border-radius: 12px; overflow: hidden;
    flex-shrink: 0; border: 1px solid #e5e5e5;
}
.uc-detacat-hero-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ═══════════════════════════════════════════════
   SIDEBAR + MAIN LAYOUT
   ═══════════════════════════════════════════════ */

.uc-layout { display: block; }
.uc-layout.uc-has-sidebar {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
    align-items: start;
}

.uc-sidebar {
    position: sticky;
    top: 10px;
    align-self: start;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    max-height: calc(100vh - 20px);
    display: flex;
    flex-direction: column;
}

.uc-sidebar-form {
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}
.uc-sidebar-form::-webkit-scrollbar { width: 4px; }
.uc-sidebar-form::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

.uc-sidebar-title {
    font-size: .88rem; font-weight: 700; margin: 0;
    text-transform: uppercase; letter-spacing: .5px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid #eee;
    color: #333;
}


/* ═══════════════════════════════════════════════
   ACTIVE FILTER TAGS
   ═══════════════════════════════════════════════ */

.uc-active-filters {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
    align-items: center;
}

.uc-active-tag {
    display: inline-flex; align-items: center; gap: 4px;
    background: #333; color: #fff;
    font-size: .72rem; font-weight: 500;
    padding: 4px 8px 4px 10px;
    border-radius: 14px;
    cursor: pointer;
    transition: background .15s;
    line-height: 1.3;
}
.uc-active-tag:hover { background: #555; }
.uc-active-tag-x {
    font-size: .9rem; line-height: 1; font-weight: 300;
    opacity: .75; margin-left: 2px;
}
.uc-active-tag:hover .uc-active-tag-x { opacity: 1; }

.uc-filter-reset-link {
    font-size: .7rem; color: #c33 !important;
    text-decoration: none !important; font-weight: 600;
    margin-left: auto; white-space: nowrap;
    padding: 2px 0; transition: color .15s;
}
.uc-filter-reset-link:hover { color: #a00 !important; }

/* ═══════════════════════════════════════════════
   FILTER WIDGET (Woodmart-inspired accordion)
   ═══════════════════════════════════════════════ */

.uc-pf-widget {
    border-bottom: 1px solid #f0f0f0;
}
.uc-pf-widget:last-of-type { border-bottom: none; }

.uc-pf-title {
    display: flex; align-items: center; gap: 8px;
    padding: 13px 16px;
    cursor: pointer;
    user-select: none;
    transition: background .15s;
    border-left: 3px solid transparent;
}
.uc-pf-title:hover { background: #f7f7f7; }
.uc-pf-title.uc-pf-open { border-left-color: #333; background: #fafafa; }

.uc-pf-title-text {
    font-size: .82rem; font-weight: 700; color: #333;
    text-transform: uppercase; letter-spacing: .3px;
    flex: 1;
}

.uc-pf-selected-count {
    font-size: .62rem; font-weight: 700;
    background: #333; color: #fff;
    min-width: 18px; height: 18px;
    border-radius: 9px; text-align: center;
    line-height: 18px; flex-shrink: 0;
}

.uc-pf-arrow {
    width: 8px; height: 8px;
    border-right: 2px solid #999;
    border-bottom: 2px solid #999;
    transform: rotate(45deg);
    transition: transform .2s;
    flex-shrink: 0;
}
.uc-pf-title.uc-pf-open .uc-pf-arrow {
    transform: rotate(-135deg);
}

.uc-pf-dropdown {
    display: none;
    padding: 0 14px 12px;
}
.uc-pf-dropdown.uc-pf-dropdown-open {
    display: block;
}

/* Dropdown select */
.uc-filter-select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: .8rem;
    background: #fff;
    color: #333;
}

/* List (multiselect checkboxes — Woodmart list style) */
.uc-pf-scroll {
    max-height: 240px; overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
}
.uc-pf-scroll::-webkit-scrollbar { width: 4px; }
.uc-pf-scroll::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

.uc-pf-list {
    list-style: none; margin: 0; padding: 0;
}
.uc-pf-item { margin: 0; }

.uc-pf-item a.pf-value,
.uc-pf-item a.pf-value:visited {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 4px;
    text-decoration: none !important; color: #555 !important;
    font-size: .78rem; border-radius: 3px;
    transition: background .12s, color .12s;
    line-height: 1.3;
}
.uc-pf-item a.pf-value:hover { background: #f5f5f5; color: #222 !important; }
.uc-pf-item.uc-pf-active a.pf-value {
    font-weight: 700; color: #222 !important; background: #f0f6ff;
}

.uc-pf-label { flex: 1; }

.uc-pf-count {
    font-size: .65rem; font-weight: 600;
    background: #f0f0f0; color: #777;
    padding: 1px 6px; border-radius: 8px;
    min-width: 20px; text-align: center;
    line-height: 1.5; flex-shrink: 0;
}
.uc-pf-item.uc-pf-active .uc-pf-count,
.uc-pf-pill.uc-pf-active .uc-pf-count { background: #d0e3ff; color: #335; }

/* Inline pills */
.uc-pf-pills {
    display: flex; flex-wrap: wrap; gap: 5px;
}
.uc-pf-pill {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 10px; border: 1px solid #e0e0e0; border-radius: 16px;
    font-size: .74rem; color: #555 !important; background: #fff;
    cursor: pointer; transition: all .15s; user-select: none;
    text-decoration: none !important; line-height: 1.2;
}
.uc-pf-pill:hover {
    border-color: #999; background: #f8f8f8; color: #222 !important;
}
.uc-pf-pill.uc-pf-active {
    background: #333; border-color: #333; color: #fff !important;
    font-weight: 600;
}
.uc-pf-pill .uc-pf-count {
    font-size: .6rem; background: transparent; color: inherit;
    padding: 0; opacity: .65;
}
.uc-pf-pill.uc-pf-active .uc-pf-count { opacity: .8; }

/* Swatches (grid of swatch items with label) */
.uc-pf-swatches {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.uc-pf-swatch-item {
    display: flex; align-items: center; gap: 6px;
    padding: 4px 8px 4px 4px;
    border: 1px solid #e0e0e0; border-radius: 20px;
    font-size: .74rem; color: #555 !important;
    text-decoration: none !important;
    cursor: pointer; transition: all .15s;
    line-height: 1.2;
}
.uc-pf-swatch-item:hover { border-color: #999; background: #f8f8f8; }
.uc-pf-swatch-item.uc-pf-active {
    border-color: #333; background: #f0f6ff; font-weight: 600;
    color: #222 !important;
}
.uc-pf-swatch-label { white-space: nowrap; }

/* Common swatch elements */
.uc-swatch {
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.uc-swatch-bg {
    width: 20px; height: 20px; border-radius: 50%;
    border: 1px solid rgba(0,0,0,.12);
}
.uc-swatch-img {
    width: 22px; height: 22px; border-radius: 4px; overflow: hidden;
}
.uc-swatch-img img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.uc-swatch-text-val {
    width: 24px; height: 24px; border-radius: 4px;
    background: #eee; font-size: .6rem; font-weight: 700;
    color: #555; text-transform: uppercase;
    display: flex; align-items: center; justify-content: center;
}

/* Toggle — HIDDEN on desktop, visible on tablet/mobile only */
.uc-filters-toggle {
    display: none;
    width: calc(100% - 28px);
    margin: 6px 14px 10px;
    padding: 10px 12px;
    background: #f8f9fb;
    border: 1px solid #d5dbe3;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    text-align: center;
    transition: all .2s;
}
.uc-filters-toggle:hover { background: #edf0f4; border-color: #bbc2cc; }
.uc-filters-toggle.open { background: #edf0f4; border-color: #bbc2cc; }

/* ═══════════════════════════════════════════════
   PAGINATION — centered, Woodmart native
   ═══════════════════════════════════════════════ */

.uc-main .woocommerce-pagination {
    text-align: center;
    margin-top: 24px;
}
.uc-main .woocommerce-pagination ul {
    display: inline-flex;
    justify-content: center;
}

/* ═══════════════════════════════════════════════
   PRODUCTS HEADING
   ═══════════════════════════════════════════════ */

.uc-products-heading {
    font-size: 1rem; font-weight: 600;
    margin: 0 0 14px; color: #444;
}
.uc-products-heading em { font-style: normal; color: #222; }

/* ═══════════════════════════════════════════════
   DETACAT SECTIONS on UNICAT pages
   ═══════════════════════════════════════════════ */

.uc-section {
    margin-bottom: 45px; border: 1px solid #eee;
    border-radius: 12px; overflow: hidden; background: #fff;
}

.uc-section-header {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; background: #f9f9f9;
    border-bottom: 2px solid #f0f0f0;
    text-decoration: none !important; color: inherit !important;
    transition: background .2s;
}
.uc-section-header:hover { background: #f2f2f2; }

.uc-section-img-wrap {
    width: 48px; height: 48px; border-radius: 8px;
    overflow: hidden; flex-shrink: 0; border: 1px solid #e0e0e0;
}
.uc-section-img-wrap img { width: 100%; height: 100%; object-fit: cover; }

.uc-section-header h2 {
    font-size: 1.05rem; font-weight: 700; margin: 0;
    text-transform: uppercase; letter-spacing: .3px; flex: 1;
}
.uc-see-all {
    font-size: .8rem; color: #777 !important;
    text-decoration: none !important; white-space: nowrap; font-weight: 500;
}
.uc-section-header:hover .uc-see-all { color: #222 !important; }

.uc-section .products { padding: 12px; }
.uc-section .products { grid-template-columns: repeat(5, 1fr) !important; }

/* ═══════════════════════════════════════════════
   LONG DESCRIPTION
   ═══════════════════════════════════════════════ */

.uc-long-description {
    margin: 36px 0 20px; padding: 24px;
    background: #fafafa; border: 1px solid #eee;
    border-radius: 10px; font-size: .93rem;
    line-height: 1.7; color: #444;
}
.uc-long-description img { max-width: 100%; height: auto; border-radius: 6px; }
.uc-long-description h2,
.uc-long-description h3 { margin-top: 1.2em; color: #222; }

/* ═══════════════════════════════════════════════
   RESPONSIVE — Tablet
   ═══════════════════════════════════════════════ */

@media (max-width: 991px) {
    .uc-catalog-page { padding: 0 12px; }

    .uc-layout.uc-has-sidebar { grid-template-columns: 1fr; }

    .uc-sidebar {
        position: static;
        margin-bottom: 16px;
        max-height: none;
    }

    .uc-filters-toggle { display: block; }
    .uc-filter-extra { display: none; }
    .uc-filter-extra.uc-visible { display: block; }

    .uc-section .products { grid-template-columns: repeat(3, 1fr) !important; }

    .uc-nav-strip { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
    .uc-nav-chip-img-wrap { width: 54px; height: 54px; }
    .uc-nav-chip-name { font-size: .6rem; }

    .uc-unicat-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
    .uc-unicat-card-img-wrap { width: 85px; height: 85px; }
}

/* ═══════════════════════════════════════════════
   RESPONSIVE — Mobile
   ═══════════════════════════════════════════════ */

@media (max-width: 576px) {
    .uc-page-title { font-size: 1.15rem; margin: 10px 0 6px; }
    .uc-seo-desc { font-size: .82rem; margin-bottom: 12px; }

    .uc-nav-strip {
        display: flex; overflow-x: auto;
        -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory;
        gap: 8px; padding-bottom: 6px; margin-bottom: 20px; scrollbar-width: none;
    }
    .uc-nav-strip::-webkit-scrollbar { display: none; }

    .uc-nav-chip {
        flex: 0 0 78px; scroll-snap-align: start;
        padding: 8px 4px 6px; border-radius: 8px;
    }
    .uc-nav-chip-img-wrap { width: 46px; height: 46px; border-radius: 6px; }
    .uc-nav-chip-name { font-size: .55rem; }

    .uc-unicat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .uc-unicat-card { padding: 10px 6px 8px; border-radius: 8px; }
    .uc-unicat-card-img-wrap { width: 60px; height: 60px; border-radius: 6px; }
    .uc-unicat-card-name { font-size: .68rem; }

    .uc-section .products { grid-template-columns: repeat(2, 1fr) !important; padding: 8px; }
    .uc-section-header { padding: 10px 12px; gap: 10px; }
    .uc-section-img-wrap { width: 38px; height: 38px; }
    .uc-section-header h2 { font-size: .88rem; }
    .uc-section { margin-bottom: 28px; }

    .uc-detacat-header { gap: 12px; }
    .uc-detacat-hero { width: 70px; height: 70px; }

    .uc-sidebar { border-radius: 6px; }
    .uc-sidebar-title { font-size: .82rem; padding: 10px 12px 8px; }
    .uc-pf-title { padding: 9px 12px; }
    .uc-pf-title-text { font-size: .75rem; }
    .uc-pf-dropdown { padding: 0 10px 10px; }
    .uc-pf-scroll { max-height: 160px; }
    .uc-pf-pill { padding: 4px 8px; font-size: .7rem; }
    .uc-active-filters { padding: 8px 10px; gap: 4px; }
    .uc-active-tag { font-size: .66rem; padding: 3px 6px 3px 8px; }

    .uc-long-description { padding: 16px; margin: 20px 0 14px; }
    .uc-products-heading { font-size: .9rem; }
}

/* ═══════════════════════════════════════════════
   NAV MENU THUMBNAILS
   ═══════════════════════════════════════════════ */

.uc-menu-thumb {
    width: 24px;
    height: 24px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 8px;
    vertical-align: middle;
    display: inline-block;
}

/* ═══════════════════════════════════════════════
   OUT OF STOCK NOTICE
   ═══════════════════════════════════════════════ */

.uc-out-of-stock-notice {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    border: 1px solid #ffe082;
    border-left: 4px solid #ffa726;
    border-radius: 8px;
    padding: 18px 22px;
    margin-bottom: 24px;
    font-size: .95rem;
    line-height: 1.6;
    color: #5d4037;
}
.uc-oos-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.uc-out-of-stock-notice p {
    margin: 0;
}
.uc-out-of-stock-notice strong {
    color: #e65100;
}
