/* =========================================================
   TASARLA  MOBILE HEADER (index ile ayn layout)
   Top row: Logo + Search
   Second row: Nav links + (right) Fav + Cart
   ========================================================= */
@media (max-width: 430px){

  /* Yatay kayma olmasn */
  html, body{ overflow-x: hidden; }

  /* Ana grid */
  .site-header .nav-search-bar .nav-search-inner{
    display: grid !important;
    grid-template-columns: auto 1fr auto auto !important;
    grid-template-areas:
      "logo  search search search"
      "nav   nav    fav    cart" !important;
    align-items: center !important;
    gap: 10px 10px !important;
  }

  /* form+fav+cart ayn container iindeydi -> grid item gibi davran */
  .site-header .nav-search-bar .header-actions.header-right{
    display: contents !important;
  }

  /* Grid alanlar */
  .site-header .header-logo{ grid-area: logo !important; }
  .site-header form.header-search-main{ grid-area: search !important; width: 100% !important; margin: 0 !important; }
  .site-header .nav-center{ grid-area: nav !important; min-width: 0 !important; }
  .site-header a.header-fav{ grid-area: fav !important; justify-self: end !important; }
  .site-header button.header-cart{ grid-area: cart !important; justify-self: end !important; }

  /* Logo */
  .site-header .header-logo img{
    height: 26px !important;
    width: auto !important;
    display: block !important;
  }

  /* Search usable */
  .site-header form.header-search-main input{
    height: 40px !important;
    font-size: 14px !important;
    padding: 0 44px 0 14px !important;
  }
  .site-header form.header-search-main button{
    width: 44px !important;
    height: 40px !important;
  }

  /* Nav linkleri: tek satr + swipe */
  .site-header .nav-links{
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none;
    min-width: 0 !important;
  }
  .site-header .nav-links::-webkit-scrollbar{ display:none; }

  /* Mobilde submenu kapat (hover samalamasn) */
  .site-header .nav-submenu{ display: none !important; }

  /* Kalp + Sepet tap alan */
  .site-header .header-icon,
  .site-header .header-cart{
    width: 40px !important;
    height: 40px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 10px !important;
  }
  .site-header .header-icon .ui-ico,
  .site-header .header-cart .ui-ico{
    width: 22px !important;
    height: 22px !important;
  }
}

/* =========================================================
   TASARLA  iPhone Mobile (<=430px) FULL FIX PACK
   ========================================================= */
@media (max-width: 430px){

  /* ---- global: yatay tama olmasn ---- */
  html, body{ overflow-x: hidden; }

  /* =========================================================
     1) HEADER  index ile ayn (logo+search st, nav swipe alt, fav+cart sa)
     ========================================================= */
  .site-header .nav-search-bar .nav-search-inner{
    display: grid !important;
    grid-template-columns: auto 1fr auto auto !important;
    grid-template-areas:
      "logo  search search search"
      "nav   nav    fav    cart" !important;
    align-items: center !important;
    gap: 10px 10px !important;
  }
  .site-header .header-actions.header-right{ display: contents !important; }

  .site-header .header-logo{ grid-area: logo !important; }
  .site-header form.header-search-main{ grid-area: search !important; width:100% !important; margin:0 !important; }
  .site-header .nav-center{ grid-area: nav !important; min-width:0 !important; }
  .site-header a.header-fav{ grid-area: fav !important; justify-self:end !important; }
  .site-header button.header-cart{ grid-area: cart !important; justify-self:end !important; }

  .site-header .header-logo img{ height:26px !important; width:auto !important; display:block !important; }

  .site-header form.header-search-main input{
    height: 40px !important;
    font-size: 14px !important;
    padding: 0 44px 0 14px !important;
  }
  .site-header form.header-search-main button{
    width:44px !important; height:40px !important;
  }

  /* Nav: swipe */
  .site-header .nav-links{
    display:flex !important;
    align-items:center !important;
    gap:14px !important;
    overflow-x:auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width:none;
    min-width:0 !important;
  }
  .site-header .nav-links::-webkit-scrollbar{ display:none; }
  .site-header .nav-submenu{ display:none !important; }

  /* Fav+Cart tap alan */
  .site-header .header-icon,
  .site-header .header-cart{
    width:40px !important;
    height:40px !important;
    display:grid !important;
    place-items:center !important;
    border-radius:10px !important;
  }
  .site-header .header-icon .ui-ico,
  .site-header .header-cart .ui-ico{
    width:22px !important;
    height:22px !important;
  }

  /* =========================================================
     2) DESIGNER TOPBAR  sticky + daha kompakt
     ========================================================= */
  .designer-topbar{
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    background: #fff !important;
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
  }
  .designer-topbar-list{
    gap: 10px !important;
    padding: 10px 12px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none;
  }
  .designer-topbar-list::-webkit-scrollbar{ display:none; }
  .designer-topbar .topbar-item{
    padding: 8px 10px !important;
    border-radius: 10px !important;
    font-size: 12.5px !important;
    white-space: nowrap !important;
  }
  .designer-topbar .topbar-icon{ width:18px !important; height:18px !important; }

  /* =========================================================
     3) MAIN LAYOUT  sidebar altta fixed toolbar, center full, right panel altta stack
     ========================================================= */

  /* Body altna fixed toolbar iin yer a */
  body{
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
  }

  .designer-editor{
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 10px 12px !important;
  }

  /* ---- Sidebar -> Bottom toolbar ---- */
  .designer-sidebar{
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 60 !important;
    background: #fff !important;
    border-top: 1px solid rgba(0,0,0,0.08) !important;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom,0px)) !important;
  }

  /* 4 tool yan yana */
  .designer-sidebar-top{
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 8px !important;
  }
  .designer-tool-btn{
    display:flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 8px 6px !important;
    border-radius: 12px !important;
  }
  .designer-tool-img{ width:22px !important; height:22px !important; }
  .designer-tool-label{ font-size: 11.5px !important; line-height: 1.1 !important; }

  /* Undo/Redo ayn barn altna mini row */
  .designer-sidebar-bottom{
    display:flex !important;
    gap: 10px !important;
    margin-top: 8px !important;
    justify-content: space-between !important;
  }
  .designer-history-btn{
    flex: 1 1 0 !important;
    padding: 10px 10px !important;
    border-radius: 12px !important;
    font-size: 12px !important;
  }
  .designer-history-img{ width:18px !important; height:18px !important; }

  /* ---- Center stage tam genilik ---- */
  .designer-center{ width: 100% !important; }

  .designer-product-stage{
    width: 100% !important;
    border-radius: 18px !important;
    overflow: hidden !important;
  }

  /* rn alann iPhoneda tarmadan gvenli bir ykseklie oturt */
  .designer-product-wrapper{
    width: 100% !important;
    max-height: 54vh !important;
    min-height: 44vh !important;
    position: relative !important;
  }
  .designer-main-product{
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display:block !important;
  }

  /* Canvas overlay */
  #designCanvas.design-canvas{
    position: absolute !important;
    inset: 0 !important;
  }

  /* Views strip: swipe + kk */
  .designer-views-strip{
    display:flex !important;
    gap: 10px !important;
    overflow-x:auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width:none;
    padding: 10px 4px 0 !important;
  }
  .designer-views-strip::-webkit-scrollbar{ display:none; }

  .designer-view-thumb{
    flex: 0 0 auto !important;
    width: 92px !important;
    border-radius: 14px !important;
    padding: 8px !important;
  }
  .designer-view-thumb img{
    width: 100% !important;
    height: 56px !important;
    object-fit: contain !important;
    display:block !important;
  }
  .designer-view-thumb span{
    font-size: 11.5px !important;
    margin-top: 6px !important;
    display:block !important;
    white-space: nowrap !important;
  }

  /* ---- Right panel mobil: alta stack + scroll ---- */
  .designer-right-panel{
    width: 100% !important;
    order: 5 !important;
  }

  .product-info-card,
  .text-editor-card,
  .item-editor-panel{
    border-radius: 18px !important;
  }

  /* Sipari butonu mobilde daha premium */
  .designer-right-footer{
    position: sticky !important;
    bottom: calc(78px + env(safe-area-inset-bottom,0px)) !important;
    background: transparent !important;
    padding-top: 10px !important;
    z-index: 20 !important;
  }
  #btnOrder.designer-cta-btn{
    width: 100% !important;
    min-height: 52px !important;
    border-radius: 14px !important;
    font-size: 16px !important;
  }

  /* =========================================================
     4) PICKER OVERLAYS  mobile full screen + proper stacking
     ========================================================= */
  .product-picker-overlay{
    padding: 0 !important;
  }
  .product-picker-shell{
    width: 100% !important;
    height: 100dvh !important;
    max-width: none !important;
    border-radius: 0 !important;
  }

  /* erik: sidebar + main -> column */
  .product-picker-content{
    display:flex !important;
    flex-direction: column !important;
    height: calc(100dvh - 56px) !important;
    overflow: hidden !important;
  }

  /* Mini store sidebar stte yatay filtre gibi */
  .mini-store-sidebar{
    width: 100% !important;
    max-width: none !important;
    display: block !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 10px 12px !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
  }

  .mini-store-filter-group{
    display:flex !important;
    gap: 10px !important;
  }
  .mini-nav-item{
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  /* Grid: 2 kolon */
  .mini-store-main{
    flex: 1 1 auto !important;
    overflow: auto !important;
    padding: 12px !important;
  }
  .mini-store-grid{
    display:grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  /* Design picker: sidebar stte, grid altta */
  .design-picker-body{
    display:flex !important;
    flex-direction: column !important;
    height: calc(100dvh - 56px) !important;
  }
  .design-picker-sidebar{
    width: 100% !important;
    max-width: none !important;
    border-right: none !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
  }
  .design-picker-main{
    flex: 1 1 auto !important;
    overflow: auto !important;
  }
  .design-grid{
    display:grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    padding: 12px !important;
  }
}
/* =========================================================
   KANO  TASARLA MOBILE LAYOUT (iPhone)
   Fix: her ey her eye giriyor + start modal ok byk
   lgili HTML: .designer-editor / .designer-sidebar / #kanoStartModal
   ========================================================= */

@media (max-width: 480px){

  /* ---------- Genel ak: desktop 3 kolon -> mobil stack ---------- */
  .designer-editor{
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  /* stteki support/save/share bar ok uzuyorsa sktr */
  .designer-topbar{
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
  }
  .designer-topbar-list{
    gap: 10px !important;
    padding: 8px 10px !important;
    justify-content: space-between !important;
  }
  .topbar-item{
    padding: 8px 10px !important;
  }
  .topbar-item .topbar-icon{
    width: 18px !important;
    height: 18px !important;
  }
  /* labellar akma yapyorsa kapat (istersen yorum satr yapp aarsn) */
  .topbar-item span:last-child{
    display: none !important;
  }

  /* ---------- Sol Toolbar -> altta sabit bar ---------- */
  .designer-sidebar{
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 90 !important;

    height: 66px !important;
    background: #fff !important;
    border-top: 1px solid rgba(0,0,0,.10) !important;
    box-shadow: 0 -10px 25px rgba(0,0,0,.10) !important;

    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;

    padding-left: env(safe-area-inset-left) !important;
    padding-right: env(safe-area-inset-right) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
  }

  .designer-sidebar-top{
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-around !important;
    gap: 0 !important;
    padding: 8px 10px !important;
  }

  .designer-tool-btn{
    flex: 1 1 0 !important;
    min-width: 0 !important;
    background: transparent !important;
    border: 0 !important;
    padding: 6px 4px !important;
    border-radius: 12px !important;
  }
  .designer-tool-btn.is-active{
    background: rgba(0,0,0,.06) !important;
  }

  .designer-tool-icon{
    width: 26px !important;
    height: 26px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 4px !important;
  }
  .designer-tool-img{
    width: 22px !important;
    height: 22px !important;
    display: block !important;
  }
  .designer-tool-label{
    display: block !important;
    text-align: center !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Undo/Redo mobilde ok yer kaplyor -> gizle */
  .designer-sidebar-bottom{
    display: none !important;
  }

  /* ---------- Orta rn alan ---------- */
  .designer-center{
    width: 100% !important;
    padding: 10px 12px 0 !important;
    margin: 0 !important;
  }

  .designer-product-stage{
    width: 100% !important;
  }
  .designer-product-wrapper{
    width: 100% !important;
    margin: 0 auto !important;
    position: relative !important;
  }

  /* Canvas/rn katman saa kayma yapyorsa ortala */
  #designCanvas{
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  /* Alt view strip: yatay scroll */
  .designer-views-strip{
    display: flex !important;
    gap: 10px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 10px 0 12px !important;
    margin-bottom: 6px !important;
  }
  .designer-view-thumb{
    flex: 0 0 auto !important;
    min-width: 92px !important;
  }

  /* ---------- Sa paneli alta al (akmay bitir) ---------- */
  .designer-right-panel{
    width: 100% !important;
    margin: 0 !important;
    padding: 0 12px 0 !important;
    position: static !important;
  }

  /* Sayfann altna barlar gelecek: ierik ezilmesin */
  .product-info-panel,
  .text-editor-panel,
  .item-editor-panel{
    margin-bottom: calc(96px + env(safe-area-inset-bottom)) !important;
  }

  /* Sipari Ver butonu: Spreadshirt gibi altta, ama toolbarn stnde */
  .designer-right-footer{
    position: sticky !important;
    bottom: calc(66px + env(safe-area-inset-bottom) + 10px) !important;
    z-index: 40 !important;
    background: linear-gradient(to top, rgba(255,255,255,1), rgba(255,255,255,.85), rgba(255,255,255,0)) !important;
    padding: 14px 0 6px !important;
  }
  .designer-cta-btn{
    width: 100% !important;
    height: 52px !important;
    border-radius: 14px !important;
    font-size: 18px !important;
  }

  /* ---------- Start modal (4 seenek) kompakt olsun ---------- */
  #kanoStartModal .kano-start-modal-card{
    width: 92vw !important;
    max-width: 420px !important;
    max-height: calc(100vh - 120px) !important;
    overflow: auto !important;
    padding: 16px 14px !important;
    border-radius: 18px !important;
  }

  #kanoStartModal #kanoStartModalTitle{
    font-size: 18px !important;
    margin: 6px 0 12px !important;
  }

  #kanoStartModal .kano-start-actions{
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  #kanoStartModal .kano-start-action{
    padding: 14px 10px !important;
    border-radius: 16px !important;
    min-height: 86px !important;
    text-align: center !important;
  }

  #kanoStartModal .kano-start-action-title{
    display: block !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    margin-bottom: 4px !important;
  }

  #kanoStartModal .kano-start-action-sub{
    display: block !important;
    font-size: 12px !important;
    opacity: .75 !important;
  }
}
/* =========================================================
   PATCH v2  TASARLA MOBILE: sidebar solda kalmasn, altta dock olsun
   (yksek specificity + inset ile kesin uygula)
   ========================================================= */
