/* REX Discovery Menu — approved handoff implementation. Front-end only. */
:root{
  --rex-mega-bg:rgba(3,20,27,.94);
  --rex-mega-bg-deep:rgba(2,7,11,.97);
  --rex-mega-border:rgba(210,178,120,.70);
  --rex-mega-border-soft:rgba(174,142,91,.30);
  --rex-mega-divider:rgba(169,180,182,.14);
  --rex-mega-text:#EDEDD6;
  --rex-mega-muted:#A9B4B6;
  --rex-mega-gold:#D2B278;
  --rex-mega-gold-hot:#EFD79D;
  --rex-mega-cyan:#58CAD5;
  --rex-mega-radius:16px;
  --rex-mega-speed-open:180ms;
  --rex-mega-speed-close:140ms;
  --rex-mega-speed-hover:150ms;
  --rex-mega-ease:cubic-bezier(.2,.8,.2,1);
}

/* Desktop trigger + shell */
@media (min-width:1101px){
  .rex-site-header{overflow:visible}
  .rex-site-header.is-mega-open{z-index:92}
  .rex-primary-nav .menu-item-rex-mega-trigger>a{position:relative;z-index:3}
  .rex-primary-nav .menu-item-rex-mega-trigger>a[aria-expanded="true"]{color:var(--rex-mega-gold-hot)!important}
  .rex-primary-nav .menu-item-rex-mega-trigger>a[aria-expanded="true"]::after{transform:scaleX(1)!important;box-shadow:0 0 10px rgba(239,215,157,.22)}
  .rex-primary-nav .menu-item-rex-mega-trigger>a[aria-expanded="true"]::before{
    content:"";position:absolute;z-index:6;left:50%;bottom:-8px;width:7px;height:7px;
    background:var(--rex-mega-gold);transform:translateX(-50%) rotate(45deg);
    box-shadow:0 0 8px rgba(239,215,157,.35),0 0 20px rgba(174,142,91,.14)
  }

  .rex-mega-menu.rex-discovery{
    display:block!important;position:absolute;z-index:85;top:calc(100% - 1px);inset-inline:0;
    width:auto;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(-6px);
    transition:opacity var(--rex-mega-speed-open) var(--rex-mega-ease),transform var(--rex-mega-speed-open) var(--rex-mega-ease),visibility var(--rex-mega-speed-close) linear
  }
  .rex-site-header.is-mega-open .rex-mega-menu.rex-discovery{opacity:1;visibility:visible;pointer-events:auto;transform:none}
  .rex-discovery__backdrop{
    position:fixed;z-index:0;inset-inline:0;top:var(--rex-mega-backdrop-top,0);bottom:0;
    display:block;width:100%;height:auto;padding:0;border:0;background:rgba(2,7,11,.36);
    backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);cursor:default;opacity:0;pointer-events:none;
    transition:opacity 160ms ease
  }
  .rex-site-header.is-mega-open .rex-discovery__backdrop{opacity:1;pointer-events:auto}
  .rex-discovery__panel{
    position:relative;z-index:1;box-sizing:border-box;width:min(1440px,calc(100vw - 64px));max-width:none!important;
    max-height:calc(100dvh - var(--rex-mega-backdrop-top,120px) - 24px);margin:0 auto;overflow:auto;
    border:1px solid transparent;border-radius:var(--rex-mega-radius);direction:rtl;color:var(--rex-mega-text);
    background:linear-gradient(rgba(3,20,27,.965),rgba(2,12,17,.98)) padding-box,
      linear-gradient(115deg,rgba(105,78,42,.72),rgba(210,178,120,.82) 24%,rgba(239,215,157,.88) 48%,rgba(174,142,91,.62) 75%,rgba(105,78,42,.68)) border-box;
    box-shadow:0 22px 70px rgba(0,0,0,.58),0 0 34px rgba(174,142,91,.07),0 0 70px rgba(26,137,155,.04),inset 0 1px 0 rgba(239,215,157,.10);
    scrollbar-width:thin;scrollbar-color:rgba(174,142,91,.30) transparent
  }
  .rex-discovery__panel::before{
    content:"";position:absolute;z-index:-1;inset:0;border-radius:inherit;pointer-events:none;
    background:radial-gradient(circle at 16% 6%,rgba(88,202,213,.065),transparent 27%),radial-gradient(circle at 88% 18%,rgba(210,178,120,.035),transparent 24%)
  }
  .rex-discovery__main{
    display:grid;grid-template-columns:minmax(500px,1.65fr) minmax(280px,.85fr) minmax(250px,.72fr);
    grid-template-areas:"showcase secondary primary";min-height:408px
  }
  .rex-discovery__showcase-col{grid-area:showcase;position:relative;padding:18px 22px 18px 18px;min-width:0}
  .rex-discovery__secondary{grid-area:secondary;padding:22px 24px;border-inline-start:1px solid var(--rex-mega-divider);min-width:0}
  .rex-discovery__primary{grid-area:primary;padding:22px 22px 18px;border-inline-start:1px solid var(--rex-mega-divider);min-width:0}
  .rex-discovery__column-label{
    margin:0 0 13px;padding:0 4px 12px;border-bottom:1px solid var(--rex-mega-divider);
    color:rgba(169,180,182,.78);font-size:12px;font-weight:700;line-height:1.7
  }

  /* Primary categories */
  .rex-discovery__primary-list{display:grid;align-content:start;gap:5px}
  .rex-discovery__primary-item{
    appearance:none;box-sizing:border-box;display:grid;grid-template-columns:30px minmax(0,1fr);align-items:center;gap:11px;
    width:100%;min-height:50px;margin:0;padding:7px 14px;border:1px solid transparent;border-radius:9px;
    background:transparent;color:var(--rex-mega-text);font:inherit;font-size:15px;font-weight:680;text-align:right;text-decoration:none;cursor:pointer;
    transition:color var(--rex-mega-speed-hover) ease,background var(--rex-mega-speed-hover) ease,border-color var(--rex-mega-speed-hover) ease,transform var(--rex-mega-speed-hover) ease,box-shadow var(--rex-mega-speed-hover) ease
  }
  .rex-discovery__primary-item:hover,.rex-discovery__primary-item:focus-visible{
    color:var(--rex-mega-gold);background:linear-gradient(90deg,rgba(174,142,91,.02),rgba(174,142,91,.09),rgba(8,43,56,.10));transform:translateX(-2px)
  }
  .rex-discovery__primary-item:focus-visible{outline:2px solid rgba(88,202,213,.50);outline-offset:2px}
  .rex-discovery__primary-item.is-active{
    color:var(--rex-mega-gold-hot);border-color:rgba(210,178,120,.62);
    background:linear-gradient(90deg,rgba(174,142,91,.03),rgba(174,142,91,.17),rgba(174,142,91,.05));
    box-shadow:inset 0 0 22px rgba(174,142,91,.08),0 0 18px rgba(210,178,120,.06)
  }
  .rex-discovery__primary-icon{display:grid;place-items:center;color:var(--rex-mega-gold);opacity:.86}
  .rex-discovery__primary-item:hover .rex-discovery__primary-icon,.rex-discovery__primary-item:focus-visible .rex-discovery__primary-icon,.rex-discovery__primary-item.is-active .rex-discovery__primary-icon{color:var(--rex-mega-gold-hot);opacity:1}
  .rex-discovery__primary-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.45;stroke-linecap:round;stroke-linejoin:round}
  .rex-discovery__primary-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

  /* Secondary navigation */
  .rex-discovery__secondary-panels{min-height:338px}
  .rex-discovery__secondary-panel[hidden]{display:none!important}
  .rex-discovery__secondary-panel{display:flex;flex-direction:column;min-height:338px}
  .rex-discovery__secondary-links{display:grid;align-content:start;gap:1px}
  .rex-discovery__secondary-link{
    display:grid;grid-template-columns:minmax(0,1fr) 24px;align-items:center;gap:10px;min-height:46px;padding:7px 10px;
    border:0;border-radius:8px;background:transparent;color:var(--rex-mega-text);text-decoration:none;
    transition:color var(--rex-mega-speed-hover) ease,background var(--rex-mega-speed-hover) ease
  }
  .rex-discovery__secondary-link:hover,.rex-discovery__secondary-link:focus-visible{color:var(--rex-mega-gold);background:linear-gradient(90deg,rgba(8,43,56,.02),rgba(19,75,93,.16),rgba(174,142,91,.025))}
  .rex-discovery__secondary-link:focus-visible{outline:2px solid rgba(88,202,213,.45);outline-offset:-1px}
  .rex-discovery__secondary-label{font-size:14.5px;font-weight:650;line-height:1.75}
  .rex-discovery__secondary-arrow{display:grid;place-items:center;color:rgba(169,180,182,.70);transition:color 150ms ease,transform 150ms ease}
  .rex-discovery__secondary-arrow svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.45}
  .rex-discovery__secondary-link:hover .rex-discovery__secondary-arrow,.rex-discovery__secondary-link:focus-visible .rex-discovery__secondary-arrow{color:var(--rex-mega-gold-hot);transform:translateX(-3px)}
  .rex-discovery__view-all{
    display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:47px;margin-top:auto;padding:8px 14px;
    border:1px solid rgba(210,178,120,.62);border-radius:8px;background:rgba(2,7,11,.40);color:var(--rex-mega-gold);font-size:14px;font-weight:750;text-decoration:none;
    transition:border-color 150ms ease,background 150ms ease,color 150ms ease,box-shadow 150ms ease
  }
  .rex-discovery__view-all:hover,.rex-discovery__view-all:focus-visible{border-color:rgba(239,215,157,.82);background:rgba(174,142,91,.08);color:var(--rex-mega-gold-hot);box-shadow:inset 0 0 16px rgba(174,142,91,.05)}
  .rex-discovery__view-all svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5}
  .rex-discovery__empty{display:grid;place-items:center;min-height:210px;color:var(--rex-mega-muted);font-size:13px;text-align:center}

  /* Dynamic showcase */
  .rex-discovery__showcase{
    position:relative;isolation:isolate;width:100%;height:100%;min-height:372px;overflow:hidden;border:1px solid rgba(88,202,213,.22);border-radius:11px;background:linear-gradient(135deg,#03171E,#02070B)
  }
  .rex-discovery__showcase-media,.rex-discovery__showcase-shade{position:absolute;inset:0}
  .rex-discovery__showcase-media{background:radial-gradient(circle at 35% 30%,rgba(26,137,155,.16),transparent 38%),#02070B}
  .rex-discovery__showcase-media img{display:block;width:100%;height:100%;object-fit:cover;object-position:center;transition:opacity 180ms ease,transform 180ms ease}
  .rex-discovery__showcase.is-updating .rex-discovery__showcase-media img{opacity:.38;transform:scale(1.006)}
  .rex-discovery__showcase-fallback{position:absolute;inset:0;display:grid;place-items:center;color:rgba(210,178,120,.28);font:600 42px/1 Georgia,serif;letter-spacing:.22em}
  .rex-discovery__showcase-shade{z-index:1;background:linear-gradient(90deg,rgba(2,7,11,.04) 0%,rgba(2,7,11,.23) 42%,rgba(2,7,11,.88) 100%)}
  .rex-discovery__showcase-copy{
    position:relative;z-index:2;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;width:min(54%,360px);height:100%;margin-inline-start:auto;padding:28px 30px;text-align:right;
    transition:opacity 170ms ease,transform 170ms ease
  }
  .rex-discovery__showcase.is-updating .rex-discovery__showcase-copy{opacity:.42;transform:translateY(4px)}
  .rex-discovery__showcase-eyebrow{margin-bottom:10px;color:rgba(237,237,214,.72);font-family:Georgia,'Times New Roman',serif;font-size:10.5px;letter-spacing:.24em;line-height:1.4;direction:ltr}
  .rex-discovery__showcase h3{margin:0;color:#fff;font-size:clamp(25px,2vw,31px);font-weight:760;line-height:1.45}
  .rex-discovery__showcase p{margin:10px 0 18px;color:rgba(237,237,214,.78);font-size:13px;line-height:1.85}
  .rex-discovery__showcase-cta{
    display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:44px;padding:7px 18px;border:1px solid rgba(210,178,120,.66);border-radius:7px;
    background:rgba(2,7,11,.46);color:var(--rex-mega-gold);font-size:13px;font-weight:750;text-decoration:none;transition:border-color 150ms ease,color 150ms ease,background 150ms ease,box-shadow 150ms ease
  }
  .rex-discovery__showcase-cta:hover,.rex-discovery__showcase-cta:focus-visible{border-color:rgba(239,215,157,.85);color:var(--rex-mega-gold-hot);background:rgba(174,142,91,.07);box-shadow:inset 0 0 14px rgba(174,142,91,.05)}
  .rex-discovery__showcase-cta svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.5;transition:transform 150ms ease}
  .rex-discovery__showcase-cta:hover svg{transform:translateX(-3px)}
  .rex-discovery__showcase-rail{position:absolute;z-index:4;left:2px;top:50%;display:grid;gap:13px;transform:translateY(-50%);pointer-events:none}
  .rex-discovery__showcase-rail span{display:flex;align-items:center;gap:6px;color:rgba(169,180,182,.62);font:11px/1.2 Georgia,serif;transition:color 150ms ease}
  .rex-discovery__showcase-rail span::after{content:"";width:0;height:1px;background:var(--rex-mega-gold);transition:width 150ms ease}
  .rex-discovery__showcase-rail span.is-active{color:var(--rex-mega-gold-hot)}
  .rex-discovery__showcase-rail span.is-active::after{width:16px}

  /* Bottom quick links */
  .rex-discovery__quicklinks{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid var(--rex-mega-divider);min-height:76px}
  .rex-discovery__quicklink{position:relative;display:grid;grid-template-columns:30px minmax(0,1fr);align-items:center;gap:12px;padding:13px 24px;color:var(--rex-mega-text);text-decoration:none;transition:background 150ms ease,color 150ms ease,transform 150ms ease}
  .rex-discovery__quicklink+.rex-discovery__quicklink{border-inline-start:1px solid rgba(174,142,91,.20)}
  .rex-discovery__quicklink:hover,.rex-discovery__quicklink:focus-visible{background:rgba(19,75,93,.09);color:var(--rex-mega-gold);transform:translateY(-1px)}
  .rex-discovery__quicklink:focus-visible{outline:2px solid rgba(88,202,213,.45);outline-offset:-3px}
  .rex-discovery__quick-icon{display:grid;place-items:center;color:var(--rex-mega-gold)}
  .rex-discovery__quick-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
  .rex-discovery__quick-copy{display:grid;gap:2px;min-width:0}
  .rex-discovery__quick-copy strong{font-size:13.5px;line-height:1.5}
  .rex-discovery__quick-copy small{color:rgba(169,180,182,.72);font-size:11px;line-height:1.5}
}

@media (min-width:1101px) and (max-width:1280px){
  .rex-discovery__panel{width:calc(100vw - 40px)}
  .rex-discovery__main{grid-template-columns:minmax(410px,1.45fr) minmax(250px,.86fr) minmax(220px,.72fr)}
  .rex-discovery__primary,.rex-discovery__secondary{padding-inline:17px}
  .rex-discovery__showcase-col{padding-inline:16px}
  .rex-discovery__showcase-copy{width:min(58%,330px);padding-inline:24px}
  .rex-discovery__quicklink{padding-inline:16px}
}

/* Full-screen mobile discovery menu */
@media (max-width:1100px){
  .rex-mobile-drawer.rex-mobile-discovery-shell{z-index:99990;background:transparent}
  .rex-mobile-discovery-shell>.rex-overlay-backdrop{background:rgba(2,7,11,.92);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
  .rex-mobile-drawer__panel.rex-mobile-discovery-shell__panel,
  [dir="rtl"] .rex-mobile-drawer__panel.rex-mobile-discovery-shell__panel{
    inset:0!important;box-sizing:border-box;display:grid;grid-template-rows:auto minmax(0,1fr) auto;width:100%!important;max-width:none!important;height:100dvh;min-height:100vh;
    padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)!important;border:0!important;overflow:hidden!important;
    background:radial-gradient(circle at 16% 4%,rgba(26,137,155,.10),transparent 24%),linear-gradient(180deg,rgba(2,15,20,.995),rgba(2,7,11,.997));
    box-shadow:none!important;transform:translateY(10px)!important;opacity:.96;transition:transform 220ms var(--rex-mega-ease),opacity 180ms ease
  }
  .rex-mobile-drawer.is-open .rex-mobile-drawer__panel.rex-mobile-discovery-shell__panel{transform:none!important;opacity:1}
  .rex-mobile-discovery-shell__head{
    position:relative;z-index:4;display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;min-height:78px;
    padding:12px 18px!important;border-bottom:1px solid rgba(174,142,91,.16)!important;background:rgba(2,10,14,.82);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)
  }
  .rex-mobile-discovery-shell__head .rex-brand{justify-content:flex-start!important;min-width:0!important}
  .rex-mobile-discovery-shell__head .custom-logo{display:block;width:min(var(--rex-logo-width-mobile,160px),190px)!important;max-width:min(var(--rex-logo-width-mobile,160px),190px)!important;max-height:54px!important;object-fit:contain}
  .rex-mobile-discovery-shell__head-actions{display:flex;align-items:center;gap:5px;direction:ltr}
  .rex-mobile-discovery-shell__head-actions .rex-icon-btn{width:46px;height:46px;color:var(--rex-mega-text)}
  .rex-mobile-discovery-shell__head-actions .rex-icon-btn:last-child{margin-inline-start:2px;border-inline-start:1px solid rgba(169,180,182,.18);border-radius:0;padding-inline-start:8px;width:54px}
  .rex-mobile-discovery-shell__scroll{min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:rgba(174,142,91,.28) transparent}
  .rex-mobile-discovery{display:grid;gap:16px;width:min(100% - 28px,720px);margin:0 auto;padding:16px 0 22px}
  .rex-mobile-discovery__search{
    display:grid;grid-template-columns:28px minmax(0,1fr);align-items:center;gap:10px;min-height:56px;padding:0 16px;border:1px solid rgba(169,180,182,.32);border-radius:12px;
    background:linear-gradient(90deg,rgba(3,20,27,.76),rgba(8,43,56,.34));box-shadow:inset 0 0 18px rgba(88,202,213,.025)
  }
  .rex-mobile-discovery__search:focus-within{border-color:rgba(210,178,120,.58);box-shadow:0 0 0 2px rgba(88,202,213,.10),inset 0 0 18px rgba(88,202,213,.04)}
  .rex-mobile-discovery__search>span{display:grid;place-items:center;color:var(--rex-mega-text)}
  .rex-mobile-discovery__search svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.45}
  .rex-mobile-discovery__search input{width:100%;min-width:0;height:54px;padding:0!important;border:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;color:var(--rex-mega-text)!important;font:inherit;font-size:15px;text-align:right}
  .rex-mobile-discovery__search input::placeholder{color:rgba(169,180,182,.72)}

  .rex-mobile-discovery__sections{display:grid;gap:0}
  .rex-mobile-discovery__section{margin:0;border:0;border-bottom:1px solid rgba(169,180,182,.13);background:transparent;overflow:visible}
  .rex-mobile-discovery__section-head,.rex-mobile-discovery__plain-link{
    list-style:none;box-sizing:border-box;display:grid;grid-template-columns:30px minmax(0,1fr) 24px;align-items:center;gap:10px;width:100%;min-height:58px;padding:8px 13px;
    border:1px solid transparent;border-radius:0;background:transparent;color:var(--rex-mega-text);text-decoration:none;cursor:pointer;transition:background 150ms ease,border-color 150ms ease,color 150ms ease,box-shadow 150ms ease
  }
  .rex-mobile-discovery__section-head::-webkit-details-marker{display:none}
  .rex-mobile-discovery__section[open]{margin:0 0 4px;padding:0 0 10px;border-bottom-color:transparent}
  .rex-mobile-discovery__section[open]>.rex-mobile-discovery__section-head{
    border-color:rgba(210,178,120,.70);border-radius:11px;color:var(--rex-mega-gold-hot);
    background:linear-gradient(90deg,rgba(174,142,91,.035),rgba(174,142,91,.15),rgba(174,142,91,.045));
    box-shadow:inset 0 0 20px rgba(174,142,91,.07),0 0 16px rgba(210,178,120,.045)
  }
  .rex-mobile-discovery__section-icon{display:grid;place-items:center;color:var(--rex-mega-gold)}
  .rex-mobile-discovery__section-icon svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.45;stroke-linecap:round;stroke-linejoin:round}
  .rex-mobile-discovery__section-head strong,.rex-mobile-discovery__plain-link strong{font-size:15.5px;font-weight:700;line-height:1.5}
  .rex-mobile-discovery__section-chevron{display:grid;place-items:center;color:rgba(237,237,214,.78);transition:transform 190ms ease,color 150ms ease}
  .rex-mobile-discovery__section-chevron svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.45}
  .rex-mobile-discovery__section[open]>.rex-mobile-discovery__section-head .rex-mobile-discovery__section-chevron{transform:rotate(90deg);color:var(--rex-mega-gold-hot)}
  .rex-mobile-discovery__section-body{
    display:grid;gap:0;margin:7px 13px 0 30px;padding:0 12px 2px;border:1px solid rgba(169,180,182,.17);border-radius:10px;background:rgba(2,12,17,.46);overflow:hidden
  }
  .rex-mobile-discovery__all,.rex-mobile-discovery__subitem{
    display:grid;grid-template-columns:minmax(0,1fr) 22px;align-items:center;gap:10px;min-height:46px;padding:7px 9px;border-bottom:1px solid rgba(169,180,182,.12);color:var(--rex-mega-text);font-size:14px;text-decoration:none
  }
  .rex-mobile-discovery__all{color:var(--rex-mega-gold);font-weight:720}
  .rex-mobile-discovery__subitem:last-child{border-bottom:0}
  .rex-mobile-discovery__all svg,.rex-mobile-discovery__subitem svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.4;color:rgba(169,180,182,.78)}
  .rex-mobile-discovery__all:hover,.rex-mobile-discovery__subitem:hover,.rex-mobile-discovery__all:focus-visible,.rex-mobile-discovery__subitem:focus-visible{color:var(--rex-mega-gold-hot);background:rgba(19,75,93,.12)}
  .rex-mobile-discovery__plain-link{border-bottom:1px solid rgba(169,180,182,.13)}
  .rex-mobile-discovery__plain-link:hover,.rex-mobile-discovery__plain-link:focus-visible{color:var(--rex-mega-gold);background:rgba(19,75,93,.08)}

  .rex-mobile-discovery__featured{
    position:relative;isolation:isolate;min-height:190px;aspect-ratio:16/7.5;overflow:hidden;border:1px solid rgba(210,178,120,.56);border-radius:12px;background:linear-gradient(135deg,#03171E,#02070B)
  }
  .rex-mobile-discovery__featured>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
  .rex-mobile-discovery__featured-shade{position:absolute;z-index:1;inset:0;background:linear-gradient(90deg,rgba(2,7,11,.05),rgba(2,7,11,.38) 45%,rgba(2,7,11,.90) 100%)}
  .rex-mobile-discovery__featured-copy{position:relative;z-index:2;display:flex;flex-direction:column;justify-content:center;align-items:flex-start;width:min(58%,360px);min-height:100%;margin-inline-start:auto;padding:18px 20px;text-align:right}
  .rex-mobile-discovery__featured-copy>span{color:rgba(237,237,214,.65);font:10px/1.3 Georgia,serif;letter-spacing:.20em;direction:ltr}
  .rex-mobile-discovery__featured-copy>strong{margin-top:5px;color:#fff;font-size:21px;line-height:1.45}
  .rex-mobile-discovery__featured-copy>p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:5px 0 12px;color:rgba(237,237,214,.75);font-size:12px;line-height:1.7}
  .rex-mobile-discovery__featured-copy>a{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:6px 14px;border:1px solid rgba(210,178,120,.65);border-radius:7px;background:rgba(2,7,11,.45);color:var(--rex-mega-gold);font-size:12px;font-weight:700;text-decoration:none}
  .rex-mobile-discovery__featured-copy>a svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.45}

  .rex-mobile-discovery__bottom{
    position:relative;z-index:5;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));min-height:70px;padding:7px max(10px,env(safe-area-inset-right)) max(7px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));
    border-top:1px solid rgba(174,142,91,.24);background:rgba(2,8,12,.96);box-shadow:0 -10px 28px rgba(0,0,0,.22)
  }
  .rex-mobile-discovery__bottom a{display:grid;place-items:center;align-content:center;gap:4px;min-width:0;min-height:56px;color:rgba(237,237,214,.82);text-decoration:none}
  .rex-mobile-discovery__bottom a:hover,.rex-mobile-discovery__bottom a:focus-visible{color:var(--rex-mega-gold-hot)}
  .rex-mobile-discovery__bottom span{display:grid;place-items:center;color:var(--rex-mega-gold)}
  .rex-mobile-discovery__bottom svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.45;stroke-linecap:round;stroke-linejoin:round}
  .rex-mobile-discovery__bottom small{font-size:11px;line-height:1.3;white-space:nowrap}
  .rex-mobile-discovery [hidden],.rex-mobile-discovery .is-filter-hidden{display:none!important}
}

