:root {
    --ez2d-theme-primary: #2f6fed;
    --ez2d-theme-secondary: #12315b;
    --ez2d-theme-accent: #57c6ff;
    --ez2d-theme-bg: #f3f6ff;
    --ez2d-theme-surface: #ffffff;
    --ez2d-theme-border: #e3e9f5;
    --ez2d-theme-text: #0f1c2e;
    --ez2d-theme-muted: #5f6f86;
    --ez2d-theme-radius: 18px;
    --ez2d-theme-shadow: 0 20px 45px rgba(20, 40, 80, 0.12);
    --ez2d-theme-shadow-soft: 0 10px 24px rgba(20, 40, 80, 0.1);
    --ez2d-theme-hero-overlay: rgba(18, 49, 91, 0.65);
    --ez2d-theme-font-display: "Manrope", "Nunito", "Segoe UI", sans-serif;
    --ez2d-theme-font-body: "Nunito", "Manrope", "Segoe UI", sans-serif;
}

body.ez2d-theme-body {
    font-family: var(--ez2d-theme-font-body);
    background: radial-gradient(circle at top, #f9fbff 0%, #eff4ff 45%, #edf2fb 100%);
    color: var(--ez2d-theme-text);
    overflow-x: hidden;
    display: block;
    margin: 0;
}

.ez2d-theme-body #page,
.ez2d-theme-body .site,
.ez2d-theme-body .site-content,
.ez2d-theme-body .content-area,
.ez2d-theme-body .site-main,
.ez2d-theme-body .entry-content,
.ez2d-theme-body #primary {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ez2d-theme-body > header,
.ez2d-theme-body > main,
.ez2d-theme-body > footer {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
}

.ez2d-theme-header {
    background: linear-gradient(120deg, #142c52 0%, #20447a 45%, #2c5ca5 100%);
    color: #fff;
    padding: 18px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 10px 24px rgba(10, 24, 46, 0.25);
}

.ez2d-theme-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.ez2d-theme-logo img {
    height: 80px;
    max-height: 80px;
    width: auto;
    display: block;
}

.ez2d-theme-logo-text {
    font-family: var(--ez2d-theme-font-display);
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.ez2d-theme-menu {
    display: flex;
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ez2d-theme-menu a {
    color: #e8f0ff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 999px;
}

.ez2d-theme-menu a:hover,
.ez2d-theme-menu a:focus {
    background: rgba(255, 255, 255, 0.15);
}

.ez2d-theme-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.ez2d-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.ez2d-btn-primary {
    background: linear-gradient(120deg, #3a7bff, #54b1ff);
    color: #fff;
    box-shadow: 0 12px 20px rgba(58, 123, 255, 0.35);
}

.ez2d-btn-primary:hover {
    transform: translateY(-1px);
}

.ez2d-btn-ghost {
    color: #e4ecff;
    border-color: rgba(255, 255, 255, 0.35);
}

.ez2d-btn-cart {
    background: transparent;
    border-color: transparent;
    color: #fff;
    padding: 0;
    gap: 0;
    box-shadow: none;
    position: relative;
}

.ez2d-cart-icon {
    font-size: 45px;
    color: #ffffff;
    line-height: 1;
}

.ez2d-btn-cart .ez2d-cart-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ez2d-btn-cart[data-count="0"] .ez2d-cart-badge {
    display: none;
}

.ez2d-cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #fff;
    color: #1f3b63;
    font-weight: 700;
    font-size: 12px;
    padding: 0 6px;
}

.ez2d-theme-main {
    min-height: 70vh;
    width: 100%;
}

.ez2d-page-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.ez2d-theme-page {
    padding: 40px 0 80px;
}

.ez2d-theme-page-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.ez2d-theme-page.is-ez2d-full {
    padding: 0;
}

.ez2d-theme-page-inner.is-ez2d-full {
    max-width: 100%;
    padding: 0;
    width: 100%;
    margin: 0;
}

.ez2d-theme-footer {
    background: #0f1f3a;
    color: #d6e3ff;
    padding: 30px 0;
}

.ez2d-theme-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.ez2d-theme-footer-social {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ez2d-theme-footer-social a {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #d6e3ff;
    transition: transform 0.2s ease, background 0.2s ease;
}

.ez2d-theme-footer-social a:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.2);
}

.ez2d-theme-footer-social svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Home page overrides */
.ez2d-fe-home {
    background: transparent;
}

.ez2d-fe-home-hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: left;
}

.ez2d-fe-home-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.ez2d-fe-home-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, var(--ez2d-theme-hero-overlay), rgba(14, 34, 70, 0.5));
    z-index: 1;
}

