/* ══════════════════════════════════════════════════════════════
   Espresso Core — Header Styles
   Prefix: md-espresso-
   ══════════════════════════════════════════════════════════════ */

[class^="md-espresso-"],
[class*=" md-espresso-"] {
    box-sizing: border-box;
}

/* ── Top Bar ──────────────────────────────────────────────── */
.md-espresso-header__topbar {
    background: #ffffff;
    border-bottom: 1px solid #eaeaea;
    padding: 12px 0;
}

.md-espresso-header__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
}

.md-espresso-header__date {
    flex: 0 0 30%;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.md-espresso-header__logo {
    flex: 0 0 40%;
    text-align: center;
}

.md-espresso-header__logo a {
    display: inline-block;
    text-decoration: none;
}

.md-espresso-header__logo-img {
    max-height: 55px;
    width: auto;
}

.md-espresso-header__logo-text {
    font-size: 28px;
    font-weight: 800;
    color: #d51317;
    letter-spacing: 2px;
}

.md-espresso-header__actions {
    flex: 0 0 30%;
    text-align: right;
    position: relative;
}

/* ── Search Toggle ────────────────────────────────────────── */
.md-espresso-header__search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #333;
    transition: color 0.2s;
}

.md-espresso-header__search-toggle:hover {
    color: #d51317;
}

.md-espresso-header__search-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    padding: 15px;
    border-radius: 4px;
    z-index: 1001;
    min-width: 320px;
}

.md-espresso-header__search-dropdown.is-open {
    display: block;
}

.md-espresso-header__search-form {
    display: flex;
    gap: 0;
}

.md-espresso-header__search-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}

.md-espresso-header__search-input:focus {
    border-color: #d51317;
}

.md-espresso-header__search-submit {
    padding: 10px 16px;
    background: #d51317;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background 0.2s;
}

.md-espresso-header__search-submit:hover {
    background: #ec3535;
}

/* ── Navigation Bar (Red) ─────────────────────────────────── */
.md-espresso-header__nav {
    background: #d51317;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    position: relative;
    z-index: 999;
}

.md-espresso-header__nav .md-espresso-header__container {
    position: relative;
}

.md-espresso-header__hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    gap: 5px;
}

.md-espresso-header__hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    transition: transform 0.3s;
}

.md-espresso-header__menu {
    display: flex;
    justify-content: center;
    align-items: stretch;
    list-style: none;
    margin: 0;
    padding: 0;
}

.md-espresso-header__menu-item {
    position: relative;
}

.md-espresso-header__menu-item > a {
    display: flex;
    align-items: center;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 15px;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.2s;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    letter-spacing: -0.3px;
}

.md-espresso-header__menu-item > a:hover {
    background: #ec3535;
}

/* ── Mega Menu ────────────────────────────────────────────── */
.md-espresso-header__mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    padding: 20px;
    z-index: 1000;
    min-width: 800px;
    border-radius: 0 0 4px 4px;
}

.md-espresso-header__menu-item:hover > .md-espresso-header__mega-menu {
    display: block;
}

.md-espresso-header__mega-inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.md-espresso-header__mega-inner .md-espresso-card--standard .md-espresso-card__image img {
    height: 120px;
    object-fit: cover;
    width: 100%;
}

.md-espresso-header__mega-inner .md-espresso-card__title {
    font-size: 13px !important;
}

/* ── Sticky Header ────────────────────────────────────────── */
.md-espresso-header__sticky {
    position: fixed;
    top: -70px;
    left: 0;
    right: 0;
    background: #d51317;
    box-shadow: 0 3px 12px rgba(0,0,0,0.25);
    z-index: 9999;
    transition: top 0.35s ease;
    padding: 0;
}

.md-espresso-header__sticky.is-visible {
    top: 0;
}

.md-espresso-header__sticky .md-espresso-header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 50px;
}

.md-espresso-header__sticky-logo img {
    max-height: 30px;
    width: auto;
}

.md-espresso-header__sticky-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
}

.md-espresso-header__sticky-menu li a {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 15px 12px;
    text-decoration: none;
    text-transform: uppercase;
    transition: background 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.md-espresso-header__sticky-menu li a:hover {
    background: #ec3535;
}