@media (max-width:520px){
  .rex-mobile-discovery{width:calc(100% - 20px);padding-top:12px}
  .rex-mobile-discovery-shell__head{padding-inline:12px!important}
  .rex-mobile-discovery__section-head,.rex-mobile-discovery__plain-link{padding-inline:10px}
  .rex-mobile-discovery__section-body{margin-inline-start:20px;margin-inline-end:8px}
  .rex-mobile-discovery__featured{min-height:174px;aspect-ratio:16/8.2}
  .rex-mobile-discovery__featured-copy{width:62%;padding-inline:15px}
}

@media (prefers-reduced-motion:reduce){
  .rex-mega-menu.rex-discovery,.rex-discovery__backdrop,.rex-discovery__primary-item,.rex-discovery__secondary-link,.rex-discovery__showcase-copy,.rex-discovery__showcase-media img,.rex-mobile-drawer__panel.rex-mobile-discovery-shell__panel,.rex-mobile-discovery__section-chevron{transition:none!important}
}

/* REX 3.9.38 — RTL discovery layout + portrait showcase + dense two-column secondary lists */
@media (min-width:1101px){
  .rex-discovery__panel,.rex-discovery__main,.rex-discovery__primary,.rex-discovery__secondary{direction:rtl;text-align:right}
  .rex-discovery__main{
    grid-template-columns:minmax(250px,.68fr) minmax(520px,1.55fr) minmax(255px,.72fr)!important;
    grid-template-areas:"primary secondary showcase"!important;
    min-height:520px!important;
  }
  .rex-discovery__primary{grid-area:primary!important;padding:22px 22px 18px!important;border-inline-start:0!important;border-inline-end:1px solid var(--rex-mega-divider)!important}
  .rex-discovery__secondary{grid-area:secondary!important;padding:22px 24px!important;border-inline-start:0!important;border-inline-end:1px solid var(--rex-mega-divider)!important}
  .rex-discovery__showcase-col{
    grid-area:showcase!important;display:flex!important;align-items:center!important;justify-content:center!important;
    padding:16px 18px!important;min-width:0
  }
  .rex-discovery__column-label{text-align:right!important}
  .rex-discovery__primary-item,.rex-discovery__secondary-link{text-align:right!important;direction:rtl!important}
  .rex-discovery__primary-label,.rex-discovery__secondary-label{text-align:right!important}

  .rex-discovery__secondary-panels,.rex-discovery__secondary-panel{min-height:430px!important}
  .rex-discovery__secondary-links{grid-template-columns:1fr;gap:2px 16px!important}
  .rex-discovery__secondary-links--two{grid-template-columns:repeat(2,minmax(0,1fr))!important;column-gap:20px!important;align-items:start!important}
  .rex-discovery__secondary-link{min-height:44px!important;padding:6px 10px!important}
  .rex-discovery__view-all{max-width:100%;margin-top:18px!important}

  .rex-discovery__showcase{
    width:min(100%,276px)!important;height:auto!important;min-height:0!important;aspect-ratio:9 / 16!important;
    align-self:center!important;border-radius:12px!important
  }
  .rex-discovery__showcase-media img{object-fit:cover!important;object-position:center center!important}
  .rex-discovery__showcase-shade{background:linear-gradient(180deg,rgba(2,7,11,.02) 25%,rgba(2,7,11,.18) 55%,rgba(2,7,11,.92) 100%)!important}
  .rex-discovery__showcase-copy{
    width:100%!important;height:100%!important;margin:0!important;padding:22px 18px!important;
    justify-content:flex-end!important;align-items:flex-start!important;text-align:right!important;direction:rtl!important
  }
  .rex-discovery__showcase-eyebrow{margin-bottom:6px!important;font-size:9.5px!important}
  .rex-discovery__showcase h3{font-size:21px!important;line-height:1.45!important}
  .rex-discovery__showcase p{margin:7px 0 12px!important;font-size:11.5px!important;line-height:1.75!important;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
  .rex-discovery__showcase-cta{min-height:39px!important;padding:6px 12px!important;font-size:11.5px!important}
  .rex-discovery__showcase.is-text-hidden .rex-discovery__showcase-copy{display:none!important}
  .rex-discovery__showcase.is-text-hidden .rex-discovery__showcase-shade{background:linear-gradient(180deg,rgba(2,7,11,.01),rgba(2,7,11,.12))!important}
  .rex-discovery__showcase-rail{display:none!important}
}

@media (min-width:1101px) and (max-width:1280px){
  .rex-discovery__main{grid-template-columns:minmax(220px,.62fr) minmax(440px,1.45fr) minmax(225px,.68fr)!important}
  .rex-discovery__showcase{width:min(100%,240px)!important}
  .rex-discovery__primary,.rex-discovery__secondary{padding-inline:16px!important}
  .rex-discovery__showcase-col{padding-inline:14px!important}
}

@media (max-width:1100px){
  .rex-mobile-discovery__featured{display:none!important}
  .rex-mobile-discovery__sections{padding-bottom:18px!important}
}


/* REX 3.9.45 — Clean mobile discovery top bar.
   Keep only a themed close control; search remains in the single filter field below. */
@media (max-width:1100px){
  .rex-mobile-discovery-shell__head{
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    min-height:64px!important;
    padding:10px 16px!important;
    border-bottom:1px solid rgba(174,142,91,.16)!important;
    background:
      linear-gradient(135deg,rgba(3,23,30,.64),rgba(2,7,11,.46))!important;
    -webkit-backdrop-filter:blur(18px) saturate(135%)!important;
    backdrop-filter:blur(18px) saturate(135%)!important;
  }

  .rex-mobile-discovery-shell__head > .rex-brand{
    display:none!important;
  }

  .rex-mobile-discovery-shell__head-actions{
    width:100%!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:0!important;
    direction:ltr!important;
  }

  .rex-mobile-discovery-shell__head-actions [data-rex-search-open]{
    display:none!important;
  }

  .rex-mobile-discovery-shell__close,
  .rex-mobile-discovery-shell__head-actions .rex-mobile-discovery-shell__close,
  .rex-mobile-discovery-shell__head-actions .rex-icon-btn:last-child{
    all:unset!important;
    box-sizing:border-box!important;
    width:46px!important;
    height:46px!important;
    display:grid!important;
    place-items:center!important;
    cursor:pointer!important;
    border:1px solid rgba(210,178,120,.48)!important;
    border-radius:14px!important;
    background:
      linear-gradient(145deg,rgba(210,178,120,.10),rgba(8,43,56,.24))!important;
    color:#efd79d!important;
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,.035),
      0 8px 22px rgba(0,0,0,.18)!important;
    transition:
      border-color .16s ease,
      background .16s ease,
      transform .16s ease,
      color .16s ease!important;
  }

  .rex-mobile-discovery-shell__close:hover,
  .rex-mobile-discovery-shell__close:focus-visible{
    border-color:rgba(239,215,157,.82)!important;
    background:
      linear-gradient(145deg,rgba(210,178,120,.16),rgba(8,43,56,.34))!important;
    color:#fff0c8!important;
    transform:translateY(-1px)!important;
    outline:none!important;
  }

  .rex-mobile-discovery-shell__close svg{
    width:23px!important;
    height:23px!important;
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:1.8!important;
    stroke-linecap:round!important;
    stroke-linejoin:round!important;
  }

  /* Give the actual menu search field a little more breathing room now that
     the duplicate top search control is gone. */
  .rex-mobile-discovery{
    padding-top:12px!important;
  }

  .rex-mobile-discovery__search{
    margin-top:0!important;
  }
}
