/* Shared Ephiro visual shell for public and authenticated portals. */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Noto+Serif:wght@500;600&display=swap');
:root {
    --ephiro-shell-ink: #1b1c1a;
    --ephiro-shell-muted: #5e6766;
    --ephiro-shell-teal: #002424;
    --ephiro-shell-teal-soft: #0d3b3a;
    --ephiro-shell-gold: #fdbe62;
    --ephiro-shell-sand: #fbf9f6;
    --ephiro-shell-surface: #ffffff;
    --ephiro-shell-line: rgba(0, 36, 36, 0.1);
}

body {
    background: var(--ephiro-shell-sand);
    color: var(--ephiro-shell-ink);
}

body > header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    background: rgba(251, 249, 246, 0.97) !important;
    box-shadow: 0 1px 12px rgba(0, 36, 36, 0.08);
    backdrop-filter: blur(12px);
}

body > header .navbar {
    min-height: 58px;
    padding: 7px 28px;
    border: 0;
    background: transparent !important;
}

body > header .navbar .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
}

body > header .navbar img {
    width: auto;
    height: 37px;
    object-fit: contain;
}

body > header .navbar .text-white {
    color: var(--ephiro-shell-muted) !important;
}

body > header .navbar .fa-instagram {
    color: #d84a73 !important;
}

body > header .navbar .fa-facebook {
    color: #2876d2 !important;
}

body > header .navbar .btn-primary,
body > header .navbar .btn-danger,
body > header .navbar .btn-logout {
    min-height: 35px;
    padding: 8px 15px;
    border: 0;
    border-radius: 7px;
    color: #ffffff !important;
    background: var(--ephiro-shell-teal) !important;
    font-size: 12px;
    font-weight: 700;
}

body > header > nav:nth-child(2),
body > header > nav:last-child {
    min-height: 39px;
    border-top: 1px solid var(--ephiro-shell-line);
    border-bottom: 1px solid var(--ephiro-shell-line);
    background: rgba(255, 255, 255, 0.94) !important;
}

body > header > nav:nth-child(2) .nav,
body > header > nav:last-child .nav {
    gap: 4px;
}

body > header > nav:nth-child(2) .nav-link,
body > header > nav:last-child .nav-link {
    position: relative;
    padding: 9px 13px;
    color: var(--ephiro-shell-muted) !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
}

body > header > nav:nth-child(2) .nav-link:hover,
body > header > nav:nth-child(2) .nav-link.active,
body > header > nav:last-child .nav-link:hover,
body > header > nav:last-child .nav-link.active {
    color: var(--ephiro-shell-teal) !important;
}

body > header > nav:nth-child(2) .nav-link:focus-visible,
body > header > nav:last-child .nav-link:focus-visible,
.ephiro-site-footer a:focus-visible {
    outline: 3px solid rgba(212, 154, 66, 0.55);
    outline-offset: 2px;
}

body > header > nav:nth-child(2) .nav-link.active::after,
body > header > nav:last-child .nav-link.active::after {
    position: absolute;
    right: 13px;
    bottom: 2px;
    left: 13px;
    height: 2px;
    border-radius: 2px;
    background: var(--ephiro-shell-gold);
    content: '';
}

body > header .dropdown-menu {
    min-width: 190px;
    padding: 7px;
    border: 1px solid var(--ephiro-shell-line);
    border-radius: 8px;
    background: var(--ephiro-shell-surface);
    box-shadow: 0 12px 28px rgba(0, 36, 36, 0.12);
}

body > header .dropdown-item {
    padding: 9px 11px;
    border-radius: 5px;
    color: var(--ephiro-shell-muted);
    font-size: 12px;
}

body > header .dropdown-item:hover,
body > header .dropdown-item:focus {
    color: var(--ephiro-shell-teal);
    background: var(--ephiro-shell-sand);
}

body > header .cart-count,
body > header .notification-count {
    background: var(--ephiro-shell-gold) !important;
    color: #291800 !important;
    font-size: 10px;
    font-weight: 700;
}

