/* =============================================================================
   USA Cabinets - Doors Card Layout  (v2.2)
   Scoped under body.ucdc-active. Targets the REAL live markup:
   - Filters: .wpc-filters-checkboxes (Style, Finish) + .wpc-filters-widget-select (Wood)
   - Cards:   custom Elementor loop (flip-box image + injected .ucdc-meta)
   - Layout:  .ucdc-layout (filters sidebar | product grid) built by ucdc.js
   Brand: navy #15336b, red #e22323, action-blue #1763d6
   ============================================================================= */

body.ucdc-active {
    --ucdc-navy:      #15336b;
    --ucdc-red:       #e22323;
    --ucdc-red-dark:  #c41a1a;
    --ucdc-blue:      #1763d6;
    --ucdc-blue-dark: #1250b0;
    --ucdc-ink:       #222a35;
    --ucdc-muted:     #6b7280;
    --ucdc-line:      #e3e6ec;
    --ucdc-card-line: #e7eaef;
    --ucdc-badge:     #2f8fe0;
    --ucdc-radius:    6px;
    --ucdc-shadow:    0 1px 3px rgba(20,30,50,.06);
}

/* =============================================================================
   1. TWO-COLUMN LAYOUT (built by ucdc.js): filters sidebar | product grid
   ============================================================================= */
body.ucdc-active .ucdc-layout {
    display: flex;
    align-items: flex-start;
    gap: 36px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
body.ucdc-active .ucdc-col-filters {
    flex: 0 0 270px;
    max-width: 270px;
    width: 270px;
    /* Not sticky: the filter list is long, so it flows with the page. */
}
body.ucdc-active .ucdc-col-grid {
    flex: 1 1 auto;
    min-width: 0;            /* allow grid to shrink inside flex */
}
body.ucdc-active .ucdc-col-filters #doors-filters,
body.ucdc-active .ucdc-col-filters .elementor-widget-container,
body.ucdc-active .ucdc-col-filters .wpc-filters-main-wrap {
    width: 100% !important;
    max-width: 100% !important;
}

/* =============================================================================
   2. FILTER WIDGET  ->  vertical sidebar
   ============================================================================= */

/* Neutralize the plugin's horizontal layout so the 3 sections stack. */
body.ucdc-active #doors-filters .wpc-filters-main-wrap.wpc-horizontal-layout,
body.ucdc-active #doors-filters .wpc-horizontal-cols-3,
body.ucdc-active #doors-filters .wpc-filters-widget-wrapper,
body.ucdc-active #doors-filters .wpc-filters-widget-containers-wrapper {
    display: block !important;
    width: 100% !important;
}
body.ucdc-active #doors-filters .wpc-filters-scroll-container {
    overflow: visible !important;
    max-height: none !important;
}
/* Hide the mobile "Filters" open button + popup chrome at every width, and
   force the inline filter content to stay visible (so mobile mirrors tablet
   instead of collapsing into the plugin's popup). */
body.ucdc-active #doors-filters .wpc-filters-open-button-container,
body.ucdc-active #doors-filters .wpc-widget-close-container,
body.ucdc-active #doors-filters .wpc-widget-popup-title {
    display: none !important;
}
body.ucdc-active #doors-filters .wpc-filters-widget-content {
    display: block !important;
    position: static !important;
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    background: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
}

/* Each filter group ("Style", "Finish", "Wood") — no outer border or divider,
   just vertical spacing. Only the individual option rows are bordered. */
body.ucdc-active #doors-filters .wpc-filters-section {
    border: none !important;
    margin: 0 0 28px !important;
    padding: 0 !important;
    width: 100% !important;
    float: none !important;
    background: none !important;
}
body.ucdc-active #doors-filters .wpc-filters-section:last-of-type {
    margin-bottom: 0 !important;
}
/* Kill any border/background the plugin paints on the content wrapper. */
body.ucdc-active #doors-filters .wpc-filter-content {
    border: none !important;
    background: none !important;
    padding: 0 !important;
}
/* The "full height" mode wraps the option list in a bordered, scrollable box.
   Remove that border/background/padding from every wrapper it can land on so
   only the individual option rows show a border. */
