/* DEJOIY Library Universe — header, footer, cart (light premium system) */

body.dejoiy-library-active .site-header,
body.dejoiy-library-active #main-header,
body.dejoiy-library-active .elementor-location-header,
body.dejoiy-library-active .elementor,
body.dejoiy-library-active .page-heading,
body.dejoiy-library-active footer.footer,
body.dejoiy-library-active .etheme-footer,
body.dejoiy-nexus-active .site-header,
body.dejoiy-nexus-active #main-header,
body.dejoiy-nexus-active .elementor-location-header,
body.dejoiy-nexus-active .mobile-header,
body.dejoiy-nexus-active .header-wrapper,
body.dejoiy-nexus-active .etheme-mobile-header,
body.dejoiy-nexus-active .top-buttons,
body.dejoiy-nexus-active .header-top,
body.dejoiy-nexus-active .et-mobile-panel,
body.dejoiy-nexus-active .etheme-page-heading,
body.dejoiy-nexus-active .page-heading,
body.dejoiy-nexus-active .mobile-menu,
body.dejoiy-nexus-active .et-mini-content,
body.dejoiy-nexus-active .et-mobile-menu-icon,
body.dejoiy-nexus-active [data-elementor-type="header"],
body.dlu-screen .site-header,
body.dlu-screen #main-header,
body.dlu-screen .elementor {
  display: none !important;
}

body.dejoiy-library-active .dlu-root,
body.dlu-screen .dlu-root,
body.dlu-screen .dlu-page,
body.dlu-screen .dlu-reader {
  display: block !important;
}

body.dejoiy-library-active,
body.dejoiy-nexus-active,
body.dlu-screen {
  background: #f8fafc;
  color: #0f172a;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

html.dejoiy-library-active,
html.dejoiy-nexus-active {
  overflow-x: hidden;
}

/* ── Header ── */
.dlu-hdr {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid #e2e8f0;
  padding-top: env(safe-area-inset-top, 0);
}

.dlu-hdr-in {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.65rem max(1rem, env(safe-area-inset-right)) 0.65rem max(1rem, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dlu-hdr-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

.dlu-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 1;
  min-width: 0;
}

.dlu-brand-logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 2px 12px rgba(124, 58, 237, 0.15);
}

.dlu-brand-text {
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  white-space: nowrap;
}

.dlu-brand em {
  font-style: normal;
  font-weight: 800;
}

.dlu-hdr-bar-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.dlu-cart-btn--bar {
  display: flex;
}

.dlu-cart-btn--tools {
  display: none;
}

.dlu-nav {
  display: none;
}

.dlu-nav a {
  color: #475569;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  padding: 0.35rem 0;
}

.dlu-nav a:hover,
.dlu-nav a:focus-visible {
  color: #7c3aed;
}

.dlu-hdr-tools {
  display: none;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dlu-search-wrap {
  position: relative;
  width: 100%;
  flex: 1 1 220px;
  min-width: 0;
}

.dlu-hdr-search {
  display: flex;
  align-items: stretch;
  width: 100%;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-height: 44px;
}

.dlu-search-live {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 120;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
  max-height: min(70vh, 420px);
  overflow: auto;
  padding: 0.65rem 0.5rem;
}

.dlu-search-live-msg {
  margin: 0.35rem 0.75rem;
  font-size: 0.875rem;
  color: #475569;
}

.dlu-search-live-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dlu-search-live-hit {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
}

.dlu-search-live-hit:hover {
  background: #f5f3ff;
}

.dlu-search-live-hit img {
  width: 40px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.dlu-search-live-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.dlu-search-live-meta strong {
  font-size: 0.9rem;
  color: #0f172a;
}

.dlu-search-live-meta small {
  font-size: 0.75rem;
  color: #64748b;
}

.dlu-search-live-all {
  display: block;
  margin: 0.5rem 0.75rem 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #7c3aed;
  text-decoration: none;
}

.dlu-hero-search-wrap {
  max-width: 640px;
  margin: 0 auto 1.25rem;
}

.dlu-hdr-search:focus-within {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.dlu-hdr-search input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0.55rem 1rem;
  color: #0f172a;
  font-size: 16px;
  outline: none;
}

.dlu-hdr-search .dlu-search-submit {
  border: none;
  border-radius: 0;
  margin: 0;
  padding: 0 1rem;
  min-width: 48px;
}

.dlu-icon-btn,
.dlu-cart-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #475569;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}

.dlu-icon-btn:hover,
.dlu-cart-btn:hover {
  border-color: #7c3aed;
  color: #7c3aed;
}

.dlu-cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.dlu-btn-pass {
  display: none;
  background: #ffd700;
  color: #0f172a;
  font-weight: 800;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 12px rgba(255, 215, 0, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.dlu-btn-pass:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.45);
}

.dlu-burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  position: relative;
  z-index: 502;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.dlu-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, #7c3aed, #ec4899);
  border-radius: 2px;
}

/* Mobile drawer — above sticky header */
.dlu-hdr-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 10020;
  width: min(300px, 88vw);
  height: 100%;
  height: 100dvh;
  padding: calc(0.75rem + env(safe-area-inset-top, 0)) 1.25rem 1.5rem;
  background: #ffffff;
  border-left: 1px solid #e2e8f0;
  box-shadow: -16px 0 48px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.dlu-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.dlu-drawer-head strong {
  font-size: 1rem;
  color: #7c3aed;
}

.dlu-drawer-close {
  border: none;
  background: #f1f5f9;
  color: #475569;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.dlu-hdr-drawer.is-open {
  transform: translateX(0);
}

.dlu-hdr-drawer[hidden] {
  display: none !important;
}

.dlu-hdr-drawer:not(.is-open) {
  pointer-events: none;
}

.dlu-hdr-drawer a {
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid #f1f5f9;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.dlu-hdr-drawer a:hover,
.dlu-hdr-drawer a:focus-visible {
  color: #7c3aed;
}

.dlu-drawer-pass {
  color: #b8860b !important;
  font-weight: 800 !important;
}

.dlu-drawer-market {
  margin-top: 0.5rem;
  color: #64748b !important;
  font-size: 0.9rem !important;
}

.dlu-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10010;
  background: rgba(15, 23, 42, 0.45);
  display: none;
  pointer-events: none;
}

.dlu-drawer-backdrop.is-open {
  display: block !important;
  pointer-events: auto;
}

.dlu-drawer-wishlist {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  color: #7c3aed;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.85rem 0;
  min-height: 44px;
  cursor: pointer;
  font-family: inherit;
}

.dlu-wishlist-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ec4899;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.dlu-wishlist-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(380px, 92vw);
  height: 100vh;
  height: 100dvh;
  z-index: 10030;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px);
  border-left: 1px solid #e2e8f0;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.dlu-wishlist-panel.is-open {
  transform: translateX(0);
}