@media (max-width: 600px){

  html, body{ overflow-x: hidden !important; }

  /* Desktop grid/kolon itmelerini tamamen iptal et */
  body .designer-editor{
    display: block !important;
    width: 100% !important;
    padding-bottom: calc(78px + env(safe-area-inset-bottom)) !important; /* alttaki bara yer a */
  }

  /* SOL TOOLBAR -> ALTA SABT BAR (kesin) */
  body .designer-editor > .designer-sidebar{
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;

    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    height: 78px !important;

    margin: 0 !important;
    transform: none !important;

    z-index: 9999 !important;
    background: #fff !important;
    border-top: 1px solid rgba(0,0,0,.12) !important;
    box-shadow: 0 -10px 25px rgba(0,0,0,.10) !important;

    overflow: hidden !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
  }

  /* 4 ikon yatay dzgn dalsn */
  body .designer-editor > .designer-sidebar .designer-sidebar-top{
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-around !important;
    gap: 0 !important;
    padding: 10px 10px 12px !important;
  }

  body .designer-editor > .designer-sidebar .designer-tool-btn{
    flex: 1 1 0 !important;
    min-width: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 14px !important;
    padding: 8px 6px !important;
  }

  body .designer-editor > .designer-sidebar .designer-tool-btn.is-active{
    background: rgba(0,0,0,.06) !important;
  }

  body .designer-editor > .designer-sidebar .designer-tool-icon{
    margin: 0 !important;
    width: 26px !important;
    height: 26px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  body .designer-editor > .designer-sidebar .designer-tool-img{
    width: 22px !important;
    height: 22px !important;
    display: block !important;
  }

  body .designer-editor > .designer-sidebar .designer-tool-label{
    margin: 0 !important;
    font-size: 11px !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
  }

  /* Undo/Redo alan mobilde kapal */
  body .designer-editor > .designer-sidebar .designer-sidebar-bottom{
    display: none !important;
  }

  /* erik soldan itilmeyi braksn (sidebar kolon etkisi tamamen gitsin) */
  body .designer-editor > .designer-center,
  body .designer-editor > .designer-right-panel{
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    max-width: 100% !important;
  }

  /* Tasarm canvas/rn alan ok saa kayyorsa */
  body .designer-editor .designer-product-wrapper{
    margin: 0 auto !important;
  }
}
/* =========================================================
   PATCH v3  Sidebar full-screen olmasn (kesin reset)
   ========================================================= */
@media (max-width: 600px){

  /* Sidebar asla tam ekran olmasn */
  body .designer-editor > .designer-sidebar{
    height: 78px !important;
    min-height: 78px !important;
    max-height: 78px !important;
    overflow: visible !important;
  }

  /* Sidebar iindeki desktop wrapper'lar bytmesin */
  body .designer-editor > .designer-sidebar,
  body .designer-editor > .designer-sidebar *{
    flex: 0 0 auto !important;
  }

  /* Baz base css'ler sidebar'a geni padding veriyor olabilir */
  body .designer-editor > .designer-sidebar{
    padding-top: 0 !important;
    padding-left: env(safe-area-inset-left) !important;
    padding-right: env(safe-area-inset-right) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
  }

  /* Sidebar-top kesin tek satr bar */
  body .designer-editor > .designer-sidebar .designer-sidebar-top{
    height: 78px !important;
    min-height: 78px !important;
    max-height: 78px !important;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom)) !important;
  }

  /* Editor ierii grnr kalsn */
  body .designer-editor > .designer-center{
    display: block !important;
  }
}
/* =========================================================
   PATCH v4  Toolbar/content akmalar + CTA (Sipari Ver) nazikletir
   ========================================================= */
