/*
Theme Name: AppStyle Pro
Theme URI: https://example.com/
Author: AppStyle
Description: App-style mobile-first WordPress theme with home-only header, infinite scroll feed, bottom navigation (Home / Popular / Categories / optional Exclusive), copy-to-clipboard content box and Hindi-friendly labels.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: appstyle
*/
:root{--pc:#e11d48;--bg:#f3f4f7;--card:#fff;--tx:#111827;--mu:#6b7280;--bd:#e5e7eb;--w:760px;--nav:54px;--r:16px}
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;margin:0;background:var(--bg);color:var(--tx);font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans","Noto Sans Devanagari",sans-serif;line-height:1.6;-webkit-tap-highlight-color:transparent}
img{max-width:100%;height:auto;display:block}
a{color:inherit;text-decoration:none}
button{font:inherit;cursor:pointer}
.app{width:100%;max-width:var(--w);margin:0 auto;padding:12px 12px 20px;flex:1 0 auto;overflow-x:hidden}

/* Header (home only) */
.hdr-wrap{position:sticky;top:0;z-index:50;background:var(--card);box-shadow:0 1px 0 var(--bd)}
.admin-bar .hdr-wrap{top:32px}
@media(max-width:782px){.admin-bar .hdr-wrap{top:46px}}
.hdr{height:48px;display:flex;align-items:center;padding:0 14px;max-width:var(--w);margin:0 auto}
.hdr--center{justify-content:center}
.hdr--menu,.hdr--social{justify-content:space-between}
.brand{display:flex;align-items:center;flex:0 1 auto;max-width:70%}
.brand .logo{height:30px;width:auto;max-width:200px;object-fit:contain}
.brand .site-name{font-weight:800;font-size:1.2rem;color:var(--pc);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hamburger{width:38px;height:38px;border:0;background:transparent;border-radius:12px;display:grid;place-content:center;gap:5px;padding:0}
.hamburger span{display:block;width:22px;height:2.5px;background:var(--tx);border-radius:2px}
.social{display:flex;gap:10px}
.social a{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--bg);color:var(--tx)}
.social a svg{width:19px;height:19px;fill:currentColor}
.social .fb:hover{color:#1877f2}.social .ig:hover{color:#e4405f}.social .yt:hover{color:#f00}

/* Drawer */
.drawer-bg{position:fixed;inset:0;background:rgba(0,0,0,.45);opacity:0;visibility:hidden;transition:.25s;z-index:90}
.drawer{position:fixed;top:0;right:0;bottom:0;width:78%;max-width:320px;background:var(--card);z-index:100;transform:translateX(100%);transition:transform .28s ease;padding:18px;overflow:auto}
.menu-open .drawer{transform:none}.menu-open .drawer-bg{opacity:1;visibility:visible}
.drawer-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;font-weight:700}
.drawer-close{border:0;background:var(--bg);width:36px;height:36px;border-radius:50%;font-size:20px;line-height:1}
.drawer ul{list-style:none;margin:0;padding:0}
.drawer li a{display:block;padding:13px 6px;border-bottom:1px solid var(--bd);font-weight:600}
.drawer .sub-menu{padding-left:14px}

/* Cards */
.feed-list{display:grid;gap:16px}
.card{display:block;background:var(--card);border-radius:var(--r);overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,.06);-webkit-tap-highlight-color:rgba(0,0,0,.05)}
.card:active{transform:scale(.99)}
.card-img{display:block;width:100%;aspect-ratio:16/9;background:linear-gradient(135deg,#e5e7eb,#f3f4f6);overflow:hidden}
.card-img img{width:100%;height:100%;object-fit:cover}
.card-body{display:block;padding:12px 14px 14px}
.card-title{margin:0;font-size:1.05rem;line-height:1.5;font-weight:700;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}
body.hi .card-title{font-size:1.12rem}

/* Category cards */
.cat-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
.cat-card{background:var(--card);border-radius:var(--r);overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,.06);display:flex;flex-direction:column}
.cat-img{aspect-ratio:4/3;background:linear-gradient(135deg,var(--pc),#7c3aed);overflow:hidden;display:block}
.cat-img img{width:100%;height:100%;object-fit:cover}
.cat-info{padding:10px 12px 12px}
.cat-name{font-weight:700;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.7em}
.cat-count{font-size:.8rem;color:var(--mu)}

/* Loader */
.feed-sentinel{display:flex;justify-content:center;padding:22px 0;min-height:60px}
.feed-sentinel[hidden]{display:none}
.spin{width:28px;height:28px;border:3px solid var(--bd);border-top-color:var(--pc);border-radius:50%;animation:sp .8s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
.empty{text-align:center;color:var(--mu);padding:50px 0}

/* Single */
.single{margin:-12px -12px 0}
.single-hero{position:relative;background:#e5e7eb}
.single-hero img{width:100%;height:auto}

.single-title{text-align:center;font-size:1.45rem;line-height:1.4;margin:20px 16px 14px}
.content-box{margin:0 12px;background:var(--card);border:2px solid #000;border-radius:var(--r);overflow:hidden}
.copy-btn{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--pc);color:var(--pc);background:#fff;border-radius:999px;padding:8px 22px;font-size:.92rem;font-weight:700}
.copy-btn svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2}
.copy-btn.done{background:var(--pc);color:#fff}
.box-foot{display:flex;justify-content:center;padding:4px 14px 20px}
.entry{padding:18px 16px 14px;font-size:1.02rem;text-align:center;word-wrap:break-word;overflow-wrap:anywhere}
.entry>*:first-child{margin-top:0}.entry>*:last-child{margin-bottom:0}
.entry img{border-radius:10px;margin:12px auto}
.entry ul,.entry ol{list-style-position:inside;padding:0}
.entry a{color:var(--pc);text-decoration:underline}
.entry iframe,.entry video{max-width:100%}

/* Bottom nav */
.bnav{position:sticky;bottom:0;z-index:60;flex:0 0 auto;background:var(--card);box-shadow:0 -2px 10px rgba(0,0,0,.08);padding-bottom:env(safe-area-inset-bottom)}
.bnav-in{max-width:var(--w);margin:0 auto;display:flex;height:var(--nav)}
.bnav a{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;color:var(--mu);font-size:.68rem;line-height:1.1;font-weight:600;position:relative}
.bnav a svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.bnav a.on{color:var(--pc)}
.bnav a.on::before{content:"";position:absolute;top:0;width:28px;height:3px;border-radius:0 0 4px 4px;background:var(--pc)}
body.hi .bnav a{font-size:.75rem}


/* Overflow guards: wide content must never zoom the page out */
html{overflow-x:clip}
.entry{min-width:0}
.entry img,.entry video,.entry iframe,.entry figure,.entry .wp-block-image{max-width:100%;height:auto}
.entry iframe{width:100%}
.entry table{display:block;max-width:100%;overflow-x:auto}
.entry pre{white-space:pre-wrap;overflow-x:auto}
.entry .alignwide,.entry .alignfull{width:auto;max-width:100%;margin-left:0;margin-right:0}
.entry .alignleft,.entry .alignright{float:none;margin:12px auto}
