/**
 * Caplugs "U.S. Parts" product-list widget.
 */

.caplugs-usp {
    --caplugs-usp-fade: #ffffff;
    width: 100%;
}

/* ------------------------------------------------------------------ *
 * Tab strip (single, horizontally scrollable line)
 * ------------------------------------------------------------------ */
.caplugs-usp__tabsbar {
    position: relative;
}

.caplugs-usp__tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid #e5e5e5;
    /* hide scrollbar but keep scrolling */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.caplugs-usp__tabs::-webkit-scrollbar {
    display: none;
}

.caplugs-usp__tab {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 10px 16px;
    border: 0;
    background: transparent;
    color: #6b6b6b;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    scroll-snap-align: start;
    transition: color 0.15s ease;
}

.caplugs-usp__tab:hover {
    color: #231f20;
}

.caplugs-usp__tab.is-active {
    color: #231f20;
}

/* active underline indicator */
.caplugs-usp__tab.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 3px;
    background-color: #c1273d;
    border-radius: 2px 2px 0 0;
}

.caplugs-usp__tab-count {
    display: inline-block;
    min-width: 1.4em;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.06);
    color: inherit;
    font-size: 0.72em;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
}

/* ------------------------------------------------------------------ *
 * Scroll affordance (edge fades + chevrons)
 * ------------------------------------------------------------------ */
.caplugs-usp__scroll {
    position: absolute;
    top: 0;
    bottom: 1px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
    /* Reset Elementor global "Theme Style > Buttons" rules that target every
       <button>; these override our base styles, so they need !important. */
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    color: #231f20 !important;
    box-shadow: none !important;
}

.caplugs-usp__scroll[hidden] {
    display: none;
}

.caplugs-usp__scroll--left {
    left: 0;
    justify-content: flex-start;
    background: linear-gradient(to right, var(--caplugs-usp-fade) 35%, rgba(255, 255, 255, 0) 100%) !important;
}

.caplugs-usp__scroll--right {
    right: 0;
    justify-content: flex-end;
    background: linear-gradient(to left, var(--caplugs-usp-fade) 35%, rgba(255, 255, 255, 0) 100%) !important;
}

.caplugs-usp__scroll span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--caplugs-usp-fade);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
    padding-bottom: 3px;
}

/* ------------------------------------------------------------------ *
 * Panels
 * ------------------------------------------------------------------ */
.caplugs-usp__panel {
    padding-top: 28px;
}

.caplugs-usp__panel[hidden] {
    display: none;
}

.caplugs-usp__heading {
    margin-bottom: 28px;
    line-height: 1.1;
}

.caplugs-usp__heading-group {
    display: block;
    margin-bottom: 4px;
    color: #c1273d;
    font-size: 15px;
    font-weight: 600;
}

.caplugs-usp__heading-type {
    display: block;
    color: #231f20;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* ------------------------------------------------------------------ *
 * Product grid + cards
 * ------------------------------------------------------------------ */
.caplugs-usp__grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 32px;
}

.caplugs-usp__card {
    --caplugs-usp-align: flex-start;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    min-width: 0;
}

.caplugs-usp__imgbox {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 110px;
    margin-bottom: 12px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.caplugs-usp__img {
    max-width: 88%;
    max-height: 84%;
    width: auto;
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply; /* blends the JPEG-cutout edges onto the box bg */
}

.caplugs-usp__code {
    margin-bottom: 4px;
    color: #231f20;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    word-break: break-word;
}

.caplugs-usp__desc {
    color: #5a5a5a;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
}

/* ------------------------------------------------------------------ *
 * Editor convenience: show a faint outline so empty widget is visible
 * ------------------------------------------------------------------ */
.elementor-editor-active .caplugs-usp:empty::before {
    content: "Caplugs Product List";
    display: block;
    padding: 40px;
    text-align: center;
    color: #9a9a9a;
    border: 1px dashed #d5d5d5;
}