@media (max-width: 600px){

  :root{
    --kano-mobile-dock-h: 78px;
    --kano-mobile-cta-h: 54px;
    --kano-mobile-gap: 12px;
  }

  /* erik, alttaki dock + safe-area kadar boluk braksn */
  body{
    padding-bottom: calc(var(--kano-mobile-dock-h) + env(safe-area-inset-bottom) + 18px) !important;
  }

  /* Orta ierik blm de ayn ekilde yer asn */
  body .designer-editor > .designer-center,
  body .designer-editor > .designer-right-panel{
    padding-bottom: calc(var(--kano-mobile-dock-h) + env(safe-area-inset-bottom) + 18px) !important;
  }

  /* Dock (toolbar) her koulda en altta kalsn */
  body .designer-editor > .designer-sidebar{
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    transform: none !important;
    margin: 0 !important;
    z-index: 9999 !important;
  }

  /* Dock'un stndeki byk beyaz boluu azalt (grntde ok yksek grnmesin) */
  body .designer-editor > .designer-sidebar{
    height: var(--kano-mobile-dock-h) !important;
    min-height: var(--kano-mobile-dock-h) !important;
    max-height: var(--kano-mobile-dock-h) !important;
    border-radius: 16px 16px 0 0 !important;
    background: rgba(255,255,255,.96) !important;
    backdrop-filter: blur(10px);
  }

  /* CTA (Sipari Ver)  Spreadshirt gibi nazik: geni ama daha ince */
  body .designer-right-footer{
    position: sticky !important;
    z-index: 120 !important;
    bottom: calc(var(--kano-mobile-dock-h) + env(safe-area-inset-bottom) + var(--kano-mobile-gap)) !important;
    background: linear-gradient(to top, rgba(255,255,255,1), rgba(255,255,255,.75), rgba(255,255,255,0)) !important;
    padding: 12px 0 6px !important;
  }

  body .designer-cta-btn{
    height: var(--kano-mobile-cta-h) !important;
    border-radius: 14px !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    letter-spacing: .2px !important;
    box-shadow: 0 10px 22px rgba(0,0,0,.12) !important;
  }

  /* View strip kart ile CTA akmasn */
  body .designer-views-strip{
    margin-bottom: calc(var(--kano-mobile-cta-h) + var(--kano-mobile-gap) + 10px) !important;
  }

  /* rn alan grseli biraz daha yukar: CTA + dock yznden boulmasn */
  body .designer-product-stage{
    padding-bottom: 8px !important;
  }
}
/* =========================================================
   PATCH v5  Stage tam otursun + mobilde sadece Sipari Ver kalsn
   ========================================================= */
@media (max-width: 600px){

  /* 1) rn sahnesi: sa/sol krpmay bitir */
  body .designer-center{
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 !important;
    max-width: none !important;
    overflow-x: hidden !important; /* yatay scroll olumasn */
  }

  body .designer-product-stage{
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important; /* krpma olmasn */
  }

  body .designer-product-wrapper{
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: visible !important;
    display: flex !important;
    justify-content: center !important;
    align-items: flex-start !important;
  }

  /* Ana rn grseli: container doldursun ama krpmasn */
  body #designerMainImage.designer-main-product{
    display: block !important;
    width: 100% !important;
    max-width: 520px !important;  /* iPhoneda gzel limit */
    height: auto !important;
    object-fit: contain !important;
    margin: 0 auto !important;
  }

  /* 2) Mobilde rn info kartn tamamen gizle (CTA kalsn) */
  body #productInfoPanel .product-info-card{
    display: none !important;
  }

  body #productInfoPanel{
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* CTA butonunu daha temiz konumla */
  body #productInfoPanel .designer-right-footer{
    padding: 10px 12px 0 !important;
  }

  body #btnOrder.designer-cta-btn{
    width: 100% !important;
  }
}
/* =======================================================================
   KANO  TASARLA (iPhone) Mobile Fix Pack
   - Print area (mavi kesik) kaymasn dzelt
   - rn grseli kesilmesin (92vw)
   - Sol sidebar -> altta dock (Spreadshirt gibi)
   - Sa panel -> sadece Sipari Ver sabit kalsn
   - lk alan 4 seenek modal klt
   ======================================================================= */

@media (max-width: 768px){

  /* Yatay scrollu kesin kapat */
  html, body{ overflow-x: hidden !important; }

  /* -------------------------------------------------------
     1) rn grseli + overlayleri ayn wrappera kilitle
     ------------------------------------------------------- */

  .designer-product-stage{
    padding: 10px 0 0 !important;
  }

  /* Wrapper: inline-block + relative + ortala (kritik) */
  .designer-product-wrapper{
    position: relative !important;
    display: inline-block !important;
    width: min(92vw, 520px) !important;   /* kesilmesin diye 100 deil 92 */
    max-width: 92vw !important;
    margin: 0 auto !important;
  }

  .designer-main-product{
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }

  /* Tasarm katmanlar: wrappera tam otursun (kritik) */
  #designCanvas,
  #kanoGrid,
  #alignGuides,
  #kanoSmartGuides{
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
  }

  /* -------------------------------------------------------
     2) Sidebar (rnler/Dizaynlar/Yaz/Ykle) -> altta dock
     ------------------------------------------------------- */

  .designer-sidebar{
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 72px !important;
    z-index: 3500 !important;
    background: #f7f7f7 !important;
    border-top: 1px solid #e6e6e6 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .designer-sidebar-top{
    display: flex !important;
    width: 100% !important;
    height: 72px !important;
    align-items: center !important;
    justify-content: space-around !important;
  }

  .designer-tool-btn{
    flex: 1 1 0 !important;
    padding: 10px 0 8px !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  .designer-tool-icon img,
  .designer-tool-icon svg{
    width: 28px !important;
    height: 28px !important;
  }

  .designer-tool-label{
    font-size: 12px !important;
    margin-top: 6px !important;
    line-height: 1.1 !important;
  }

  /* Geri al / tekrarla blounu mobilde gizle (ok yer kaplyor) */
  .designer-sidebar-bottom{
    display: none !important;
  }

  /* Dock stne ierik binmesin */
  .designer-editor,
  .designer-center{
    padding-bottom: 88px !important;
  }

  /* -------------------------------------------------------
     3) Sa paneli temizle -> sadece Sipari Ver sabit kalsn
     ------------------------------------------------------- */

  .designer-right{
    position: static !important;
    width: 100% !important;
    padding: 0 !important;
    background: transparent !important;
  }

  /* rn aklamalar / renk vs. mobilde kapat (isteine gre) */
  .designer-right-top,
  .designer-right-body{
    display: none !important;
  }

  /* Sipari Ver sabit bar (dockun stnde) */
  .designer-right-footer{
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 72px !important; /* dock ykseklii */
    z-index: 3490 !important;
    padding: 10px 14px !important;
    background: rgba(255,255,255,0.96) !important;
    border-top: 1px solid #ededed !important;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }

  #btnOrder,
  .designer-cta-btn{
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 auto !important;
    height: 54px !important;
    border-radius: 16px !important;
    font-size: 18px !important;
  }

  /* -------------------------------------------------------
     4) lk alan 4 seenek modal (Balamak iin...) klt
     ------------------------------------------------------- */

  #kanoStartModal .kano-start-modal-card{
    width: min(92vw, 520px) !important;
    padding: 18px 16px !important;
    border-radius: 18px !important;
  }

  #kanoStartModal .kano-start-actions{
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  #kanoStartModal .kano-start-action{
    padding: 14px 12px !important;
    border-radius: 16px !important;
    min-height: 96px !important;
  }

  #kanoStartModal .kano-start-action-title{
    font-size: 15px !important;
  }

  #kanoStartModal .kano-start-action-sub{
    font-size: 12px !important;
    opacity: .65 !important;
  }
}
/* =========================================================
   PATCH v6  Mobilde mavi dashed print-area hizasn dzelt
   (designCanvasi grselin stne birebir bindir)
   ========================================================= */
@media (max-width: 600px){

  /* Grsel + canvas ayn kutunun iinde referanslansn */
  body .designer-product-wrapper{
    position: relative !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: block !important;         /* flexi kapat (kaydran ana sebep) */
    overflow: visible !important;
  }

  /* rn grseli: tam genilikte, krpma yok */
  body #designerMainImage.designer-main-product{
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    position: relative !important;
    z-index: 1 !important;
  }

  /* Canvas: grselin stne birebir otur */
  body #designCanvas.design-canvas{
    position: absolute !important;
    top: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 2 !important;
    pointer-events: auto !important;
  }

  /* Eer ierdeki overlay taarsa, bunu kitle (baz cihazlarda art) */
  body .designer-product-stage{
    overflow-x: hidden !important;
  }
}
/* =========================================================
   KANO  TASARLA (iPhone) Mobile Override v1
   - Header: logo+search stte, nav + heart/cart altta
   - Editor: left sidebar -> bottom toolbar
   - Right panel details hidden, only Order button sticky
   - Canvas overlays pinned to product image wrapper (fix dashed area)
   ========================================================= */