body.ucdc-active #doors-filters .wpc-filter-content,
body.ucdc-active #doors-filters .wpc-filter-content.wpc-filter-style,
body.ucdc-active #doors-filters .wpc-filter-content.wpc-filter-finish,
body.ucdc-active #doors-filters .wpc-filter-content.wpc-filter-wood,
body.ucdc-active #doors-filters .wpc-filter-style,
body.ucdc-active #doors-filters .wpc-filter-finish,
body.ucdc-active #doors-filters .wpc-filter-wood,
body.ucdc-active #doors-filters .wpc-filters-ul-list,
body.ucdc-active #doors-filters ul.wpc-filters-checkboxes,
body.ucdc-active #doors-filters .wpc-filters-section.wpc-filter-full-height,
body.ucdc-active #doors-filters .wpc-filters-section.wpc-filter-full-height .wpc-filter-content {
    border: none !important;
    outline: none !important;
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

/* The plugin's "full height" / horizontal mode lays the checkbox list out in
   CSS columns and gives each section a narrow fixed/column width. That is what
   squeezes each term into a ~60px box and wraps the text one letter per line.
   Kill all column behaviour and force every wrapper to the full sidebar width. */
body.ucdc-active #doors-filters .wpc-filter-content,
body.ucdc-active #doors-filters .wpc-filter-style,
body.ucdc-active #doors-filters .wpc-filter-finish,
body.ucdc-active #doors-filters .wpc-filter-wood,
body.ucdc-active #doors-filters .wpc-filters-ul-list,
body.ucdc-active #doors-filters ul.wpc-filters-checkboxes {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    -webkit-column-count: 1 !important;
    -moz-column-count: 1 !important;
    column-count: 1 !important;
    -webkit-columns: auto !important;
    columns: auto !important;
    column-width: auto !important;
    column-gap: 0 !important;
    float: none !important;
}
/* Belt-and-suspenders: the section itself must never be column-width-sized. */
body.ucdc-active #doors-filters .wpc-filters-section.wpc-filter-full-height {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    -webkit-column-count: 1 !important;
    column-count: 1 !important;
    column-width: auto !important;
}

/* Section header / toggle */
body.ucdc-active #doors-filters .wpc-filter-header {
    margin: 0 0 14px !important;
    border: none !important;
    padding: 0 !important;
}
body.ucdc-active #doors-filters .wpc-filter-title,
body.ucdc-active #doors-filters .wpc-filter-title button {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: var(--ucdc-ink) !important;
    text-transform: none !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-align: left !important;
    line-height: 1.3 !important;
}
/* The title becomes a clickable toggle (class added by ucdc.js). */
body.ucdc-active #doors-filters .wpc-filter-title.ucdc-collapse-toggle {
    cursor: pointer;
    user-select: none;
}
body.ucdc-active #doors-filters .wpc-filter-title button > .wpc-wrap-icons {
    display: inline !important;
}

/* Chevron indicator. The plugin renders an empty .wpc-open-icon; some titles
   (Wood) have no button at all, so we add our own caret on the toggle. */
body.ucdc-active #doors-filters .wpc-filter-title .wpc-open-icon {
    display: none !important;
}
body.ucdc-active #doors-filters .wpc-filter-title.ucdc-collapse-toggle::after {
    content: "";
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin-left: 12px;
    border-right: 2px solid #9aa3b2;
    border-bottom: 2px solid #9aa3b2;
    transform: rotate(45deg);          /* points down = expanded */
    transition: transform .18s ease;
}
body.ucdc-active #doors-filters .wpc-filter.ucdc-collapsed .wpc-filter-title.ucdc-collapse-toggle::after {
    transform: rotate(-45deg);         /* points up = collapsed */
}

