/* imdesi design layer (loaded by inc/theme.php after theme.css + premium.css)
   Brand: navy #04335B, brand blue #0E5A9C, gold #D9A95C / #9A6F35. */

:root {
  --d-navy: #04335B; --d-navy-deep: #021E36; --d-blue: #0E5A9C; --d-sky: #6EA6D6;
  --d-gold: #D9A95C; --d-gold-ink: #8A6230; --d-ink: #101828; --d-muted: #475467;
  --d-line: rgba(4, 51, 91, .10); --d-r: 18px; --d-r-lg: 26px;
  --d-sh-1: 0 1px 2px rgba(4, 51, 91, .06), 0 10px 28px -16px rgba(4, 51, 91, .30);
  --d-sh-2: 0 2px 6px rgba(4, 51, 91, .07), 0 26px 50px -24px rgba(4, 51, 91, .45);
  --d-ease: cubic-bezier(.2, .8, .2, 1);
  --d-gut: clamp(16px, 4vw, 40px);
}

body { --wp--style--root--padding-left: var(--d-gut); --wp--style--root--padding-right: var(--d-gut); }
::selection { background: rgba(217, 169, 92, .35); color: var(--d-navy-deep); }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: d-fade-out .18s var(--d-ease) both; }
::view-transition-new(root) { animation: d-fade-in .28s var(--d-ease) both; }
@keyframes d-fade-out { to { opacity: 0; } }
@keyframes d-fade-in { from { opacity: 0; transform: translateY(6px); } }

h1 em, h2 em, h3 em, .imd-ph__title em {
  background-image: linear-gradient(100deg, var(--d-blue) 0%, var(--d-navy) 30%, #B8862F 60%, var(--d-blue) 100%) !important;
  background-size: 100% 100% !important; animation: none !important;
}
.imd-night h2 em, .imd-brandband h2 em, .imd-ph--store .imd-ph__title em {
  background-image: linear-gradient(100deg, #FFE2A8, #D9A95C 45%, #9FC7EE 80%, #FFE2A8) !important;
}

header.wp-block-template-part { transition: box-shadow .25s var(--d-ease), background-color .25s var(--d-ease); }
.imd-scrolled header.wp-block-template-part { box-shadow: 0 8px 30px -18px rgba(4, 51, 91, .45); background: rgba(255, 255, 255, .86) !important; }

.imd-ph:not(.imd-ph--store) {
  background: radial-gradient(120% 140% at 0% 0%, #F3F7FC 0%, #FFFFFF 55%) !important;
  border-bottom: 1px solid var(--d-line) !important;
  padding-block: clamp(1.75rem, 4.5vw, 3.25rem) clamp(1.75rem, 4vw, 3rem) !important;
}
.imd-ph__mesh i:nth-child(1) { background: radial-gradient(circle, rgba(14, 90, 156, .22), transparent 65%) !important; }
.imd-ph__mesh i:nth-child(2) { background: radial-gradient(circle, rgba(217, 169, 92, .26), transparent 65%) !important; }
.imd-ph__mesh i:nth-child(3) { background: radial-gradient(circle, rgba(110, 166, 214, .20), transparent 65%) !important; }
.imd-ph__inner { max-width: 1200px !important; }
.imd-ph--art .imd-ph__bubbles { display: none; }

@media (min-width: 900px) {
  .imd-ph--art .imd-ph__inner { display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(300px, 40%); align-items: center; gap: clamp(24px, 4vw, 56px); }
  .imd-ph--art .imd-ph__text { order: 1; max-width: none !important; }
  .imd-ph__art {
    order: 2; position: relative; aspect-ratio: 3 / 2; border-radius: var(--d-r-lg);
    background: #E9EEF5 var(--art) center / cover no-repeat; box-shadow: var(--d-sh-2);
    transform: perspective(1200px) rotateY(-6deg) rotateX(2deg); transition: transform .8s var(--d-ease);
    animation: d-art-in .9s var(--d-ease) both .1s; overflow: hidden;
  }
  .imd-ph__art:hover { transform: perspective(1200px) rotateY(0) rotateX(0); }
  .imd-ph__art::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
    background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .28) 50%, transparent 60%);
    background-size: 250% 100%; background-position: 120% 0; animation: d-glint 1.6s var(--d-ease) both .9s;
  }
  .imd-ph__art-glow { position: absolute; inset: auto -12% -30% auto; width: 60%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(217, 169, 92, .45), transparent 70%); filter: blur(20px); pointer-events: none; }
}
@media (min-width: 900px) and (min-resolution: 1.5dppx) { .imd-ph__art { background-image: var(--art-2x); } }
@media (max-width: 899px) { .imd-ph__art { display: none; } }
@keyframes d-art-in { from { opacity: 0; transform: perspective(1200px) rotateY(-14deg) translateX(24px); } }
@keyframes d-glint { from { background-position: 120% 0; } to { background-position: -20% 0; } }