@media (max-width: 480px){

  /* ---------- HEADER ---------- */
  .utility-bar{ display:none !important; } /* stteki sipari takip/yards/giri barn mobilde kaldr */

  .site-header{ position:sticky; top:0; z-index:2000; background:#fff; }
  .nav-center{
    display:flex !important;
    flex-wrap:wrap !important;
    align-items:center !important;
    gap:10px !important;
    padding:10px 12px !important;
  }

  /* 1. satr: logo + search */
  .nav-left{ flex:0 0 auto !important; }
  .nav-left .logo{ display:block; }
  .nav-search{
    flex:1 1 auto !important;
    min-width:0 !important;
  }
  .nav-search input{ width:100% !important; }

  /* 2. satr: nav linkler + heart/cart ayn satr */
  .nav-links{
    flex:1 1 auto !important;
    min-width:0 !important;
    order:3 !important;
    display:flex !important;
    gap:18px !important;
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch !important;
    white-space:nowrap !important;
    padding:6px 0 0 !important;
  }
  .nav-links::-webkit-scrollbar{ display:none; }

  .nav-right{
    flex:0 0 auto !important;
    order:4 !important;
    display:flex !important;
    gap:14px !important;
    align-items:center !important;
    padding:6px 0 0 !important;
  }
  .nav-right a, .nav-right button{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
  }

  /* Tasarla iindeki extra topbar (telefon/indir/payla/fullscreen) ok kartryor */
  .designer-topbar{ display:none !important; }

  /* ---------- LAYOUT RESET ---------- */
  .designer-editor{
    display:block !important;
    width:100% !important;
  }

  /* Desktop'taki sa/sol kolonlarn yer kaplamasn sfrla */
  .designer-center{
    width:100% !important;
    margin:0 !important;
    padding:0 12px !important;
  }

  /* ---------- BOTTOM TOOLBAR (sol sidebar -> alt bar) ---------- */
  .designer-sidebar{
    position:fixed !important;
    left:0 !important;
    right:0 !important;
    bottom:0 !important;
    top:auto !important;
    width:auto !important;
    height:84px !important;
    background:#fff !important;
    z-index:2500 !important;
    border-top:1px solid rgba(0,0,0,.08) !important;
    box-shadow:0 -10px 30px rgba(0,0,0,.08) !important;
    display:block !important;
  }

  .designer-sidebar-bottom{ display:none !important; } /* undo/redo blou mobilde kapat */

  .designer-sidebar-top{
    height:84px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:space-around !important;
    gap:6px !important;
    padding:10px 10px 12px !important;
  }

  .designer-tool-btn{
    flex:1 1 0 !important;
    min-width:0 !important;
    padding:8px 6px !important;
    border-radius:14px !important;
  }

  .designer-tool-icon{ display:flex !important; justify-content:center !important; }
  .designer-tool-img{
    width:26px !important;
    height:26px !important;
  }
  .designer-tool-label{
    display:block !important;
    text-align:center !important;
    font-size:12px !important;
    margin-top:6px !important;
    line-height:1.05 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }

  /* ---------- ORDER BUTTON (sticky) ---------- */
  /* sa panel iindeki aklamalar gizle, sadece buton kalsn */
  .product-info-card{ display:none !important; }

  /* footer' fixed yap */
  .designer-right-footer{
    position:fixed !important;
    left:12px !important;
    right:12px !important;
    bottom:96px !important; /* 84px toolbar + 12px gap */
    z-index:2600 !important;
    background:transparent !important;
    padding:0 !important;
    margin:0 !important;
  }
  #btnOrder.designer-cta-btn{
    width:100% !important;
    height:56px !important;
    border-radius:16px !important;
    font-size:18px !important;
  }

  /* Right panelin kendi kolon davrann bozmasn diye normal akta tut */
  .designer-right-panel{
    position:static !important;
    width:auto !important;
    height:auto !important;
    padding:0 !important;
    margin:0 !important;
  }

  /* ---------- PRODUCT STAGE + CANVAS OVERLAY FIX ---------- */
  .designer-product-stage{
    width:100% !important;
    display:flex !important;
    justify-content:center !important;
    align-items:flex-start !important;
    overflow:visible !important;
    padding-top:10px !important;
  }

  .designer-product-wrapper{
    width:100% !important;
    max-width:420px !important; /* iPhoneda ideal */
    margin:0 auto !important;
    position:relative !important;
    height:auto !important;
    overflow:visible !important;
  }

  #designerMainImage{
    display:block !important;
    width:100% !important;
    height:auto !important;
    max-width:100% !important;
  }

  /* overlay katmanlarn image wrappera kilitle */
  #designCanvas,
  #kanoGrid,
  #alignGuides{
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    height:100% !important;
  }

  /* canvas iinde retilen eyler (fabric, svg vs) 100% otursun */
  #designCanvas canvas,
  #designCanvas svg{
    width:100% !important;
    height:100% !important;
    display:block !important;
  }

  /* readout vs mobilde kapat */
  #kanoPosReadout{ display:none !important; }

  /* ---------- VIEWS STRIP ---------- */
  .designer-views-strip{
    margin-top:10px !important;
    margin-bottom:170px !important; /* order btn + bottom toolbar akmasn */
    overflow-x:auto !important;
    -webkit-overflow-scrolling:touch !important;
  }

  /* Sayfann ieriine ekstra alt boluk ver ki fixed barlar ierii kapatmasn */
  body{
    padding-bottom:190px !important;
  }
}

@media (max-width: 480px){
  .designer-product-wrapper{ position:relative !important; }
  #designCanvas{ position:absolute !important; transform:none !important; }
  #designerMainImage{ display:block; max-width:100%; height:auto; margin:0 auto; }
}
/* =======================================================================
   KANO  TASARLA Mobile Bottom-Sheet Panel Patch (v1)
   Paste this at the VERY BOTTOM of mobile_overrides_iphone1.css (or your v7).
   Requires tasarla.js patch that toggles: body.kano-sheet-open
   ======================================================================= */

@media (max-width: 900px){
  /* Right panel becomes a collapsible bottom sheet */
  .designer-right-panel{
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(var(--kano-bottom-nav-h, 72px) + env(safe-area-inset-bottom, 0px)) !important;
    top: auto !important;
    width: 100% !important;

    /* CLOSED state: only a small grab-area shows */
    transform: translateY(calc(100% - 56px)) !important;
    transition: transform .22s ease !important;

    background: #ffffff !important;
    border-top: 1px solid rgba(0,0,0,.08) !important;
    border-radius: 18px 18px 0 0 !important;
    box-shadow: 0 -10px 26px rgba(0,0,0,.10) !important;
    z-index: 9990 !important;

    /* IMPORTANT: keep it from taking layout space */
    margin: 0 !important;
  }

  /* OPEN state */
  body.kano-sheet-open .designer-right-panel{
    transform: translateY(0) !important;
  }

  /* Grab handle button injected by JS */
  #kanoSheetHandle{
    width: 100% !important;
    border: 0 !important;
    background: transparent !important;
    padding: 10px 0 6px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent !important;
  }
  #kanoSheetHandle span{
    display: block !important;
    width: 44px !important;
    height: 5px !important;
    border-radius: 999px !important;
    background: rgba(0,0,0,.22) !important;
  }

  /* Limit panel height so canvas ALWAYS stays visible */
  .designer-right-panel > .designer-panel,
  #productInfoPanel,
  #itemEditorPanel,
  #textEditorPanel{
    max-height: 46vh !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Slightly tighter paddings on mobile */
  #itemEditorPanel, #textEditorPanel, #productInfoPanel{
    padding: 14px 14px 18px !important;
  }

  /* Avoid huge empty spaces inside editor cards */
  #textEditorPanel textarea,
  #textEditorPanel input[type="text"],
  #itemEditorPanel input[type="text"],
  #itemEditorPanel input[type="number"],
  #itemEditorPanel select,
  #textEditorPanel select{
    max-width: 100% !important;
  }
}

/* =======================================================================
   KANO  MOBILE BOTTOM SHEET (Spreadshirt-like)  v15
   Paste THIS at the VERY BOTTOM of mobile_overrides_iphone1.css
   Works with tasarla_v15_mobile_sheet_fix.js
   ======================================================================= */

:root{
  --kano-safe-bottom: env(safe-area-inset-bottom, 0px);
  --kano-bottom-nav-h: 92px;
  --kano-orderbar-h: 72px;
}

@media (max-width: 820px){

  body.kano-mobile-has-orderbar{
    padding-bottom: calc(var(--kano-bottom-nav-h) + var(--kano-orderbar-h) + var(--kano-safe-bottom) + 10px) !important;
  }

  /* Hide the original right panel on mobile (we re-render panels as sheet) */
  .designer-right-panel{
    display: none !important;
  }

  /* Order action bar */
  #kanoMobileOrderBar{
    position: fixed;
    left: 0; right: 0;
    bottom: calc(var(--kano-bottom-nav-h) + var(--kano-safe-bottom));
    z-index: 2147483000;
    pointer-events: none;
  }
  #kanoMobileOrderBar .kano-order-inner{
    pointer-events: auto;
    max-width: 560px;
    margin: 0 auto;
    padding: 10px 12px;
  }
  #kanoMobileOrderBar .kano-order-inner #btnOrder{
    width: 100% !important;
    border-radius: 16px !important;
  }

  /* Bottom sheet */
  #kanoMobileSheet{
    position: fixed;
    left: 0; right: 0;
    bottom: calc(var(--kano-bottom-nav-h) + var(--kano-orderbar-h) + var(--kano-safe-bottom));
    z-index: 2147482990;
    transform: translateY(110%);
    transition: transform .22s ease;
    max-height: min(58vh, 560px);
    pointer-events: none;
  }
  body.kano-mobile-sheet-open #kanoMobileSheet{
    transform: translateY(0);
    pointer-events: auto;
  }

  #kanoMobileSheet .kano-sheet-card{
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -14px 38px rgba(0,0,0,.12);
    overflow: hidden;
    max-height: inherit;
  }
  #kanoMobileSheet .kano-sheet-handle{
    width: 46px;
    height: 5px;
    border-radius: 999px;
    background: rgba(0,0,0,.18);
    margin: 10px auto 8px;
  }
  #kanoMobileSheet .kano-sheet-inner{
    padding: 10px 12px 14px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(min(58vh, 560px) - 26px);
  }

  /* Panels inside sheet should behave like normal blocks */
  #kanoMobileSheet #productInfoPanel,
  #kanoMobileSheet #textEditorPanel,
  #kanoMobileSheet #itemEditorPanel{
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    box-shadow: none !important;
    border: 0 !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* You previously hid product card  re-enable it inside the sheet */
  #kanoMobileSheet #productInfoPanel .product-info-card{
    display: block !important;
  }

  /* Make big forms easier on mobile */
  #kanoMobileSheet input,
  #kanoMobileSheet select,
  #kanoMobileSheet textarea{
    font-size: 16px !important; /* prevents iOS zoom */
  }
}

