/* ========================================
   5trak Solution Archive Widget
   ======================================== */

/* --- Layout: Sidebar + Grid --- */
.sol-layout {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.sol-sidebar {
    flex-shrink: 0;
    width: 280px;
    min-width: 280px;
    position: sticky;
    top: 50px;
}

.sol-main {
    flex: 1;
    min-width: 0;
}

/* --- Grid --- */
.sol-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* --- Sidebar Elements --- */
.sol-sidebar__heading {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px;
    line-height: 1.4;
}

.sol-cat-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sol-cat-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
    transition: color 0.2s;
}

.sol-cat-label--active {
    font-weight: 600;
}

/* Custom checkbox with visible checkmark */
.sol-cat-checkbox {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
    cursor: pointer;
    border: 2px solid #D1D5DB;
    border-radius: 3px;
    background: #fff;
    position: relative;
    transition: background-color 0.2s, border-color 0.2s;
}

.sol-cat-checkbox:checked {
    background-color: var(--sol-checkbox-color, #3773B9);
    border-color: var(--sol-checkbox-color, #3773B9);
}

.sol-cat-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);
}

.sol-cat-checkbox:focus-visible {
    outline: 2px solid var(--sol-checkbox-color, #3773B9);
    outline-offset: 2px;
}

/* --- Search --- */
.sol-sidebar__search {
    margin-top: 24px;
}

.sol-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.sol-search {
    width: 100%;
    font-family: inherit;
    font-size: 14px;
    padding: 10px 40px 10px 14px;
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    background: #fff;
    color: #1A1A2E;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.sol-search:focus {
    border-color: #3773B9;
}

.sol-search__icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    pointer-events: none;
}

.sol-search__icon img {
    width: 14px;
    height: 14px;
    display: block;
    object-fit: contain;
}

/* --- Enquiry Button --- */
.sol-sidebar__enquiry {
    margin-top: 24px;
}

a.sol-enquiry-btn,
button.sol-enquiry-btn,
.sol-enquiry-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    padding: 14px 24px;
    border: none;
    border-radius: 4px;
    background: #3773B9;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    text-decoration: none;
    line-height: 1;
    box-sizing: border-box;
}

.sol-enquiry-btn:hover {
    background: #2a5a94;
}

.sol-enquiry-btn__icon {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.sol-enquiry-btn__icon i,
.sol-enquiry-btn__icon svg {
    font-size: inherit;
    width: 1em;
    height: 1em;
}

/* Icon position: right — reverse flex order */
.sol-enquiry-btn--icon-right {
    flex-direction: row;
}

.sol-enquiry-btn--icon-left {
    flex-direction: row;
}

/* --- Product Card --- */
.sol-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.3s, transform 0.3s;
}

.sol-card--hover:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.sol-card__image {
    overflow: hidden;
    background: #F3F4F6;
    height: 220px;
}

.sol-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.sol-card--zoom:hover .sol-card__image img {
    transform: scale(1.05);
}

.sol-card__content {
    padding: 16px;
}

.sol-card__title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 4px;
}

.sol-card__code {
    font-size: 13px;
    color: #6B7280;
    display: block;
}

/* Hide cards during filter */
.sol-card[data-hidden="true"] {
    display: none;
}

/* --- No Results --- */
.sol-no-results {
    text-align: center;
    padding: 60px 20px;
    font-size: 16px;
    color: #9CA3AF;
    margin: 0;
}

/* ========================================
   LIGHTBOX
   ======================================== */
.sol-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100000;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.sol-lightbox__inner {
    position: relative;
    max-width: 900px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sol-lightbox__close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    z-index: 10;
    transition: opacity 0.2s;
}

.sol-lightbox__close:hover {
    opacity: 0.7;
}

.sol-lightbox__image-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    max-height: 70vh;
}

.sol-lightbox__image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

.sol-lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    transition: opacity 0.2s;
    z-index: 10;
    user-select: none;
}

.sol-lightbox__nav:hover {
    opacity: 0.7;
}

.sol-lightbox__nav--prev {
    left: -50px;
}

.sol-lightbox__nav--next {
    right: -50px;
}

.sol-lightbox__info {
    width: 100%;
    background: #fff;
    padding: 16px 20px;
    border-radius: 0 0 8px 8px;
    margin-top: -4px;
    box-sizing: border-box;
}

.sol-lightbox__title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.3;
}

.sol-lightbox__code {
    font-size: 13px;
    color: #6B7280;
    display: block;
    margin-bottom: 8px;
}

.sol-lightbox__desc {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 8px;
}

.sol-lightbox__counter {
    font-size: 12px;
    color: #9CA3AF;
    display: block;
    text-align: right;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .sol-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sol-lightbox__nav--prev {
        left: 0;
    }

    .sol-lightbox__nav--next {
        right: 0;
    }
}

@media (max-width: 768px) {
    .sol-layout {
        flex-direction: column;
    }

    .sol-sidebar {
        width: 100% !important;
        min-width: 0 !important;
        position: static;
    }

    .sol-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sol-lightbox__nav {
        font-size: 24px;
    }

    .sol-lightbox__nav--prev {
        left: 5px;
    }

    .sol-lightbox__nav--next {
        right: 5px;
    }
}

@media (max-width: 480px) {
    .sol-grid {
        grid-template-columns: 1fr;
    }
}