.dlu-wishlist-panel[hidden] {
  display: none !important;
}

.dlu-wishlist-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10025;
  background: rgba(15, 23, 42, 0.35);
  display: none;
}

.dlu-wishlist-backdrop.is-open {
  display: block !important;
}

.dlu-wishlist-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dlu-wishlist-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #0f172a;
  font-weight: 600;
}

.dlu-wishlist-item img {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
}

.dlu-fav-chip {
  display: inline-block;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #7c3aed;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  margin: 0.25rem;
}

body.dlu-nav-open {
  overflow: hidden;
}

body.dlu-nav-open .dlu-hdr {
  z-index: 10000;
}

body.dlu-cart-open,
body.dlu-wishlist-open {
  overflow: hidden;
}

/* ── Cart panel (glass on light) — above sticky header (500) ── */
.dlu-cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(380px, 92vw);
  height: 100vh;
  height: 100dvh;
  z-index: 10030;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px);
  border-left: 1px solid #e2e8f0;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.dlu-cart-panel.is-open {
  transform: translateX(0);
}

.dlu-cart-panel[hidden] {
  display: flex !important;
}

.dlu-cart-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: max(1rem, env(safe-area-inset-top, 0px)) 1.25rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
  flex-shrink: 0;
}

.dlu-cart-close {
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.5rem;
  cursor: pointer;
}

.dlu-cart-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  color: #475569;
}

.dlu-cart-panel-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.dlu-cart-panel-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #f1f5f9;
}

.dlu-cart-panel-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.dlu-cart-panel-thumb {
  flex-shrink: 0;
  width: 52px;
  display: block;
}

.dlu-cart-panel-thumb img {
  width: 52px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
}

.dlu-cart-panel-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.dlu-cart-panel-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f172a;
  text-decoration: none;
  line-height: 1.3;
}

.dlu-cart-panel-title:hover {
  color: #7c3aed;
}

.dlu-cart-panel-author {
  font-size: 0.75rem;
  color: #64748b;
}

.dlu-cart-panel-price {
  font-size: 0.8rem;
  font-weight: 700;
  color: #7c3aed;
}

.dlu-cart-panel-remove {
  font-size: 0.72rem;
  color: #ec4899;
  text-decoration: none;
  margin-top: 0.15rem;
}

.dlu-cart-panel-remove:hover {
  text-decoration: underline;
}

