/*
Theme Name: 10 Magazine Blocks
Description: Lightweight block theme demo for 10 Magazine. Core blocks only: layout templates, starter patterns, gallery overlay.
Author: Red Dot Creative
Version: 0.1.0
Requires at least: 6.6
Requires PHP: 8.0
Text Domain: tenmag
*/

/* ---------- Cards (related, for-you, home grids) ---------- */
.tenmag-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:2rem 1.5rem}
.tenmag-card a{display:block;color:inherit;text-decoration:none}
.tenmag-card__img{display:block;width:100%;height:auto!important;aspect-ratio:4/5;object-fit:cover;background:#eee;margin-bottom:.75rem;transition:opacity .2s}
.tenmag-card a:hover .tenmag-card__img{opacity:.85}
.tenmag-card__kicker{display:block;font-size:.72rem;letter-spacing:.14em;text-transform:uppercase;color:var(--wp--preset--color--accent);margin-bottom:.35rem}
.tenmag-card__title{font-family:var(--wp--preset--font-family--display);font-weight:400;font-size:1.35rem;line-height:1.15;margin:0}
.tenmag-section-title{font-family:var(--wp--preset--font-family--sans);font-size:.8rem;letter-spacing:.2em;text-transform:uppercase;border-top:1px solid currentColor;padding-top:.75rem;margin:0 0 1.5rem}
.tenmag-for-you__why{font-size:.85rem;color:var(--wp--preset--color--mute);margin:-1rem 0 1.5rem}
.tenmag-for-you__why button{background:none;border:0;padding:0;margin-left:.5rem;text-decoration:underline;cursor:pointer;color:inherit;font:inherit}

/* ---------- Kicker / standfirst ---------- */
.tenmag-kicker a,.tenmag-kicker{font-size:.75rem;letter-spacing:.18em;text-transform:uppercase;color:var(--wp--preset--color--accent);text-decoration:none}
.wp-block-post-excerpt.tenmag-standfirst .wp-block-post-excerpt__excerpt{font-family:var(--wp--preset--font-family--display);font-style:italic;font-size:var(--wp--preset--font-size--large);line-height:1.35;margin:0}
.tenmag-byline{font-size:.8rem;letter-spacing:.08em;text-transform:uppercase;color:var(--wp--preset--color--mute)}
.tenmag-portrait-header .wp-block-post-featured-image{height:100%;margin:0}
.tenmag-portrait-header .wp-block-post-featured-image img{height:100%;min-height:80vh;object-fit:cover}
@media (max-width:781px){.tenmag-portrait-header .wp-block-post-featured-image img{min-height:0;aspect-ratio:3/4}}

/* Credits block in patterns */
.tenmag-credits p{margin:.2rem 0;font-size:.8rem;letter-spacing:.08em;text-transform:uppercase}
.tenmag-credits strong{font-weight:600}

/* Product cards (Shop starter) */
.tenmag-product .wp-block-image img{aspect-ratio:4/5;object-fit:cover;width:100%}
.tenmag-product p{margin:.25rem 0}
.tenmag-product .tenmag-product__brand{font-size:.72rem;letter-spacing:.16em;text-transform:uppercase}
.tenmag-product .tenmag-product__price{font-weight:600}

/* ---------- Gallery: lead pair + thumbs + view all ---------- */
.tenmag-gallery{margin-block:2.5rem}
.tenmag-gallery__lead{display:grid;grid-template-columns:1fr 1fr;gap:0}
.tenmag-gallery__lead button,.tenmag-gallery__thumbs button{all:unset;cursor:zoom-in;display:block;position:relative}
.tenmag-gallery__lead img{display:block;width:100%;aspect-ratio:3/4;object-fit:cover}
.tenmag-gallery__thumbs{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem;margin:1rem 0 0 10%}
.tenmag-gallery__thumbs img{display:block;width:100%;aspect-ratio:1;object-fit:cover}
.tenmag-gallery__all{background:#111;color:#fff}
.tenmag-gallery__all img{opacity:.35}
.tenmag-gallery__all span{position:absolute;inset:.6rem;border:1px solid #fff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;font-weight:700;letter-spacing:.08em;font-size:1.1rem}
.tenmag-gallery__all span::before{content:"";width:28px;height:28px;background:
 radial-gradient(circle,#fff 0 3.5px,transparent 4px) 0 0/9.33px 9.33px}
.tenmag-gallery__title{font-family:var(--wp--preset--font-family--display);font-size:1.6rem;margin:0 0 1rem}
@media (max-width:600px){.tenmag-gallery__thumbs{margin-left:0;grid-template-columns:repeat(4,1fr);gap:.5rem}.tenmag-gallery__all span{font-size:.7rem}}

/* Overlay */
.tenmag-lightbox{position:fixed;inset:0;z-index:99999;background:#050505;color:#fff;display:none;grid-template-columns:1fr 420px}
.tenmag-lightbox.is-open{display:grid}
.tenmag-lightbox__stage{position:relative;display:flex;align-items:center;justify-content:center;min-height:0;padding:2rem 4.5rem}
.tenmag-lightbox__stage img{max-width:100%;max-height:calc(100vh - 4rem);object-fit:contain;display:block}
.tenmag-lightbox__nav{position:absolute;top:50%;transform:translateY(-50%);background:none;border:0;color:#fff;font-size:3rem;line-height:1;cursor:pointer;padding:1rem;opacity:.8}
.tenmag-lightbox__nav:hover,.tenmag-lightbox__nav:focus-visible{opacity:1;outline:1px solid #fff}
.tenmag-lightbox__prev{left:.5rem}.tenmag-lightbox__next{right:.5rem}
.tenmag-lightbox__panel{border-left:1px solid #222;padding:5rem 2.25rem 2rem;overflow:auto}
.tenmag-lightbox__close{position:absolute;top:1.25rem;right:1.5rem;background:none;border:0;color:#fff;font-size:2.25rem;cursor:pointer;line-height:1}
.tenmag-lightbox__title{font-family:var(--wp--preset--font-family--display);font-size:2rem;line-height:1.1;margin:0 0 1rem;font-weight:400}
.tenmag-lightbox__caption{font-size:1.05rem;line-height:1.5;margin:0 0 1rem}
.tenmag-lightbox__credit{font-size:.8rem;letter-spacing:.1em;text-transform:uppercase;color:#aaa}
.tenmag-lightbox__count{font-size:.8rem;letter-spacing:.1em;color:#888;margin-top:2rem}
@media (max-width:900px){.tenmag-lightbox{grid-template-columns:1fr;grid-template-rows:1fr auto}.tenmag-lightbox__stage{padding:3.5rem 3rem 1rem}.tenmag-lightbox__stage img{max-height:65vh}.tenmag-lightbox__panel{border:0;padding:1rem 1.5rem 2rem;max-height:30vh}}
body.tenmag-noscroll{overflow:hidden}

/* ---------- Editor guard-rail counters (shown in canvas) ---------- */
.tenmag-counter{font:600 11px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.04em;color:#2e7d32;margin-top:4px}
.tenmag-counter.is-near{color:#b26a00}
.tenmag-counter.is-over{color:#c8102e}

/* Hide the empty read-more prompt under standfirsts in the editor */
.wp-block-post-excerpt__more-text{display:none}