.ez2d-fe-home-hero-inner {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 60px 24px;
}

.ez2d-fe-home-title {
    font-family: var(--ez2d-theme-font-display);
    font-size: 44px;
    font-weight: 800;
    max-width: 520px;
}

.ez2d-fe-home-cards,
.ez2d-fe-home-products {
    padding: 36px 24px;
}

.ez2d-fe-home-cards-grid,
.ez2d-fe-products-grid {
    display: grid;
    gap: 20px;
    row-gap: 36px;
    column-gap: 36px;
}

.ez2d-fe-home .ez2d-fe-home-cards-grid {
    grid-template-columns: repeat(var(--ez2d-cols, 3), minmax(0, 1fr));
}

.ez2d-fe-home .ez2d-fe-products-grid {
    grid-template-columns: repeat(var(--ez2d-cols, 3), minmax(0, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
    row-gap: 36px;
    column-gap: 36px;
}

.ez2d-card,
.ez2d-fe-home-card,
.ez2d-fe-product-card {
    background: var(--ez2d-theme-surface);
    border-radius: var(--ez2d-theme-radius);
    box-shadow: var(--ez2d-theme-shadow-soft);
    border: 1px solid var(--ez2d-theme-border);
    padding: 22px;
}

.ez2d-fe-home-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ez2d-fe-home-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ez2d-theme-shadow);
}

.ez2d-fe-home-card h3 {
    font-family: var(--ez2d-theme-font-display);
    font-size: 20px;
    margin: 8px 0 10px;
}

.ez2d-fe-home-card p {
    color: var(--ez2d-theme-muted);
    margin: 0;
}

.ez2d-fe-section-title {
    font-family: var(--ez2d-theme-font-display);
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--ez2d-theme-secondary);
    text-align: center;
}

.ez2d-fe-product-card.is-featured {
    border-color: rgba(47, 111, 237, 0.4);
    box-shadow: 0 22px 40px rgba(47, 111, 237, 0.2);
}

.ez2d-fe-product-title {
    font-size: 20px;
    font-weight: 700;
}

.ez2d-fe-product-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--ez2d-theme-primary);
    margin: 10px 0;
}

.fe-btn-add,
.fe-btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--ez2d-theme-primary);
    color: #fff;
    font-weight: 700;
    border: none;
    text-decoration: none;
    transition: transform 0.2s ease;
    box-sizing: border-box;
}

.ez2d-fe-home-category-cta {
    margin-top: 32px;
    padding-bottom: 18px;
    position: relative;
    z-index: 1;
}

.ez2d-fe-home-products .ez2d-fe-home-category-cta {
    margin-top: 36px !important;
    margin-bottom: 36px !important;
    padding-bottom: 20px;
}

@media (max-width: 820px) {
    #ez2d-fe-lesson-calendar {
        width: 100% !important;
        height: auto !important;
    }

    .fc .fc-timegrid-body,
    .fc .fc-timegrid-slots,
    .fc .fc-scroller {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }

    .fc .fc-timegrid-col {
        min-width: 100% !important;
        width: 100% !important;
        display: block !important;
    }

    .fc .fc-scrollgrid,
    .fc .fc-scrollgrid table {
        width: 100% !important;
    }

    .fc .fc-timeGridWeek-button,
    .fc .fc-timeGridWeek-button.fc-button {
        display: none !important;
    }
}

.fe-btn-add:hover,
.fe-btn-login:hover {
    transform: translateY(-2px);
}