/* =======================================================================
   KANO HOTFIX (2026-01-19) — Sipariş Ver görünmüyor fix
   Neden: Dosyanın altındaki v15 "bottom sheet" bölümü .designer-right-panel {display:none}
   yapıyor. JS tarafında orderbar inject edilmediği için buton kayboluyor.
   Çözüm: v15'i mobilde devre dışı bırak + klasik fixed CTA + fixed views strip.
   ======================================================================= */

@media (max-width: 820px){
  /* v15 bottom-sheet'i kapat (JS yoksa buton kayboluyor) */
  .designer-right-panel{ display: block !important; }
  #kanoMobileOrderBar{ display: none !important; }
  #kanoMobileSheet{ display: none !important; }
}

@media (max-width: 520px){
  :root{
    --kano-safe-bottom: env(safe-area-inset-bottom, 0px);
    --kano-bottom-toolbar-h: 78px; /* Ürünler/Dizaynlar/Yazı/Yükle barı */
    --kano-cta-h: 64px;           /* Sipariş Ver alanı (yaklaşık) */
    --kano-gap: 10px;
  }

  /* Alt sabit yığın için sayfaya pay bırak */
  body{
    padding-bottom: calc(var(--kano-bottom-toolbar-h) + var(--kano-cta-h) + 92px + var(--kano-safe-bottom) + 22px) !important;
  }

  /* 1) Sipariş Ver — her zaman görünür (toolbar'ın üstünde) */
  #btnOrder,
  #btnOrder.designer-cta-btn{
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: calc(var(--kano-bottom-toolbar-h) + var(--kano-safe-bottom) + var(--kano-gap)) !important;
    width: min(420px, calc(100% - 24px)) !important;
    z-index: 2147483600 !important;
    display: block !important;
  }

  /* Sağ panel footer akışını bozmasın */
  .designer-right-footer{
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
  }

  /* 2) Ön/Arka/Sol/Sağ Yüz strip — Sipariş Ver'in üstünde sabit */
  body .designer-views-strip{
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(var(--kano-bottom-toolbar-h) + var(--kano-cta-h) + var(--kano-safe-bottom) + (var(--kano-gap) * 2)) !important;

    z-index: 2147483500 !important;
    margin: 0 !important;
    padding: 10px 12px 12px !important;

    background: rgba(255,255,255,.96) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);

    border-top: 1px solid rgba(0,0,0,.08) !important;
    box-shadow: 0 -10px 24px rgba(0,0,0,.10) !important;

    display: flex !important;
    gap: 12px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  body .designer-views-strip::-webkit-scrollbar{ display:none !important; }

  /* 3) Görsel alanına ekstra alt margin ekleme (bounce yapmasın) */
  body .designer-product-stage,
  body .designer-center{ margin-bottom: 0 !important; padding-bottom: 0 !important; }
}

/* =======================================================================
   KANO HOTFIX (2026-01-19) — Mobile fixed stack (Views + CTA)
   Fixes: "Sipariş Ver" invisible due to v15 sheet hiding .designer-right-panel
   Strategy:
   - Re-enable .designer-right-panel (disable v15) on small screens
   - Keep bottom toolbar (designer-sidebar) fixed
   - Keep view strip fixed above CTA
   - Keep CTA fixed above bottom toolbar
   ======================================================================= */

@media (max-width: 820px){
  /* Disable v15 sheet UI if its JS isn't running */
  .designer-right-panel{ display: block !important; }
  #kanoMobileOrderBar, #kanoMobileSheet{ display: none !important; }
}

@media (max-width: 520px){
  :root{
    --kano-safe-bottom: env(safe-area-inset-bottom, 0px);
    --kano-bottom-toolbar-h: 78px;   /* Ürünler/Dizaynlar/Yazı/Yükle barı */
    --kano-cta-gap: 10px;
    --kano-cta-h: 64px;             /* Sipariş Ver blok yüksekliği (yaklaşık) */
  }

  /* Sayfa içeriği fixed barların altına girmesin */
  body{
    padding-bottom: calc(var(--kano-bottom-toolbar-h) + var(--kano-cta-h) + 86px + var(--kano-safe-bottom) + 18px) !important;
  }

  /* 1) Sipariş Ver — her zaman görünür (fixed) */
  #btnOrder{
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: calc(var(--kano-bottom-toolbar-h) + var(--kano-safe-bottom) + var(--kano-cta-gap)) !important;
    width: min(420px, calc(100% - 24px)) !important;
    z-index: 2147483600 !important;
    box-shadow: 0 14px 34px rgba(0,0,0,.18) !important;
  }

  /* Butonun kendi container'ı fixed ile kavga etmesin */
  .designer-right-footer{
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
  }

  /* 2) Ön/Arka/Sol/Sağ şeridi — CTA'nın üstüne sabitle */
  body .designer-views-strip{
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(var(--kano-bottom-toolbar-h) + var(--kano-safe-bottom) + var(--kano-cta-gap) + var(--kano-cta-h) + 12px) !important;

    z-index: 2147483500 !important;

    margin: 0 !important;
    padding: 10px 12px 12px !important;

    background: rgba(255,255,255,.96) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,.08) !important;
    box-shadow: 0 -10px 24px rgba(0,0,0,.10) !important;

    display: flex !important;
    gap: 12px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  body .designer-views-strip::-webkit-scrollbar{ display: none !important; }

  /* Şerit daha kompakt olsun */
  body .designer-views-strip .designer-view-thumb{
    flex: 0 0 auto !important;
    min-width: 92px !important;
    padding: 8px 10px !important;
  }
  body .designer-views-strip .designer-view-thumb img{
    width: 44px !important;
    height: 44px !important;
    object-fit: contain !important;
  }
  body .designer-views-strip .designer-view-thumb span{
    font-size: 12px !important;
    line-height: 1.1 !important;
    margin-top: 6px !important;
    white-space: nowrap !important;
  }

  /* Views strip artık akıştan çıktığı için eski ekstra boşlukları sıfırla */
  body .designer-product-stage,
  body .designer-center{
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
  }
}

/* =======================================================================
   KANO FINAL HOTFIX (2026-01-19)
   Problems:
   1) "Sipariş Ver" not visible on iPhone because older mobile sheet patches
      can hide/move the right panel / footer.
   2) Fixed "Ön/Arka/Sol/Sağ" strip overlaps the start modal.
   Fix:
   - Hard-disable ALL bottom-sheet experiments on mobile.
   - Force #btnOrder to be a fixed CTA above the bottom toolbar.
   - Force views strip to be fixed ABOVE the CTA.
   - When the start modal is open (body.kano-modal-open), hide both CTA + views strip.
   ======================================================================= */

@media (max-width: 900px){
  /* Kill any sheet UI remnants (v1/v15 experiments) */
  #kanoMobileOrderBar,
  #kanoMobileSheet,
  #kanoSheetHandle{ display: none !important; }

  body.kano-mobile-sheet-open #kanoMobileSheet{ display:none !important; }
  body.kano-mobile-sheet-open #kanoMobileOrderBar{ display:none !important; }

  /* Never hide the real panel on mobile (some patches did display:none) */
  body .designer-right-panel{
    display: block !important;
    position: static !important;
    transform: none !important;
  }
}

@media (max-width: 520px){
  :root{
    --kano-safe-bottom: env(safe-area-inset-bottom, 0px);
    --kano-bottom-toolbar-h: 78px; /* Ürünler/Dizaynlar/Yazı/Yükle */
    --kano-cta-h: 64px;            /* Sipariş Ver (yaklaşık) */
    --kano-gap: 10px;
  }

  /* Leave room for: bottom toolbar + CTA + views strip */
  body{
    padding-bottom: calc(var(--kano-bottom-toolbar-h) + var(--kano-cta-h) + 96px + var(--kano-safe-bottom) + 18px) !important;
  }

  /* CTA (Sipariş Ver) — FORCE visible */
  body #btnOrder{
    position: fixed !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    bottom: calc(var(--kano-bottom-toolbar-h) + var(--kano-safe-bottom) + var(--kano-gap)) !important;
    width: min(420px, calc(100% - 24px)) !important;
    height: 56px !important;
    border-radius: 16px !important;
    z-index: 2147483600 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  /* The footer container must not interfere */
  body .designer-right-footer{
    position: static !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: 0 !important;
  }

  /* Views strip — fixed ABOVE CTA */
  body .designer-views-strip{
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(var(--kano-bottom-toolbar-h) + var(--kano-safe-bottom) + var(--kano-gap) + var(--kano-cta-h) + 12px) !important;
    z-index: 2147483500 !important;

    margin: 0 !important;
    padding: 10px 12px 12px !important;
    background: rgba(255,255,255,.96) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,.08) !important;
    box-shadow: 0 -10px 24px rgba(0,0,0,.10) !important;

    display: flex !important;
    gap: 12px !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  body .designer-views-strip::-webkit-scrollbar{ display:none !important; }

  /* IMPORTANT: When start modal is open, do NOT overlap it */
  body.kano-modal-open #btnOrder,
  body.kano-modal-open .designer-views-strip{
    display: none !important;
  }
}