.imd-ph__eyebrow { animation: d-rise .6s var(--d-ease) both; }
.imd-ph__title { animation: d-rise .7s var(--d-ease) both .05s; letter-spacing: -.02em; }
.imd-ph__sub, .imd-ph__text > p:not(.imd-ph__eyebrow) { animation: d-rise .7s var(--d-ease) both .12s; }
@keyframes d-rise { from { opacity: 0; transform: translateY(10px); } }

.imd-crumbs { margin: 0 0 14px; font-size: 13px; animation: d-rise .5s var(--d-ease) both; }
.imd-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 2px; margin: 0; padding: 0; list-style: none; }
.imd-crumbs li { display: inline-flex; align-items: center; color: var(--d-muted); max-width: 32ch; }
.imd-crumbs li + li::before { content: ""; width: 6px; height: 6px; margin: 0 9px 0 7px; border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); opacity: .45; }
.imd-crumbs a { color: var(--d-blue); text-decoration: none; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; }
.imd-crumbs a:hover { background: rgba(14, 90, 156, .08); text-decoration: none; }
.imd-crumbs [aria-current] span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--d-ink); font-weight: 600; }
.imd-ph--store .imd-crumbs li, .imd-ph--store .imd-crumbs [aria-current] span { color: inherit; opacity: .85; }
.imd-ph--store .imd-crumbs a { color: inherit; }

.imdesi-card, .imd-deal, .imx-store, .imx-tile, .imd-card { transition: transform .3s var(--d-ease), box-shadow .3s var(--d-ease), border-color .3s var(--d-ease); }
.imdesi-card { overflow: hidden; border-radius: var(--d-r) !important; border: 1px solid var(--d-line) !important; box-shadow: var(--d-sh-1) !important; background: #fff; height: 100%; padding: 0 !important; display: flex; flex-direction: column; }
.imdesi-card:hover { border-color: rgba(217, 169, 92, .7) !important; }
.imd-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; margin: 0 0 4px !important; background: #EEF3F9; }
.imd-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .7s var(--d-ease); }
.imdesi-card:hover .imd-card__media img { transform: scale(1.05); }
.imdesi-card > :not(.imd-card__media) { margin-left: 18px !important; margin-right: 18px !important; }
.imdesi-card > :last-child { margin-bottom: 18px !important; }

.wp-block-button__link, .imd-btn, .imd-find__go, .imx-btn { transition: transform .2s var(--d-ease), box-shadow .25s var(--d-ease), background-color .2s; }
.wp-block-button__link:hover, .imd-btn:hover { transform: translateY(-1px); }
:where(a, button, input, select, textarea, [tabindex]):focus-visible { outline: 3px solid var(--d-gold); outline-offset: 2px; }

.d-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 9999; pointer-events: none; background: linear-gradient(90deg, var(--d-blue), var(--d-gold)); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.admin-bar .d-progress { top: 32px; }
.d-top {
  position: fixed; right: 20px; bottom: 24px; z-index: 60; width: 46px; height: 46px; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; color: #fff; background: var(--d-navy);
  box-shadow: 0 14px 30px -12px rgba(4, 51, 91, .7); opacity: 0; transform: translateY(14px) scale(.9); pointer-events: none;
  transition: opacity .3s var(--d-ease), transform .3s var(--d-ease), background-color .2s;
}
.d-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.d-top:hover { background: var(--d-blue); }
.d-top svg { width: 20px; height: 20px; }
@media (max-width: 781px) { .d-top { bottom: calc(84px + env(safe-area-inset-bottom)); right: 14px; width: 42px; height: 42px; } }