@media (max-width: 980px) {
    .ez2d-theme-header-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .ez2d-theme-menu-toggle {
        display: inline-flex;
        margin-right: 12px;
    }

    .ez2d-theme-nav {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 24px;
        right: 24px;
        background: #16325e;
        border-radius: 16px;
        padding: 16px;
        box-shadow: 0 18px 32px rgba(10, 24, 46, 0.35);
        z-index: 50;
    }

    .ez2d-theme-nav.is-open {
        display: block;
    }

    .ez2d-theme-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ez2d-theme-actions {
        width: auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
        margin-left: auto;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .ez2d-theme-menu {
        flex-wrap: wrap;
    }

    .ez2d-fe-home-title {
        font-size: 32px;
    }

    .ez2d-fe-section-title {
        font-size: 24px;
    }

    .ez2d-fe-home .ez2d-fe-home-cards-grid,
    .ez2d-fe-home .ez2d-fe-products-grid {
        grid-template-columns: 1fr !important;
    }

    .ez2d-fe-home .ez2d-fe-home-cards-grid--nested,
    .ez2d-fe-home .ez2d-fe-home-cards-grid--below {
        grid-template-columns: 1fr !important;
        grid-column: 1 / -1 !important;
    }

    .ez2d-fe-home .ez2d-fe-home-calendar-card,
    .ez2d-fe-home .ez2d-fe-home-card--col2,
    .ez2d-fe-home .ez2d-fe-home-card--col3,
    .ez2d-fe-home .ez2d-fe-home-card--colspan {
        grid-column: 1 / -1 !important;
        width: 100% !important;
    }
}

@media (max-width: 980px) {
    .ez2d-fe-home .ez2d-fe-home-cards-grid,
    .ez2d-fe-home .ez2d-fe-products-grid {
        grid-template-columns: 1fr !important;
    }

    .ez2d-fe-home .ez2d-fe-home-cards-grid--nested,
    .ez2d-fe-home .ez2d-fe-home-cards-grid--below {
        grid-template-columns: 1fr !important;
        grid-column: 1 / -1 !important;
    }

    .ez2d-fe-home .ez2d-fe-home-calendar-card,
    .ez2d-fe-home .ez2d-fe-home-card--col2,
    .ez2d-fe-home .ez2d-fe-home-card--col3,
    .ez2d-fe-home .ez2d-fe-home-card--colspan {
        grid-column: 1 / -1 !important;
        width: 100% !important;
    }
}

.ez2d-fe-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ez2d-fe-product-card .fe-btn-add,
.ez2d-fe-product-card .fe-btn-login {
    margin-top: auto;
}

.ez2d-fe-home .ez2d-fe-home-lesson-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--ez2d-theme-primary);
    color: #fff;
    font-weight: 700;
    border: none;
    text-decoration: none;
    transition: transform 0.2s ease;
    box-sizing: border-box;
    line-height: 1;
    min-height: 40px;
}

.ez2d-fe-home .ez2d-fe-home-lesson-btn:hover {
    transform: translateY(-2px);
}
.ez2d-fe-home-hero {
  position: relative;
  overflow: hidden;
  max-width: none;
  width: 100%;
  margin: 0 auto;
  border-radius: 0;
  min-height: 560px;
}

.ez2d-fe-home-hero .ez2d-fe-home-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right 30%;
  z-index: 1;
}

.ez2d-fe-home-hero .ez2d-fe-home-hero-overlay {
  display: none;
}

.ez2d-fe-home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 47, 110, 0.92) 0%, rgba(12, 47, 110, 0.7) 40%, rgba(12, 47, 110, 0.25) 65%, rgba(12, 47, 110, 0) 85%);
  z-index: 2;
}

.ez2d-fe-home-hero::after {
  content: "";
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -56px;
  height: 110px;
  background: #f5f7fc;
  transform: rotate(1.6deg);
  z-index: 4;
}

@supports (clip-path: polygon(0 0, 100% 0, 100% 80%, 0 92%)) {
  .ez2d-fe-home-hero {
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0 86%);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 86%);
  }
  .ez2d-fe-home-hero::after {
    display: none;
  }
}

.ez2d-fe-home-hero .ez2d-btn-primary,
.ez2d-fe-home-hero .ez2d-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.ez2d-fe-home-hero .ez2d-btn-primary {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.25);
}

