/* QURATED 2026 — Directory page (SS 2027) */
/* โหลดคู่กับ style.css : ใช้ .lookbook-bar / .site-footer / โลโก้ ร่วมกัน */

.directory-page {
    background: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ---------- Title ---------- */
.directory-head {
    text-align: center;
    padding: 8px 20px 20px;
}

.directory-head .dir-super {
    font-family: var(--font-serif);
    font-size: 20px;
    letter-spacing: 2px;
    color: var(--dark);
}

.directory-head .dir-title {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 46px;
    letter-spacing: 6px;
    color: var(--black);
    margin-top: 2px;
}

/* ---------- Layout ---------- */
.directory {
    flex: 1;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 40px 80px;
}

.dir-cat {
    margin-top: 40px;
}

.dir-cat + .dir-cat {
    margin-top: 64px;
}

.dir-cat-title {
    font-family: var(--font-serif);
    font-weight: 400;
    font-size: 34px;
    letter-spacing: 1px;
    color: var(--black);
    margin-bottom: 34px;
}

.dir-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 52px;
    row-gap: 44px;
}

/* ---------- Brand entry ---------- */
.dir-brand {
    display: grid;
    grid-template-columns: 40% 1fr;
    gap: 20px;
    align-items: start;
}

/* แบรนด์ที่มี 2 รูป (เช่น BONO_BRAND) — เต็มความกว้าง [รูป | ข้อมูล | รูป] */
.dir-brand--wide {
    grid-column: 1 / -1;
    grid-template-columns: 260px minmax(0, 1fr) 260px;
    column-gap: 44px;
}

.dir-media {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--grey-card);
}

.dir-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.dir-info h3 {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--black);
    margin-bottom: 8px;
}

.dir-info p {
    font-size: 12.5px;
    line-height: 1.55;
    color: #3A3A3A;
    word-break: break-word;
}

/* ---------- Responsive ---------- */
/* คงเป็น grid 2 คอลัมน์เสมอ (รวมมือถือ) ตามที่ลูกค้าขอ */
@media (max-width: 860px) {
    .directory {
        padding: 20px 20px 64px;
    }

    .dir-grid {
        column-gap: 26px;
        row-gap: 36px;
    }

    .directory-head .dir-title {
        font-size: 36px;
        letter-spacing: 4px;
    }

    .dir-cat-title {
        font-size: 28px;
        margin-bottom: 24px;
    }

    /* BONO (2 รูป) เต็มกว้าง → รูปคู่กันด้านบน + ข้อมูลด้านล่าง (กันล้นจอแคบ) */
    .dir-brand--wide {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "img1 img2" "info info";
        column-gap: 24px;
        row-gap: 12px;
    }
    .dir-brand--wide > *:nth-child(1) { grid-area: img1; }
    .dir-brand--wide > *:nth-child(2) { grid-area: info; }
    .dir-brand--wide > *:nth-child(3) { grid-area: img2; }
}

/* มือถือ: การ์ดแนวตั้ง (รูปด้านบน–ข้อมูลด้านล่าง) 2 คอลัมน์/แถว */
@media (max-width: 600px) {
    .dir-grid {
        column-gap: 14px;
        row-gap: 26px;
    }

    .dir-brand {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .dir-info h3 {
        font-size: 12px;
        margin-bottom: 5px;
    }

    .dir-info p {
        font-size: 11px;
        line-height: 1.45;
    }

    /* คงให้ BONO เป็น 2 คอลัมน์รูป (ทับกฎ .dir-brand ด้านบน) */
    .dir-brand--wide {
        grid-template-columns: 1fr 1fr;
        column-gap: 12px;
    }

    .directory-head .dir-title {
        font-size: 30px;
        letter-spacing: 3px;
    }

    .dir-cat-title {
        font-size: 24px;
    }
}
