/* EmlakVitrin V5.1 system layer.
   The design reference CSS (assets/css/v51/*) is loaded unchanged; this file only fits the
   live markup into it: legacy Bootstrap/theme defaults, real data shapes (long or upper-case
   names, account menu, CMS footer) and the pieces the static prototype did not need.
   Every rule is scoped to V5.1 classes so the admin and dashboard pages that also load this
   file are unaffected. */

/* Legacy theme resets inside V5.1 surfaces */
.ev-ui button{font-family:inherit}
.ev-ui h1,.ev-ui h2,.ev-ui h3{font-family:inherit}
.ev-ui a:hover{text-decoration:none}
.svg-sprites{position:absolute;width:0;height:0;overflow:hidden}

/* Top line: language / currency menus */
.ev-v51-topline-tools{display:flex;align-items:center;gap:14px}
.ev-ui .ev-v51-topline-btn{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;color:#fff;font-size:12px;padding:0;line-height:30px}
.ev-ui .ev-v51-topline-btn img{border-radius:2px}
.ev-v51-dropdown{position:relative}
.ev-v51-dropdown .dropdown-menu{min-width:190px;padding:6px;border:1px solid #e5eaf1;border-radius:12px;box-shadow:0 18px 45px rgba(16,40,63,.16);font-size:13px;z-index:1060}
.ev-v51-dropdown .dropdown-item{display:flex;align-items:center;gap:8px;width:100%;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:#1c2737;text-align:left;font-size:13px}
.ev-v51-dropdown .dropdown-item:hover,.ev-v51-dropdown .dropdown-item.active{background:#fff0e4;color:#df5900}
.ev-v51-dropdown form{margin:0}

/* Header account button */
.ev-ui .ev-signin{border:0;background:transparent;color:inherit;padding:0;cursor:pointer}
.ev-v51-avatar{width:24px;height:24px;border-radius:50%;object-fit:cover}
.ev-ui .ev-signin .ev-fav-count{position:static;margin-left:2px}
.ev-ui .ev-header-actions .ev-icon-btn{position:relative}
.ev-ui .ev-desktop-nav a[aria-current="page"]{color:var(--ev-orange)}

/* Search card: popular searches are links to real catalogue searches */
.ev-ui .ev-quick-search a{text-decoration:none}
.ev-ui .v51-location-picker{position:relative}
.ev-ui .ev-hero{overflow:visible;z-index:2}
.ev-ui .ev-hero-image,.ev-ui .ev-hero-shade{overflow:hidden}
.ev-ui .v51-suggest{position:absolute;left:0;right:0;top:100%;margin-top:6px;z-index:30;display:grid;max-height:280px;overflow:auto;padding:6px;border:1px solid #e3e9f1;border-radius:12px;background:#fff;box-shadow:0 18px 45px rgba(16,40,63,.16)}
.ev-ui .v51-suggest[hidden]{display:none}
.ev-ui .v51-suggest [role=option]{border:0;background:transparent;padding:9px 10px;border-radius:8px;text-align:left;color:#1c2737;font-size:13px;font-weight:600}
.ev-ui .v51-suggest [role=option]:hover,.ev-ui .v51-suggest [role=option][aria-selected=true]{background:#fff0e4;color:#df5900}
.ev-ui .ev-advanced-filters select{min-height:38px;border:1px solid #e3e9f1;border-radius:10px;padding:0 10px;background:#fff}

/* Category rail: the tree has as many parents as the admin defines (design shows eight) */
@media (min-width:1101px){.ev-ui .ev-category-row{grid-template-columns:repeat(var(--ev-v51-cats,8),minmax(0,1fr))}}
.ev-ui .ev-category{text-decoration:none;color:inherit}
.ev-ui .ev-category-copy strong,.ev-ui .ev-category-copy small{text-transform:lowercase;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.ev-ui .ev-category-copy strong::first-letter,.ev-ui .ev-category-copy small::first-letter{text-transform:uppercase}

/* Stories: seen state and viewer */
.ev-ui .ev-story{text-decoration:none;color:inherit}
.ev-ui .ev-story strong{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ev-ui .ev-story.is-seen .ev-story-ring{border-color:#cfd6df}
.ev-v51-story-viewer{position:fixed;inset:0;z-index:2000;display:grid;place-items:center;background:rgba(6,17,30,.88);padding:16px}
.ev-v51-story-viewer[hidden]{display:none}
.ev-v51-story-frame{position:relative;width:min(420px,100%);aspect-ratio:9/16;max-height:calc(100vh - 32px);border-radius:18px;overflow:hidden;background:#0a2138}
.ev-v51-story-frame>img{width:100%;height:100%;object-fit:cover}
.ev-v51-story-progress{position:absolute;left:12px;right:12px;top:12px;height:3px;border-radius:3px;background:rgba(255,255,255,.35);z-index:2}
.ev-v51-story-progress span{display:block;height:100%;width:0;border-radius:3px;background:#fff}
.ev-v51-story-caption{position:absolute;left:0;right:0;bottom:0;padding:70px 16px 64px;background:linear-gradient(transparent,rgba(6,17,30,.85));color:#fff;display:grid;gap:4px}
.ev-v51-story-caption a{color:#fff;font-weight:780;font-size:16px;line-height:1.3}
.ev-v51-story-caption span{color:#ffb274;font-weight:780}
.ev-ui .ev-v51-story-close,.ev-v51-story-close{position:absolute;top:22px;right:12px;z-index:3;background:rgba(255,255,255,.18);color:#fff;border:0}
.ev-v51-story-nav{position:absolute;top:50%;z-index:3;width:40px;height:40px;margin-top:-20px;border:0;border-radius:50%;background:rgba(255,255,255,.2);color:#fff;display:grid;place-items:center}
.ev-v51-story-prev{left:10px}.ev-v51-story-prev .i{transform:rotate(180deg)}
.ev-v51-story-next{right:10px}
.ev-v51-story-share{position:absolute;right:14px;bottom:16px;z-index:3}
.ev-v51-story-viewer .i{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
body.ev-v51-no-scroll{overflow:hidden}

/* Listing cards: real titles and badges can be long */
.ev-ui .ev-listing-photo{position:relative}
.ev-ui .ev-listing-photo{overflow:hidden}
.ev-ui .ev-listing-photo>a{display:block;height:100%}
.ev-ui .ev-listing-photo img{width:100%;object-fit:cover}
.ev-ui .ev-listing-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;color:inherit}
.ev-ui .ev-listing-badge{max-width:calc(100% - 64px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ev-ui .ev-listing-fav[aria-pressed="true"]{color:#ff6b00}
.ev-ui .ev-listing-fav[aria-pressed="true"] .i{fill:currentColor}
.ev-ui .ev-listing[hidden]{display:none}
.ev-ui .ev-v51-empty{margin:18px 0 0;color:#697b91}
.ev-ui .ev-listing-meta span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Map preview markers carry city names */
.ev-ui a.ev-map-illustration{display:block;color:inherit}
.ev-ui .ev-marker{white-space:nowrap}

/* Discovery cards */
.ev-ui .v5-card strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
.ev-ui .v5-category-card strong{text-transform:lowercase}
.ev-ui .v5-category-card strong::first-letter{text-transform:uppercase}
.ev-ui .ev-v51-ai-card{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:25px}
.ev-ui .ev-v51-ai-actions{display:flex;gap:9px;flex-wrap:wrap}

/* Corporate stores: the symbol slot shows the store logo */
.ev-ui .ev-v51-corp-logo{padding:0;overflow:hidden;background:#fff;border:1px solid #e3e9f1}
.ev-ui .ev-v51-corp-logo img{width:100%;height:100%;object-fit:contain}
.ev-ui .v51-corporate-card strong{overflow-wrap:anywhere}

/* Blog cards */
.ev-ui .v51-card .v51-media{width:100%;aspect-ratio:16/9;object-fit:cover}

/* Footer (keeps id="footer": the catalogue's infinite scroll observes it) */
.ev-v51-footer-root{margin-top:0}
.ev-ui #footer.v5-home-footer{margin-top:0;background:#17283d;color:#dbe4ee}
.ev-ui .v5-home-footer a{text-decoration:none}
.ev-ui .v5-home-footer h3{font-size:16px;font-weight:750;line-height:1.3;margin:0 0 14px}
.ev-ui .v5-home-footer h3 a{display:inline;margin:0;font-size:inherit;color:#fff}
.ev-ui .v5-home-footer .v5-columns>div:nth-child(3) a{text-transform:lowercase}
.ev-ui .v5-home-footer .v5-columns>div:nth-child(3) a::first-letter{text-transform:uppercase}
.ev-v51-footer-about,.ev-v51-footer-about p{font-size:13px;line-height:1.6;opacity:.85;margin:0 0 10px}
.ev-v51-footer-social{display:flex;gap:10px;list-style:none;padding:0;margin:8px 0 0}
.ev-v51-footer-social a{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,.1)}
.ev-v51-newsletter{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding-top:18px;padding-bottom:18px;border-top:1px solid rgba(255,255,255,.12)}
.ev-v51-newsletter h3{margin:0 0 4px}
.ev-v51-newsletter p{margin:0;opacity:.8;font-size:13px}
.ev-v51-newsletter form{display:flex;gap:8px;flex-wrap:wrap}
.ev-v51-newsletter input[type=email]{min-width:240px;min-height:40px;border:0;border-radius:10px;padding:0 12px}
.ev-v51-honeypot{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.ev-v51-footbottom{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}
.ev-v51-footbottom nav{display:flex;gap:14px;flex-wrap:wrap}
.ev-ui .v5-footbottom a{color:inherit}

/* Compare drawer follows the V5.1 palette; the header compare button replaces the floating one */
#toggleCompare{display:none!important}
#compareSidebar{border-radius:16px 0 0 16px;overflow:hidden}
#compareSidebar .card-header{background:#ff6b00!important}
#compareSidebar .card-footer .btn.text-white{background:#ff6b00!important}

/* Phone widths: keep the header actions, footer and the closed compare drawer inside the viewport */
body:has(.ev-v51-chrome){overflow-x:clip}
.ev-v51-footer-social{flex-wrap:wrap}
@media (max-width:480px){
  .ev-ui .ev-header-actions{gap:2px;min-width:0}
  .ev-ui .ev-header-actions .ev-icon-btn{width:34px;height:34px}
  .ev-ui .ev-store-cta{padding:8px 10px;font-size:11px}
}
@media (max-width:400px){
  .ev-ui .ev-header-actions .ev-icon-btn[data-target="#loginModal"]{display:none}
}
@media (max-width:359px){
  .ev-ui .ev-store-cta span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .ev-ui .ev-store-cta .i{display:inline-block}
}