.ez2d-fe-home-hero .ez2d-btn-ghost {
  background: rgba(255, 255, 255, 0.85);
  color: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

/* theme hamburger */
.ez2d-theme-header-inner {
    position: relative;
}

.ez2d-theme-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    width: 32px;
    height: 32px;
    border-radius: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    box-shadow: none;
}

.ez2d-theme-menu-toggle-bar {
    display: block;
    width: 26px;
    height: 3px;
    background: #ffffff;
    border-radius: 999px;
}

.ez2d-theme-logo-img {
    height: 80px;
    max-height: 80px;
    width: auto;
    display: block;
}

.ez2d-theme-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.ez2d-theme-site-name {
    color: #ffffff;
    font-family: var(--ez2d-theme-font-display);
    font-size: 56px;
    font-weight: 800;
    letter-spacing: 0.2px;
    line-height: 1;
    white-space: nowrap;
}

.ez2d-theme-menu-toggle-bar + .ez2d-theme-menu-toggle-bar {
    margin-top: 0;
}

.ez2d-nav-locked .ez2d-theme-menu-toggle {
    display: inline-flex;
}

.ez2d-nav-locked .ez2d-theme-nav {
    display: block;
}

.ez2d-nav-locked .ez2d-theme-nav.is-open {
    display: block;
}

@media (max-width: 980px) {
    .ez2d-theme-header-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .ez2d-theme-menu-toggle {
        display: inline-flex;
        margin-right: 10px;
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }

    .ez2d-theme-nav {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 24px;
        right: 24px;
        background: #16325e;
        border-radius: 16px;
        padding: 16px;
        box-shadow: 0 18px 32px rgba(10, 24, 46, 0.35);
        z-index: 50;
    }

    .ez2d-theme-nav.is-open {
        display: block;
    }

    .ez2d-theme-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ez2d-theme-actions {
        width: auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
        margin-left: auto;
        gap: 10px;
    }

    .ez2d-nav-locked .ez2d-theme-nav {
        display: none;
    }

    .ez2d-theme-actions .ez2d-btn-dashboard {
        display: none !important;
    }

    .ez2d-theme-mobile-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-top: 12px;
    }
}

.ez2d-is-mobile .ez2d-theme-actions .ez2d-btn-dashboard {
    display: none !important;
}

    .ez2d-theme-nav {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: 24px;
        right: 24px;
        background: #16325e;
        border-radius: 16px;
        padding: 16px;
        box-shadow: 0 18px 32px rgba(10, 24, 46, 0.35);
        z-index: 50;
    }

    .ez2d-theme-nav.is-open {
        display: block;
    }

    .ez2d-theme-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ez2d-theme-actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}


/* theme hamburger locked desktop */
.ez2d-nav-locked .ez2d-theme-nav.is-open {
    position: absolute;
    top: calc(100% + 8px);
    left: 24px;
    right: 24px;
    background: #16325e;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 18px 32px rgba(10, 24, 46, 0.35);
    z-index: 50;
}



/* theme avatar */
.ez2d-theme-actions {
    margin-left: auto;
}

.ez2d-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(255, 255, 255, 0.35);
}


/* header right align */
.ez2d-theme-header-inner {
    justify-content: flex-start;
}

.ez2d-theme-nav {
    margin-left: 24px;
}

.ez2d-theme-actions {
    margin-left: auto;
}


/* header right align v2 */
.ez2d-theme-header-inner {
    justify-content: space-between;
}

.ez2d-theme-nav {
    margin-left: auto;
}

.ez2d-theme-actions {
    margin-left: 16px;
    justify-content: flex-end;
}


/* admin dashboard hamburger rules */
.ez2d-admin-dashboard-page.ez2d-nav-admin .ez2d-theme-menu-toggle {
    display: none !important;
}

.ez2d-admin-dashboard-page.ez2d-nav-locked .ez2d-mobile-hamburger {
    display: none !important;
}

