/* DFNS — UI polish / shared components */

html, body { min-height: 100%; }
body.no-scroll { overflow: hidden; }
.site-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
.site-wrapper > main { flex: 1; }

.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(9,9,11,.72); border-bottom: 1px solid rgba(255,255,255,.055); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%); transition: background .25s ease, border-color .25s ease, box-shadow .25s ease; }
.site-header:hover { background: rgba(12,12,16,.88); border-color: rgba(255,255,255,.09); box-shadow: 0 10px 35px rgba(0,0,0,.14); }
.header-container { min-height: 76px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 1; flex-shrink: 0; transition: transform .2s ease, opacity .2s ease; }
.brand:hover { transform: translateY(-1px); opacity: .92; }
.brand-mark { font-size: 25px; font-weight: 950; letter-spacing: -.05em; }
.brand-subtitle { margin-top: 5px; font-size: 9px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; opacity: .55; }
.main-navigation { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.nav-link { position: relative; text-decoration: none; padding: 10px 14px; border-radius: 11px; font-weight: 750; font-size: 13px; color: inherit; transition: color .2s ease, background .2s ease, transform .2s ease; }
.nav-link::after { content: ""; position: absolute; left: 13px; right: 13px; bottom: 5px; height: 2px; border-radius: 999px; background: currentColor; transform: scaleX(0); transform-origin: center; opacity: .7; transition: transform .22s cubic-bezier(.2,.8,.2,1); }
.nav-link:hover { background: rgba(255,255,255,.065); transform: translateY(-1px); }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-search-button, .mobile-menu-button { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(255,255,255,.04); color: inherit; cursor: pointer; text-decoration: none; font-size: 20px; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.header-search-button:hover, .mobile-menu-button:hover { transform: translateY(-2px) scale(1.02); background: rgba(255,255,255,.085); border-color: rgba(255,255,255,.17); }
.header-search-button:active, .mobile-menu-button:active { transform: scale(.96); }
.mobile-menu-button { display: none; }

.item-page { overflow: hidden; }
.breadcrumb-section { padding: 28px 0 10px; }
.breadcrumbs { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 13px; opacity: .72; }
.breadcrumbs a { color: inherit; text-decoration: none; transition: opacity .18s ease; }
.breadcrumbs a:hover { opacity: 1; }

.item-hero-section { position: relative; min-height: 650px; isolation: isolate; }
#item-hero-background { position: absolute; inset: 0; z-index: -2; opacity: .45; filter: saturate(.8) blur(1px); transform: scale(1.02); transition: opacity .45s ease, background-image .5s ease; }
.item-hero-section::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(8,8,12,.98) 0%, rgba(8,8,12,.76) 42%, rgba(8,8,12,.9) 100%), linear-gradient(0deg, rgba(8,8,12,1), transparent 45%); pointer-events: none; }
.item-hero-container { position: relative; z-index: 2; min-height: 620px; display: grid; grid-template-columns: minmax(320px,1fr) minmax(360px,560px); gap: 50px; align-items: center; }
.item-image-panel { position: relative; min-height: 500px; display: grid; place-items: center; }
.item-main-image { position: relative; z-index: 2; width: min(100%, 540px); max-height: 560px; object-fit: contain; filter: drop-shadow(0 30px 45px rgba(0,0,0,.55)); animation: dfns-item-in .5s cubic-bezier(.2,.8,.2,1) both; }
@keyframes dfns-item-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.item-image-loading { position: absolute; inset: 20%; display: grid; place-items: center; z-index: 1; }
.item-image-loading::after { content: ""; width: 44px; height: 44px; border: 3px solid rgba(255,255,255,.18); border-top-color: #fff; border-radius: 50%; animation: dfns-spin .8s linear infinite; }
@keyframes dfns-spin { to { transform: rotate(360deg); } }
.item-image-controls { display: flex; gap: 8px; position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 4; padding: 6px; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(10,10,14,.75); backdrop-filter: blur(12px); }
.item-image-control { border: 0; background: transparent; color: inherit; padding: 9px 13px; border-radius: 9px; cursor: pointer; font-weight: 750; transition: background .2s ease, transform .2s ease; }
.item-image-control:hover { background: rgba(255,255,255,.07); transform: translateY(-1px); }
.item-image-control.active { background: rgba(255,255,255,.1); }
.item-info-panel { max-width: 620px; }
.item-last-seen-hero { width: fit-content; max-width: 100%; display: inline-flex; align-items: center; gap: 9px; margin: 15px 0 3px; padding: 8px 12px; border: 1px solid rgba(255,255,255,.085); border-radius: 999px; background: rgba(255,255,255,.045); color: rgba(255,255,255,.72); font-size: 11px; line-height: 1.2; box-shadow: inset 0 1px rgba(255,255,255,.035); }
.item-last-seen-hero > span:last-child { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.item-last-seen-hero strong { font-weight: 850; color: rgba(255,255,255,.92); }
.item-last-seen-hero b { font-weight: 700; color: rgba(255,255,255,.52); }
.last-seen-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #a78bfa; box-shadow: 0 0 12px rgba(167,139,250,.65); animation: dfns-pulse 2s ease-in-out infinite; }
@keyframes dfns-pulse { 0%,100% { opacity: .55; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.15); } }
.last-seen-value { color: rgba(255,255,255,.82); }
.item-eyebrow, .section-eyebrow { font-size: 11px; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; opacity: .55; }
#item-name { margin: 10px 0 10px; font-size: clamp(42px,6vw,78px); line-height: .92; letter-spacing: -.055em; }
#item-description { max-width: 600px; line-height: 1.7; opacity: .7; }
.item-price { margin: 28px 0; display: flex; align-items: baseline; gap: 10px; }
#item-price { font-size: 38px; font-weight: 900; }
.price-currency { font-size: 12px; font-weight: 850; letter-spacing: .12em; opacity: .5; }
.item-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.item-availability { margin-top: 18px; display: flex; justify-content: space-between; gap: 15px; max-width: 560px; padding: 14px 16px; border: 1px solid rgba(255,255,255,.08); border-radius: 13px; background: rgba(255,255,255,.035); }
.availability-indicator { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 750; }
.availability-date { opacity: .5; font-size: 12px; }
.status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 12px rgba(74,222,128,.5); }
.details-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.details-card { border: 1px solid rgba(255,255,255,.08); border-radius: 18px; background: rgba(255,255,255,.035); padding: 22px; transition: transform .22s ease, border-color .22s ease, background .22s ease; }
.details-card:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.13); background: rgba(255,255,255,.05); }
.details-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.details-card-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: rgba(255,255,255,.07); }
.details-card-header h3 { margin: 3px 0 0; }
.details-card-eyebrow { font-size: 10px; font-weight: 850; opacity: .45; letter-spacing: .12em; }
.details-list { margin: 0; }
.details-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.06); }
.details-row dt { opacity: .48; font-size: 13px; }
.details-row dd { margin: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }

