/* ===== Shared header and footer (loaded from header.html and footer.html) ===== */

/* The placeholders must not create a box, or the sticky header stops working */
#site-header,
#site-footer {
    display: contents;
}

/* Reserve space while the header and footer load, so the page does not jump */
#site-header:not(.sl-loaded)::before {
    content: "";
    display: block;
    height: 115px;
}

#site-footer:not(.sl-loaded)::before {
    content: "";
    display: block;
    min-height: 320px;
    background-color: var(--text-color-dark);
}

/* --- Header --- */
.site-header {
    border-bottom: 1px solid rgba(46, 106, 177, 0.12);
}

.logo a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.logo-mark {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1;
    color: var(--primary-color-end);
}

.nav-list a {
    position: relative;
    padding: 0.4rem 0;
}

.nav-list a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: var(--primary-color-start);
    transition: width 0.3s ease;
}

.nav-list a:hover::after,
.nav-list a.active::after {
    width: 100%;
}

/* --- Cart icon with count --- */
.cart-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    color: var(--text-color-dark);
    transition: color 0.3s ease;
}

.cart-icon-wrapper:hover {
    color: var(--primary-color-start);
}

.cart-icon {
    width: 24px;
    height: 24px;
}

.cart-count {
    position: absolute;
    top: -9px;
    right: -11px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background-color: var(--primary-color-end);
    color: var(--white-color);
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.cart-count[data-count="0"] {
    display: none;
}

/* --- Footer --- */
.site-footer {
    padding: 3rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 2.5rem;
    width: 100%;
    text-align: left;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.9rem;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-color-light);
}

.footer-logo img {
    width: 36px;
    height: 36px;
}

.footer-line {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.4rem;
}

.footer-line a {
    text-decoration: underline;
}

.footer-heading {
    font-weight: 700;
    margin-bottom: 0.9rem;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.footer-col a {
    color: var(--text-color-light);
    opacity: 0.8;
    font-size: 0.95rem;
    transition: opacity 0.3s ease;
}

.footer-col a:hover {
    opacity: 1;
}

.footer-disclaimer {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    width: 100%;
    max-width: none;
    text-align: center;
}

.footer-disclaimer p {
    max-width: 800px;
    margin: 0 auto;
}

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

    .footer-brand {
        grid-column: 1 / -1;
    }

    .logo-text {
        font-size: 1.35rem;
    }
}

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