body > main,
body > .container:first-of-type {
    padding-top: 118px;
}

body > .main-content {
    padding-top: 118px;
}

.ephiro-site-footer {
    padding: 0 !important;
    color: var(--ephiro-shell-muted);
    background: var(--ephiro-shell-sand) !important;
    text-align: left;
}

.ephiro-site-footer .ephiro-footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 34px;
    padding-top: 42px;
    padding-bottom: 32px;
}

.ephiro-site-footer .ephiro-footer-brand {
    max-width: 300px;
}

.ephiro-site-footer .ephiro-footer-logo {
    margin-bottom: 12px;
    color: var(--ephiro-shell-teal);
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 21px;
}

.ephiro-site-footer p,
.ephiro-site-footer a {
    font-family: 'Manrope', 'Segoe UI', sans-serif;
}

.ephiro-site-footer .ephiro-footer-brand p {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
}

.ephiro-site-footer .ephiro-footer-grid h3 {
    margin: 0 0 12px;
    color: var(--ephiro-shell-teal);
    font-family: 'Noto Serif', Georgia, serif;
    font-size: 16px;
    font-weight: 500;
}

.ephiro-site-footer .ephiro-footer-grid > div:not(.ephiro-footer-brand) a {
    display: block;
    margin-bottom: 8px;
    color: var(--ephiro-shell-muted);
    font-size: 11px;
    text-decoration: none;
    transition: color 160ms ease, transform 160ms ease;
}

.ephiro-site-footer .ephiro-footer-grid a:hover {
    color: var(--ephiro-shell-teal);
    transform: translateX(3px);
}

.ephiro-site-footer .ephiro-footer-socials {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    font-size: 10px;
    text-transform: uppercase;
}

.ephiro-site-footer .ephiro-footer-socials a {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    color: var(--ephiro-shell-teal);
    background: #ffffff;
    transition: background 160ms ease, color 160ms ease;
}

.ephiro-site-footer .ephiro-footer-socials a:hover {
    color: #ffffff;
    background: var(--ephiro-shell-teal);
}

.ephiro-site-footer .ephiro-footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 13px;
    padding-bottom: 18px;
    border-top: 1px solid var(--ephiro-shell-line);
    color: #717978;
    font-size: 10px;
}

.ephiro-site-footer .ephiro-footer-bottom p {
    margin: 0;
}

.ephiro-site-footer .ephiro-footer-bottom span {
    color: #825500;
}

@media (max-width: 768px) {
    body > header .navbar {
        padding: 7px 15px;
    }

    body > header .navbar img {
        height: 34px;
    }

    /* NOTE: the shared second nav (Includes/mobile/second-nav.php) is a
       drawer toggle strip on every viewport. These shell scroll rules must
       NOT touch .second-nav or links re-appear inline. */
    body > header > nav:nth-child(2):not(.second-nav) .nav,
    body > header > nav:last-child:not(.second-nav) .nav {
        flex-wrap: nowrap;
        justify-content: flex-start !important;
        overflow-x: auto;
        padding: 0 8px;
    }

    body > header > nav:nth-child(2):not(.second-nav) .nav-link,
    body > header > nav:last-child:not(.second-nav) .nav-link {
        white-space: nowrap;
        font-size: 12px;
    }

    body > main,
    body > .container:first-of-type {
        padding-top: 104px;
    }
    body > .main-content {
        padding-top: 104px;
    }

    .ephiro-site-footer .ephiro-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 18px;
        padding: 34px 20px 25px;
    }

    .ephiro-site-footer .ephiro-footer-brand {
        grid-column: 1 / -1;
        max-width: none;
    }

    .ephiro-site-footer .ephiro-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        padding-right: 20px;
        padding-left: 20px;
    }
}

@media (max-width: 480px) {
    .ephiro-site-footer .ephiro-footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Page-specific shell rules are lower priority than the Login/Register layouts. */
.stitch-login-page > header,
.stitch-register-page > header,
.stitch-error-page > header {
    position: static;
    box-shadow: none;
    backdrop-filter: none;
}
