  @font-face {
    font-family: 'MyFont';
    src: url('../font/vazir/Vazir-Medium.eot') format('woff'),
      url('../font/vazir/Vazir-Medium.woff') format('embedded-opentype'),
      url('../font/vazir/Vazir-Medium.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
  }

  :root {
      --brand-orange: #ff7a0c;
    --brand-green:#128d21;
    --brand-perple:#004b78;
    --panel: #ece9e8;
    --teal: #18a999;
    --danger: #dc3545;
    --nav-h: 70px;
    --nav-h-desktop: 84px;
  }

  html,
  body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  }

  body {
    font-family: MyFont;
    font-size: 15px;
    color: #111;
  }

  /* ---------- Navbar ---------- */
  .topbar {
    background: var(--panel);
    border-bottom: 4px solid var(--brand-orange);
    position: relative;
    min-height: var(--nav-h-desktop);
    flex: 0 0 auto;
  }

  .navbar-toggler {
    border: 0 !important;
    box-shadow: none !important;
    padding: 8px 10px;
  }

  .burger {
    width: 34px;
    height: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .burger span {
    display: block;
    height: 3px;
    border-radius: 2px;
    background: #111;
  }

  .nav-link {
    color: #d15f00 !important;
    font-weight: 600;
  }
.back-button{
  color: white;
    text-decoration: none;
    position: fixed;
    background: #00618f;
    padding: 10px;
    border-radius: 7px;
    font-size: 18px;
}
  .brand-logo {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    border: 5px solid var(--brand-orange);
    background: #fff;
    display: grid;
    place-items: center;
    overflow: hidden;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 10px;
    z-index: 3;
  }

  .brand-logo img {
    width: 76px;
    height: 76px;
    object-fit: contain;
  }

  /* ---------- Layout wrapper ---------- */
  .page {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  /* فضای اصلی زیر navbar */
  .content {
    flex: 1 1 auto;
    display: flex;
     overflow: visible;
  align-items: flex-start;
    justify-content: center;
    padding: 14px 12px;
    
    /* ✅ جلوگیری از اسکرول صفحه */
  }

  /* ---------- Panel (scroll only inside) ---------- */
  .panel {
    width: min(1100px, 100%);
    background: var(--panel);
    border: 3px solid var(--brand-orange);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    padding: 18px 18px 18px;
  max-height: none;
  display: block;
    /* ✅ حداکثر ارتفاع: بسته به viewport */
  
   
   
    overflow: hidden;
  }

  .panel-title {
    font-weight: 900;
    text-align: center;
    margin-bottom: 12px;
    font-size: 28px;
    line-height: 1.2;
    text-shadow: 0 2px 0 rgba(255, 255, 255, .9), 0 4px 10px rgba(0, 0, 0, .08);
    flex: 0 0 auto;
  }

  /* ✅ فرم خودش اسکرول می‌خوره */
  .panel-body {
    overflow-x: hidden;
    /* فقط افقی */
   overflow: visible;


    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* Edge قدیمی */
  }

  .panel-body::-webkit-scrollbar {
    display: none;
    /* Chrome / Safari */
  }

  /* ---------- Wall cards ---------- */
  .wall-card {
    border: 2px solid rgba(0, 0, 0, .25);
    border-radius: 18px;
    background: #bfbfbf;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
  }

  .wall-card:hover {
    transform: translateY(-2px);
  }

  .wall-card.selected {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(24, 169, 153, .18);
  }

  .wall-card .label {
    font-weight: 900;
    color: #111;
    font-size: 44px;
  }

  /* ---------- Inputs ---------- */
  .form-label {
    font-weight: 800;
  }

  .form-control,
  .form-select {
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, .25);
    background: #fff;
    padding-top: 10px;
    padding-bottom: 10px;
    direction: rtl;
  }

  /* ✅ اینجا دیگه فضای خالی رزرو نمی‌کنیم */
  .hidden-block {
    display: none;
  }

  /* validation message */
  .field-error {
    font-size: 12.5px;
    color: var(--danger);
    margin-top: 6px;
    min-height: 16px;
    text-align: right;
  }

  .is-invalid-custom {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .15);
  }

  /* CTA */
  .cta {
 background: var(--brand-perple);
    border: 0;
    color: #fff;
    font-weight: 900;
    border-radius: 7px;
    padding: 8px 18px;
    min-width: 280px;
    font-size: 22px;
}
  a:hover{
    color: #ece9e8;
  }

  @media (max-width: 991.98px) {
    .topbar {
      min-height: var(--nav-h);
    }
.content{
    padding: 14px 70px;
}
    .panel {
      max-height: calc(100vh - var(--nav-h) - 90px);
    }
.nav-item-hide{
    display: none;
}
    .brand-logo {
      width: 90px;
      height: 90px;
      top: 18px;
          border: 3px solid #ff7a0c;
          transform: translateX(-42%);
    }

    .brand-logo img {
      width: 84px;
      height: 84px;
    }

    .panel-title {
      font-size: 25px;
      margin-bottom: 2px;
      margin-top: 12px;
    }

    .wall-card {
      height: 230px;
    }

    .wall-card .label {
      font-size: 42px;
    }

    .mobile-center {
      text-align: center;
    }

    .field-error {
      text-align: center;
    }
  }

  @media (max-width: 575.98px) {
    body {
      font-size: 15px;
    }

    .panel {
      padding: 16px 14px 16px;
    }

    .panel-body {
      padding: 0px 2px 0;
    }
.nav-item-hide{
    display: none;
}
    .wall-card {
      height: 120px;
      border-radius: 16px;
    }

    .wall-card .label {
      font-size: 38px;
    }


    .panel-title {
      font-size: 18px;
      margin-bottom: 10px;
      margin-top: 20px;
    }
  }
    @media (max-width: 575.98px) {
    .content{
      padding: 14px 12px;
    }
    .back-button{
    text-align: center;
    }
    .cta{
          position: absolute;
    bottom: 0;
    }
     .cta {
      width: 97%;
      max-width: 400px;
              border-radius: 10px;
    }
    .panel{
      border: 0;
      box-shadow: 0 0 0;
      border-radius: 0;
    }
    body{
      background-color: var(--panel);
    }
  }
