/* Iceberry responsive desktop/tablet layer — additive only. */

:root{
  --ice-responsive-max:1240px;
  --ice-responsive-admin-max:1540px;
}

/* Keep page media stable while images load. */
.product-card>img,
.ice-search-product-card>img,
.category-emoji img,
.cat-icon img,
.fav-card img,
.cart-thumb,
.admin-row img{
  display:block;
  object-position:center;
}

/* Home featured row: one horizontal carousel, selected products only. */
.products.ice-home-carousel,
.products.ice-featured-products.ice-home-carousel{
  position:relative!important;
  display:flex!important;
  flex-wrap:nowrap!important;
  justify-content:flex-start!important;
  align-items:stretch!important;
  gap:12px!important;
  width:100%!important;
  max-width:100%!important;
  margin:0 0 18px!important;
  padding:4px 2px 12px!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scroll-behavior:smooth!important;
  scroll-snap-type:x mandatory!important;
  overscroll-behavior-inline:contain!important;
  scrollbar-width:none!important;
  direction:rtl!important;
}
.products.ice-home-carousel::-webkit-scrollbar{display:none}
.products.ice-home-carousel>.product-card,
.products.ice-featured-products.ice-home-carousel>.product-card{
  flex:0 0 calc((100% - 18px)/3)!important;
  width:calc((100% - 18px)/3)!important;
  max-width:none!important;
  min-width:0!important;
  scroll-snap-align:start!important;
  margin:0!important;
}
.ice-carousel-controls{
  display:none;
  align-items:center;
  gap:8px;
  margin-inline-start:auto;
}
.ice-carousel-controls button{
  width:40px;
  height:40px;
  border:0;
  border-radius:14px;
  display:grid;
  place-items:center;
  color:#596985;
  background:#fff;
  box-shadow:0 8px 20px rgba(76,100,170,.12),inset 0 0 0 1px rgba(215,223,242,.72);
  font:900 22px/1 Vazirmatn,Tahoma,sans-serif;
  cursor:pointer;
}
.ice-carousel-controls button:hover{color:#fff;background:linear-gradient(135deg,#55bdff,#7a58ee)}
.ice-carousel-paused::after{
  content:"";
  position:absolute;
  inset:auto 50% 2px auto;
  width:28px;
  height:3px;
  border-radius:99px;
  background:linear-gradient(90deg,#55bdff,#8b62ff);
  transform:translateX(50%);
  opacity:.75;
}

/* Tablet */
@media (min-width:700px) and (max-width:1099px){
  .page{
    padding:24px 24px 128px!important;
    align-items:flex-start!important;
  }
  .page>.app,
  .app{
    width:min(100%,960px)!important;
    max-width:960px!important;
    min-height:calc(100vh - 48px)!important;
    padding:24px 28px 118px!important;
    border-radius:36px!important;
    overflow:visible!important;
  }
  .auth-page .app,.page .auth-app{max-width:620px!important}

  .topbar{height:116px!important}
  .topbar .logo{width:260px!important;max-width:38%!important}
  .icon-btn{width:58px!important;height:58px!important;border-radius:21px!important;font-size:25px!important}
  .topbar .icon-btn .badge{top:-7px!important;right:-7px!important}

  .search-box{height:64px!important;border-radius:25px!important;padding-inline:22px!important}
  .search-box input{font-size:17px!important}
  .search-icon{font-size:38px!important}

  .hero:not(.ice-has-managed-banner){height:330px!important;border-radius:32px!important}
  .hero-copy{right:38px!important;top:52px!important}
  .hero h1{font-size:36px!important;line-height:1.65!important}
  .hero p{font-size:15px!important}
  .hero-img{width:46%!important;height:88%!important;left:3%!important}
  .pill{font-size:14px!important;padding:10px 17px!important}
  .cta{font-size:16px!important;padding:13px 28px!important}

  .categories{
    height:auto!important;
    min-height:148px!important;
    padding:18px 16px!important;
    border-radius:30px!important;
    gap:12px!important;
  }
  .categories article{font-size:14px!important;gap:10px!important}
  .cat-icon{width:76px!important;height:76px!important;font-size:37px!important}
  .cat-icon img{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:inherit!important}

  .section-head{margin:18px 6px 14px!important}
  .section-head h2{font-size:23px!important}
  .section-head a{font-size:14px!important}
  .ice-carousel-controls{display:flex}

  .products:not(.ice-home-carousel),
  .ice-search-products-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:16px!important;
  }
  .products.ice-home-carousel>.product-card,
  .products.ice-featured-products.ice-home-carousel>.product-card{
    flex-basis:220px!important;
    width:220px!important;
  }
  .product-card{min-height:286px!important;padding:14px 12px 12px!important;border-radius:23px!important}
  .product-card>img{height:auto!important;aspect-ratio:1/1!important;border-radius:19px!important}
  .product-card h3{font-size:15px!important;margin-top:11px!important}
  .product-card strong{font-size:14px!important}
  .add{height:42px!important;border-radius:17px!important;font-size:14px!important}

  .category-list{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important}
  .category-item{min-height:108px!important;padding:16px 18px!important}
  .category-emoji{width:72px!important;height:72px!important;flex-basis:72px!important}
  .category-info h2{font-size:18px!important}

  .profile-card{padding:30px!important;min-height:290px!important}
  .profile-menu{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:14px!important}
  .profile-menu a{min-height:82px!important}
  .info-grid,.photo-options,.favorites-list,.address-list,.transaction-list{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .fav-card{grid-template-columns:90px 1fr auto!important;padding:14px!important}
  .fav-card img{width:88px!important;height:88px!important}

  .orders-list{grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:start!important}
  .cart-item{grid-template-columns:105px 1fr 150px!important;min-height:145px!important;padding:16px!important}
  .cart-thumb{width:100px!important;height:100px!important}
  .summary-card,.discount-box,.checkout-card,.edit-card,.info-card{border-radius:30px!important}

  .bottom-nav{
    width:min(calc(100% - 48px),720px)!important;
    height:82px!important;
    bottom:20px!important;
    border-radius:29px!important;
    padding-inline:12px!important;
    box-shadow:0 18px 48px rgba(69,90,150,.18),inset 0 0 0 1px rgba(219,226,244,.9)!important;
  }
  .bottom-nav a{font-size:12px!important;gap:6px!important}
  .bottom-nav span{font-size:27px!important}
  .bottom-nav .active span,.bottom-nav a[class*="active-"] span{width:48px!important;height:48px!important;border-radius:17px!important}

  .notice-card{width:min(90vw,620px)!important;max-height:80vh!important;padding:26px!important}
  .ice-flash-notice-v3{max-width:640px!important}
}

/* Desktop / laptop */
@media (min-width:1100px){
  body:not(.admin-body){background:linear-gradient(180deg,#f4f8ff,#eaf1ff)!important}
  .page{
    width:100%!important;
    max-width:none!important;
    padding:24px 28px 138px!important;
    align-items:flex-start!important;
  }
  .page>.app,
  .app{
    width:100%!important;
    max-width:none!important;
    min-height:calc(100vh - 56px)!important;
    padding:28px 38px 128px!important;
    border-radius:42px!important;
    overflow:visible!important;
  }
  .auth-page .app,.page .auth-app{max-width:680px!important}

  .topbar{height:130px!important}
  .topbar .logo{width:310px!important;max-width:32%!important}
  .icon-btn{width:64px!important;height:64px!important;border-radius:23px!important;font-size:28px!important}
  .topbar .icon-btn .badge{top:-8px!important;right:-8px!important}

  .search-box{height:68px!important;border-radius:27px!important;padding-inline:25px!important;margin-bottom:22px!important}
  .search-box input{font-size:18px!important}
  .search-icon{font-size:40px!important}

  .hero:not(.ice-has-managed-banner){height:390px!important;border-radius:36px!important;margin-bottom:22px!important}
  .hero-copy{right:54px!important;top:62px!important}
  .hero h1{font-size:44px!important;line-height:1.55!important}
  .hero p{font-size:17px!important}
  .hero-img{width:47%!important;height:92%!important;left:3%!important}
  .pill{font-size:15px!important;padding:11px 19px!important}
  .cta{font-size:17px!important;padding:14px 32px!important}

  .hero.ice-has-managed-banner,.club.ice-has-managed-banner{border-radius:36px!important}
  .categories{
    height:auto!important;
    min-height:176px!important;
    padding:22px 24px!important;
    border-radius:34px!important;
    gap:20px!important;
    margin-bottom:24px!important;
  }
  .categories article{font-size:16px!important;gap:12px!important;cursor:pointer}
  .cat-icon{width:92px!important;height:92px!important;font-size:42px!important}
  .cat-icon img{width:100%!important;height:100%!important;object-fit:cover!important;border-radius:inherit!important}

  .section-head{margin:22px 8px 16px!important}
  .section-head h2{font-size:27px!important}
  .section-head a{font-size:15px!important}
  .ice-carousel-controls{display:flex}

  .products:not(.ice-home-carousel),
  .ice-search-products-grid{
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:20px!important;
  }
  .products.ice-home-carousel,
  .products.ice-featured-products.ice-home-carousel{gap:18px!important;padding-bottom:16px!important}
  .products.ice-home-carousel>.product-card,
  .products.ice-featured-products.ice-home-carousel>.product-card{
    flex-basis:255px!important;
    width:255px!important;
  }
  .product-card{min-height:335px!important;padding:16px 14px 14px!important;border-radius:26px!important}
  .product-card>img{height:auto!important;aspect-ratio:1/1!important;border-radius:21px!important}
  .product-card h3{font-size:17px!important;margin:13px 0 7px!important;white-space:normal!important;line-height:1.65!important;min-height:56px!important}
  .product-card strong{font-size:16px!important}
  .add{height:46px!important;border-radius:18px!important;font-size:15px!important}
  .add span{width:31px!important;height:31px!important}

  .category-list{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:18px!important}
  .category-item{min-height:122px!important;padding:18px 20px!important;border-radius:28px!important}
  .category-emoji{width:82px!important;height:82px!important;flex-basis:82px!important}
  .category-info h2{font-size:20px!important}
  .categories-hero{min-height:155px!important;padding:26px!important}

  .cart-title-bar,.orders-title,.edit-page-title{min-height:76px!important;padding-inline:20px!important}
  .cart-title-bar h1,.orders-title h1,.edit-page-title h1{font-size:28px!important}

  .profile-card{padding:36px!important;min-height:320px!important;border-radius:36px!important}
  .profile-main{max-width:960px!important;margin-inline:auto!important}
  .profile-stats{gap:18px!important}
  .profile-menu{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:16px!important}
  .profile-menu a{min-height:88px!important;padding:18px!important;border-radius:25px!important}
  .info-grid,.photo-options,.favorites-list,.address-list,.transaction-list{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:16px!important}
  .fav-card{grid-template-columns:100px 1fr auto!important;padding:15px!important}
  .fav-card img{width:96px!important;height:96px!important}

  .orders-list{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:18px!important;align-items:start!important}
  .order-card{padding:22px!important;border-radius:29px!important}
  .cart-list{gap:15px!important}
  .cart-item{grid-template-columns:120px 1fr 170px!important;min-height:168px!important;padding:20px!important;border-radius:28px!important}
  .cart-thumb{width:112px!important;height:112px!important;border-radius:22px!important}
  .cart-info h2{font-size:18px!important}
  .summary-card,.discount-box,.checkout-card,.edit-card,.info-card{padding:25px!important;border-radius:34px!important}
  .admin-form-grid.checkout-form{grid-template-columns:repeat(2,minmax(0,1fr))!important}

  .ice-product-page-card{max-width:760px!important;margin-inline:auto!important;padding:34px!important;border-radius:36px!important}
  .ice-product-page-card>img{max-width:520px!important;margin-inline:auto!important}
  .ice-product-page-card h1{font-size:38px!important}

  .club:not(.ice-has-managed-banner){height:210px!important;padding:24px 34px!important;border-radius:34px!important}
  .club:not(.ice-has-managed-banner) img{width:180px!important;height:165px!important}
  .club h2{font-size:25px!important}
  .club p{font-size:14px!important}

  .bottom-nav{
    width:min(calc(100% - 64px),820px)!important;
    height:86px!important;
    bottom:22px!important;
    border-radius:31px!important;
    padding-inline:18px!important;
    background:rgba(255,255,255,.96)!important;
    -webkit-backdrop-filter:blur(18px)!important;
    backdrop-filter:blur(18px)!important;
    box-shadow:0 20px 55px rgba(60,82,143,.2),inset 0 0 0 1px rgba(219,226,244,.92)!important;
  }
  .bottom-nav a{font-size:13px!important;gap:7px!important;transition:transform .18s ease,color .18s ease!important}
  .bottom-nav a:hover{transform:translateY(-4px);color:#2d9ff0!important}
  .bottom-nav span{font-size:29px!important}
  .bottom-nav .active span,.bottom-nav a[class*="active-"] span{width:51px!important;height:51px!important;border-radius:18px!important}

  .notice-card{width:min(88vw,700px)!important;max-height:82vh!important;padding:30px!important;border-radius:36px!important}
  .notice-head h2{font-size:25px!important}
  .notice-message{padding:18px!important}
  .ice-special-dialog{width:min(90vw,700px)!important}
  .ice-flash-notice-v3{max-width:720px!important}
}

/* Admin tablet */
@media (min-width:800px) and (max-width:1199px){
  .admin-shell{max-width:1120px!important;padding:22px!important}
  .admin-top{padding:18px 20px!important}
  .admin-grid,.ice-dashboard-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .admin-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:16px!important}
  .admin-card{padding:22px!important;border-radius:30px!important}
  .admin-row{grid-template-columns:76px minmax(0,1fr) auto!important;padding:14px!important}
  .admin-row img{width:74px!important;height:74px!important}
  .admin-orders-table,.ice-real-chart-scroll{overflow-x:auto!important}
  .ice-banner-slot-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .ice-special-product-picker{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* Admin desktop: permanent right sidebar, spacious content. */
@media (min-width:1200px){
  .admin-body{overflow-x:hidden!important}
  .admin-shell{width:100%!important;max-width:none!important;padding:20px 24px 40px!important;margin:0!important}
  .admin-shell>.admin-top,
  .admin-shell>.admin-panel{
    margin-right:318px!important;
  }
  .admin-top{
    top:18px!important;
    min-height:92px!important;
    padding:18px 24px!important;
    border-radius:30px!important;
  }
  .admin-brand img{width:112px!important}
  .admin-brand div strong{font-size:21px!important}
  .admin-brand div span{font-size:13px!important}

  .admin-menu-wrap{
    position:fixed!important;
    top:18px!important;
    right:20px!important;
    bottom:18px!important;
    width:286px!important;
    height:auto!important;
    margin:0!important;
    z-index:1002!important;
  }
  .admin-menu-btn{display:none!important}
  .admin-dropdown,
  .admin-dropdown.show{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    max-width:none!important;
    padding:92px 14px 18px!important;
    display:flex!important;
    transform:none!important;
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
    border-radius:30px!important;
    overflow-y:auto!important;
  }
  .admin-drawer-head{min-height:76px!important;padding:15px 17px!important}
  .admin-drawer-close{display:none!important}
  .admin-dropdown>button:not(.admin-drawer-close){min-height:50px!important;border-radius:16px!important;padding:10px 13px!important;font-size:14px!important}
  .admin-menu-overlay{display:none!important}
  .admin-body.admin-menu-open{overflow:auto!important}

  .admin-panel{padding-top:6px!important}
  .admin-card{padding:25px!important;border-radius:32px!important;margin-bottom:20px!important}
  .admin-card h2{font-size:23px!important}
  .admin-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:16px!important}
  .ice-dashboard-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:17px!important}
  .ice-dashboard-stat{min-height:145px!important;padding:22px!important}
  .admin-form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:17px!important}
  .admin-field input,.admin-field select,.admin-field textarea{font-size:15px!important;padding:14px 15px!important}
  .admin-list{gap:13px!important}
  .admin-row{grid-template-columns:86px minmax(0,1fr) auto!important;gap:16px!important;padding:15px!important;border-radius:22px!important}
  .admin-row img{width:84px!important;height:84px!important;border-radius:19px!important}
  .admin-row h3{font-size:17px!important}
  .admin-row-actions{justify-content:flex-end!important;max-width:440px!important}
  .admin-btn{min-height:48px!important;padding-inline:20px!important}
  .admin-order-card{grid-template-columns:minmax(0,1fr) 250px!important;padding:22px!important}
  .admin-order-tools{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .ice-banner-slot-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:20px!important}
  .ice-special-product-picker{grid-template-columns:repeat(3,minmax(0,1fr))!important;max-height:560px!important}
  .ice-permission-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .admin-orders-table,.ice-real-chart-scroll{overflow-x:auto!important}
  .ice-real-line-chart{min-width:860px!important}
}

/* Ultra-wide screens should not stretch content endlessly. */
@media (min-width:1600px){
  :root{--ice-responsive-max:100%;--ice-responsive-admin-max:100%}
  .products.ice-home-carousel>.product-card,
  .products.ice-featured-products.ice-home-carousel>.product-card{flex-basis:275px!important;width:275px!important}
}

@media (prefers-reduced-motion:reduce){
  .products.ice-home-carousel{scroll-behavior:auto!important}
  .bottom-nav a,.ice-carousel-controls button{transition:none!important}
}
