/* ============================================================
   OTHERS.HTML — Product Gallery Stylesheet
   Layout: sticky nav (shared) + search bar + sidebar + CSS Grid
   ============================================================ */

/* --- Search bar ------------------------------------------- */
.gallery-search-wrap {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    padding: 10px 20px;
}

.gallery-search {
    align-items: center;
    display: flex;
    gap: 8px;
    margin: 0 auto;
    max-width: 800px;
}

.gallery-search input {
    border: 1px solid #ccc;
    border-radius: 4px;
    flex: 1;
    font-size: 14px;
    padding: 8px 12px;
    outline: none;
    transition: border-color 0.2s;
}

.gallery-search input:focus {
    border-color: #2790f4;
}

.gallery-search button {
    background-color: #07539f;
    border: none;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 20px;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.gallery-search button:hover {
    background-color: #053f7c;
}

/* --- Breadcrumbs ------------------------------------------ */
.breadcrumbs {
    color: #888;
    font-size: 12.5px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 20px;
}

/* --- Product catalog PDF (others / others-en) ------------ */
.catalog-pdf-cta {
    background-color: #f0f4f8;
    border-radius: 6px;
    font-size: 0.95rem;
    margin: 0.5rem auto 0;
    max-width: 1200px;
    padding: 0.65rem 1.25rem;
}

.catalog-pdf-cta a {
    font-weight: 600;
}

.breadcrumbs a {
    color: #2790f4;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* --- Page layout: sidebar + main -------------------------- */
.gallery-layout {
    align-items: flex-start;
    display: flex;
    gap: 0;
    margin: 0 auto;
    max-width: 1200px;
    padding: 16px 12px 32px;
}

/* --- Sidebar ---------------------------------------------- */
.nav2 {
    background-color: #f5f5f7;
    border-radius: 6px;
    flex-shrink: 0;
    margin-right: 16px;
    overflow: visible;
    width: 148px;
}

.nav2 .candan {
    list-style: none;
    margin: 0;
    padding: 4px 0;
}

.nav2 .sidebar-item {
    position: relative;
}

.nav2 .sidebar-item > a {
    color: #222;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.35;
    min-height: 44px;
    padding: 8px 12px;
    text-decoration: none;
    transition: color 0.15s, background-color 0.15s;
    white-space: normal;
    overflow-wrap: anywhere;
}

.nav2 .sidebar-item > a:hover,
.nav2 .sidebar-item.active > a {
    background-color: #e8f0fe;
    color: #2790f4;
}

.nav2 .sidebar-item.active > a {
    font-weight: 600;
    border-left: 3px solid #2790f4;
    padding-left: 9px;
}

/* Flyout submenu */
.nav2 .flyout {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    display: none;
    left: 100%;
    min-width: 180px;
    padding: 4px 0;
    position: absolute;
    top: 0;
    z-index: 200;
}

.nav2 .sidebar-item:hover > .flyout {
    display: block;
}

.nav2 .flyout ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav2 .flyout ul li a,
.nav2 .flyout ul li span {
    color: #444;
    display: block;
    font-size: 12.5px;
    line-height: 36px;
    padding: 0 14px;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s, color 0.15s;
}

.nav2 .flyout ul li a:hover {
    background-color: #f0f4ff;
    color: #2790f4;
}

.nav2 .flyout ul li span {
    color: #aaa;
    cursor: default;
}

/* --- Product main area ------------------------------------ */
.product-main {
    flex: 1;
    min-width: 0;
}

.product-main > .product-grid + .product-grid {
    margin-top: 22px;
}

/* --- CSS Grid product gallery ----------------------------- */
.product-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, 1fr);
}

/* --- Category section header (spans all columns) ---------- */
.cat-header {
    border-bottom: 2px solid #dde4f0;
    color: #333;
    font-size: 13.5px;
    font-weight: 600;
    grid-column: 1 / -1;
    letter-spacing: 0.2px;
    margin-top: 10px;
    padding: 6px 2px 6px;
}

/* --- Product card ----------------------------------------- */
.product-card {
    background-color: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    color: #333;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-decoration: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s;
}

.product-card:hover {
    border-color: #c0d4f5;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.card-img {
    align-items: center;
    background-color: #fafafa;
    display: flex;
    height: 180px;
    justify-content: center;
    overflow: hidden;
    width: 100%;
}

.card-img img {
    height: 100%;
    max-height: 160px;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.25s ease;
    width: auto;
}

.product-card:hover .card-img img {
    transform: scale(1.06);
}

.card-title {
    border-top: 1px solid #f0f0f0;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    margin: 0;
    overflow: hidden;
    padding: 9px 10px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* --- No results message ----------------------------------- */
.no-results {
    color: #888;
    font-size: 14px;
    padding: 40px 0;
    text-align: center;
    width: 100%;
}

/* --- Pagination ------------------------------------------- */
.pagination {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 28px;
    padding: 8px 0;
}

.pagination button {
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    color: #333;
    cursor: pointer;
    font-size: 13px;
    padding: 7px 18px;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.pagination button:hover:not(:disabled) {
    background-color: #2790f4;
    border-color: #2790f4;
    color: #fff;
}

.pagination button:disabled {
    color: #bbb;
    cursor: default;
}

#page-info {
    color: #666;
    font-size: 13px;
    white-space: nowrap;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* --- Tablet: ≤ 1024px — 3-column grid -------------------- */
@media (max-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Tablet: ≤ 768px — hide sidebar, 3-col grid ---------- */
@media (max-width: 768px) {
    .gallery-layout {
        flex-direction: column;
        padding: 12px;
    }

    .nav2 {
        display: none;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .card-img {
        height: 140px;
    }
}

/* --- Mobile: ≤ 560px — 2-column grid --------------------- */
@media (max-width: 560px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .card-img {
        height: 120px;
    }

    .gallery-search-wrap {
        padding: 8px 12px;
    }
}

/* --- Very small: ≤ 380px — 2-col, tighter ---------------- */
@media (max-width: 380px) {
    .product-grid {
        gap: 6px;
    }

    .card-img {
        height: 100px;
    }

    .card-title {
        font-size: 12px;
        padding: 7px 8px;
    }
}
