/* Stationery page (/stationery). Builds on school.css (buttons, breadcrumb, filters, product cards, states). */
.stn {
    --stn-green: #0b6b35;
    --stn-green-deep: #08502a;
    --stn-tint: #eef8f1;
    --stn-border: #dfe8e3;
}

/* Hero */
.stn-hero { background: linear-gradient(100deg, #ffffff 0%, #f3fbf5 38%, #e3f4e8 100%); border-bottom: 1px solid #e4efe7; overflow: hidden; }
.stn-hero-inner { max-width: 1280px; margin: 0 auto; padding: 14px 24px 0; }
.stn-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: end; gap: 12px; }
.stn-hero-copy { padding: 18px 0 30px; align-self: center; }
.stn-hero h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); line-height: 1; font-weight: 900; letter-spacing: -.02em; color: var(--stn-green-deep); margin: 0 0 12px; }
.stn-hero-sub { font-size: clamp(1.05rem, 2vw, 1.5rem); line-height: 1.3; color: #334155; margin: 0 0 22px; max-width: 30ch; }
.stn-benefits { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 0; margin: 0; padding: 0; }
.stn-benefits li { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: #1e293b; padding: 0 22px 0 0; margin-right: 22px; border-right: 1px solid #cfe3d6; font-size: .98rem; }
.stn-benefits li:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.stn .stn-benefits [data-lucide], .stn .stn-benefits svg.lucide { width: 30px; height: 30px; color: var(--stn-green); stroke-width: 1.8; }

.stn-hero-art { position: relative; min-height: 250px; display: flex; align-items: flex-end; justify-content: center; }
.stn-hero-art > svg:not(.stn-doodle) { width: 100%; max-width: 640px; height: auto; max-height: 310px; display: block; }
.stn-hero-art.has-banner { align-items: center; padding: 14px 0 18px; }
.stn-hero-art.has-banner img { display: block; width: 100%; max-height: 320px; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 18px; }
.stn-doodle { position: absolute; display: block; opacity: .85; }
.stn-doodle-plane { width: 84px; left: 2%; top: 8%; }
.stn-doodle-bulb { width: 44px; left: 18%; top: 38%; }
.stn-doodle-star { width: 52px; left: 4%; top: 58%; }
.stn-motto {
    position: absolute; right: 0; top: 10px; margin: 0; padding: 14px 22px; max-width: 190px;
    background: #15803d; color: #fff; transform: rotate(-9deg); border-radius: 14px 6px 16px 8px;
    font-family: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive; font-size: 1.25rem; line-height: 1.25; font-weight: 700;
    box-shadow: 0 8px 22px rgba(8, 80, 42, .22);
}
.stn-motto span { display: block; }
.stn-hero-art.has-banner .stn-motto { top: 24px; right: 10px; }

.stn-body { padding-top: 18px; }
.stn-h2 { font-size: 1.3rem; font-weight: 800; color: #0f172a; margin: 0 0 12px; }

/* Category cards */
.stn-cats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 14px; }
.stn-cat {
    display: flex; flex-direction: column; height: 100%; text-decoration: none; color: #0f172a; border-radius: 14px;
    border: 1px solid var(--stn-border); background: var(--stn-tone, #f4faf6); box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
    overflow: hidden; transition: box-shadow .18s, border-color .18s, transform .18s;
}
.stn-cat:hover { border-color: #9fd3b2; box-shadow: 0 8px 20px rgba(15, 23, 42, .1); transform: translateY(-2px); color: #0f172a; }
.stn-cat-art { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; padding: 10px 10px 0; }
.stn-cat-art svg, .stn-cat-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.stn-cat-art.is-icon [data-lucide], .stn-cat-art.is-icon svg.lucide { width: 48px; height: 48px; color: var(--stn-green); stroke-width: 1.5; }
.stn-cat-foot { display: flex; align-items: center; gap: 8px; padding: 8px 12px 12px; margin-top: auto; min-height: 58px; }
.stn-cat-name { flex: 1; min-width: 0; font-weight: 700; font-size: .92rem; line-height: 1.2; overflow-wrap: break-word; hyphens: manual; }
.stn-arrow { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: #fff; border: 1px solid #d5e2da; display: inline-flex; align-items: center; justify-content: center; color: #0f172a; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.stn .stn-arrow [data-lucide], .stn .stn-arrow svg.lucide { width: 18px; height: 18px; stroke-width: 2.4; }
.stn-cat:hover .stn-arrow, .stn-sub:hover .stn-arrow { background: var(--stn-green); border-color: var(--stn-green); color: #fff; }
.stn-tone-0 { --stn-tone: #eaf6ee; }
.stn-tone-1 { --stn-tone: #e9f1fa; }
.stn-tone-2 { --stn-tone: #fcf0e6; }
.stn-tone-3 { --stn-tone: #f0eefa; }
.stn-tone-4 { --stn-tone: #fcebee; }
.stn-tone-5 { --stn-tone: #eaf7f0; }
.stn-tone-6 { --stn-tone: #e9f2fb; }

/* Explore Subcategories */
.stn-explore-wrap { margin-top: 30px; }
.stn-explore { display: grid; gap: 10px 14px; align-items: start; }
.stn-acc { min-width: 0; }
.stn-acc-h { margin: 0; font-size: inherit; }
.stn-acc-btn {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 9px 14px; text-align: left;
    background: #fff; border: 1px solid var(--stn-border); border-radius: 10px; color: #0f172a; font: inherit; font-size: .88rem; line-height: 1.25; cursor: pointer;
}
.stn-acc-btn:hover { border-color: #9fd3b2; background: #fbfefc; }
.stn-acc-icon { display: inline-flex; color: #334155; }
.stn .stn-acc-icon [data-lucide], .stn .stn-acc-icon svg.lucide { width: 20px; height: 20px; stroke-width: 1.7; }
.stn-acc-name { flex: 1; min-width: 0; }
.stn .stn-acc-chev { width: 18px; height: 18px; color: #334155; transition: transform .18s; }
.stn-acc-btn[aria-expanded="true"] .stn-acc-chev { transform: rotate(180deg); }
.stn-acc.is-open { background: var(--stn-tint); border: 1px solid #cde9d6; border-radius: 14px; padding: 4px 14px 14px; }
.stn-acc.is-open .stn-acc-btn { background: transparent; border-color: transparent; padding-left: 4px; padding-right: 4px; font-size: 1.05rem; font-weight: 700; }
.stn-acc.is-open .stn-acc-icon { color: var(--stn-green); }
.stn-acc-panel[hidden] { display: none; }
.stn-subs { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.stn-sub { display: flex; flex-direction: column; height: 100%; background: #fff; border: 1px solid var(--stn-border); border-radius: 12px; text-decoration: none; color: #0f172a; overflow: hidden; transition: box-shadow .18s, border-color .18s; }
.stn-sub:hover { border-color: #9fd3b2; box-shadow: 0 6px 16px rgba(15, 23, 42, .08); color: #0f172a; }
.stn-sub-art { display: flex; align-items: center; justify-content: center; aspect-ratio: 1; padding: 8px; }
.stn-sub-art svg, .stn-sub-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.stn-sub-art.is-icon [data-lucide], .stn-sub-art.is-icon svg.lucide { width: 36px; height: 36px; color: var(--stn-green); stroke-width: 1.5; }
.stn-sub-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 4px; padding: 4px 6px 8px; margin-top: auto; }
/* Words never break: when a name and its arrow do not fit on one line, the arrow moves below. */
.stn-sub-name { flex: 1 1 auto; max-width: 100%; font-size: .78rem; font-weight: 600; line-height: 1.2; overflow-wrap: normal; }
.stn-sub .stn-arrow { width: 24px; height: 24px; }
.stn .stn-sub .stn-arrow [data-lucide], .stn .stn-sub .stn-arrow svg.lucide { width: 15px; height: 15px; }
.stn-acc-empty { margin: 6px 4px 8px; color: #475569; font-size: .9rem; }
.stn-acc-all { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 10px 4px 0; min-height: 36px; color: var(--stn-green); font-weight: 700; font-size: .9rem; text-decoration: none; }
.stn-acc-all:hover { text-decoration: underline; }
.stn-acc-n { color: #475569; font-weight: 600; }

/* Desktop: the open category on the left, the others in three columns on the right. */
@media (min-width: 992px) {
    /* Rows are placed column by column (--r / --c, set by the page and the script); the last 1fr row takes up the
       open panel's extra height so the compact rows stay together. */
    .stn-explore.is-open-any { grid-template-columns: minmax(0, 2.7fr) repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(var(--stn-rows, 5), auto) 1fr; }
    .stn-explore.is-open-any .stn-acc.is-open { grid-column: 1; grid-row: 1 / -1; }
    .stn-explore.is-open-any .stn-acc:not(.is-open) { grid-row: var(--r); grid-column: var(--c); }
    .stn-explore:not(.is-open-any) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Tablet: two columns; an open category takes the full row where it is. */
@media (min-width: 640px) and (max-width: 991px) {
    .stn-explore { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: row dense; }
    .stn-acc.is-open { grid-column: 1 / -1; }
}

/* Products on the landing page */
.stn-products-wrap { margin-top: 34px; }
.stn-list-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 12px; }
.stn-list-head .stn-h2 { margin: 0; }
.stn-search { display: flex; gap: 8px; flex: 0 1 420px; min-width: 0; }
.stn-search input { flex: 1; min-width: 0; min-height: 40px; padding: 8px 12px; border: 1px solid #cbd5e1; border-radius: 9px; font: inherit; background: #fff; color: #0f172a; }
.stn-more { text-align: center; margin: 20px 0 0; }

/* Category listing */
.stn-head .sch-cat-head-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.stn-head .sch-cat-head-art.is-icon { display: flex; align-items: center; justify-content: center; }
.stn-head .sch-cat-head-art.is-icon [data-lucide], .stn-head .sch-cat-head-art.is-icon svg.lucide { width: 44px; height: 44px; color: var(--stn-green); }
.stn-head-desc { margin: 0; color: #475569; }
.stn-head h1 { margin-bottom: 4px; }
.stn-chips { margin-top: 14px; }

@media (max-width: 1199px) { .stn-cats { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (max-width: 991px) {
    .stn-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .stn-hero-copy { padding: 14px 0 6px; }
    .stn-hero-art { min-height: 0; }
    .stn-hero-art > svg:not(.stn-doodle) { max-height: 240px; }
    .stn-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
    .stn-hero-inner { padding: 10px 16px 0; }
    .stn-hero h1 { margin-bottom: 8px; }
    .stn-hero-sub { margin-bottom: 14px; }
    .stn-benefits li { padding-right: 12px; margin-right: 12px; font-size: .88rem; gap: 6px; }
    .stn .stn-benefits [data-lucide], .stn .stn-benefits svg.lucide { width: 22px; height: 22px; }
    .stn-motto { font-size: .95rem; padding: 9px 14px; max-width: 130px; top: 4px; }
    .stn-doodle-plane { width: 56px; }
    .stn-doodle-bulb, .stn-doodle-star { display: none; }
    .stn-cats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .stn-cat-foot { padding: 6px 8px 10px; min-height: 52px; gap: 6px; }
    .stn-cat-name { font-size: .84rem; }
    .stn-arrow { width: 28px; height: 28px; }
    .stn-search { flex-basis: 100%; }
}
@media (max-width: 559px) {
    .stn-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stn-subs { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
    .stn-benefits li { border-right: 0; margin-right: 0; padding-right: 14px; }
}
@media (prefers-reduced-motion: reduce) {
    .stn-cat, .stn-acc-chev { transition: none; }
    .stn-cat:hover { transform: none; }
}