/* Collapse behaviour (JS toggles .ucdc-collapsed on the .wpc-filter group). */
body.ucdc-active #doors-filters .wpc-filter-content {
    display: block;
    overflow: hidden;
}
body.ucdc-active #doors-filters .wpc-filter.ucdc-collapsed .wpc-filter-content {
    display: none !important;
}

/* ---- Checkbox filters (Style + Finish) as bordered rows ---- */
body.ucdc-active #doors-filters ul.wpc-filters-checkboxes,
body.ucdc-active #doors-filters ul.wpc-filters-ul-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
}
body.ucdc-active #doors-filters .wpc-filters-checkboxes .wpc-term-item,
body.ucdc-active #doors-filters .wpc-filters-checkboxes li.wpc-checkbox-item {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background: #fff !important;
    border: 1px solid var(--ucdc-card-line) !important;
    border-radius: var(--ucdc-radius) !important;
    overflow: hidden !important;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
body.ucdc-active #doors-filters .wpc-filters-checkboxes .wpc-term-item:hover {
    border-color: #c3ccda !important;
    box-shadow: var(--ucdc-shadow);
}
body.ucdc-active #doors-filters .wpc-filters-checkboxes .wpc-term-item.wpc-term-selected {
    border-color: var(--ucdc-blue) !important;
    background: #eef4fe !important;
    box-shadow: 0 0 0 2px var(--ucdc-blue) inset;
}
body.ucdc-active #doors-filters .wpc-filters-checkboxes .wpc-term-item.wpc-term-selected label a {
    color: var(--ucdc-blue) !important;
    font-weight: 600 !important;
}
/* The row wrapper holds [checkbox] + [label(a + count)] */
body.ucdc-active #doors-filters .wpc-filters-checkboxes .wpc-term-item-content-wrapper {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    padding: 11px 13px !important;
    margin: 0 !important;
    gap: 11px !important;
    box-sizing: border-box !important;
}
/* Custom checkbox */
body.ucdc-active #doors-filters .wpc-filters-checkboxes input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 auto !important;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1.5px solid #b9c0cc !important;
    border-radius: 4px !important;
    background: #fff !important;
    cursor: pointer;
    position: relative;
    top: 0 !important;
    transition: border-color .12s ease, background .12s ease;
}
body.ucdc-active #doors-filters .wpc-filters-checkboxes input[type="checkbox"]:hover {
    border-color: var(--ucdc-blue) !important;
}
body.ucdc-active #doors-filters .wpc-filters-checkboxes input[type="checkbox"]:checked {
    background: var(--ucdc-blue) !important;
    border-color: var(--ucdc-blue) !important;
}
body.ucdc-active #doors-filters .wpc-filters-checkboxes input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
/* Label fills the row. Block layout (not flex) so the term text uses the full
   available width and only wraps at word boundaries when truly needed. */
body.ucdc-active #doors-filters .wpc-filters-checkboxes label {
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    cursor: pointer;
    line-height: 1.3 !important;
    white-space: normal !important;
}
/* The term anchor — override the theme's competing rule
   (.wpc-filters-main-wrap li.wpc-term-item a {font-size:16px;margin-left:8px}). */
body.ucdc-active #doors-filters .wpc-filters-checkboxes label a,
body.ucdc-active #doors-filters .wpc-filters-main-wrap li.wpc-term-item a.wpc-filter-link {
    color: var(--ucdc-ink) !important;
    text-decoration: none !important;
    font-size: 14.5px !important;
    font-weight: 500 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: inline !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    hyphens: none !important;
}
body.ucdc-active #doors-filters .wpc-filters-checkboxes label a:hover {
    color: var(--ucdc-blue) !important;
}