.dlu-cart-empty {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
}

.dlu-cart-panel-foot {
  padding: 1rem 1rem max(1rem, env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.98);
}

.dlu-cart-panel-foot .dlu-btn-primary,
.dlu-cart-page .dlu-shelf-actions .dlu-btn-primary,
.dlu-cart-page .dlu-empty .dlu-btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  border: none;
  cursor: pointer;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.dlu-cart-panel-foot .dlu-btn-primary:hover,
.dlu-cart-page .dlu-shelf-actions .dlu-btn-primary:hover,
.dlu-cart-page .dlu-empty .dlu-btn-primary:hover {
  color: #ffffff;
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(236, 72, 153, 0.35);
}

.dlu-cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 10025;
}

.dlu-cart-backdrop.is-open {
  display: block !important;
}

/* ── Footer ── */
.dlu-ft {
  position: relative;
  margin-top: 4rem;
  padding: 3rem 0 2rem;
  background: #0f172a;
  overflow: hidden;
}

.dlu-ft-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.35;
}

.dlu-ft-in {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.dlu-ft-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.dlu-ft-col h3 {
  color: #ffffff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 0.5rem;
}

.dlu-ft-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dlu-ft-col a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.dlu-ft-col a:hover {
  color: #a855f7;
}

.dlu-ft-tag {
  text-align: center;
  margin-top: 2rem;
  color: #06b6d4;
  font-weight: 600;
}

.dlu-ft-copy {
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.5rem;
}

/* ── Tablet footer ── */
@media (min-width: 600px) {
  .dlu-ft-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Desktop header ── */
@media (min-width: 1024px) {
  .dlu-hdr-in {
    display: grid;
    grid-template-columns: auto minmax(200px, 340px) 1fr auto;
    grid-template-areas:
      "brand search nav tools";
    align-items: center;
    gap: 0.75rem 1.25rem;
    padding: 0.65rem 1.5rem;
  }

  .dlu-hdr-bar {
    grid-area: brand;
  }

  .dlu-hdr-search {
    grid-area: search;
    width: 100%;
  }

  .dlu-nav {
    grid-area: nav;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.2rem 1rem;
  }

  .dlu-hdr-tools {
    grid-area: tools;
    display: flex;
  }

  .dlu-hdr-bar-actions {
    display: none;
  }

  .dlu-cart-btn--bar {
    display: none;
  }

  .dlu-cart-btn--tools {
    display: grid;
  }

  .dlu-burger {
    display: none;
  }

  .dlu-btn-pass {
    display: inline-flex;
    align-items: center;
  }

  .dlu-icon-btn--hide-sm {
    display: grid;
  }

  .dlu-ft-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Mobile Nexus — slim header (search lives in hero on landing) */
@media (max-width: 1023px) {
  body.dejoiy-library-active .dlu-hdr--mobile-slim .dlu-search-wrap,
  body.dejoiy-nexus-active .dlu-hdr--mobile-slim .dlu-search-wrap,
  body.dejoiy-library-active .dlu-hdr .dlu-nav,
  body.dejoiy-nexus-active .dlu-hdr .dlu-nav {
    display: none !important;
  }

  body.dejoiy-library-active .dlu-hdr--mobile-slim .dlu-hdr-in,
  body.dejoiy-nexus-active .dlu-hdr--mobile-slim .dlu-hdr-in {
    padding: 0.4rem max(0.65rem, env(safe-area-inset-left)) 0.45rem max(0.65rem, env(safe-area-inset-right));
    gap: 0;
  }

  body.dejoiy-library-active {
    --dlu-hdr-h: 52px;
  }

  body.dejoiy-nexus-active:not(.dejoiy-library-active) {
    --dlu-hdr-h: 52px;
  }

  .dlu-hdr--pay-bar {
    position: sticky;
    top: 0;
    z-index: 500;
    margin-bottom: 0.75rem;
  }

  .dlu-hdr--pay-bar .dlu-pay-back {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    padding: 0.35rem 0.75rem;
    margin-left: auto;
  }

  body.dejoiy-nexus-active .woocommerce-order-pay,
  body.dejoiy-nexus-active.woocommerce-checkout {
    padding: 0 max(0.75rem, env(safe-area-inset-right)) 2rem max(0.75rem, env(safe-area-inset-left));
  }
}

/* Checkout / cart — compact header (one row, no search on phone) */
@media (max-width: 1023px) {
  .dlu-hdr--compact .dlu-search-wrap {
    display: none;
  }

  .dlu-hdr--compact .dlu-hdr-in {
    gap: 0.35rem;
    padding-bottom: 0.5rem;
  }

  body.dlu-screen {
    --dlu-hdr-h: 108px;
  }

  body.dlu-screen .dlu-checkout-page,
  body.dlu-screen .dlu-cart-page {
    --dlu-hdr-h: 56px;
  }

  .dlu-icon-btn--hide-sm {
    display: none;
  }

  .dlu-btn-pass {
    display: none;
  }

  .dlu-hdr-in {
    padding: 0.5rem max(0.75rem, env(safe-area-inset-right)) 0.65rem max(0.75rem, env(safe-area-inset-left));
    gap: 0.5rem;
  }

  .dlu-icon-btn,
  .dlu-cart-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .dlu-hdr-search {
    min-height: 46px;
  }

  .dlu-hdr-search input {
    font-size: 16px;
    padding: 0.6rem 0.85rem;
  }

  body.dlu-screen .dlu-page {
    padding: 1.15rem 0 calc(3.5rem + env(safe-area-inset-bottom, 0));
  }

  body.dlu-screen .dlu-page-in {
    padding: 0 max(0.85rem, env(safe-area-inset-left)) 0 max(0.85rem, env(safe-area-inset-right));
  }

  .dlu-checkout-shell .woocommerce-error,
  .dlu-checkout-shell .woocommerce-message,
  .dlu-checkout-shell .woocommerce-info,
  .dlu-cart-page .woocommerce-error,
  .dlu-cart-page .woocommerce-message,
  .dlu-cart-page .woocommerce-info {
    margin: 0.6rem 0 !important;
    padding: 0.7rem 0.85rem !important;
    font-size: 0.875rem !important;
    line-height: 1.45;
    border-radius: 10px;
  }

  .dlu-checkout-page .dlu-page-in > h1,
  .dlu-checkout-page .dlu-checkout-heading,
  .dlu-cart-page .dlu-page-in > h1 {
    font-size: clamp(1.25rem, 5.5vw, 1.65rem);
    line-height: 1.2;
    margin: 0.35rem 0 0.5rem;
  }

  .dlu-checkout-shell .woocommerce {
    max-width: 100%;
    overflow-x: hidden;
  }

  .dlu-checkout-shell .form-row,
  .dlu-checkout-shell .woocommerce-billing-fields__field-wrapper .form-row {
    margin-bottom: 0.75rem;
  }

  .dlu-checkout-page .dlu-page-sub,
  .dlu-cart-page .dlu-page-sub {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
  }
}

/* Tablet / large phone: brand row + full-width search */
@media (min-width: 480px) and (max-width: 1023px) {
  .dlu-hdr-in {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "bar actions"
      "search search";
    align-items: center;
    column-gap: 0.65rem;
    row-gap: 0.5rem;
  }

  .dlu-hdr-bar {
    grid-area: bar;
    min-width: 0;
  }

  .dlu-hdr-bar-actions {
    grid-area: actions;
  }

  .dlu-search-wrap {
    grid-area: search;
    width: 100%;
  }
}

/* Small phones */
@media (max-width: 479px) {
  body.dlu-screen {
    --dlu-hdr-h: 118px;
  }

  .dlu-brand-text {
    font-size: clamp(0.82rem, 3.8vw, 0.95rem);
    max-width: min(42vw, 10.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
  }

  .dlu-brand-logo {
    width: 36px;
    height: 36px;
  }

  .dlu-search-live {
    max-height: min(55vh, 320px);
  }
}

@media (max-width: 380px) {
  .dlu-brand-text {
    max-width: 9rem;
    font-size: 0.82rem;
  }

  .dlu-brand-logo {
    width: 32px;
    height: 32px;
  }
}

/* Landscape phones — shorter header stack */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 1023px) {
  body.dlu-screen {
    --dlu-hdr-h: 88px;
  }

  .dlu-hdr-in {
    gap: 0.35rem;
    padding-top: 0.35rem;
    padding-bottom: 0.4rem;
  }

  .dlu-hdr-search {
    min-height: 40px;
  }
}

/* Avoid overlap with common chat / FAB widgets */
@media (max-width: 1023px) {
  body.dlu-screen .dlu-page,
  body.dlu-screen .dlu-reader {
    scroll-margin-top: calc(var(--dlu-hdr-h, 108px) + 12px);
  }

  body.dlu-screen .dlu-crumb {
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
  }
}


/* Nexus: no shelf/cart count badges */
.dejoiy-nexus-active .dlu-cart-badge,
.dejoiy-library-active .dlu-cart-badge,
.dejoiy-nexus-active .dlu-wishlist-badge,
.dejoiy-library-active .dlu-wishlist-badge { display: none !important; visibility: hidden !important; }