/* =======================================================================
   KANO v17 (2026-01-19) — iPhone FIXED STACK
   Goal (as requested):
   - Keep "Ön/Arka/Sol/Sağ" strip fixed just ABOVE the bottom toolbar
   - Keep bottom toolbar (Ürünler/Dizaynlar/Yazı/Yükle) fixed ABOVE "Sipariş Ver"
   - Keep "Sipariş Ver" fixed at the VERY bottom (safe-area aware)
   - Do NOT overlap the start modal
   - Works even if right-panel gets hidden (we move #btnOrder to body via JS)
   Requires JS patch: KANO v17 mobile fixed stack (added to tasarla.js)
   ======================================================================= */

:root{
  --kano-safe-bottom: env(safe-area-inset-bottom, 0px);
  --kano-mobile-cta-h: 64px;      /* CTA bar total visual height (approx) */
  --kano-mobile-toolbar-h: 78px;  /* bottom tool bar height */
}

@media (max-width: 520px){

  /* 0) Kill any old sheet transforms that can break position:fixed on iOS */
  html, body{ transform: none !important; }
  body .designer-right-panel,
  body #productInfoPanel,
  body .designer-panel,
  body .designer-right-footer{
    transform: none !important;
    position: static !important;
  }

  /* 1) Reserve space so content never hides under fixed bars */
  body{
    padding-bottom: calc(var(--kano-safe-bottom) + var(--kano-mobile-cta-h) + var(--kano-mobile-toolbar-h) + 120px) !important;
  }

  /* 2) Bottom toolbar sits ABOVE CTA (we move it up) */
  body .designer-sidebar{
    bottom: calc(var(--kano-safe-bottom) + var(--kano-mobile-cta-h)) !important;
    height: var(--kano-mobile-toolbar-h) !important;
  }

  /* 3) Fixed Views Bar container (JS injects + moves .designer-views-strip inside) */
  #kanoMobileViewsBar{
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(var(--kano-safe-bottom) + var(--kano-mobile-cta-h) + var(--kano-mobile-toolbar-h)) !important;
    z-index: 2147483000 !important;
    padding: 10px 12px 12px !important;
    background: rgba(255,255,255,.96) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,.08) !important;
    box-shadow: 0 -10px 24px rgba(0,0,0,.10) !important;
  }

  /* The strip itself (now inside kanoMobileViewsBar) */
  #kanoMobileViewsBar .designer-views-strip{
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
  }

  /* 4) Fixed CTA bar container (JS injects + moves #btnOrder inside) */
  #kanoMobileCtaBar{
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 2147483100 !important;
    padding: 10px 12px calc(12px + var(--kano-safe-bottom)) !important;
    background: rgba(255,255,255,.98) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,.08) !important;
    box-shadow: 0 -12px 28px rgba(0,0,0,.12) !important;
    pointer-events: none !important; /* only the button is clickable */
  }

  #kanoMobileCtaBar #btnOrder{
    pointer-events: auto !important;
    width: min(420px, calc(100% - 24px)) !important;
    margin: 0 auto !important;
    height: 56px !important;
    border-radius: 16px !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  /* 5) Start modal open => hide fixed bars completely (no ugly overlap) */
  body.kano-modal-open #kanoMobileViewsBar,
  body.kano-modal-open #kanoMobileCtaBar{
    display: none !important;
  }
}

@media (max-width: 520px){
  /* While dragging on canvas, prevent page scrolling (iOS) */
  body.kano-canvas-dragging{ overflow: hidden !important; }
  #designCanvas, #designCanvas canvas{ touch-action: none !important; }
  .designer-product-stage{ overscroll-behavior: contain !important; }
}

/* =======================================================================
   KANO v18 (2026-01-19) — MOBILE SINGLE DOCK (Spreadshirt-like)
   - One bottom dock: Add / Product / Save / Order
   - Add opens (Design/Text/Upload) menu
   - Product opens Print Areas (Views strip)
   - Selected item action bars are DESKTOP only
   ======================================================================= */

@media (max-width: 820px){
  /* Kill legacy stacked bars/sheets if they exist */
  #kanoMobileCtaBar,
  #kanoMobileViewsBar,
  #kanoMobileOrderBar,
  #kanoMobileSheet,
  #kanoSheetHandle,
  #kanoMobileOrderSlot{ display:none !important; }

  /* Desktop-only: selected item panels/toolbars */
  #itemEditorPanel,
  .text-layer-actions{ display:none !important; }

  /* Hide the old bottom tools row; we render our own dock */
  .designer-sidebar .designer-sidebar-top,
  .designer-sidebar .designer-sidebar-bottom{ display:none !important; }

  /* Make room for dock + safe area */
  body.kano-v18-mobile-dock{
    padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
  }

  /* Backdrop (closes sheets on tap) */
  #kanoDockBackdrop{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.28);
    z-index: 9998;
    display:none;
  }

  /* Dock */
  #kanoMobileDock{
    position: fixed;
    left: 0; right: 0;
    bottom: 0;
    z-index: 9999;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0,0,0,.08);
  }
  #kanoMobileDock .kano-dock-row{
    display:grid;
    grid-template-columns: 1fr 1fr 1fr 1.25fr;
    gap: 10px;
    align-items: stretch;
  }

  #kanoMobileDock .kano-dock-btn,
  #kanoMobileDock #btnOrder{
    height: 56px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,.10);
    background: #fff;
    color: #111;
    font-weight: 700;
    font-size: 15px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap: 8px;
    -webkit-tap-highlight-color: transparent;
  }

  /* Order = primary */
  #kanoMobileDock .kano-order-slot #btnOrder{
    border: 0;
    background: #0aa37f;
    color: #fff;
    font-weight: 800;
  }

  /* Force btnOrder to behave like a normal button inside dock */
  #btnOrder{
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  /* Sheets */
  .kano-dock-sheet{
    position: fixed;
    left: 0; right: 0;
    bottom: calc(92px + env(safe-area-inset-bottom));
    z-index: 9999;
    transform: translateY(120%);
    transition: transform .22s ease;
    padding: 10px;
  }
  body.kano-add-open #kanoAddSheet,
  body.kano-product-open #kanoProductSheet{
    transform: translateY(0);
  }
  .kano-sheet-card{
    background: rgba(255,255,255,.98);
    border: 1px solid rgba(0,0,0,.10);
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0,0,0,.16);
    overflow:hidden;
  }
  .kano-sheet-grid{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 12px;
  }
  .kano-sheet-btn{
    height: 54px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,.10);
    background:#fff;
    font-weight:700;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
  }

  /* Put the existing views strip into our product sheet and make it compact */
  #kanoProductViewsMount .designer-views-strip{
    position: static !important;
    margin: 0 !important;
    padding: 12px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  #kanoProductViewsMount .designer-views-strip .designer-view-thumb{
    border-radius: 14px !important;
    background: rgba(0,0,0,.03) !important;
  }

  /* In case the original strip was styled as sticky/fixed elsewhere */
  .designer-views-strip{
    top:auto !important;
    bottom:auto !important;
    left:auto !important;
    right:auto !important;
    transform:none !important;
    z-index:auto !important;
  }
}

/* =======================================================================
   KANO v18 (2026-01-19) — MOBILE SINGLE DOCK (Spreadshirt-like)
   - One bottom dock: Add / Product / Save / Order
   - Add opens (Design/Text/Upload) menu
   - Product opens Print Areas (Views strip)
   - Selected item action bars are DESKTOP only
   ======================================================================= */