/* ---- Door-style icons injected into the Style filter (see ucdc.js) ---- */
body.ucdc-active #doors-filters .ucdc-style-icon {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #5b6470;
    margin: 0 2px 0 0;
}
body.ucdc-active #doors-filters .ucdc-style-icon svg {
    display: block;
    width: 30px;
    height: 30px;
}
body.ucdc-active #doors-filters .wpc-term-item.wpc-term-selected .ucdc-style-icon {
    color: var(--ucdc-blue);
}
/* Slightly more breathing room in Style rows that carry an icon. */
body.ucdc-active #doors-filters .wpc-filter-style .ucdc-has-style-icon .wpc-term-item-content-wrapper {
    padding-top: 9px !important;
    padding-bottom: 9px !important;
}

/* Term counts (e.g. "(18)") — muted, never pushed out of the box. */
body.ucdc-active #doors-filters .wpc-term-count {
    color: var(--ucdc-muted) !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    margin: 0 0 0 4px !important;
    flex: 0 0 auto !important;
    align-self: center !important;
    white-space: nowrap !important;
}

/* ---- Wood dropdown -> styled to match the checkbox boxes ---- */
body.ucdc-active #doors-filters .wpc-filter-wood .wpc-filter-content,
body.ucdc-active #doors-filters .wpc-filter-content.wpc-filter-wood {
    margin-top: 0 !important;
}
body.ucdc-active #doors-filters .wpc-filter-wood select.wpc-filters-widget-select,
body.ucdc-active #doors-filters select.wpc-filters-widget-select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-height: 46px !important;
    height: 46px !important;
    margin: 0 !important;
    border: 1px solid var(--ucdc-card-line) !important;
    border-radius: var(--ucdc-radius) !important;
    padding: 0 40px 0 13px !important;
    font-size: 14.5px !important;
    font-weight: 500 !important;
    color: var(--ucdc-ink) !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 13px center !important;
    cursor: pointer;
    line-height: 46px !important;
    box-shadow: none !important;
    transition: border-color .15s ease, box-shadow .15s ease;
}
body.ucdc-active #doors-filters select.wpc-filters-widget-select:hover {
    border-color: #c3ccda !important;
    box-shadow: var(--ucdc-shadow);
}
body.ucdc-active #doors-filters select.wpc-filters-widget-select:focus {
    border-color: var(--ucdc-blue) !important;
    box-shadow: 0 0 0 1px var(--ucdc-blue) inset !important;
    outline: none !important;
}

/* Apply / Cancel controls */
body.ucdc-active #doors-filters .wpc-filters-widget-controls-container {
    margin-top: 18px !important;
}
body.ucdc-active #doors-filters .wpc-filters-apply-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    height: 46px;
    background: var(--ucdc-red) !important;
    color: #fff !important;
    border-radius: var(--ucdc-radius) !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    text-decoration: none !important;
    border: none !important;
}
body.ucdc-active #doors-filters .wpc-filters-apply-button:hover {
    background: var(--ucdc-red-dark) !important;
}
body.ucdc-active #doors-filters .wpc-filters-close-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    height: 38px;
    margin-top: 8px !important;
    color: var(--ucdc-muted) !important;
    text-decoration: none !important;
    font-size: 14px !important;
}

/* Active-selection chips */
body.ucdc-active #doors-filters .wpc-filter-chips-list:not(.wpc-empty-chips-container) {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

/* =============================================================================
   3. PRODUCT GRID  (Elementor custom posts loop)
   ============================================================================= */
body.ucdc-active .ucdc-col-grid .elementor-posts-container.elementor-grid,
body.ucdc-active .elementor-posts-container.elementor-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 28px 24px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}
body.ucdc-active .ucdc-col-grid .elementor-widget-container,
body.ucdc-active .ucdc-col-grid .elementor-widget-posts {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* The card shell */
body.ucdc-active article.elementor-post.ucdc-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--ucdc-card-line);
    border-radius: var(--ucdc-radius);
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s ease, border-color .15s ease;
}
body.ucdc-active article.elementor-post.ucdc-card:hover {
    box-shadow: 0 6px 18px rgba(20,30,50,.10);
    border-color: #d6dbe4;
}