/* Ensure desktop hamburger stays visible (front-end header) */
@media (min-width: 981px) {
    body .ez2d-theme-menu-toggle {
        display: none !important;
    }
    .ez2d-theme-header-inner {
        flex-wrap: nowrap;
        align-items: center;
        gap: 14px;
        overflow: visible;
        justify-content: flex-start;
        padding-right: 510px;
    }
    .ez2d-theme-brand {
        order: 1;
        flex: 0 0 auto;
    }
    .ez2d-theme-actions {
        order: 3;
        margin-left: auto;
        flex: 0 0 auto;
        flex-shrink: 0;
        position: relative;
        z-index: 2;
        min-width: 220px;
        margin-right: 120px;
    }
    .ez2d-theme-nav {
        display: flex !important;
        position: static;
        background: transparent;
        box-shadow: none;
        padding: 0;
        width: auto;
        order: 2;
        margin: 0 16px;
        flex: 1 1 auto;
        min-width: 320px;
        max-width: 100%;
        overflow: visible;
        visibility: visible;
        opacity: 1;
    }
    .ez2d-theme-mobile-actions {
        display: none;
    }

    .ez2d-theme-menu {
        gap: 6px;
        justify-content: center;
        flex-wrap: nowrap;
        flex-direction: row;
        align-items: center;
        white-space: nowrap;
        overflow: visible;
        display: flex !important;
        visibility: visible;
        opacity: 1;
    }

    .ez2d-theme-menu a {
        padding: 10px 18px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.25);
        color: #fff;
        font-weight: 600;
        font-size: 14px;
        transition: background .15s ease, border-color .15s ease, transform .15s ease;
    }

    .ez2d-theme-menu a:hover,
    .ez2d-theme-menu a:focus {
        background: rgba(255, 255, 255, 0.22);
        border-color: rgba(255, 255, 255, 0.45);
        transform: translateY(-1px);
    }

    .ez2d-nav-locked .ez2d-theme-nav {
        display: block !important;
        position: static !important;
        background: transparent !important;
        box-shadow: none !important;
    }
}

@media (min-width: 981px) {
    .ez2d-theme-nav,
    .ez2d-nav-locked .ez2d-theme-nav,
    .ez2d-theme-menu {
        display: flex !important;
    }
}

/* Header layout refresh */
.ez2d-theme-logo img,
.ez2d-theme-logo-img {
    height: 82px;
    max-height: 82px;
    width: auto;
}

.ez2d-theme-subheader {
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    padding: 10px 0 12px;
}