.imd-footer { background: linear-gradient(180deg, var(--d-navy) 0%, var(--d-navy-deep) 100%) !important; color: rgba(255, 255, 255, .78) !important; border-top: 0 !important; }
.imd-footer a { color: rgba(255, 255, 255, .86) !important; text-decoration: none; transition: color .2s; }
.imd-footer a:hover { color: var(--d-gold) !important; }
.imd-footer .imd-footer__h { color: var(--d-gold) !important; letter-spacing: .02em; }
.imd-footer__base { border-top-color: rgba(255, 255, 255, .12) !important; }
.imd-footer__note, .imd-footer__base, .imd-footer__base * { color: rgba(255, 255, 255, .62) !important; }
.imd-wordmark { background: var(--d-navy-deep); overflow: hidden; line-height: .74; text-align: center; padding-top: 8px; margin-top: -1px; user-select: none; }
.imd-wordmark span {
  display: inline-block; font-weight: 800; letter-spacing: -.05em; font-size: clamp(88px, 21vw, 320px); transform: translateY(18%);
  background: linear-gradient(180deg, rgba(217, 169, 92, .5), rgba(217, 169, 92, 0) 85%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (max-width: 781px) { .imd-wordmark { padding-bottom: calc(64px + env(safe-area-inset-bottom)); } }

.imd-section-title, .imx-home h2, .imd-sec-near h2 { letter-spacing: -.015em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .imd-ph__art { transform: none; }
}
/* Card hover outline: brand gold to blue instead of the old rainbow */
.imdesi-card::after, .imd-deal::after, .imd-cmp-card::after, .imd-tile::after {
  background: linear-gradient(135deg, var(--d-gold), var(--d-blue)) !important;
}
.imdesi-card:hover { border-color: transparent !important; }
/* One picture per guide card (the theme layer adds it) */
.imdesi-card .wp-block-post-featured-image { display: none !important; }
/* Single guides: the banner already shows the featured image on wide screens */
@media (min-width: 900px) {
  .single-post .imd-ph--art ~ * .wp-block-post-featured-image,
  .single-post main .wp-block-post-featured-image { display: none; }
}
/* Latest Posts block cards */
.imx-home .wp-block-latest-posts__featured-image, .wp-block-latest-posts__featured-image { display: block !important; margin: -1px -1px 14px !important; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--d-r) var(--d-r) 0 0; background: #EEF3F9; }
.wp-block-latest-posts__featured-image a, .wp-block-latest-posts__featured-image img { display: block; width: 100%; height: 100%; }
.wp-block-latest-posts__featured-image img { object-fit: cover; transition: transform .7s var(--d-ease); }
.wp-block-latest-posts li:hover .wp-block-latest-posts__featured-image img { transform: scale(1.05); }
.wp-block-latest-posts li:has(.wp-block-latest-posts__featured-image) { overflow: hidden; padding-top: 0 !important; }
/* ---------- Deal cards: the offer is the picture ---------- */
.imd-deal__media br { display: none; }
.imd-deal__media:has(.imd-deal__face) { padding: 0 !important; background: none !important; }
.imd-deal__media:has(.imd-deal__face) .imd-deal__pill { display: none; }
.imd-deal__face {
  --sc: #0E5A9C;
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
  height: 100%; min-height: 132px; padding: 18px 18px 16px; overflow: hidden; isolation: isolate;
  text-decoration: none !important; color: var(--d-navy-deep);
  background:
    radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--sc) 22%, transparent), transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--sc) 9%, #fff) 0%, #fff 70%);
  border-bottom: 1px solid var(--d-line);
}
.imd-deal__face::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--sc);
}
.imd-deal__val {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: clamp(26px, 2.4vw, 34px); font-weight: 800; line-height: 1.05; letter-spacing: -.03em;
  color: var(--d-navy-deep); text-wrap: balance;
}
.imd-deal__mark {
  align-self: flex-start; display: inline-flex; align-items: center; justify-content: center;
  height: 36px; max-width: 120px; padding: 6px 10px; border-radius: 10px; background: #fff;
  box-shadow: 0 1px 2px rgba(4, 51, 91, .08), 0 0 0 1px rgba(4, 51, 91, .06);
}
.imd-deal__mark img { max-height: 24px; max-width: 100px; width: auto; height: auto; object-fit: contain; display: block; }
.imd-deal:hover .imd-deal__face::before { height: 6px; transition: height .25s var(--d-ease); }
.imd-deal__media:has(.imd-deal__face) { aspect-ratio: auto !important; height: auto !important; }

/* On a store's own page the store line on every card repeats the banner */
.tax-store .imd-deal__store { display: none; }
/* Face fills the media area (overrides the old centred logo bubble) */
.imd-deal .imd-deal__media:has(.imd-deal__face) { display: block !important; }
.imd-deal .imd-deal__media .imd-deal__face { display: flex !important; width: 100% !important; max-width: none !important; margin: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.imd-deal .imd-deal__media .imd-deal__mark img {
  width: auto !important; height: auto !important; max-height: 24px !important; max-width: 100px !important;
  padding: 0 !important; margin: 0 !important; border-radius: 0 !important; box-shadow: none !important; background: none !important;
}
.imd-deal .imd-deal__body { justify-content: flex-start !important; }
.imd-deal .imd-deal__foot { margin-top: auto !important; }
.imd-deal .imd-deal__body > :not([class]) { display: none !important; }
.tax-store .imd-deal .imd-deal__store { display: none !important; }
.tax-store .imd-deal .imd-deal__meta { justify-content: flex-end; min-height: 0; }