/* Flatten ALL loop wrappers to simple full-width blocks: no bg/padding/gap/
   min-height/border. This removes the gray box AND the stray whitespace
   (Elementor flex containers carry a min-height + boxed padding). */
body.ucdc-active .ucdc-card .elementor,
body.ucdc-active .ucdc-card .individual-door-item,
body.ucdc-active .ucdc-card .e-con,
body.ucdc-active .ucdc-card .e-con-inner,
body.ucdc-active .ucdc-card .e-con-boxed,
body.ucdc-active .ucdc-card .e-con.e-parent,
body.ucdc-active .ucdc-card .e-con.e-child,
body.ucdc-active .ucdc-card .elementor-element-e18dad2,
body.ucdc-active .ucdc-card .elementor-element-af33ecb,
body.ucdc-active .ucdc-card .elementor-element-a136df7 {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
    row-gap: 0 !important;
    column-gap: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
    width: 100% !important;
    max-width: 100% !important;
    --padding-top: 0 !important;
    --padding-bottom: 0 !important;
    --padding-left: 0 !important;
    --padding-right: 0 !important;
    --row-gap: 0 !important;
    --column-gap: 0 !important;
    --min-height: 0 !important;
}
/* The a136df7 container only held the (now hidden) name + button -> remove it. */
body.ucdc-active .ucdc-card .elementor-element-a136df7 {
    display: none !important;
}

/* ---- Flip-box image -> static product image with badge ----
   Force every flip layer + the widget-container to exactly the image height so
   no residual height shows below the picture (the RTA-kitchen whitespace). */
body.ucdc-active .ucdc-card .elementor-widget-ma-flipbox {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
}
body.ucdc-active .ucdc-card .elementor-widget-ma-flipbox .elementor-widget-container {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 0 !important;
    position: relative;       /* anchor for the 20% OFF ribbon */
}
body.ucdc-active .ucdc-card .jltma-flip-box-wrapper,
body.ucdc-active .ucdc-card .jltma-flip-box-inner,
body.ucdc-active .ucdc-card .jltma-flip-box-front {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 210px !important;
    min-height: 0 !important;
    max-height: 210px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;          /* kill the 3D flip */
    -webkit-transform: none !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
    transition: none !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}
/* Real anchor overlaying the card image (see PHP). Covers the whole image
   area and sits above the flip layers so a native click navigates instantly,
   beating the slow Master Addons wrapper-link JS handler. */
body.ucdc-active .ucdc-card .jltma-flip-box-wrapper .ucdc-image-link {
    position: absolute !important;
    inset: 0 !important;
    z-index: 5 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    cursor: pointer;
    /* invisible, but clickable */
    background: transparent !important;
    text-indent: -9999px;
    overflow: hidden;
}
/* Hide the flip "back" face and inner flip content; we want a plain image. */
body.ucdc-active .ucdc-card .jltma-flip-box-back {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: none !important;
    -webkit-transform: none !important;
    z-index: 0 !important;
    pointer-events: none !important;
}
body.ucdc-active .ucdc-card .jltma-flipbox-content {
    display: none !important;
}
/* Bulletproof the front face: always shown, on top, never transformed. */
body.ucdc-active .ucdc-card .jltma-flip-box-front {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1 !important;
}
/* Kill the flip animation in EVERY state, including :hover/:focus. The plugin
   rotates .jltma-flip-box-inner on hover; pin it flat regardless. */