.ez2d-theme-subheader-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 981px) {
    .ez2d-theme-header-inner,
    .ez2d-theme-subheader-inner {
        max-width: none;
        width: 100%;
        margin: 0;
        padding-left: 18px;
        padding-right: 18px;
    }

    .ez2d-theme-header-inner {
        min-height: 96px;
        justify-content: flex-start !important;
        gap: 14px;
    }

    .ez2d-theme-brand {
        height: 96px;
        display: inline-flex;
        align-items: center;
        margin-left: 0;
        flex: 1 1 auto;
        min-width: 0;
    }

    .ez2d-theme-logo {
        gap: 12px;
    }

    .ez2d-theme-site-name {
        font-size: clamp(40px, 3.2vw, 56px);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .ez2d-theme-subheader {
        background: transparent !important;
        border-top: 0 !important;
        padding-top: 6px;
        padding-bottom: 8px;
    }

    .ez2d-theme-header-inner {
        padding-right: 18px !important;
    }

    .ez2d-theme-actions {
        margin-left: auto !important;
        margin-right: 0 !important;
        gap: 8px;
        min-width: 0;
        flex-shrink: 0;
    }

    .ez2d-theme-actions .ez2d-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .ez2d-theme-subheader-inner {
        display: flex;
        align-items: center;
        gap: 12px;
        padding-left: 170px;
    }

    .ez2d-theme-subheader .ez2d-theme-nav {
        flex: 0 1 auto;
        width: auto;
        min-width: 0;
    }

    .ez2d-theme-subheader .ez2d-theme-menu {
        flex-wrap: nowrap;
        gap: 7px;
    }

    .ez2d-theme-subheader .ez2d-theme-menu a {
        padding: 8px 16px;
        font-size: 13px;
        white-space: nowrap;
    }

    .ez2d-subheader-dashboard {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 8px 14px;
        font-size: 13px;
    }

    .ez2d-theme-subheader .ez2d-theme-nav {
        display: block !important;
        position: static !important;
        width: 100%;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .ez2d-theme-subheader .ez2d-theme-menu {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
    }

    .ez2d-theme-subheader .ez2d-theme-menu a {
        background: transparent;
        border-color: rgba(255, 255, 255, 0.26);
        color: #e8f0ff;
    }

    .ez2d-theme-subheader .ez2d-theme-menu a:hover,
    .ez2d-theme-subheader .ez2d-theme-menu a:focus {
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.38);
    }
}

@media (max-width: 980px) {
    .ez2d-theme-logo img,
    .ez2d-theme-logo-img {
        height: 66px;
        max-height: 66px;
    }

    .ez2d-theme-header-inner {
        min-height: 78px;
    }

    .ez2d-theme-brand {
        height: 78px;
        display: inline-flex;
        align-items: center;
    }

    .ez2d-theme-site-name {
        font-size: 27px;
    }

    .ez2d-subheader-dashboard {
        display: none !important;
    }

    .ez2d-theme-subheader {
        padding: 0;
        border-top: 0;
        background: transparent;
    }

    .ez2d-theme-subheader-inner {
        padding: 0 24px;
        position: relative;
    }

    .ez2d-theme-subheader .ez2d-theme-nav {
        display: none !important;
        width: 100%;
    }

    .ez2d-theme-subheader .ez2d-theme-nav.is-open {
        display: block !important;
    }
}

/* Final mobile fit override: keep menu fully inside viewport */
@media (max-width: 980px) {
    .ez2d-theme-subheader .ez2d-theme-nav,
    .ez2d-theme-subheader .ez2d-theme-nav.is-open {
        position: static !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 8px 0 10px !important;
        border-radius: 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .ez2d-theme-subheader .ez2d-theme-menu {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        max-height: 58vh;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 0 !important;
        margin: 0 !important;
    }

    .ez2d-theme-subheader .ez2d-theme-menu a {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        word-break: break-word;
        text-align: left;
    }
}

/* Final desktop fit and ordering */
@media (min-width: 981px) {
    .ez2d-theme-header-inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 12px;
        width: 100%;
        max-width: 100%;
        padding-left: 14px !important;
        padding-right: 14px !important;
        overflow: visible;
    }

    .ez2d-theme-brand {
        min-width: 0;
        max-width: calc(100vw - 360px);
        overflow: hidden;
    }

    .ez2d-theme-logo {
        display: flex;
        min-width: 0;
        max-width: 100%;
        overflow: hidden;
    }

    .ez2d-theme-site-name {
        max-width: min(62vw, 880px);
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: clamp(34px, 2.8vw, 56px);
    }

    .ez2d-theme-actions {
        justify-self: end;
        margin: 0 !important;
        gap: 8px !important;
        max-width: 100%;
        flex-wrap: nowrap;
        overflow: visible;
        padding-right: 0;
    }

    .ez2d-theme-actions .ez2d-btn {
        padding: 7px 12px !important;
        font-size: 12px !important;
    }

    .ez2d-theme-subheader-inner {
        padding-left: 150px !important;
        padding-right: 14px !important;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
        flex-wrap: nowrap;
        overflow: visible;
    }

    .ez2d-theme-subheader .ez2d-theme-nav {
        flex: 0 1 auto;
        min-width: 0;
    }

    .ez2d-theme-subheader .ez2d-theme-menu {
        flex-wrap: nowrap !important;
        overflow: visible;
    }

    /* Hide duplicate dashboard page link in menu; keep dedicated rightmost dashboard button */
    .ez2d-theme-subheader .ez2d-theme-menu a[href*="admin-dashboard"],
    .ez2d-theme-subheader .ez2d-theme-menu a[href*="ez2d-admin-dashboard"] {
        display: none !important;
    }

    .ez2d-subheader-dashboard {
        flex: 0 0 auto;
        order: 2;
        margin-left: 10px;
        display: inline-flex !important;
        white-space: nowrap;
    }
}

/* Final hard override: desktop fit + dashboard as last item after pages */
@media (min-width: 981px) {
    .ez2d-theme-header-inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        overflow: visible !important;
    }

    .ez2d-theme-brand {
        min-width: 0;
        max-width: calc(100vw - 380px) !important;
        overflow: hidden;
    }

    .ez2d-theme-site-name {
        font-size: clamp(32px, 2.7vw, 54px) !important;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ez2d-theme-actions {
        justify-self: end;
        position: relative;
        right: 34px;
        margin: 0 !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
        overflow: visible !important;
    }

    .ez2d-theme-actions .ez2d-btn {
        padding: 7px 12px !important;
        font-size: 12px !important;
    }

    .ez2d-theme-subheader-inner {
        padding-left: 110px !important;
        padding-right: 12px !important;
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        flex-wrap: nowrap !important;
        overflow: visible !important;
    }

    .ez2d-theme-subheader .ez2d-theme-nav {
        flex: 0 0 auto !important;
        width: auto !important;
        min-width: 0;
    }

    .ez2d-theme-subheader .ez2d-theme-menu {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 7px !important;
        width: auto !important;
        overflow: visible !important;
    }

    .ez2d-subheader-dashboard {
        display: inline-flex !important;
        order: 99;
        margin-left: 10px !important;
        padding: 8px 14px !important;
        font-size: 13px !important;
        white-space: nowrap;
    }
}

/* Header greeting (avatar + first name) */
.ez2d-header-greeting {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 8px;
    flex: 0 0 auto;
    order: 99;
    white-space: nowrap;
    color: #ffffff;
}

.ez2d-header-greeting-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.2);
}

