/* =============================================================================
   LAYOUT — shared structural chrome: header, nav, footer
   These styles apply on every page.
============================================================================= */

/* ── Site header ──────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    opacity: 0.95;
    z-index: 200;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-xs);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
    gap: 1rem;
}

/* ── Logo ─────────────────────────────────────────────────────────────────── */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.logo__icon { width: 36px; height: 36px; }
.logo__name {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 0.06em;
}
.logo__name span { color: var(--blue); }

/* CR: fysh-navbar-fix-2026-07-15 — dropdown CSS added */
/* ── Primary nav (desktop) ────────────────────────────────────────────────── */
.primary-nav {
    display: none;
    align-items: center;
    gap: 0.1rem;
}
.primary-nav a {
    position: relative;
    padding: 0.45rem 0.7rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate);
    border-radius: var(--radius-sm);
    transition: color var(--ease);
}
.primary-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.7rem;
    right: 0.7rem;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--ease);
    border-radius: 2px;
}
.primary-nav a:hover,
.primary-nav a[aria-current="page"] { color: var(--navy); }
.primary-nav a:hover::after,
.primary-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ── Nav dropdown (desktop) ────────────────────────────────────────────────── */
/* Wrapper: provides the anchor for absolute-positioned menu. */
.nav-has-dropdown {
    position: relative;
}

/* Trigger button — visually matches .primary-nav a */
.nav-dropdown__trigger {
    position: relative;
    padding: 0.45rem 0.7rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate);
    font-family: inherit;
    line-height: inherit;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: color var(--ease);
    white-space: nowrap;
}
.nav-dropdown__trigger::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.7rem;
    right: 0.7rem;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--ease);
    border-radius: 2px;
}
.nav-dropdown__trigger:hover,
.nav-has-dropdown.is-open .nav-dropdown__trigger { color: var(--navy); }
.nav-dropdown__trigger:hover::after,
.nav-has-dropdown.is-open .nav-dropdown__trigger::after { transform: scaleX(1); }

/* Chevron icon */
.nav-dropdown__chevron {
    font-size: 0.7rem;
    display: inline-block;
    transition: transform var(--ease);
    pointer-events: none;
}
.nav-has-dropdown.is-open .nav-dropdown__chevron,
.nav-dropdown__trigger[aria-expanded="true"] .nav-dropdown__chevron { transform: rotate(180deg); }

/* Dropdown panel — hidden by default, shown on hover OR .is-open (JS click/keyboard) */
.nav-dropdown__menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 190px;
    background: #fff;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(15,35,64,.12);
    padding: 0.35rem 0;
    z-index: 200;
}
.nav-has-dropdown:hover .nav-dropdown__menu,
.nav-has-dropdown.is-open .nav-dropdown__menu { display: block; }

/* Menu items */
.nav-dropdown__menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate);
    border-radius: 0;
    transition: background var(--ease), color var(--ease);
}
.nav-dropdown__menu a::after { display: none; } /* no sliding underline */
.nav-dropdown__menu a:hover { background: var(--cream, #F6F5F2); color: var(--navy); }
.nav-dropdown__menu a i {
    font-size: 1rem;
    color: var(--gold);
    flex-shrink: 0;
}



/* ── Header actions (desktop) ─────────────────────────────────────────────── */
.header-actions {
    display: none;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}
.btn--signin {
    padding: 0.5rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--navy);
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--ease), color var(--ease);
}
.btn--signin:hover { border-color: var(--blue); color: var(--blue); }

/* ── Authenticated user pill ──────────────────────────────────────────────── */
.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    background: #fff;
    border: 1.5px solid var(--border, #E2E8F0);
    border-radius: 24px;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
    max-width: 220px;
}