body.ucdc-active .ucdc-card .jltma-flip-box-wrapper:hover .jltma-flip-box-inner,
body.ucdc-active .ucdc-card .jltma-flip-box-wrapper:focus .jltma-flip-box-inner,
body.ucdc-active .ucdc-card .jltma-flip-box-wrapper:focus-within .jltma-flip-box-inner,
body.ucdc-active .ucdc-card .jltma-flip-box-wrapper.one:hover .jltma-flip-box-inner,
body.ucdc-active .ucdc-card .jltma-flip-box-inner:hover,
body.ucdc-active .ucdc-card .jltma-flip-box-wrapper:hover .jltma-flip-box-front,
body.ucdc-active .ucdc-card .jltma-flip-box-wrapper:hover .jltma-flip-box-back {
    transform: none !important;
    -webkit-transform: none !important;
    transition: none !important;
    opacity: 1 !important;
}
/* And keep the back face hidden even when hovered. */
body.ucdc-active .ucdc-card .jltma-flip-box-wrapper:hover .jltma-flip-box-back {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* (20% OFF ribbon removed per request.) */

/* ---- HIDE the old door-name widget + old Shop Now button ---- */
body.ucdc-active .ucdc-card .door-name,
body.ucdc-active .ucdc-card .elementor-element-8d3e2e8,
body.ucdc-active .ucdc-card .elementor-widget-post-info,
body.ucdc-active .ucdc-card .elementor-element-027f063,
body.ucdc-active .ucdc-card .elementor-widget-button {
    display: none !important;
}

/* =============================================================================
   4. INJECTED META BLOCK
   ============================================================================= */
body.ucdc-active .ucdc-card .ucdc-meta {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;            /* fill remaining height so buttons align */
}
body.ucdc-active .ucdc-card .ucdc-title {
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ucdc-ink);
    margin: 0 0 12px;
    text-align: center;
}
body.ucdc-active .ucdc-card .ucdc-title a { color: inherit; text-decoration: none; }
body.ucdc-active .ucdc-card .ucdc-title a:hover { color: var(--ucdc-navy); }

