/* ── PTM Drill-Down Frontend v3.4 ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap');

.ptm-drilldown-wrap {
    font-family: 'Plus Jakarta Sans', sans-serif;
    max-width: 100%;
    width: 100%;
    padding: 70px 0;
    color: #111827;
}

/* ── Inner container ── */
.ptm-inner {
    width: 100%;
    padding: 0 32px;
    box-sizing: border-box;
}

/* ── Main Heading (Level 1) ── */
.ptm-main-heading {
    text-align: center;
    margin-bottom: 40px;
}
.ptm-main-heading h2 {
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 800;
    color: #111827;
    margin: 0 0 10px;
    letter-spacing: -.3px;
    line-height: 1.2;
}
.ptm-main-heading .ptm-sub-heading {
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
    display: block;
    text-align: center;
}
.ptm-heading-divider {
    width: 60px;
    height: 4px;
    background: #1e2a3a;
    border-radius: 2px;
    margin: 14px auto 0;
    display: block;
}

/* ── Level heading (Level 2 & 3) ── */
.ptm-level-heading {
    text-align: center;
    margin-bottom: 32px;
}
.ptm-level-heading h2 {
    font-size: clamp(24px, 3.5vw, 34px);
    font-weight: 800;
    color: #111827;
    margin: 0 0 10px;
    text-align: center;
    letter-spacing: -.2px;
}

/* ── Breadcrumb ── */
.ptm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 28px;
    padding: 10px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    color: #6b7280;
}
.ptm-bc-link {
    cursor: pointer;
    color: #1e2a3a;
    transition: color 0.15s;
}
.ptm-bc-link:hover { color: #3a9a1f; text-decoration: underline; }
.ptm-bc-sep  { color: #9ca3af; }
.ptm-bc-cat  { color: #111827; font-weight: 700; }

/* ── Breadcrumb back arrow — right side ── */
/* Arrow is a <span> so theme button CSS won't touch it */
.ptm-bc-back-arrow {
    margin-left: auto;
    flex-shrink: 0;
    background: transparent;
    border: 2px solid #111827;
    border-radius: 8px;
    color: #111827;
    font-size: 16px;
    width: 36px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    line-height: 1;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    text-decoration: none;
    font-style: normal;
    font-weight: 700;
}
.ptm-bc-back-arrow:hover {
    background: #111827;
    color: #fff;
}

/* ══════════════════════════════════════
   LEVEL 1 — GRADE TILES
══════════════════════════════════════ */
.ptm-grades-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.ptm-grade-tile {
    background: #1e2a3a;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    text-align: center;
    padding: 32px 24px;
    border-radius: 14px;
    cursor: pointer;
    letter-spacing: .5px;
    text-transform: uppercase;
    transition: background 0.18s, transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    box-shadow: 0 4px 14px rgba(0,0,0,.15);
    user-select: none;
    min-width: 160px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    flex: 0 1 160px;
}
.ptm-grade-tile:hover {
    background: #162030;
    border-color: #3a9a1f;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(30,42,58,.35);
}
.ptm-grade-tile:active { transform: translateY(-1px); }

/* ══════════════════════════════════════
   LEVEL 2 — CATEGORY TILES
══════════════════════════════════════ */
.ptm-cats-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    padding: 0 8px;
}

.ptm-cat-tile {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 22px 20px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    user-select: none;
    min-width: 160px;
    flex: 0 1 180px;
}
.ptm-cat-tile:hover {
    border-color: #3a9a1f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(58,154,31,.15);
}
.ptm-cat-name {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}
.ptm-cat-count {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    background: #f3f4f6;
    padding: 3px 10px;
    border-radius: 20px;
}

/* ══════════════════════════════════════
   LEVEL 3 — PRODUCTS LIST
══════════════════════════════════════ */
.ptm-products-list {
    list-style: none;
    margin: 0;
    padding: 0 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.ptm-products-list li {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    transition: border-color 0.15s, background 0.15s;
    min-width: 180px;
    flex: 0 1 200px;
}
.ptm-products-list li:hover {
    border-color: #3a9a1f;
    background: #f0fdf4;
    color: #1e2a3a;
}

/* ── Animations ── */
.ptm-level { animation: ptm-fadein 0.22s ease; }
@keyframes ptm-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Mobile: 1 column ── */
@media (max-width: 768px) {
    .ptm-drilldown-wrap { padding: 50px 0; }
    .ptm-inner { padding: 0 16px; }

    /* Grade tiles — 1 per row */
    .ptm-grades-grid {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
    }
    .ptm-grade-tile {
        min-width: unset !important;
        flex: none !important;
        width: 100% !important;
        border-radius: 10px !important;
        padding: 22px 16px !important;
        font-size: 14px !important;
        background: #1e2a3a !important;
        color: #fff !important;
    }

    /* Category tiles — 1 per row */
    .ptm-cats-grid {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
    }
    .ptm-cat-tile {
        min-width: unset !important;
        flex: none !important;
        width: 100% !important;
        border-radius: 10px !important;
    }

    /* Product list — 1 per row */
    .ptm-products-list {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
    }
    .ptm-products-list li {
        min-width: unset !important;
        flex: none !important;
        width: 100% !important;
    }

    .ptm-main-heading h2 { font-size: 24px; }

    /* Breadcrumb arrow stays right */
    .ptm-bc-back-arrow {
        margin-left: auto !important;
        position: static !important;
        transform: none !important;
    }
}