@media (max-width: 820px){
  /* ---- 1) Hide "selected item" action bars on mobile (desktop keeps) ---- */
  #itemEditorPanel,
  .text-layer-actions{
    display: none !important;
  }

  /* ---- 2) Hide old stacked fixed bars from previous experiments ---- */
  #kanoMobileCtaBar,
  #kanoMobileViewsBar,
  #kanoMobileOrderBar,
  #kanoMobileSheet,
  #kanoSheetHandle{
    display: none !important;
  }

  /* Keep original side tool buttons in DOM but not visible (we trigger them via JS) */
  .designer-sidebar{
    display: none !important;
  }

  /* Ensure the order button is not absolute/fixed anymore (it's inside the dock now) */
  #btnOrder{
    position: static !important;
    inset: auto !important;
    transform: none !important;
    width: 100% !important;
    margin: 0 !important;
    height: 54px !important;
    border-radius: 14px !important;
  }

  body.kano-v18-mobile-dock{
    /* make room for the dock */
    padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
    overscroll-behavior: none;
  }

  /* Backdrop */
  #kanoDockBackdrop{
    position: fixed;
    left: 0; right: 0; top: 0; bottom: 0;
    background: rgba(0,0,0,.18);
    z-index: 9997;
    display: none;
  }

  /* Dock */
  #kanoMobileDock{
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: #fff;
    border-top: 1px solid rgba(0,0,0,.08);
    z-index: 9999;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.25fr;
    gap: 10px;
    align-items: center;
  }

  #kanoMobileDock .kanoDockBtn,
  #kanoMobileDock .kanoDockOrderSlot > button{
    -webkit-tap-highlight-color: transparent;
    appearance: none;
    border: 1px solid rgba(0,0,0,.10);
    background: #fff;
    color: #111;
    height: 54px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 10px;
    box-shadow: 0 10px 22px rgba(0,0,0,.06);
  }

  #kanoMobileDock .kanoDockBtn:active{ transform: translateY(1px); }

  #kanoMobileDock .kanoDockBtn .ico{
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
  }

  /* Order is primary */
  #kanoMobileDock .kanoDockOrderSlot > button{
    border: none !important;
    background: #10a37f !important;
    color: #fff !important;
    box-shadow: 0 14px 28px rgba(16,163,127,.28);
    font-size: 18px !important;
    letter-spacing: .2px;
  }

  /* Sheets */
  .kanoDockSheet{
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(92px + env(safe-area-inset-bottom));
    padding: 12px;
    background: #fff;
    border-top: 1px solid rgba(0,0,0,.08);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -14px 30px rgba(0,0,0,.10);
    z-index: 9998;
    transform: translateY(120%);
    transition: transform .22s ease;
  }

  body.kano-add-open #kanoAddSheet{ transform: translateY(0); }
  body.kano-product-open #kanoProductSheet{ transform: translateY(0); }

  .kanoDockSheetTitle{
    font-size: 13px;
    font-weight: 800;
    color: rgba(0,0,0,.55);
    margin: 2px 2px 10px;
  }

  .kanoDockGrid3{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .kanoDockGrid3 button,
  .kanoDockGrid1 button{
    height: 54px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,.10);
    background: #fff;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  .kanoDockGrid3 button:active,
  .kanoDockGrid1 button:active{ transform: translateY(1px); }

  .kanoDockGrid1{ display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 12px; }

  /* Views strip inside the product sheet (keeps original markup) */
  #kanoProductSheet .designer-views-strip{
    margin-top: 6px !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    overflow: visible !important;
  }

  #kanoProductSheet .designer-views-strip-inner{
    gap: 10px !important;
  }

  #kanoProductSheet .designer-view-thumb{
    background: #fff !important;
    border: 1px solid rgba(0,0,0,.10) !important;
    border-radius: 16px !important;
    padding: 10px 8px !important;
    min-width: 0 !important;
  }

  /* When dock is active, keep page from fighting scroll too much */
  .kano-canvas-dragging{
    overflow: hidden !important;
    touch-action: none !important;
  }
}


/* =========================================================
   KANO v19 — Mobile Dock UI (Spreadshirt-style)
   - Hide legacy mobile toolbars/panels
   - Single fixed dock + bottom sheets
   ========================================================= */

@media (max-width: 820px){
  /* Activate only when JS adds class */
  body.kano-v18-mobile-dock{
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  /* Fix the editor area between header and dock */
  body.kano-v18-mobile-dock .designer-editor{
    position: fixed !important;
    top: var(--kano-top-h, 140px) !important;
    left: 0 !important;
    right: 0 !important;
    bottom: calc(var(--kano-dock-h, 76px) + env(safe-area-inset-bottom)) !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  body.kano-v18-mobile-dock .designer-center{
    height: 100% !important;
    max-height: 100% !important;
    overflow: hidden !important;
  }

  /* Hide legacy toolbars/sidebar on mobile dock mode */
  body.kano-v18-mobile-dock .designer-sidebar,
  body.kano-v18-mobile-dock #designerActions,
  body.kano-v18-mobile-dock .designer-actions,
  body.kano-v18-mobile-dock .designer-floating-actions,
  body.kano-v18-mobile-dock .designer-mobile-toolbar,
  body.kano-v18-mobile-dock .designer-mobile-actions{
    display: none !important;
  }

  /* Selected item actions (Copy/Delete) should be desktop only */
  body.kano-v18-mobile-dock .designer-selected-actions,
  body.kano-v18-mobile-dock .selected-actions,
  body.kano-v18-mobile-dock .kano-selected-actions,
  body.kano-v18-mobile-dock #kanoSelectedBar{
    display: none !important;
  }

  /* Dock */
  #kanoMobileDock{
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 10050;
    background: rgba(245,245,245,.98);
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 18px;
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1.3fr;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,.12);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }

  .kano-dock-btn{
    appearance: none;
    border: 1px solid rgba(0,0,0,.12);
    background: #fff;
    border-radius: 14px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 56px;
  }

  .kano-dock-ico{ display:block; line-height:0; }
  .kano-dock-ico img{ width: 22px; height: 22px; object-fit: contain; }
  .kano-dock-ico svg{ width: 22px; height: 22px; fill: none; stroke: #111; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .kano-dock-txt{ font-size: 12px; color: #111; font-weight: 600; }

  /* Order button moved into dock slot */
  #kanoDockOrderSlot{ display:flex; }
  #kanoDockOrderSlot #btnOrder{
    width: 100% !important;
    border-radius: 14px !important;
    border: 0 !important;
    padding: 10px 10px !important;
    min-height: 56px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    background: #06a77d !important;
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(6,167,125,.22) !important;
  }

  /* Backdrop */
  #kanoDockBackdrop{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.25);
    z-index: 10020;
    display: none;
  }

  /* Sheets */
  #kanoAddSheet, #kanoProductSheet{
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom) + var(--kano-dock-h, 76px) + 10px);
    z-index: 10040;
    background: #fff;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(0,0,0,.18);
    transform: translateY(16px);
    opacity: 0;
    pointer-events: none;
    transition: transform .18s ease, opacity .18s ease;
  }

  body.kano-add-open #kanoAddSheet,
  body.kano-product-open #kanoProductSheet{
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .kano-sheet-inner{ padding: 10px; }

  /* Add sheet items */
  .kano-sheet-item{
    width: 100%;
    appearance: none;
    border: 1px solid rgba(0,0,0,.10);
    background: #fff;
    border-radius: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    margin: 8px 0;
  }
  .kano-sheet-ico{ width: 28px; height: 28px; display:inline-flex; align-items:center; justify-content:center; }
  .kano-sheet-ico img{ width: 24px; height: 24px; object-fit: contain; }

  /* Product sheet */
  .kano-product-top{ display:flex; justify-content:flex-start; padding: 4px 2px 10px 2px; }
  .kano-mini-link{
    appearance:none;
    border: 0;
    background: transparent;
    color: #0a84ff;
    font-weight: 800;
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 12px;
  }

  /* Views strip inside sheet */
  body.kano-v18-mobile-dock #kanoProductViewsMount .designer-views-strip{
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* Ensure the product image/canvas uses available height */
  body.kano-v18-mobile-dock .designer-product-stage{
    height: 100% !important;
  }
}

/* =======================================================================
   PATCH v21 — Sipariş Ver'i dock icine kilitle (floating bar olmasin)
   Sorun: #btnOrder bazen eski mobile CSS/inline style ile fixed kalip ustte
   yesil bar gibi gorunuyor.
   Cozum: Dock slot icinde position/inset/transform reset.
   ======================================================================= */

@media (max-width: 900px){
  body.kano-v18-mobile-dock #kanoMobileCtaBar,
  body.kano-v18-mobile-dock #kanoMobileOrderBar,
  body.kano-v18-mobile-dock .kano-mobile-orderbar{
    display:none !important;
  }

  body.kano-v18-mobile-dock #kanoDockOrderSlot #btnOrder{
    position: static !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    box-shadow: 0 10px 22px rgba(6,167,125,.22) !important;
  }

  /* ekstra sigorta: btnOrder nerede olursa olsun fixed olmasin (mobilde) */
  body.kano-v18-mobile-dock #btnOrder{
    position: static !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
  }
}
/* =======================================================================
   KANO — Mobile Dock Patch (v1)
   Load AFTER: mobile_overrides_iphone1.css
   Requires:  tasarla.js (already injects kano-v18 mobile dock + sheets)
   ======================================================================= */