body.ucdc-active .ucdc-card .ucdc-meta-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    margin-bottom: 14px;
    border-top: 1px solid var(--ucdc-card-line);
}
body.ucdc-active .ucdc-card .ucdc-price,
body.ucdc-active .ucdc-card .ucdc-ship {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ucdc-ink);
}
body.ucdc-active .ucdc-card .ucdc-price-icon,
body.ucdc-active .ucdc-card .ucdc-ship-icon {
    color: #4b5563;
    display: inline-flex;
    flex: 0 0 auto;
}
body.ucdc-active .ucdc-card .ucdc-price-text { display: flex; flex-direction: column; line-height: 1.25; }
body.ucdc-active .ucdc-card .ucdc-price-label { font-size: 13px; font-weight: 700; }
body.ucdc-active .ucdc-card .ucdc-price-value { font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
body.ucdc-active .ucdc-card .ucdc-price-info {
    color: var(--ucdc-red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 2px;
    margin: 0 0 0 2px;
    cursor: pointer;
    vertical-align: middle;
    line-height: 0;
    border-radius: 50%;
    transition: background .12s ease, transform .05s ease;
}
body.ucdc-active .ucdc-card .ucdc-price-info:hover {
    background: rgba(226,35,35,.12);
}
body.ucdc-active .ucdc-card .ucdc-price-info:active { transform: scale(.92); }
body.ucdc-active .ucdc-card .ucdc-price-info:focus-visible {
    outline: 2px solid var(--ucdc-red);
    outline-offset: 1px;
}
/* On bath pages there is no price block; the ship line sits on its own. */
body.ucdc-active .ucdc-card .ucdc-meta-row.ucdc-no-price {
    justify-content: flex-start;
}
body.ucdc-active .ucdc-card .ucdc-price-na { color: var(--ucdc-muted); font-weight: 500; }
body.ucdc-active .ucdc-card .ucdc-ship-text { font-size: 13.5px; color: #374151; }

/* Buttons */
body.ucdc-active .ucdc-card .ucdc-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: auto;          /* pin to bottom for equal-height cards */
}
/* Gallery cards have one button; let it span the full card width at every
   breakpoint (the responsive blocks below re-set grid-template-columns). */
body.ucdc-active .ucdc-card .ucdc-actions.ucdc-actions-single {
    grid-template-columns: 1fr !important;
}
body.ucdc-active .ucdc-card .ucdc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 8px;
    border-radius: var(--ucdc-radius);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: none;
    line-height: 1;
    text-align: center;
    transition: background .15s ease, transform .05s ease;
}
body.ucdc-active .ucdc-card .ucdc-btn:active { transform: translateY(1px); }
body.ucdc-active .ucdc-card .ucdc-btn-shop { background: var(--ucdc-red); color: #fff; }
body.ucdc-active .ucdc-card .ucdc-btn-shop:hover { background: var(--ucdc-red-dark); color:#fff; }
body.ucdc-active .ucdc-card .ucdc-btn-sample { background: var(--ucdc-blue); color: #fff; }
body.ucdc-active .ucdc-card .ucdc-btn-sample:hover { background: var(--ucdc-blue-dark); color:#fff; }
body.ucdc-active .ucdc-card .ucdc-btn-icon { display: inline-flex; flex: 0 0 auto; }

/* Order Sample loading / added states */
body.ucdc-active .ucdc-card .ucdc-btn-sample.ucdc-loading { opacity: .8; cursor: default; }
body.ucdc-active .ucdc-card .ucdc-btn-sample.ucdc-added { background: #138a4e; }

/* =============================================================================
   INFO POPUP (10x10 sample image lightbox)
   Markup lives in the footer; ucdc.js toggles .ucdc-modal-open.
   These rules are NOT scoped to .ucdc-active because the modal is a direct
   child of <body>, outside the page content.
   ============================================================================= */
.ucdc-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 4vmin;
    box-sizing: border-box;
}
.ucdc-modal.ucdc-modal-open { display: flex; }
.ucdc-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 40, .72);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    cursor: pointer;
    animation: ucdcFade .18s ease;
}
.ucdc-modal-dialog {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
    max-width: 1100px;
    width: 100%;
    max-height: 92vh;
    overflow: hidden;
    animation: ucdcPop .2s ease;
}
.ucdc-modal-body {
    width: 100%;
    max-height: 92vh;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}
.ucdc-modal-img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 92vh;
    object-fit: contain;
}
.ucdc-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    color: #1f2733;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    transition: background .15s ease, transform .05s ease;
}
.ucdc-modal-close:hover { background: #fff; }
.ucdc-modal-close:active { transform: scale(.94); }
body.ucdc-modal-lock { overflow: hidden !important; }

@keyframes ucdcFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ucdcPop {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to   { opacity: 1; transform: none; }
}
@media (max-width: 600px) {
    .ucdc-modal { padding: 3vmin; }
    .ucdc-modal-dialog { border-radius: 8px; }
    .ucdc-modal-close { top: 6px; right: 6px; width: 36px; height: 36px; }
}

/* =============================================================================
   5. RESPONSIVE
   ============================================================================= */

/* Tablet: 2-up grid while sidebar is still beside the grid (down to 1024px). */
@media (max-width: 1100px) and (min-width: 1025px) {
    body.ucdc-active .ucdc-col-grid .elementor-posts-container.elementor-grid,
    body.ucdc-active .elementor-posts-container.elementor-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    body.ucdc-active .ucdc-col-filters { flex-basis: 240px; max-width: 240px; width: 240px; }
}

/* Below 1024px: stack the filter block above the grid, both full width.
   Each filter group sits on its own row; its options flow horizontally in a
   single, horizontally-scrollable strip of pills (saves vertical space and
   reads cleanly on tablet). */
@media (max-width: 1024px) {
    body.ucdc-active .ucdc-layout {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    body.ucdc-active .ucdc-col-filters {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 26px !important;
        max-height: none !important;
        overflow: visible !important;
        padding-right: 0 !important;
    }
    body.ucdc-active .ucdc-col-grid {
        width: 100% !important;
        max-width: 100% !important;
    }
    body.ucdc-active #doors-filters .wpc-instead-of-posts-found {
        display: none !important;
    }
    /* Groups stacked vertically, full width. */
    body.ucdc-active #doors-filters .wpc-filters-widget-wrapper {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    body.ucdc-active #doors-filters .wpc-filters-section {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 18px !important;
    }
    body.ucdc-active #doors-filters .wpc-filter-header {
        margin-bottom: 10px !important;
    }
    /* Options become a horizontal, scrollable strip of pills. */
    body.ucdc-active #doors-filters .wpc-filter-style .wpc-filters-checkboxes,
    body.ucdc-active #doors-filters .wpc-filter-finish .wpc-filters-checkboxes,
    body.ucdc-active #doors-filters ul.wpc-filters-checkboxes {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 10px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 2px 2px 12px !important;          /* room for the scrollbar */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    body.ucdc-active #doors-filters .wpc-filters-checkboxes .wpc-term-item,
    body.ucdc-active #doors-filters .wpc-filters-checkboxes li.wpc-checkbox-item {
        flex: 0 0 auto !important;                 /* don't shrink; scroll instead */
        width: auto !important;
        max-width: none !important;
    }
    body.ucdc-active #doors-filters .wpc-filters-checkboxes .wpc-term-item-content-wrapper {
        white-space: nowrap !important;
        padding: 9px 14px !important;
    }
    body.ucdc-active #doors-filters .wpc-filters-checkboxes label a {
        white-space: nowrap !important;
    }
    /* Slim, on-brand scrollbar for the strips. */
    body.ucdc-active #doors-filters .wpc-filters-checkboxes::-webkit-scrollbar {
        height: 6px;
    }
    body.ucdc-active #doors-filters .wpc-filters-checkboxes::-webkit-scrollbar-thumb {
        background: #cdd3dd;
        border-radius: 6px;
    }
    body.ucdc-active #doors-filters .wpc-filters-checkboxes::-webkit-scrollbar-track {
        background: transparent;
    }
    /* Wood dropdown stays full width on its own row. */
    body.ucdc-active #doors-filters .wpc-filter-wood select.wpc-filters-widget-select {
        max-width: 420px !important;
    }
    body.ucdc-active .ucdc-col-grid .elementor-posts-container.elementor-grid,
    body.ucdc-active .elementor-posts-container.elementor-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* Phones: keep the horizontal scrollable filter strips (inherited from the
   <=1024px block); just size the cards down. Filters may be hidden by the
   theme on phones — that's acceptable for now. */
