/*
 * Home page, phones only (<768px). Loaded with a media attribute by
 * frontend/page.blade.php; sections are in frontend/home-mobile.
 */
.sgh-desktop { display: none; }
.sgh { background: #F4F6F8; color: #12161C; font-family: Poppins, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
.sgh *, .sgh *::before, .sgh *::after { box-sizing: border-box; }
.sgh h1, .sgh h2, .sgh p, .sgh ul { margin: 0; padding: 0; list-style: none; }
.sgh h1, .sgh h2 { font-family: inherit; letter-spacing: 0; text-transform: none; }
.sgh a { text-decoration: none; }
.sgh img { display: block; max-width: 100%; }
.sgh .i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sgh .i-sm { width: 16px; height: 16px; }
.sgh .i-lg { width: 26px; height: 26px; }
.sgh-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.sgh a:focus-visible, .sgh button:focus-visible, .sgh input:focus-visible, .sgh select:focus-visible { outline: 3px solid #4DA3E0; outline-offset: 2px; }

/* Hero (runs under the fixed site header) */
.sgh-hero { background: #0B3F7A; color: #fff; padding: calc(var(--sgh-top, 56px) + 14px) 16px 20px; border-radius: 0 0 22px 22px; }
.sgh-hero h1 { font-size: 20px; font-weight: 700; line-height: 1.25; color: #fff; margin-bottom: 10px; }
.sgh-hero form { margin: 0; }
.sgh-search { position: relative; display: block; margin: 0; }
.sgh-search .i { position: absolute; left: 14px; top: 13px; color: #5B6470; }
.sgh-search input { display: block; width: 100%; height: 48px; border: 0; border-radius: 12px; padding: 0 14px 0 46px; font: inherit; font-size: 16px; color: #12161C; background: #fff; }
.sgh-region { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; margin: 8px 0 0; padding: 0 10px 0 12px; border-radius: 18px; border: 1.5px solid rgba(255, 255, 255, .45); color: #fff; font-size: 13px; font-weight: 500; }
.sgh-region:focus-within { outline: 3px solid #4DA3E0; outline-offset: 2px; }
.sgh-region select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; color: #fff; font: inherit; padding: 0; margin: 0; max-width: 170px; height: 34px; outline: none; }
.sgh-region option { color: #12161C; }
.sgh-cats { margin-top: 16px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 6px; }
.sgh-cats a { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #fff; font-size: 12px; font-weight: 500; text-align: center; line-height: 1.2; }
.sgh-cats a:hover, .sgh-cats a:focus { color: #fff; }
.sgh-ci { width: 52px; height: 52px; border-radius: 14px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22); color: #fff; display: flex; align-items: center; justify-content: center; }

/* Sections */
.sgh-sec { padding: 18px 16px 4px; }
.sgh-last { padding-bottom: 22px; }
.sgh-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sgh-head h2 { font-size: 18px; font-weight: 700; line-height: 1.25; color: #12161C; }
.sgh-head a { font-size: 14px; font-weight: 600; color: #0062A8; white-space: nowrap; }

/* Ad cards */
.sgh-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sgh-card { position: relative; background: #fff; border: 1px solid #E3E7EC; border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.sgh-ph { aspect-ratio: 1; background: #D9E1E8; color: #7A8591; display: flex; align-items: center; justify-content: center; }
.sgh-ph img { width: 100%; height: 100%; object-fit: cover; }
.sgh-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sgh-price { font-size: 15px; font-weight: 700; color: #12161C; }
.sgh-price.is-muted { color: #3A424D; }
.sgh .sgh-title { font-size: 13px; line-height: 1.3; height: 34px; overflow: hidden; color: #12161C; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
/* The whole card is the link; the heart sits above it. */
.sgh .sgh-title::after { content: ""; position: absolute; inset: 0; }
.sgh .sgh-title:focus-visible { outline: none; }
.sgh-card:has(.sgh-title:focus-visible) { outline: 3px solid #4DA3E0; outline-offset: 2px; }
.sgh-meta { font-size: 11px; color: #5B6470; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgh .sgh-save { position: absolute; z-index: 2; top: 6px; right: 6px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .95); color: #12161C; display: flex; align-items: center; justify-content: center; padding: 0; }
.sgh .sgh-save .i { width: 18px; height: 18px; }
.sgh .sgh-save[aria-pressed="true"] { color: #D92D20; }
.sgh .sgh-save[aria-pressed="true"] .i { fill: currentColor; }
.sgh .sgh-more { display: flex; align-items: center; justify-content: center; height: 46px; margin-top: 12px; border-radius: 12px; border: 1.5px solid #C3CBD4; background: #fff; color: #12161C; font-size: 14px; font-weight: 600; }

/* Sell banner */
.sgh-sell { background: #157A2C; border-radius: 16px; padding: 18px; color: #fff; display: flex; flex-direction: column; gap: 12px; }
.sgh-sell h2 { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 4px; }
.sgh-sell p { font-size: 13px; color: #E8F7EC; line-height: 1.5; }
.sgh .sgh-sell a { display: flex; align-items: center; justify-content: center; height: 48px; border-radius: 12px; background: #fff; color: #157A2C; font-size: 15px; font-weight: 600; }

/* Region chips */
.sgh-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sgh .sgh-chips a { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border-radius: 22px; border: 1.5px solid #D5DBE2; background: #fff; color: #12161C; font-size: 13px; font-weight: 500; white-space: nowrap; }

/* Swipeable rows */
.sgh-scroll { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px !important; padding: 0 16px 4px !important; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.sgh-scroll::-webkit-scrollbar { display: none; }
.sgh-scroll li { flex: 0 0 84px; }
.sgh .sgh-scroll a { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #12161C; font-size: 12px; font-weight: 500; text-align: center; line-height: 1.2; }
.sgh-scroll img { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; background: #E6F1FA; }
.sgh-banners { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
.sgh-banners::-webkit-scrollbar { display: none; }
.sgh-banners img { flex: 0 0 100%; width: 100%; height: auto; border-radius: 12px; scroll-snap-align: center; }

/* Blog list */
.sgh-posts { display: flex; flex-direction: column; gap: 8px; }
.sgh .sgh-posts a { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #E3E7EC; border-radius: 12px; padding: 8px; color: #12161C; }
.sgh-posts img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex: none; }
.sgh-posts span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sgh-posts b { font-size: 13px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sgh-posts small { font-size: 11px; color: #5B6470; }

/* Safety + app */
.sgh-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sgh .sgh-info a { background: #fff; border: 1px solid #E3E7EC; border-radius: 14px; padding: 14px; color: #12161C; display: flex; flex-direction: column; gap: 6px; }
.sgh-info b { font-size: 14px; font-weight: 600; }
.sgh-info a > span:last-child { font-size: 12px; color: #5B6470; line-height: 1.4; }
.sgh-info-ic { color: #0070C0; display: flex; }
.sgh-info-ic.is-green { color: #157A2C; }