.user-pill:hover {
    border-color: var(--gold, #C9A84C);
    background: #fefdf8;
}

.user-pill__icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

/* Role colours */
.user-pill__icon--admin  { background: #fef3c7; color: #92400E; }
.user-pill__icon--vendor { background: #EBF2FF; color: var(--blue, #1E5BA8); }
.user-pill__icon--buyer  { background: #f0fdf4; color: #15803D; }

.user-pill__email {
    font-size: 12px;
    font-weight: 500;
    color: var(--navy, #0F2340);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}

/* Mobile variant — full width in drawer */
.user-pill--mobile {
    width: 100%;
    max-width: 100%;
    padding: 8px 14px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.user-pill--mobile .user-pill__icon {
    width: 34px;
    height: 34px;
    font-size: 16px;
}

.user-pill--mobile .user-pill__email {
    font-size: 13px;
    max-width: none;
}

/* ── Hamburger ────────────────────────────────────────────────────────────── */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 9px;
    background: none;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    transition: border-color var(--ease);
}
.nav-toggle:hover { border-color: var(--blue); }

.nav-toggle span {
    display: block;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: transform var(--ease), opacity var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile nav drawer ────────────────────────────────────────────────────── */
.mobile-nav {
    display: none;
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--white);
    padding: 1.5rem 1.25rem 2rem;
    border-top: 1px solid var(--border);
    overflow-y: auto;
    z-index: 199;
}
.mobile-nav.is-open { display: block; }

.mobile-nav__links a {
    display: block;
    padding: 0.9rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--slate);
    border-bottom: 1px solid var(--border);
    transition: color var(--ease);
}
.mobile-nav__links a:hover { color: var(--navy); }
.mobile-nav__links li:last-child a { border-bottom: none; }

.mobile-nav__actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1.5rem;
}

/* ── Responsive nav show/hide ─────────────────────────────────────────────── */
@media (min-width: 768px) {
    .header-actions { display: flex; }
    .nav-toggle      { display: none;  }
}
@media (min-width: 1024px) {
    .primary-nav { display: flex; }
}

/* ── Site footer ──────────────────────────────────────────────────────────── */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.65); }

.footer-main { padding: 4.5rem 0 3rem; }

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}
@media (min-width: 640px)  { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1.6fr; } }

/* ── Footer brand ─────────────────────────────────────────────────────────── */
.footer-logo .logo__name       { color: var(--white); }
.footer-logo .logo__name span  { color: var(--gold);  }

.footer-brand__tagline {
    font-size: 0.875rem;
    line-height: 1.7;
    margin: 0.85rem 0 1.5rem;
    max-width: 260px;
}

/* ── Footer columns ───────────────────────────────────────────────────────── */
.footer-col__heading {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 1.1rem;
}

.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
    transition: color var(--ease);
}
.footer-links a:hover { color: var(--gold); }

/* ── Footer newsletter ────────────────────────────────────────────────────── */
.footer-newsletter__text {
    font-size: 0.85rem;
    line-height: 1.65;
    margin-bottom: 1rem;
}

/* Property-alert feature list — matches the footer's list typography, muted
   colour and even 0.5rem rhythm (was an unstyled <ul> with default bullets). */
.footer-alert-features {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.footer-alert-features li {
    position: relative;
    padding-left: 1.35rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: rgba(255,255,255,0.6);
}
.footer-alert-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--gold);
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.5;
}
/* CTA sits on the same rhythm; keep clear separation before the contact block. */
.footer-alert-btn { margin-bottom: 0.25rem; }
.footer-newsletter-form { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-newsletter-form input {
    padding: 0.65rem 0.9rem;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--white);
    outline: none;
    transition: border-color var(--ease);
}
.footer-newsletter-form input::placeholder { color: rgba(255,255,255,0.35); }
.footer-newsletter-form input:focus        { border-color: var(--gold); }

/* ── Footer contact ───────────────────────────────────────────────────────── */
.footer-contact-list {
    margin-top: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}
.footer-contact-item svg { flex-shrink: 0; color: var(--gold); margin-top: 2px; }

/* ── Footer bottom bar ────────────────────────────────────────────────────── */
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.07); padding: 1.25rem 0; }

.footer-bottom__inner {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.78rem;
}
@media (min-width: 768px) {
    .footer-bottom__inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.footer-bottom__copy { color: rgba(255,255,255,0.38); }

.footer-bottom__legal { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.footer-bottom__legal a {
    color: rgba(255,255,255,0.45);
    transition: color var(--ease);
}
.footer-bottom__legal a:hover { color: var(--gold); }