.dfns-search-modal { position: fixed; inset: 0; z-index: 3000; display: none; }
.dfns-search-modal.open { display: block; }
.dfns-search-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(10px); }
.dfns-search-panel { position: relative; width: min(760px, calc(100% - 28px)); max-height: min(820px, calc(100vh - 40px)); overflow: auto; margin: 20px auto; padding: 25px; border: 1px solid rgba(255,255,255,.12); border-radius: 22px; background: #111116; box-shadow: 0 35px 100px rgba(0,0,0,.55); animation: dfns-modal-in .22s ease both; }
@keyframes dfns-modal-in { from { opacity: 0; transform: translateY(-8px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
.dfns-search-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 18px; }
.dfns-search-eyebrow { font-size: 10px; font-weight: 900; letter-spacing: .17em; opacity: .45; }
.dfns-search-head h2 { margin: 5px 0 0; font-size: 25px; letter-spacing: -.03em; }
.dfns-search-close { width: 38px; height: 38px; border: 0; border-radius: 10px; background: rgba(255,255,255,.07); color: inherit; font-size: 25px; cursor: pointer; transition: transform .18s ease, background .18s ease; }
.dfns-search-close:hover { transform: rotate(5deg); background: rgba(255,255,255,.12); }
.dfns-search-input-wrap { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: 56px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(255,255,255,.045); }
.dfns-search-input-wrap > span { opacity: .5; font-size: 22px; }
#dfns-database-input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: inherit; font: inherit; font-size: 16px; }
.dfns-search-input-wrap kbd { font-size: 9px; padding: 4px 7px; border: 1px solid rgba(255,255,255,.12); border-radius: 5px; opacity: .45; }
.dfns-search-status { padding: 16px 2px 10px; font-size: 12px; opacity: .5; }
.dfns-search-results { display: grid; gap: 7px; }
.dfns-search-result { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 13px; min-height: 70px; padding: 7px 10px 7px 7px; border: 1px solid transparent; border-radius: 13px; color: inherit; text-decoration: none; transition: .15s ease; }
.dfns-search-result:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.08); transform: translateX(2px); }
.dfns-search-result-image { width: 58px; height: 58px; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.05); display: grid; place-items: center; }
.dfns-search-result-image img { width: 100%; height: 100%; object-fit: cover; }
.dfns-search-result-copy { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.dfns-search-result-copy strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dfns-search-result-copy span { font-size: 11px; opacity: .5; }
.dfns-search-arrow { opacity: .4; font-size: 20px; transition: transform .18s ease; }
.dfns-search-result:hover .dfns-search-arrow { transform: translateX(3px); opacity: .75; }
.item-api-error { max-width: 800px; margin: 100px auto; padding: 30px; border: 1px solid rgba(255,255,255,.1); border-radius: 18px; background: rgba(255,255,255,.04); }
.item-api-error strong { font-size: 25px; }
.item-api-error p { opacity: .65; line-height: 1.6; }
.item-api-error a { color: inherit; }

@media (max-width: 900px) {
  .main-navigation { display: none; position: absolute; top: 70px; left: 14px; right: 14px; padding: 10px; flex-direction: column; align-items: stretch; border: 1px solid rgba(255,255,255,.1); border-radius: 15px; background: rgba(16,16,20,.98); box-shadow: 0 25px 60px rgba(0,0,0,.35); animation: dfns-menu-in .18s ease both; }
  .main-navigation.open { display: flex; }
  @keyframes dfns-menu-in { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
  .mobile-menu-button { display: grid; }
  .header-container { position: relative; }
  .item-hero-container { grid-template-columns: 1fr; gap: 10px; padding-top: 25px; padding-bottom: 50px; }
  .item-image-panel { min-height: 390px; }
  .item-info-panel { max-width: none; }
  #item-name { font-size: clamp(42px,12vw,68px); }
}
@media (max-width: 650px) {
  .header-container { min-height: 66px; }
  .brand-subtitle { display: none; }
  .item-image-panel { min-height: 310px; }
  .item-main-image { max-height: 350px; }
  .details-grid { grid-template-columns: 1fr; }
  .details-row { grid-template-columns: 1fr; gap: 5px; }
  .details-row dd { text-align: left; }
  .item-actions > * { flex: 1 1 180px; }
  .item-last-seen-hero { max-width: calc(100vw - 32px); border-radius: 14px; }
  .dfns-search-panel { margin: 10px auto; max-height: calc(100vh - 20px); padding: 18px; }
  .dfns-search-result { grid-template-columns: 48px 1fr auto; }
  .dfns-search-result-image { width: 48px; height: 48px; }
}