.ez2d-header-greeting-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ez2d-header-greeting-avatar-illustration {
    border-color: rgba(255, 255, 255, 0.5);
    background: transparent;
}

.ez2d-header-greeting-avatar-illustration svg {
    width: 100%;
    height: 100%;
    display: block;
}

.ez2d-header-greeting-avatar-fallback {
    font-size: 16px;
    font-weight: 700;
}

.ez2d-header-greeting-text {
    color: #ffffff;
    font-weight: 700;
    line-height: 1;
    font-size: clamp(18px, 1.6vw, 32px);
}

@media (min-width: 981px) {
    .ez2d-theme-actions {
        gap: 10px !important;
    }

    .ez2d-header-greeting-avatar {
        width: 46px;
        height: 46px;
    }
}

@media (max-width: 980px) {
    .ez2d-header-greeting {
        margin-left: 0;
        gap: 8px;
    }

    .ez2d-header-greeting-avatar {
        width: 34px;
        height: 34px;
    }

    .ez2d-header-greeting-text {
        font-size: clamp(13px, 3.2vw, 18px);
    }
}

/* Keep site name link clean (no underline in any state) */
.ez2d-theme-logo,
.ez2d-theme-logo:link,
.ez2d-theme-logo:visited,
.ez2d-theme-logo:hover,
.ez2d-theme-logo:focus,
.ez2d-theme-site-name {
    text-decoration: none !important;
}

/* Match home products section heading with public product title size */
.ez2d-fe-home-products .ez2d-fe-section-head h2 {
    font-size: 24px !important;
}

@media (max-width: 980px) {
    .ez2d-theme-nav .menu-item-has-children > .sub-menu {
        display: none;
    }

    .ez2d-theme-nav .menu-item-has-children.ez2d-submenu-open > .sub-menu {
        display: block;
    }
}

/* Mobile dashboard header: keep hamburger left and push brand right */
@media (max-width: 980px) {
    .ez2d-theme-header-inner {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr) auto !important;
        align-items: center !important;
        column-gap: 14px !important;
    }

    .ez2d-theme-menu-toggle {
        margin-right: 0 !important;
        justify-self: start;
        z-index: 2;
    }

    .ez2d-theme-brand {
        min-width: 0;
        margin-left: 30px !important;
    }

    .ez2d-theme-logo {
        display: flex;
        align-items: center;
        min-width: 0;
        gap: 10px;
    }

    .ez2d-theme-site-name {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: clamp(22px, 4.8vw, 30px);
    }
}

@media (max-width: 640px) {
    .ez2d-theme-brand {
        margin-left: 30px !important;
    }
}



