/* Public site — home page (index.php). Shared styles: assets/css/site.css */

.home-hero { text-align: center; max-width: 760px; margin: clamp(24px, 8vh, 80px) auto 36px; }
.home-hero .page-title { margin-inline: auto; max-width: 20ch; line-height: 1.2; }
.home-hero .page-subtitle { margin-inline: auto; }

.home-search { position: relative; margin-top: 26px; display: flex; gap: 8px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 14px 40px rgba(23, 23, 23, 0.08); transition: box-shadow .2s, border-color .2s; }
.home-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), 0 14px 40px rgba(23, 23, 23, 0.08); }
.home-search i { align-self: center; margin-inline-start: 14px; color: var(--muted); }
.home-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 1.02rem; color: var(--ink); padding: 8px 4px; }
.home-search button { border: 0; border-radius: 999px; padding: 0 24px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; transition: background .15s; }
.home-search button:hover { background: var(--color-primary-hover); }

.home-popular { margin-top: 14px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; align-items: center; font-size: .86rem; color: var(--muted); }
.home-popular a { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; transition: all .15s; }
.home-popular a:hover { border-color: var(--accent); color: var(--accent); }

.home-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 1040px; margin: 0 auto; }
.home-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s, border-color .2s; }
.home-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--color-primary) 30%, transparent); box-shadow: 0 16px 36px rgba(23, 23, 23, 0.08); }
.home-card i { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-size: 1.05rem; }
.home-card strong { font-size: 1rem; }
.home-card span { color: var(--muted); font-size: .88rem; }

@media (max-width: 900px) { .home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) {
    .home-cards { grid-template-columns: 1fr; }
    .home-search { border-radius: 18px; flex-wrap: wrap; }
    .home-search i { display: none; }
    .home-search input { padding: 10px 12px; }
    .home-search button { width: 100%; padding: 12px; }
}

/* Products strip (site field profiles with a catalogue, e.g. kids) */
.home-products { max-width: 1040px; margin: 40px auto 6px; }
.home-products__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.home-products__head h2 { font-size: 1.25rem; }
.home-products__head a { color: var(--accent); font-weight: 700; text-decoration: none; font-size: .9rem; white-space: nowrap; }
.home-products__head a:hover { text-decoration: underline; }
.home-products__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.home-product { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink); transition: transform .2s, box-shadow .2s, border-color .2s; }
.home-product:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--color-primary) 30%, transparent); box-shadow: 0 16px 36px rgba(23, 23, 23, 0.08); }
.home-product__img { aspect-ratio: 1; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 1.7rem; overflow: hidden; }
.home-product__img img { width: 100%; height: 100%; object-fit: cover; }
.home-product strong { font-size: .92rem; line-height: 1.35; }
.home-product__price { color: var(--accent); font-weight: 700; font-size: .9rem; }
@media (max-width: 900px) { .home-products__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .home-products { margin-top: 28px; } }

/* Kids profile — playful home (scoped: Admin → Branding → site field = kids) */
.home-kids h1.page-title, .home-kids h2, .home-cat span, .hk-badge { font-family: 'Baloo Bhaijaan 2', 'IBM Plex Sans Arabic', sans-serif; }
.home-kids .home-hero { position: relative; }
.hk-badge { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 7px 16px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .9rem; }
.hk-float { position: absolute; opacity: .4; pointer-events: none; animation: hkFloat 7s ease-in-out infinite; }
.hk-f1 { top: -6px; inset-inline-start: 5%; color: #f59e0b; font-size: 2rem; }
.hk-f2 { top: 22%; inset-inline-end: 4%; color: #8b5cf6; font-size: 1.5rem; animation-delay: 1.2s; }
.hk-f3 { bottom: 6%; inset-inline-start: 11%; color: #ec4899; font-size: 1.25rem; animation-delay: 2s; }
.hk-f4 { top: -10px; inset-inline-end: 17%; color: #06b6d4; font-size: 1.6rem; animation-delay: .6s; }
.hk-f5 { bottom: -4px; inset-inline-end: 8%; color: #22c55e; font-size: 1.35rem; animation-delay: 1.6s; }
@keyframes hkFloat { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-12px) rotate(5deg); } }
@media (prefers-reduced-motion: reduce) { .hk-float { animation: none; } }

.home-cats { max-width: 1040px; margin: 38px auto 0; }
.home-cats h2 { text-align: center; font-size: 1.45rem; margin-bottom: 16px; }
.home-cats__grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.home-cat { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: 20px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: .86rem; text-align: center; transition: transform .18s, box-shadow .18s, border-color .18s; }
.home-cat i { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 1.35rem; transition: transform .18s; }
.home-cat:hover { transform: translateY(-4px) rotate(-1deg); box-shadow: 0 14px 30px rgba(23, 23, 23, .10); border-color: color-mix(in srgb, var(--color-primary) 25%, transparent); }
.home-cat:hover i { transform: scale(1.1) rotate(6deg); }
.home-cat:nth-child(6n+1) i { background: #fef3c7; color: #d97706; }
.home-cat:nth-child(6n+2) i { background: #fee2e2; color: #dc2626; }
.home-cat:nth-child(6n+3) i { background: #ede9fe; color: #7c3aed; }
.home-cat:nth-child(6n+4) i { background: #cffafe; color: #0891b2; }
.home-cat:nth-child(6n+5) i { background: #dcfce7; color: #16a34a; }
.home-cat:nth-child(6n+6) i { background: #fce7f3; color: #db2777; }
@media (max-width: 900px) { .home-cats__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .home-cats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.home-trust { max-width: 1040px; margin: 30px auto 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.home-trust__item { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; background: #fff; border: 1px dashed color-mix(in srgb, var(--color-primary) 35%, transparent); border-radius: 16px; font-weight: 600; font-size: .9rem; }
.home-trust__item i { color: var(--accent); }
@media (max-width: 640px) { .home-trust { grid-template-columns: 1fr; } }

.home-kids .home-card, .home-kids .home-product { border-radius: 20px; }
.home-kids .home-card:hover, .home-kids .home-product:hover { transform: translateY(-4px) rotate(-.6deg); }
.home-kids .home-card:nth-child(3n+1) i { background: #fef3c7; color: #d97706; }
.home-kids .home-card:nth-child(3n+2) i { background: #cffafe; color: #0891b2; }
.home-kids .home-card:nth-child(3n+3) i { background: #fce7f3; color: #db2777; }
.home-kids .home-product__img { border-radius: 16px; }
.home-kids .home-product__price { background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; align-self: flex-start; }
