/* ================================================
   DJK Filter Sidebar – Frontend Styles
   ================================================ */

#djk-catalog-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    font-family: 'Kanit', sans-serif;
}

/* ─── Sidebar ─── */
#djk-sidebar {
    width: 240px;
    min-width: 220px;
    background: #fff;
    border: 1px solid #E0E6ED;
    border-radius: 6px;
    overflow: hidden;
    position: sticky;
    top: 100px;
    box-shadow: 0 4px 20px rgba(21, 101, 192, 0.08);
}

.djk-sidebar-heading {
    background: linear-gradient(135deg, #0D47A1, #1E88E5);
    color: #fff;
    padding: 12px 14px;
    font-size: 18px;
    font-weight: 600;
}

.djk-sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.djk-sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    font-size: 16px;
    color: #1A2B3C;
    text-decoration: none;
    border-bottom: 1px solid #F5F7FA;
    transition: all 0.18s;
}

.djk-sidebar-menu li a:hover,
.djk-sidebar-menu li a.djk-active {
    background: #EEF2FF;
    color: #1565C0;
    font-weight: 600;
    padding-left: 18px;
}

.djk-sidebar-contact {
    padding: 14px;
    border-top: 4px solid #F5F7FA;
    font-size: 15px;
    color: #546E7A;
}

.djk-sidebar-contact h4 {
    font-size: 15px;
    font-weight: 600;
    color: #1A2B3C;
    margin: 0 0 8px;
}

.djk-sidebar-contact p { margin: 4px 0; }

/* ─── Product Grid ─── */
#djk-product-grid {
    flex: 1;
}

#djk-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.djk-item {
    background: #fff;
    border: 1px solid #E0E6ED;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.djk-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(21, 101, 192, 0.12);
}

.djk-item-img {
    width: 100%;
    background: #F5F7FA;
    display: flex;
    align-items: center;
    justify-content: center;
}

.djk-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;   /* แสดงรูปเต็มภาพ ไม่ตัด crop */
    transition: transform 0.3s;
}

.djk-item:hover .djk-item-img img {
    transform: scale(1.05);
}

.djk-item-info {
    padding: 14px;
}

.djk-item-name {
    font-size: 22px;
    font-weight: 600;
    color: #1A2B3C;
    margin-bottom: 6px;
    line-height: 1.4;
}

.djk-item-price {
    font-size: 15px;
    font-weight: 700;
    color: #1565C0;
}

.djk-item.djk-hidden {
    display: none !important;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    #djk-catalog-wrapper { flex-direction: column; }
    #djk-sidebar { width: 100%; position: static; }
    .djk-sidebar-menu { display: flex; flex-wrap: wrap; }
    .djk-sidebar-menu li a { border-bottom: none; border-right: 1px solid #F5F7FA; }
    #djk-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    #djk-grid { grid-template-columns: 1fr; }
}