@media (max-width: 767px) {
    body.ucdc-active #doors-filters .wpc-filters-section {
        margin-bottom: 16px !important;
    }
    body.ucdc-active .ucdc-col-grid .elementor-posts-container.elementor-grid,
    body.ucdc-active .elementor-posts-container.elementor-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
    body.ucdc-active .ucdc-card .jltma-flip-box-wrapper,
    body.ucdc-active .ucdc-card .jltma-flip-box-inner,
    body.ucdc-active .ucdc-card .jltma-flip-box-front {
        height: 150px !important;
        max-height: 150px !important;
    }
    body.ucdc-active .ucdc-card .ucdc-meta { padding: 12px 12px 14px; }
    body.ucdc-active .ucdc-card .ucdc-title { font-size: 15px; margin-bottom: 10px; }
    body.ucdc-active .ucdc-card .ucdc-actions { grid-template-columns: 1fr; gap: 8px; }
    body.ucdc-active .ucdc-card .ucdc-btn { height: 42px; }
}

/* Very small phones: single card column so images aren't tiny. */
@media (max-width: 460px) {
    body.ucdc-active .ucdc-col-grid .elementor-posts-container.elementor-grid,
    body.ucdc-active .elementor-posts-container.elementor-grid {
        grid-template-columns: 1fr !important;
    }
    body.ucdc-active .ucdc-card .jltma-flip-box-wrapper,
    body.ucdc-active .ucdc-card .jltma-flip-box-inner,
    body.ucdc-active .ucdc-card .jltma-flip-box-front {
        height: 220px !important;
        max-height: 220px !important;
    }
    body.ucdc-active .ucdc-card .ucdc-actions { grid-template-columns: 1fr 1fr; }
}