/* ===== DencyHome premium mobile filter redesign ===== */
:root{
  --dh-bg:#f7f3ef;
  --dh-card:#ffffff;
  --dh-text:#192029;
  --dh-muted:#7b8491;
  --dh-line:rgba(25,32,41,.10);
  --dh-shadow:0 16px 45px rgba(29,37,45,.12);
  --dh-orange:#ff7a0c;
  --dh-blue:#004b78;
  --dh-green:#128d21;
}

body{background:linear-gradient(180deg,#fff7f0 0%,#f3efea 100%);color:var(--dh-text)}
.content{align-items:stretch;padding:18px 14px 18px;}
.panel{background:rgba(255,255,255,.72);border:1px solid rgba(255,122,12,.24);box-shadow:var(--dh-shadow);backdrop-filter:blur(14px);padding:0;}
.panel-body{padding:16px;scroll-behavior:smooth;}
.smart-filter-card{max-width:1030px;margin:0 auto;}

.filter-hero{position:relative;overflow:hidden;border-radius:24px;padding:22px 18px;background:linear-gradient(135deg,#102f48 0%,#005c8d 58%,#ff7a0c 150%);color:#fff;box-shadow:0 18px 42px rgba(0,75,120,.25);text-align:right;}
.filter-hero:before{content:"";position:absolute;inset:-70px auto auto -50px;width:180px;height:180px;border-radius:50%;background:rgba(255,255,255,.12)}
.filter-badge{display:inline-flex;align-items:center;gap:8px;padding:7px 12px;border-radius:999px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.22);font-size:13px;font-weight:800;}
.filter-hero h1{position:relative;margin:12px 0 8px;font-size:clamp(22px,4.8vw,34px);font-weight:950;letter-spacing:-.7px;}
.filter-hero p{position:relative;margin:0;color:rgba(255,255,255,.84);font-size:14px;}
.filter-steps{position:relative;display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:16px;}
.filter-steps span{background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);border-radius:14px;padding:9px 6px;text-align:center;font-size:12px;font-weight:800;color:rgba(255,255,255,.86)}
.filter-steps span.active{background:#fff;color:var(--dh-blue)}

.filter-section{background:var(--dh-card);border:1px solid var(--dh-line);border-radius:22px;margin-top:14px;padding:16px;box-shadow:0 10px 24px rgba(0,0,0,.045);}
.compact-section{padding:14px;}
.section-head{display:flex;align-items:center;gap:10px;margin-bottom:14px;text-align:right;}
.section-number{width:36px;height:36px;display:grid;place-items:center;flex:0 0 36px;border-radius:13px;background:linear-gradient(135deg,var(--dh-orange),#ff9b45);color:#fff;font-weight:950;box-shadow:0 8px 18px rgba(255,122,12,.28);}
.section-head h2{font-size:17px;margin:0 0 4px;font-weight:950;}
.section-head small{color:var(--dh-muted);font-size:12.5px;}

.wall-options{direction:rtl;}
.wall-card{height:148px;border:1px solid rgba(0,75,120,.12);border-radius:22px;background:#f4f7fa;padding:7px;position:relative;overflow:hidden;box-shadow:0 8px 22px rgba(0,0,0,.055);transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease,background .18s ease;}
.wall-card img{width:100%!important;height:100%!important;object-fit:cover;border-radius:17px!important;display:block;}
.wall-card:hover{transform:translateY(-3px);box-shadow:0 14px 28px rgba(0,75,120,.14)}
.wall-card.selected{border-color:var(--dh-orange);background:#fff7ee;box-shadow:0 0 0 4px rgba(255,122,12,.13),0 14px 30px rgba(255,122,12,.16);}
.wall-card.selected:after{content:"✓";position:absolute;top:12px;right:12px;width:31px;height:31px;border-radius:50%;display:grid;place-items:center;background:var(--dh-green);color:#fff;font-weight:950;box-shadow:0 8px 18px rgba(18,141,33,.24)}
.wall-count{position:absolute;right:11px;bottom:11px;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.92);backdrop-filter:blur(8px);font-size:12px;font-weight:900;color:var(--dh-blue);box-shadow:0 7px 18px rgba(0,0,0,.10);}

.appliance-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;}
.filter-check{position:absolute!important;opacity:0;pointer-events:none;}
.option-chip,.wide-toggle{cursor:pointer;user-select:none;border:1px solid var(--dh-line);background:#f9fafb;border-radius:18px;min-height:62px;padding:11px 12px;display:flex;align-items:center;justify-content:center;gap:8px;font-weight:900;color:#2b3440;transition:.18s ease;text-align:center;}
.option-chip{flex-direction:column;}
.chip-icon{font-size:21px;line-height:1;}
.filter-check:checked + .option-chip,.filter-check:checked + .wide-toggle{background:linear-gradient(135deg,#fff3e8,#ffffff);border-color:var(--dh-orange);color:var(--dh-blue);box-shadow:0 0 0 4px rgba(255,122,12,.11),0 10px 22px rgba(255,122,12,.12);}
.filter-check:checked + .option-chip:after,.filter-check:checked + .wide-toggle:after{content:"✓";width:23px;height:23px;border-radius:50%;display:grid;place-items:center;background:var(--dh-green);color:#fff;font-size:13px;font-weight:950;}
.wide-toggle{justify-content:space-between;min-height:58px;}
.wide-toggle b{font-size:12px;color:var(--dh-muted);font-weight:800;}

.float-field{text-align:right;margin-bottom:14px;}
.form-label{font-size:13.5px;margin-bottom:8px;color:#253041;}
.input-group{border-radius:16px;box-shadow:0 9px 20px rgba(0,0,0,.045);}
.form-control,.form-select,.input-group-text{border-color:rgba(25,32,41,.12)!important;background:#fff!important;}
.form-control,.form-select{min-height:49px;border-radius:16px!important;font-weight:800;}
.input-group .form-control{border-top-left-radius:0!important;border-bottom-left-radius:0!important;}
.input-group .input-group-text{border-top-right-radius:0!important;border-bottom-right-radius:0!important;color:var(--dh-muted);font-weight:900;}
.form-control:focus,.form-select:focus{border-color:var(--dh-orange)!important;box-shadow:0 0 0 .22rem rgba(255,122,12,.13)!important;}
.field-error{min-height:18px;font-weight:800;}

.filter-submit-bar{position:sticky;bottom:0;z-index:20;padding:12px 0 2px;background:linear-gradient(180deg,rgba(255,255,255,0),rgba(255,255,255,.96) 38%,rgba(255,255,255,.96));}
.cta{width:min(420px,100%);min-width:unset;border-radius:18px;padding:12px 20px;background:linear-gradient(135deg,var(--dh-green),#0b6d17);box-shadow:0 14px 30px rgba(18,141,33,.24);display:flex;align-items:center;justify-content:center;flex-direction:column;line-height:1.25;transition:transform .16s ease,filter .16s ease;}
.cta:hover{transform:translateY(-2px);filter:brightness(1.04)}
.cta span{font-size:20px;font-weight:950;}
.cta small{font-size:11px;opacity:.86;font-weight:700;margin-top:2px;}
.cta.bg-danger{background:linear-gradient(135deg,#dc3545,#b51f2d)!important;}
.cta.bg-success{background:linear-gradient(135deg,var(--dh-green),#0b6d17)!important;}

@media (max-width:991.98px){
  html,body{overflow:hidden;}
  .content{padding:12px;align-items:stretch;}
  .panel{max-height:calc(100vh - var(--nav-h) - 24px);width:100%;border-radius:24px;}
  .panel-body{padding:12px 10px 0;}
  .brand-logo{width:76px;height:76px;top:13px;transform:translateX(-50%)}
  .brand-logo img{width:68px;height:68px;}
  .wall-card{height:128px;}
  .mobile-center{text-align:initial;}
  .field-error{text-align:right;}
}

@media (max-width:575.98px){
  body{background:#f6f1eb;font-size:14px;}
  .topbar{min-height:66px;border-bottom-width:3px;}
  .panel{border:0;border-radius:0;box-shadow:none;background:transparent;max-height:calc(100vh - 66px);}
  .panel-body{padding:10px 10px 0;}
  .filter-hero{border-radius:22px;padding:18px 15px;}
  .filter-hero h1{font-size:22px;}
  .filter-steps span{font-size:11px;padding:8px 3px;}
  .filter-section{border-radius:20px;padding:14px;margin-top:11px;}
  .section-head{align-items:flex-start;}
  .section-head h2{font-size:16px;}
  .appliance-grid{grid-template-columns:repeat(2,1fr);}
  .option-chip{min-height:70px;border-radius:17px;}
  .wall-card{height:112px;border-radius:18px;padding:5px;}
  .wall-card img{border-radius:14px!important;}
  .wall-count{font-size:11px;right:8px;bottom:8px;}
  .filter-submit-bar{margin-inline:-10px;padding:13px 10px 10px;box-shadow:0 -12px 32px rgba(0,0,0,.08);}
  .cta{position:static!important;width:100%;max-width:none;border-radius:16px;}
  .back-button{z-index:50;}
}

/* Fix: optional fields (پنجره/جزیره) must expand the filter panel naturally on mobile.
   Previously the mobile panel had a fixed/max viewport height and hidden overflow,
   so when these fields opened the sticky submit bar jumped upward and the panel-body
   looked like it was collapsing. */
@media (max-width:991.98px){

html,
body{
    overflow-x:hidden;
    overflow-y:auto;
    height:auto;
}

.page,
.content,
.smart-filter-card{
    height:auto;
    min-height:0;
}

.panel{
    height:auto;
    max-height:none;
    overflow:visible;
    display:block;
}

.panel-body{
    height:auto;
    max-height:none;
    overflow:visible;
}

.filter-submit-bar{
    position:relative;
    bottom:auto;
}

}

@media (min-width:992px){

.content{
    align-items:flex-start;
}

.panel{
    display:flex;
    flex-direction:column;
    height:calc(100vh - var(--nav-h-desktop) - 28px);
    max-height:calc(100vh - var(--nav-h-desktop) - 28px);
}

.panel-body{
    flex:1;
    overflow-y:auto;
    min-height:0;
}

.filter-submit-bar{
    position:sticky;
    bottom:0;
    z-index:20;
}

}

@media (max-width: 575.98px) {
  .panel {
    max-height: none !important;
  }

  .filter-submit-bar {
    margin-top: 10px;
  }
}