@media (max-width: 980px){
  /* -------------------------------------------------------------------
     1) Hide legacy mobile UI that creates the ugly top bar
     ------------------------------------------------------------------- */
  body.kano-v18-mobile-dock .designer-bottom-nav,
  body.kano-v18-mobile-dock .mobile-bottom-nav,
  body.kano-v18-mobile-dock .bottom-nav,
  body.kano-v18-mobile-dock #designerBottomNav,
  body.kano-v18-mobile-dock #mobileBottomNav,
  body.kano-v18-mobile-dock .designer-sidebar,
  body.kano-v18-mobile-dock .designer-sidebar.mobile,
  body.kano-v18-mobile-dock .designer-tools{
    display:none !important;
  }

  /* -------------------------------------------------------------------
     2) Mobile dock (4 buttons)
     ------------------------------------------------------------------- */
  body.kano-v18-mobile-dock{
    --kanoDockH: 96px;
  }

  /* Edit bar: JS toggles display (inline), we just keep a safe default */
  body.kano-v18-mobile-dock .kano-item-toolbar{
    display:none;
    position: fixed;
    z-index: 9999;
  }

  body.kano-v18-mobile-dock .kano-mobile-dock{
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    z-index: 9999;

    display: flex;
    gap: 10px;

    padding: 10px;
    border-radius: 24px;
    background: rgba(255,255,255,.90);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 32px rgba(0,0,0,.14);
    border: 1px solid rgba(0,0,0,.06);
  }

  body.kano-v18-mobile-dock .kano-mobile-dock .kano-dock-btn{
    flex: 1 1 0;
    min-width: 0;
    height: 76px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;

    border-radius: 18px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(255,255,255,.92);

    color: #111;
    font-size: 14px;
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
  }

  body.kano-v18-mobile-dock .kano-mobile-dock .kano-dock-btn:active{
    transform: scale(.985);
  }

  body.kano-v18-mobile-dock .kano-mobile-dock .kano-dock-btn .kano-ico{
    width: 26px;
    height: 26px;
    display: block;
  }

  body.kano-v18-mobile-dock .kano-mobile-dock .kano-dock-btn.is-primary{
    background: #0aa387;
    border-color: #0aa387;
    color: #fff;
  }

  body.kano-v18-mobile-dock .kano-mobile-dock .kano-dock-btn.is-primary .kano-ico{
    filter: brightness(0) invert(1);
  }

  /* Reserve space so the dock DOES NOT cover the product */
  body.kano-v18-mobile-dock .designer-center,
  body.kano-v18-mobile-dock .designer-main,
  body.kano-v18-mobile-dock .designer-editor,
  body.kano-v18-mobile-dock main{
    padding-bottom: calc(var(--kanoDockH) + 32px + env(safe-area-inset-bottom)) !important;
  }

  /* -------------------------------------------------------------------
     3) Sheets + backdrop
     ------------------------------------------------------------------- */
  body.kano-v18-mobile-dock .kano-sheet-backdrop{
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0,0,0,.35);

    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
  }

  body.kano-v18-mobile-dock.kano-add-open .kano-sheet-backdrop,
  body.kano-v18-mobile-dock.kano-product-open .kano-sheet-backdrop{
    opacity: 1;
    pointer-events: auto;
  }

  body.kano-v18-mobile-dock .kano-sheet{
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(var(--kanoDockH) + 20px + env(safe-area-inset-bottom));
    z-index: 9999;

    background: #fff;
    border-radius: 24px;
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 18px 44px rgba(0,0,0,.20);
    overflow: hidden;

    transform: translateY(18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
  }

  body.kano-v18-mobile-dock.kano-add-open #kanoAddSheet,
  body.kano-v18-mobile-dock.kano-product-open #kanoProductSheet{
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  body.kano-v18-mobile-dock .kano-sheet .kano-sheet-body{
    padding: 12px;
  }

  /* Add sheet: 3-col grid */
  body.kano-v18-mobile-dock .kano-sheet-grid{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  body.kano-v18-mobile-dock .kano-sheet-item{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 12px 10px;
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(248,248,248,.92);

    color: #111;
    font-weight: 600;
    font-size: 13px;
    text-align: center;
  }

  body.kano-v18-mobile-dock .kano-sheet-item img,
  body.kano-v18-mobile-dock .kano-sheet-item svg{
    width: 26px;
    height: 26px;
    display: block;
  }

  /* Product sheet: hide "Ürün Değiştir", show face picker */
  body.kano-v18-mobile-dock #kanoChangeProductBtn{
    display: none !important;
  }

  body.kano-v18-mobile-dock #kanoProductSheet .designer-views-strip{
    display: flex !important;
    gap: 12px;
    overflow-x: auto;
    padding: 6px 2px 12px 2px;
    -webkit-overflow-scrolling: touch;
  }

  body.kano-v18-mobile-dock #kanoProductSheet .designer-views-strip::-webkit-scrollbar{
    display: none;
  }

  body.kano-v18-mobile-dock #kanoProductSheet .view-btn{
    flex: 0 0 auto;
    min-width: 92px;
    padding: 10px 10px;

    border-radius: 18px;
    border: 1px solid rgba(0,0,0,.10);
    background: rgba(248,248,248,.92);
    text-align: center;
  }

  body.kano-v18-mobile-dock #kanoProductSheet .view-btn.active{
    border-color: #0aa387;
    box-shadow: 0 0 0 2px rgba(10,163,135,.18) inset;
    background: #fff;
  }

  body.kano-v18-mobile-dock #kanoProductSheet .view-btn img{
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: block;
    margin: 0 auto 6px auto;
  }

  body.kano-v18-mobile-dock #kanoProductSheet .view-btn .view-label{
    font-size: 13px;
    font-weight: 600;
    color: #333;
  }
}
/* =========================================================
   KANO PATCH: Mobile Dock lower + Design Picker gentle sheet
   Paste at VERY BOTTOM of mobile_overrides_iphone1.css
   ========================================================= */

@media (max-width: 480px){

  /* ---------- 1) DOCK: daha aşağı + safe-area düzgün ---------- */

  /* Butonlar alt tarafa daha yakın olsun (extra 10px'leri azaltıyoruz) */
  #kanoMobileDock{
    bottom: 0 !important;
    padding: 6px 10px calc(env(safe-area-inset-bottom) + 2px) !important;
  }

  /* Sayfanın altına bırakılan boşluk dock yüksekliğiyle daha doğru olsun */
  body.kano-v18-mobile-dock{
    padding-bottom: calc(76px + env(safe-area-inset-bottom)) !important;
  }

  /* Dock içi butonlar çok “yüksek” duruyorsa 56 -> 54 */
  #kanoMobileDock .kano-dock-btn,
  #kanoMobileDock #btnOrder{
    height: 54px !important;
  }


  /* ---------- 2) DESIGN PICKER: tam ekran değil, bottom-sheet ---------- */

  /* Overlay ekranı kaplasın ama içerik altta sheet şeklinde dursun */
  #designPickerOverlay.product-picker-overlay{
    display: none; /* JS zaten display:flex yapıyor */
    align-items: flex-end !important;
    justify-content: center !important;
    padding: 0 10px calc(env(safe-area-inset-bottom) + 10px) !important;
    background: rgba(0,0,0,.32) !important;
  }

  /* Shell: alttan çıkan nazik panel */
  #designPickerOverlay .product-picker-shell{
    width: 100% !important;
    max-width: 560px !important;
    max-height: 86dvh !important;
    height: auto !important;

    border-radius: 18px 18px 0 0 !important;
    overflow: hidden !important;

    background: #fff !important;
    box-shadow: 0 -12px 30px rgba(0,0,0,.18) !important;

    /* Açılış animasyonu */
    animation: kanoSheetIn .18s ease-out both;
  }

  /* Overlay fade-in */
  #designPickerOverlay.product-picker-overlay[style*="display: flex"]{
    animation: kanoFadeIn .18s ease-out both;
  }

  /* Header sabit kalsın, içerik scroll olsun */
  #designPickerOverlay .product-picker-header{
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
    background: #fff !important;
  }

  /* İç body yüksekliği artık 100vh değil -> sheet'e göre */
  #designPickerOverlay .design-picker-body{
    height: calc(86dvh - 56px) !important;
  }

  #designPickerOverlay .design-picker-main{
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* Close butonu biraz daha rahat */
  #designPickerOverlay .product-picker-close{
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
    font-size: 18px !important;
  }

}

/* Animasyonlar */
@keyframes kanoSheetIn{
  from { transform: translateY(18px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes kanoFadeIn{
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* === KANO FIX: Mobile'da seçili objenin üstündeki hızlı araç çubuğunu göster === */
@media (max-width: 900px){
  /* Not: Daha önce .kano-item-toolbar 'display:none !important' ile gizlenmişti.
     Bu fix, toolbar'ın tekrar görünmesini ve mobilde daha kolay tıklanmasını sağlar. */
  .kano-item-toolbar{
    position: fixed !important;
    z-index: 99999 !important;
    transform: translate(-50%, -110%);
    padding: 8px 10px;
    gap: 8px;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.14);
  }
  .kano-item-toolbar button{
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .kano-item-toolbar svg{
    width: 18px;
    height: 18px;
  }
}

/* FORCE: header tek satır (Spreadshirt) — column/wrap ne varsa ezer */
@media (max-width: 520px){

  header.site-header .nav-search-bar .container.nav-search-inner,
  header.site-header .container.nav-search-inner{
    display: flex !important;
    flex-direction: row !important;   /* <-- kritik */
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;

    height: 56px !important;          /* <-- min-height değil, direkt kilitle */
    min-height: 56px !important;
    max-height: 56px !important;

    padding: 8px 12px !important;
  }

  /* header-actions bazen display:contents kalıyor, onu da ez */
  header.site-header .header-actions,
  header.site-header .header-actions.header-right{
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px !important;
    width: auto !important;
    min-width: 0 !important;
  }

  /* İçeride biri margin/padding ile satır büyütüyorsa sıfırla */
  header.site-header .nav-search-bar .container.nav-search-inner > *{
    margin: 0 !important;
  }
}

/* Product picker (tasarla mağaza) — mobilde sadece ürün grid */
@media (max-width: 980px){
  #productPickerOverlay .mini-store-sidebar{
    display: none !important;
  }

  #productPickerOverlay .mini-store-content{
    display: block !important;
  }

  #productPickerOverlay .mini-store-main{
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
  }
}
