/* ============================================================
   custom.modern.css
   Modern light redesign for Webasyst Shop-Script theme "artdeluxe"
   Brand colors preserved
   ============================================================ */

/* --------- Variables (brand-safe) --------- */
:root {
  --brand: #98404a;
  --brand-soft: rgba(152,64,74,.12);
  --text: #3a3a3a;
  --muted: #777;
  --bg: #ffffff;
  --bg-soft: #f6f6f6;
  --border: #e6e6e6;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(0,0,0,.08);
  --shadow-sm: 0 6px 16px rgba(0,0,0,.08);
}

/* --------- Base --------- */
body {
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  transition: color .2s ease;
}
a:hover {
  color: var(--brand);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* --------- Header cleanup --------- */
#header,
.header {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

/* --------- Category left menu --------- */
.menu-v.category-tree {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: var(--shadow-sm);
}

.menu-v.category-tree a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
}

.menu-v.category-tree a:hover {
  background: var(--brand-soft);
}

/* --------- Home categories tiles --------- */
.home-cat {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.home-cat .produt {
  width: auto !important;
  float: none !important;
}

.home-cat .produt a {
  display: block;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}

.home-cat .produt a:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.home-cat .produt img {
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.home-cat .produt span {
  display: block;
  margin-top: 10px;
  font-weight: 700;
}



/* --------- Add to cart button --------- */
.addtocart input[type="submit"],
.productListSubmit {
  background: var(--brand);
  border: none;
  color: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}

.addtocart input[type="submit"]:hover,
.productListSubmit:hover {
  background: #7d333b;
  transform: translateY(-1px);
}

/* --------- Mobile --------- */
@media (max-width: 760px) {
  .home-cat {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-list.thumbs,
  .thumbs.product-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .item_li .item_title {
    font-size: 14px;
  }
}

/* =====================
   Tuning v2 (menu + cart)
   ===================== */

/* Left sidebar menu: make it more compact */
.sidebar.left, .sidebar.left300px, .sidebar {
  font-size: 14px;
}
.menu-v.category-tree a{
  padding: 8px 10px;
  font-weight: 700;
  line-height: 1.25;
}
.menu-v.category-tree li{
  margin: 2px 0;
}
/* reduce extra spacing if theme adds it */
.categoryFoo, .categoryFoo *{
  letter-spacing: normal !important;
}

/* Make sidebar block visually lighter */
.menu-v.category-tree{
  box-shadow: 0 6px 16px rgba(0,0,0,.06);
}

/* Product list cart button: less "heavy" color */
.productListSubmit,
.addtocart input[type="submit"]{
  background: rgba(152,64,74,.10) !important; /* brand-soft */
  border: 1px solid rgba(152,64,74,.35) !important;
  color: var(--brand) !important;
}
.productListSubmit:hover,
.addtocart input[type="submit"]:hover{
  background: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
}
/* If inside button is an <img> cart icon, keep it visible */
.productListSubmit img{
  filter: none;
}
.productListSubmit:hover img{
  filter: brightness(0) invert(1);
}



/* =====================
   Header v4: clean full-width bar (no ugly dashed pills)
   Keeps brand, improves alignment, no HTML changes required
   ===================== */

/* Full-width header background, but keep content centered */
#header, .header{
  width: 100%;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--border);
}
.header .container,
.container.app-header{
  max-width: 1180px !important;
  margin: 0 auto !important;
}

/* Restore a sane 4-column layout */
.container.app-header{
  display: grid;
  grid-template-columns: 220px 1fr 230px 220px;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
}

/* Logo: a bit bigger, left-aligned */
.logoTop{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin: 0;
}
.logoTop img{
  max-width: 190px !important;
}

/* Benefits: compact chips in one row */
.infodeliveri{
  justify-content: center;
  gap: 10px;
  margin: 0 !important;
}
.infodeliveri .dostavka{
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 10px;
  box-shadow: none;
}
.infodeliveri .dostavka span{
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;          /* prevent ugly wrapping */
  letter-spacing: .2px;
}

/* Phones/time: stack neatly */
.infcont{
  align-items: flex-end;
  gap: 4px;
}
.infcont a{
  font-size: 13px;
  font-weight: 800;
}
.infcont img{
  width: 16px;
  height: 16px;
}
.infcont .clock_x span{
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

/* Cart: compact pill (icon + text), not a huge bubble */
.cartTop #cart-summary{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  box-shadow: var(--shadow-sm);
}
.cartTop #cart-summary img{
  width: 34px !important;
  height: auto !important;
}
.cartTop .pokupki{
  font-weight: 900;
  color: var(--brand);
  line-height: 1.1;
}
.cartTop .cart-total{
  font-weight: 800;
  color: var(--text);
}

/* Make header responsive before mobile menu takes over */
@media (max-width: 1100px){
  .container.app-header{
    grid-template-columns: 200px 1fr 240px;
    grid-template-areas:
      "logo perks cart"
      "logo phones cart";
    row-gap: 8px;
  }
  .logoTop{ grid-area: logo; }
  .infodeliveri{ grid-area: perks; justify-content: flex-start; flex-wrap: wrap; }
  .infcont{ grid-area: phones; align-items: flex-start; }
  .cartTop{ grid-area: cart; }
}

@media (max-width: 760px){
  /* desktop header hidden by theme; mobile header is styled in v2 already */
  .container.app-header{ display:none; }
}



/* =====================
   Header alignment fix (advantages center, phones left)
   ===================== */

/* Center advantages block perfectly */
.infodeliveri{
  justify-content: center !important;
  align-items: center;
  text-align: center;
}
.infodeliveri .dostavka{
  justify-content: center;
  text-align: center;
}

/* Phones block: force left alignment for all items including clock */
.infcont{
  align-items: flex-start !important;
  text-align: left !important;
}
.infcont li,
.infcont a,
.infcont span{
  text-align: left !important;
}

/* Clock line aligned with phones */
.infcont .clock_x{
  margin-left: 0 !important;
  padding-left: 0 !important;
  align-self: flex-start;
}



/* =====================
   Advantages chips: less "puffy", more premium (v6)
   ===================== */
.infodeliveri{
  gap: 8px !important;
}
.infodeliveri .dostavka{
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-radius: 12px !important;     /* not a huge pill */
  padding: 6px 10px !important;
  box-shadow: none !important;
}
.infodeliveri .dostavka i,
.infodeliveri .dostavka img{
  opacity: .85;
}
.infodeliveri .dostavka span{
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .15px !important;
}



/* =====================
   Advantages v7: ultra-compact + strict, and FIX centering bug
   Why first item was left: theme likely has UL padding/margins and/or
   flex container not taking full width. We zero paddings and force width.
   ===================== */

/* Force container to really center */
.infodeliveri{
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 6px 10px !important;
  margin: 0 !important;
  padding: 0 !important;          /* UL default padding caused left shift */
  list-style: none !important;
}

/* Make each list item not add extra spacing */
.infodeliveri > li{
  margin: 0 !important;
  padding: 0 !important;
}

/* Strict look: no boxes, just icon + text */
.infodeliveri .dostavka{
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  padding: 2px 0 !important;
  box-shadow: none !important;

  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

/* Tighter icon */
.infodeliveri .dostavka i,
.infodeliveri .dostavka img{
  width: 16px !important;
  height: 16px !important;
  opacity: .85;
}

/* Compact text */
.infodeliveri .dostavka span{
  font-size: 12px !important;
  font-weight: 800 !important;
  letter-spacing: .12px !important;
  white-space: nowrap !important;
  color: var(--text) !important;
}

/* Optional subtle separator between items (looks strict) */
.infodeliveri > li:not(:last-child) .dostavka:after{
  content: "";
  display: inline-block;
  width: 1px;
  height: 14px;
  background: var(--border);
  margin-left: 10px;
}

/* On narrow widths: remove separators to avoid odd wrapping */
@media (max-width: 980px){
  .infodeliveri > li .dostavka:after{ display:none; }
}



/* =====================
   Sidebar menu v8: more compact height (desktop)
   ===================== */
@media (min-width: 761px){
  .menu-v.category-tree{
    padding: 8px !important;
  }
  .menu-v.category-tree a{
    padding: 7px 10px !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    line-height: 1.15 !important;
  }
  /* reduce nested indent & vertical rhythm */
  .menu-v.category-tree ul{
    margin: 0 !important;
    padding-left: 0 !important;
  }
  .menu-v.category-tree li{
    margin: 1px 0 !important;
  }
  /* if theme uses extra padding for sublevels */
  .menu-v.category-tree li ul li a{
    padding: 6px 10px !important;
  }
}



/* =====================
   Banner v9: correct gutters (gap from left menu + reach right edge)
   Problem: banner sits flush to content edge (no left gutter) and stops short on right
   Fix: use full width but add symmetric inner gutters via calc + margins
   ===================== */

@media (min-width: 761px){
  /* Make sure sizing doesn't overflow */
  .bannerHome, .bannerHome *{
    box-sizing: border-box;
  }

  /* Full available column width, with nice gutters */
  .bannerHome{
    display: block !important;
    width: calc(100% - 32px) !important;
    margin: 0 16px 24px 16px !important;  /* left gap from sidebar + right to edge */
    height: 440px;                         /* height ~= sidebar menu */
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
  }

  .bannerHome img{
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: center;
    display: block;
  }
}

/* If theme uses a specific right column wrapper, ensure it can stretch */
@media (min-width: 761px){
  .content, .content .content, .content .main, .main, .rcol, .rightcol, .content__inner{
    min-width: 0;
  }
}



/* =====================
   Banner v10: remove extra right field (compensate parent padding)
   + Cart: more аккуратная (compact, premium)
   ===================== */

@media (min-width: 761px){
  /* Banner should touch the right edge of the content column */
  .bannerHome{
    width: calc(100% + 16px) !important;   /* extend into parent's right padding */
    margin: 0 -16px 24px 16px !important;  /* keep left gutter, kill right field */
  }
}

/* -------- Cart (header) more аккуратная -------- */
.cartTop #cart-summary{
  background: #fff !important;
  border: 1px solid var(--border) !important;
  border-radius: 14px !important;   /* less "pill" */
  padding: 8px 10px !important;
  box-shadow: 0 6px 16px rgba(0,0,0,.06) !important;
  gap: 10px !important;
}

.cartTop #cart-summary img{
  width: 28px !important;
  height: auto !important;
  opacity: .85;
}

.cartTop .pokupki{
  font-size: 13px !important;
  font-weight: 900 !important;
  color: var(--text) !important;
}
.cartTop .pokupki b,
.cartTop .pokupki strong{
  color: var(--brand) !important;
}

.cartTop #cart-summary:hover{
  border-color: rgba(152,64,74,.35) !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.08) !important;
  transform: translateY(-1px);
  transition: all .2s ease;
}



/* =====================
   v13: Layout aligned to your actual homepage HTML (#main2)
   Goals:
   - Left menu column width == one category card (1/4)
   - Banner width == three category cards (3/4)
   - Add a real gutter between menu and right column (banner + cards)
   - Remove "right field" by keeping banner inside the 3/4 column with no extra margins
   ===================== */



/* Mobile: keep your existing mobile banner/menu behavior */
@media (max-width: 760px){
  #main2 > .col-md-9.padding0{ padding-left: 0 !important; }
}



/* =====================
   v14: spacing/flow fixes under banner + tidy H1
   - prevent banner overlap feeling
   - add clear separation and consistent rhythm
   ===================== */

@media (min-width: 761px){
  .bannerHome{
    margin-bottom: 40px !important;
  }
}

.homeH1{
  display: block;
  clear: both;
  margin: 0 0 32px 0 !important;
  padding: 0 !important;
  text-align: center;
  font-size: 22px;
  font-weight: 650;
  color: #666;
}

/* extra safety: ensure the block that follows starts on a new row */
.content.col-md-12{
  clear: both;
}



/* =====================
   v15: Top menu as a clean full-width bar ("полоска")
   Works with common Webasyst theme selectors. Safe: only affects menus in header/top area.
   ===================== */

/* top bar container candidates */
.topmenu, .top-menu, .menu-top, .menuTop, .menuH, .menu_header, .header-menu, .head-menu, #topmenu, #menuTop{
  background: #f7f7f8 !important;
  border-bottom: 1px solid var(--border) !important;
}

/* if menu is just a UL centered at the very top */
.topmenu ul, .top-menu ul, .menu-top ul, .menuTop ul, .menuH ul, .menu_header ul, .header-menu ul, .head-menu ul, #topmenu ul, #menuTop ul{
  margin: 0 !important;
  padding: 8px 12px !important;
  list-style: none !important;
  display: flex !important;
  gap: 8px !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap;
}

/* links */
.topmenu a, .top-menu a, .menu-top a, .menuTop a, .menuH a, .menu_header a, .header-menu a, .head-menu a, #topmenu a, #menuTop a{
  display: inline-flex !important;
  align-items: center !important;
  padding: 7px 12px !important;
  border-radius: 999px !important;
  color: var(--text) !important;
  font-weight: 650 !important;
  font-size: 14px !important;
  text-decoration: none !important;
  line-height: 1 !important;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

/* hover/active */
.topmenu a:hover, .top-menu a:hover, .menu-top a:hover, .menuTop a:hover, .menuH a:hover, .menu_header a:hover, .header-menu a:hover, .head-menu a:hover, #topmenu a:hover, #menuTop a:hover{
  background: rgba(152,64,74,.08) !important;
  color: var(--brand) !important;
}
.topmenu li.selected > a, .top-menu li.selected > a, .menu-top li.selected > a, .menuTop li.selected > a, .menuH li.selected > a, .menu_header li.selected > a, .header-menu li.selected > a, .head-menu li.selected > a,
#topmenu li.selected > a, #menuTop li.selected > a,
.topmenu li.active > a, .top-menu li.active > a, .menu-top li.active > a, .menuTop li.active > a, .menuH li.active > a, .menu_header li.active > a, .header-menu li.active > a, .head-menu li.active > a,
#topmenu li.active > a, #menuTop li.active > a{
  background: rgba(152,64,74,.12) !important;
  color: var(--brand) !important;
}

/* Make it truly full-width if the menu sits inside a narrow container */
.topmenu, .top-menu, .menu-top, .menuTop, .menuH, .menu_header, .header-menu, .head-menu, #topmenu, #menuTop{
  width: 100% !important;
}

/* Mobile: tighten */
@media (max-width: 760px){
  .topmenu ul, .top-menu ul, .menu-top ul, .menuTop ul, .menuH ul, .menu_header ul, .header-menu ul, .head-menu ul, #topmenu ul, #menuTop ul{
    justify-content: flex-start !important;
    padding: 8px 10px !important;
    gap: 6px !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .topmenu a, .top-menu a, .menu-top a, .menuTop a, .menuH a, .menu_header a, .header-menu a, .head-menu a, #topmenu a, #menuTop a{
    font-size: 13px !important;
    padding: 7px 10px !important;
    white-space: nowrap;
  }
}



/* =====================
   v16: Top menu = compact grey full-width bar (edge-to-edge)
   ===================== */

.topmenu,
.top-menu,
.menu-top,
.menuTop,
.menuH,
.menu_header,
.header-menu,
.head-menu,
#topmenu,
#menuTop{
  width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  background: #f1f1f1 !important;
  border-bottom: 1px solid #e0e0e0 !important;
}

.topmenu ul,
.top-menu ul,
.menu-top ul,
.menuTop ul,
.menuH ul,
.menu_header ul,
.header-menu ul,
.head-menu ul,
#topmenu ul,
#menuTop ul{
  margin: 0 auto !important;
  padding: 6px 12px !important;
  max-width: 1320px;
  list-style: none !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 14px !important;
  flex-wrap: wrap;
}

.topmenu a,
.top-menu a,
.menu-top a,
.menuTop a,
.menuH a,
.menu_header a,
.header-menu a,
.head-menu a,
#topmenu a,
#menuTop a{
  padding: 4px 6px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #444 !important;
  border-radius: 0 !important;
  text-decoration: none !important;
}

.topmenu a:hover,
.top-menu a:hover,
.menu-top a:hover,
.menuTop a:hover,
.menuH a:hover,
.menu_header a:hover,
.header-menu a:hover,
.head-menu a:hover,
#topmenu a:hover,
#menuTop a:hover{
  color: #000 !important;
  text-decoration: underline !important;
}

.topmenu li.active > a,
.top-menu li.active > a,
.menu-top li.active > a,
#topmenu li.active > a,
#menuTop li.active > a{
  font-weight: 600 !important;
  color: #000 !important;
}

@media (max-width: 760px){
  .topmenu ul,
  .top-menu ul,
  .menu-top ul,
  #topmenu ul,
  #menuTop ul{
    justify-content: flex-start !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 12px !important;
    padding: 6px 10px !important;
    flex-wrap: nowrap;
  }
  .topmenu a,
  .top-menu a,
  .menu-top a,
  #topmenu a,
  #menuTop a{
    white-space: nowrap;
    font-size: 13px !important;
  }
}



/* =====================
   v17: Ultra-compact full-width grey top bar (overrides v15/v16)
   ===================== */

/* outer bar - edge-to-edge */
.topmenu,
.top-menu,
.menu-top,
.menuTop,
.menuH,
.menu_header,
.header-menu,
.head-menu,
#topmenu,
#menuTop{
  width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  background: #f1f1f1 !important;
  border-bottom: 1px solid #e2e2e2 !important;
}

/* inner list - compact height */
.topmenu ul,
.top-menu ul,
.menu-top ul,
.menuTop ul,
.menuH ul,
.menu_header ul,
.header-menu ul,
.head-menu ul,
#topmenu ul,
#menuTop ul{
  margin: 0 auto !important;
  padding: 4px 10px !important; /* smaller than v16 */
  max-width: 1320px;
  list-style: none !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 18px !important;
  flex-wrap: wrap;
}

/* links - strict/compact */
.topmenu a,
.top-menu a,
.menu-top a,
.menuTop a,
.menuH a,
.menu_header a,
.header-menu a,
.head-menu a,
#topmenu a,
#menuTop a{
  padding: 0 !important;
  font-size: 12.5px !important;
  line-height: 1 !important;
  font-weight: 500 !important;
  color: #555 !important;
  border-radius: 0 !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition: color .15s ease, text-decoration-color .15s ease;
}

.topmenu a:hover,
.top-menu a:hover,
.menu-top a:hover,
.menuTop a:hover,
.menuH a:hover,
.menu_header a:hover,
.header-menu a:hover,
.head-menu a:hover,
#topmenu a:hover,
#menuTop a:hover{
  color: #000 !important;
  text-decoration: underline !important;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* active */
.topmenu li.active > a,
.top-menu li.active > a,
.menu-top li.active > a,
#topmenu li.active > a,
#menuTop li.active > a{
  font-weight: 600 !important;
  color: #000 !important;
}

@media (max-width: 760px){
  .topmenu ul,
  .top-menu ul,
  .menu-top ul,
  #topmenu ul,
  #menuTop ul{
    justify-content: flex-start !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 14px !important;
    padding: 3px 10px !important;
    flex-wrap: nowrap;
  }
  .topmenu a,
  .top-menu a,
  .menu-top a,
  #topmenu a,
  #menuTop a{
    font-size: 12px !important;
  }
}



/* =====================
   v18: Targeted top menu (your real selectors)
   HTML:
   <div class="top-menu">
     <ul id="page-list" class="ul_top_bl">...</ul>
   ===================== */

.top-menu{
  padding: 0 !important;
  margin: 0 !important;
  min-height: 0 !important;
  background: #f1f1f1 !important;
  border-bottom: 1px solid #e2e2e2 !important;
  width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
}

#page-list.ul_top_bl{
  margin: 0 auto !important;
  padding: 2px 10px !important;   /* << ultra low height */
  max-width: 1320px;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 18px !important;
  list-style: none !important;
  flex-wrap: wrap;
}

#page-list.ul_top_bl > li{
  margin: 0 !important;
  padding: 0 !important;
}

#page-list.ul_top_bl a{
  display: inline-block;
  padding: 0 !important;
  font-size: 12px !important;
  line-height: 1 !important;
  color: #555 !important;
  text-decoration: none !important;
  white-space: nowrap;
}

#page-list.ul_top_bl a:hover{
  color: #000 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

@media (max-width: 760px){
  #page-list.ul_top_bl{
    justify-content: flex-start !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    gap: 14px !important;
    padding: 2px 10px !important;
  }
}



/* =====================
   v19: Cart styling fixes (header + product cards) WITHOUT affecting layout grids
   Targeted selectors only to avoid shifting markup
   ===================== */

/* ---------- Header cart capsule ---------- */
/* common Webasyst / theme selectors */
.cart,
.cart-info,
.cart-block,
#cart,
#cart-block,
#cart-summary,
#cart-content,
.header-cart,
.header_cart,
.header .cart,
.header #cart,
.header .cart-block,
.header .cart-info,
.header .cart-info a,
.header .cart a,
.header .cart-block a{
  /* do NOT change positioning; only visual */
  background: #fff !important;
  border: 1px solid #e6e6e6 !important;
  border-radius: 28px !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.06) !important;
}

/* inner padding for clickable element */
.cart a,
.cart-info a,
.cart-block a,
#cart a,
#cart-block a,
#cart-summary a,
.header-cart a,
.header .cart a{
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 16px !important;
  text-decoration: none !important;
}

/* icon color (gold like logo) */
.cart i,
.cart svg,
.cart a i,
.cart a svg,
#cart i,
#cart svg,
#cart a i,
#cart a svg{
  color: #d6b15a !important;
}

/* cart text */
.cart,
.cart a,
.cart-info,
.cart-info a,
.cart-block,
.cart-block a,
#cart,
#cart a{
  color: var(--text) !important;
  font-weight: 650;
}

/* nudge alignment: keep in line with phones without changing grid */
.header .cart,
.header #cart,
.header .cart-block{
  margin-top: 2px !important;
}

/* ---------- Product card add-to-cart button ---------- */
/* try to match your round cart button in product tiles */
.addtocart,
.addtocart a,
.button-cart,
.button_cart,
.cart-add,
.cart_add,
a.addtocart,
a.cart-add,
a.cart_add{
  background: #fff !important;
  border: 1px solid #e6e6e6 !important;
  border-radius: 999px !important;
  box-shadow: 0 3px 10px rgba(0,0,0,.08) !important;
}

/* the clickable icon inside */
.addtocart i,
.addtocart svg,
.button-cart i,
.button-cart svg,
.cart-add i,
.cart-add svg,
.cart_add i,
.cart_add svg{
  color: #d6b15a !important;
}

/* hover */
.addtocart:hover,
.addtocart a:hover,
.button-cart:hover,
.button_cart:hover,
.cart-add:hover,
.cart_add:hover,
a.addtocart:hover,
a.cart-add:hover,
a.cart_add:hover{
  background: #faf7ef !important;
}



/* =====================
   v20: Product tile cart button (.productListSubmit) + light animation
   Your markup:
   <button class="productListSubmit" type="submit"><img ...cart1.svg></button>
   ===================== */

button.productListSubmit{
  background: #fff !important;
  border: 1px solid #e6e6e6 !important;
  border-radius: 999px !important;
  width: 46px !important;
  height: 46px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 3px 10px rgba(0,0,0,.08) !important;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

button.productListSubmit img{
  width: 22px !important;
  height: 22px !important;
  display: block;
  /* try to tint the SVG to "gold" similar to header (works for many monochrome SVGs) */
  filter: brightness(0) saturate(100%) invert(72%) sepia(29%) saturate(746%) hue-rotate(7deg) brightness(96%) contrast(90%);
  transition: transform .16s ease, filter .16s ease;
}

/* Hover: subtle lift + warm background */
button.productListSubmit:hover{
  background: #faf7ef !important;
  border-color: #eadfc7 !important;
  box-shadow: 0 8px 18px rgba(0,0,0,.10) !important;
  transform: translateY(-1px);
}

/* Press: small "tap" */
button.productListSubmit:active{
  transform: translateY(0) scale(.98);
  box-shadow: 0 4px 12px rgba(0,0,0,.08) !important;
}

button.productListSubmit:hover img{
  transform: scale(1.05);
}

/* Keyboard focus */
button.productListSubmit:focus-visible{
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(214,177,90,.25), 0 6px 16px rgba(0,0,0,.10) !important;
  border-color: #d6b15a !important;
}



/* =====================
   v21 FIX: product tile cart button hover
   - Default: white bg + gold icon
   - Hover: bg stays white, icon becomes "price" color
   ===================== */

button.productListSubmit{
  background: #ffffff !important;
  border: 1px solid #e6e6e6 !important;
  border-radius: 999px !important;
  width: 46px !important;
  height: 46px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 3px 10px rgba(0,0,0,.08) !important;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

button.productListSubmit img{
  width: 22px !important;
  height: 22px !important;
  display: block;
  /* GOLD default */
  filter: brightness(0) saturate(100%) invert(69%) sepia(52%) saturate(474%) hue-rotate(6deg) brightness(95%) contrast(90%);
  transition: transform .16s ease, filter .16s ease;
}

/* Hover: keep white background, accent border/shadow, icon -> price color */
button.productListSubmit:hover{
  background: #ffffff !important;
  border-color: #8b3a3a !important; /* price color */
  box-shadow: 0 8px 18px rgba(139,58,58,.18) !important;
  transform: translateY(-1px);
}

button.productListSubmit:hover img{
  transform: scale(1.05);
  /* PRICE tone */
  filter: brightness(0) saturate(100%) invert(27%) sepia(25%) saturate(1900%) hue-rotate(331deg) brightness(95%) contrast(90%);
}

/* Press */
button.productListSubmit:active{
  transform: translateY(0) scale(.98);
  box-shadow: 0 4px 12px rgba(139,58,58,.16) !important;
}

/* Focus (keyboard) */
button.productListSubmit:focus-visible{
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(139,58,58,.18), 0 6px 16px rgba(0,0,0,.10) !important;
  border-color: #8b3a3a !important;
}
/* =========================================================
   CART (mobile): elements don't fit / overflow fixes
   ========================================================= */
@media (max-width: 560px){
  /* Keep cart area inside viewport */
  .cart-page, .cart, #cart, #cart-content, .cart-content{ max-width:100%; }

  /* If the cart is rendered as a table, make it responsive */
  table.cart,
  table.cart tbody,
  table.cart tr,
  table.cart td{
    display:block;
    width:100%;
  }
  table.cart tr{
    margin:0 0 14px;
    border-radius:14px;
    overflow:hidden;
  }
  table.cart td{
    border:0 !important;
  }

  /* Common cart item wrappers (different themes use different class names) */
  .cart-item,
  .cart__item,
  .cart-product,
  .cart-row,
  .cart__row,
  .cart-product-row{
    display:flex;
    flex-wrap:wrap;
    align-items:flex-start;
    gap:10px;
    width:100%;
    box-sizing:border-box;
  }

  /* Image block */
  .cart-item .image,
  .cart-item .img,
  .cart-product .image,
  .cart-product .img,
  .cart__item .image,
  .cart__item .img,
  .cart-row .image,
  .cart-row .img{
    flex:0 0 72px;
    max-width:72px;
  }
  .cart-item img,
  .cart-product img,
  .cart__item img,
  .cart-row img{
    max-width:72px;
    height:auto;
    border-radius:12px;
    display:block;
  }

  /* Title/summary */
  .cart-item .name,
  .cart-item .title,
  .cart-item .product-name,
  .cart-product .name,
  .cart-product .title,
  .cart-product .product-name,
  .cart__item .name,
  .cart__item .title,
  .cart-row .name,
  .cart-row .title{
    flex:1 1 calc(100% - 92px);
    min-width:0;
  }
  .cart-item .name a,
  .cart-item .title a,
  .cart-item .product-name a,
  .cart-product .name a,
  .cart-product .title a,
  .cart-product .product-name a,
  .cart__item .name a,
  .cart__item .title a,
  .cart-row .name a,
  .cart-row .title a{
    display:block;
    white-space:normal;
    overflow-wrap:anywhere;
    word-break:break-word;
  }

  /* Remove / trash button (often a round icon) */
  .cart-item .delete,
  .cart-item .remove,
  .cart-item .trash,
  .cart-item .delete-item,
  .cart-product .delete,
  .cart-product .remove,
  .cart-product .trash,
  .cart-product .delete-item,
  .cart__item .delete,
  .cart__item .remove,
  .cart-row .delete,
  .cart-row .remove{
    margin-left:auto;
    flex:0 0 auto;
  }

  /* Qty controls usually should go to the next line */
  .cart-item .quantity,
  .cart-item .qty,
  .cart-item .count,
  .cart-item .amount,
  .cart-product .quantity,
  .cart-product .qty,
  .cart-product .count,
  .cart-row .quantity,
  .cart-row .qty,
  .cart__item .quantity,
  .cart__item .qty{
    flex:1 1 100%;
    max-width:100%;
  }

  /* Price/total aligns to the right and must not overflow */
  .cart-item .price,
  .cart-item .total,
  .cart-product .price,
  .cart-product .total,
  .cart-row .price,
  .cart-row .total,
  .cart__item .price,
  .cart__item .total{
    margin-left:auto;
    text-align:right;
    max-width:100%;
  }

  /* Safety: prevent absolutely positioned inner icons from escaping */
  .cart-item,
  .cart__item,
  .cart-product,
  .cart-row,
  .cart__row{
    position:relative;
  }
  .cart-item *,
  .cart-product *,
  .cart__item *,
  .cart-row *{
    box-sizing:border-box;
    max-width:100%;
  }
}

/* =========================================================
   v23 tweaks (requested):
   1) Make cart/checkout blocks more compact like old site (no big рамки)
   2) Product cards: less “boxed”, smaller paddings, keep 4-in-row behavior
   3) Category/home tiles: make images bigger inside the frame (remove extra padding)
   ========================================================= */

/* --- 1) Cart / Checkout: remove heavy cards, make tighter --- */
body .cart, body .checkout, body .cart-page, body .checkout-page{ background:transparent; }

body .cart-item,
body .cart__item,
body .cart-product,
body .cart-row,
body .cart__row,
body .checkout .cart-item,
body .checkout .cart__item{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  border-radius:0 !important;
}

@media (max-width: 767px){
  body .cart-item,
  body .cart__item,
  body .cart-product,
  body .cart-row,
  body .cart__row{
    padding:2px 2px !important;
    margin:0 !important;
  }

  /* Make thumbs smaller so everything fits */
  body .cart-item .image,
  body .cart-item .thumb,
  body .cart-item .photo,
  body .cart__item .image,
  body .cart__item .thumb,
  body .cart__item .photo{
    width:64px !important;
    height:64px !important;
    flex:0 0 64px !important;
  }

  /* Compact qty controls */
  body .cart-item .quantity,
  body .cart-item .qty,
  body .cart__item .quantity,
  body .cart__item .qty{
    margin-top:8px !important;
  }
  body .cart-item .quantity button,
  body .cart-item .qty button,
  body .cart__item .quantity button,
  body .cart__item .qty button{
    width:28px !important;
    height:28px !important;
    line-height:26px !important;
    border-radius:8px !important;
  }
  body .cart-item .quantity input,
  body .cart-item .qty input,
  body .cart__item .quantity input,
  body .cart__item .qty input{
    height:28px !important;
    min-width:34px !important;
  }
}

/* --- 2) Product cards in category + homepage: less рамок, tighter --- */
#product-list2 .product,
.product-home .product,
.products .product,
.product-list .product,
.product-list2 .product,
.product__item,
.product-item{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}

/* Inner card wrapper (if exists) */
#product-list2 .product .inner,
.product-home .product .inner,
.products .product .inner,
.product-item .inner{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  padding:0 !important;
}

/* Make typography a bit smaller (mobile) */
@media (max-width: 767px){
  #product-list2 .product .name,
  .product-home .product .name,
  .products .product .name,
  .product-item .name{
    font-size:13px !important;
    line-height:1.25 !important;
  }
  #product-list2 .product .price,
  .product-home .product .price,
  .products .product .price,
  .product-item .price{
    font-size:16px !important;
  }
}

/* --- 3) Category tiles (home grid): enlarge image inside frame --- */
.home-cat .produt a{ display:block; }

.home-cat .produt .img{
  padding:0 !important;
  border-radius:18px;
  overflow:hidden;
}

.home-cat .produt .img img{
  width:100% !important;
  height:100% !important;
  display:block;
}

/* If the tile has a fixed height, give it one for consistent bigger images */
@media (min-width: 992px){
  .home-cat .produt .img{ height:150px; }
}
@media (max-width: 991px){
  .home-cat .produt .img{ height:128px; }
}

/* Also cover product images in lists (if they were getting smaller due to padding) */
#product-list2 .product img,
.product-home .product img,
.products .product img,
.product-item img{
  max-width:100%;
}

/* Common image wrappers */
#product-list2 .product .img,
#product-list2 .product .image,
.product-home .product .img,
.product-home .product .image,
.products .product .img,
.products .product .image,
.product-item .img,
.product-item .image{
  padding:0 !important;
  overflow:hidden;
}

#product-list2 .product .img img,
#product-list2 .product .image img,
.product-home .product .img img,
.product-home .product .image img,
.products .product .img img,
.products .product .image img,
.product-item .img img,
.product-item .image img{
  width:100% !important;
  height:100% !important;
  object-fit:cover;
  display:block;
}

/* ===============================
   v24: MOBILE CART LAYOUT + BIGGER PRODUCT IMAGES (category + home)
   =============================== */

/* --- Bigger product images to fill the card frame (category + home product grids) --- */
.product-list li.item_li .image,
.product-list li.item_li .image_main,
.product-home .product .img{
  padding: 0 !important;
}

.product-list li.item_li .image img,
.product-list li.item_li .image_main img{
  display: block;
  width: 100% !important;
  height: 190px !important;
  object-fit: cover;

}

.product-home .product .img{
  height: 210px !important;
}
.product-home .product .img img{
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
  border-radius: 14px;
}

@media (max-width: 991px){
  .product-list li.item_li .image img,
  .product-list li.item_li .image_main img{
    height: 170px !important;
  }
  .product-home .product .img{
    height: 180px !important;
  }
}



@media (max-width: 860px) {
    .checkout.white-block {
        margin-top: 30px;
    }
}



/* === CART MOBILE: title full width + qty + delete + price in one row === */
@media (max-width: 767px){


  /* Оставляем цену и удаление (они нам нужны во 2-й строке) */
  tr.tr_cart .cart_td_price,
  tr.tr_cart .cart_td_remove,
  tr.tr_cart .cart_td_mobile{
    display: block !important;
  }

  /* Делаем строку товара grid-ом */
  tr.tr_cart{
    display: grid !important;
    grid-template-columns: 78px 1fr auto;
    grid-template-areas:
      "img title title"
      "qty remove price";
    column-gap: 12px;
    row-gap: 10px;
    align-items: start;
    padding: 12px 0;
  }

  /* Фото */
  tr.tr_cart .img-col-cart{ grid-area: img; }
  tr.tr_cart .img-col-cart .img{
    display:block;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background-size: cover !important;
    background-position: center !important;
  }

  /* Название — на всю ширину */
  tr.tr_cart .cart_td_name{
    grid-area: title;
    padding: 0 !important;
    margin: 0 !important;
  }
  tr.tr_cart .cart_td_name .cart-item{
    display:block;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    white-space: normal;
  }
  tr.tr_cart .cart_td_name .cart-item-sku{
    display:inline;
    opacity:.65;
    font-weight: 400;
  }

  /* Количество — используем мобильный блок */
  tr.tr_cart .cart_td_mobile{
    grid-area: qty;
    padding: 0 !important;
    margin: 0 !important;
  }
  tr.tr_cart .cart_td_mobile .row_cart{
    display:block !important;
  }
  tr.tr_cart .cart_td_count_mobile{
    display:flex;
    align-items:center;
    gap: 6px;
  }

  /* Удалить — справа от количества */
  tr.tr_cart .cart_td_remove{
    grid-area: remove;
    padding: 0 !important;
    margin: 0 !important;
    align-self: center;
    text-align: center !important;
  }
  tr.tr_cart .cart_td_remove a.delete{
    display:inline-flex;
    width: 40px;
    height: 40px;
    align-items:center;
    justify-content:center;
    border-radius: 999px;
  }

  /* Цена — справа */
  tr.tr_cart .cart_td_price{
    grid-area: price;
    padding: 0 !important;
    margin: 0 !important;
    align-self: center;
    text-align: right !important;
    font-weight: 700;
    white-space: nowrap;
  }

  /* Прячем дублирующую цену внутри mobile-блока (если есть) */
  tr.tr_cart .cart_td_price_mobile{
    display:none !important;
  }
}

/* === CART MOBILE FIX (table -> grid layout) === */
@media (max-width: 767px){

  /* 1) "Ломаем" табличную раскладку на мобиле */
  table.cart,
  .cart table,
  table.cart tbody,
  .cart table tbody{
    display:block !important;
    width:100% !important;
  }

  table.cart tr.tr_cart,
  .cart table tr.tr_cart{
    display:grid !important;
    grid-template-columns: 78px 1fr auto auto;  /* img | title | remove | price */
    grid-template-areas:
      "img title title title"
      "qty qty remove price";
    column-gap: 12px;
    row-gap: 10px;
    align-items: start;
    width:100% !important;
    padding: 12px 0;
  }

  table.cart tr.tr_cart > td,
  .cart table tr.tr_cart > td{
    display:block !important;
    width:auto !important;
    padding:0 !important;
    margin:0 !important;
    float:none !important;
  }


  /* 3) Фото */
  tr.tr_cart .img-col-cart{ grid-area: img; }
  tr.tr_cart .img-col-cart .img{
    display:block;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background-size: cover !important;
    background-position: center !important;
  }

  /* 4) Название — на всю ширину */
  tr.tr_cart .cart_td_name{ grid-area: title; }
  tr.tr_cart .cart_td_name .cart-item{
    display:block;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    white-space: normal;
  }
  tr.tr_cart .cart_td_name .cart-item-sku{
    opacity:.65;
    font-weight: 400;
  }

  /* 5) Вторая строка: qty слева */
  tr.tr_cart .cart_td_mobile{ grid-area: qty; }
  tr.tr_cart .cart_td_mobile .row_cart{ display:block !important; }
  tr.tr_cart .cart_td_count_mobile{
    display:flex;
    align-items:center;
    gap: 6px;
  }

  /* 6) Удалить — справа от qty */
  tr.tr_cart .cart_td_remove{
    grid-area: remove;
    justify-self: end;
    align-self: center;
    text-align: right !important;
  }
  tr.tr_cart .cart_td_remove a.delete{
    display:inline-flex;
    width: 40px;
    height: 40px;
    align-items:center;
    justify-content:center;
    border-radius: 999px;
  }

  /* 7) Цена — край справа */
  tr.tr_cart .cart_td_price{
    grid-area: price;
    justify-self: end;
    align-self: center;
    text-align: right !important;
    font-weight: 700;
    white-space: nowrap;
  }

  /* чтобы не было дубля цены из mobile-ячейки */
  tr.tr_cart .cart_td_price_mobile{ display:none !important; }
}

/* === CART MOBILE PATCH v2: qty + remove + price in one row, compact qty, no img frame === */
@media (max-width: 767px){

  /* 0) Убираем дубли: оставляем ТОЛЬКО mobile-ряд */
  tr.tr_cart td.cart_td_mobile{ display:block !important; }

  /* 1) Картинка без рамки/плашки */
  tr.tr_cart .img-col-cart a{ display:block; }
  tr.tr_cart .img-col-cart .img{
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background-color: transparent !important;
  }

  /* 2) Вторая строка: qty | remove | price (одна линия) */
  tr.tr_cart td.cart_td_mobile{
    grid-area: qty;
    width:100%;
  }
  tr.tr_cart td.cart_td_mobile .row_cart{
    display:grid !important;
    grid-template-columns: 1fr auto auto; /* qty | remove | price */
    align-items:center;
    gap: 10px;
    width:100%;
  }

  /* qty слева */
  tr.tr_cart td.cart_td_mobile .cart_td_count_mobile{
    justify-self:start;
    display:inline-flex !important;
    align-items:center;
    gap: 6px;
  }

  /* remove берём из отдельной ячейки и ставим во 2 колонку */
  tr.tr_cart td.cart_td_remove{
    grid-area: unset !important;
    justify-self:end;
    align-self:center;
    margin:0 !important;
  }
  tr.tr_cart td.cart_td_remove a.delete{
    display:inline-flex;
    width: 38px;
    height: 38px;
    align-items:center;
    justify-content:center;
    border-radius: 999px;
  }

  /* price справа */
  tr.tr_cart td.cart_td_price{
    grid-area: unset !important;
    justify-self:end;
    align-self:center;
    font-weight:700;
    white-space:nowrap;
  }

  /* 3) Прячем mobile-цену, чтобы не было дубля */
  tr.tr_cart .cart_td_price_mobile{ display:none !important; }

  /* 4) Кол-во компактнее */
  tr.tr_cart .btn_count{
    width: 28px !important;
    height: 28px !important;
    line-height: 28px !important;
    border-radius: 6px !important;
  }
  tr.tr_cart input.qty{
    width: 34px !important;
    height: 28px !important;
    padding: 0 !important;
    text-align:center !important;
    font-size: 13px !important;
    border-radius: 6px !important;
  }

  /* если внутри темы плюс/минус имеют свои td/float */
  tr.tr_cart .cart_td_count_mobile *{
    float:none !important;
  }
}

/* === CART MOBILE layout for your exact markup (.tr_cart) === */
@media (max-width: 767px){

  /* hide desktop qty/price columns */
  tr.tr_cart > td.cart_td_count,
  tr.tr_cart > td.cart_td_price{
    display:none !important;
  }

  /* make row flexible without breaking table on desktop */
  tr.tr_cart{
    position:relative !important;
    display:flex !important;
    flex-wrap:wrap !important;
    align-items:flex-start !important;
    gap:10px 10px !important;
    padding:14px 14px 18px !important;
  }

  tr.tr_cart > td{
    display:block !important;
    padding:0 !important;
    border:0 !important;
    background:transparent !important;
  }

  /* image */
  tr.tr_cart > td.img-col-cart{
    width:74px !important;
    flex:0 0 74px !important;
    order:1 !important;
  }

  /* remove "frame" around image */
  tr.tr_cart > td.img-col-cart .img{
    border:0 !important;
    outline:0 !important;
    box-shadow:none !important;
    background-color:transparent !important;
    border-radius:14px !important; /* можно убрать если не надо */
  }

  /* title takes all space to the right of image */
  tr.tr_cart > td.cart_td_name{
    flex:1 1 auto !important;
    min-width:0 !important;
    order:2 !important;
    padding-right:70px !important; /* место под кнопку удалить */
  }
  tr.tr_cart > td.cart_td_name a.cart-item{
    display:block !important;
    white-space:normal !important;
    word-break:break-word !important;
    line-height:1.25 !important;
  }
  tr.tr_cart > td.cart_td_name .cart-item-sku{
    display:block !important;
    margin-top:4px !important;
    opacity:.7 !important;
  }

  /* second line: qty + price */
  tr.tr_cart > td.cart_td_mobile{
    width:100% !important;
    flex:0 0 100% !important;
    order:3 !important;
    margin-top:8px !important;
  }
  tr.tr_cart td.cart_td_mobile .row_cart{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:10px !important;
    width:100% !important;
  }

  /* compact qty */
  tr.tr_cart .cart_td_count_mobile{
    display:inline-flex !important;
    align-items:center !important;
    gap:6px !important;
  }
  tr.tr_cart .btn_count{
    width:28px !important;
    height:28px !important;
    line-height:28px !important;
    border-radius:6px !important;
  }
  tr.tr_cart input.qty{
    width:34px !important;
    height:28px !important;
    padding:0 !important;
    text-align:center !important;
    font-size:13px !important;
    border-radius:6px !important;
  }

  /* price right */
  tr.tr_cart .cart_td_price_mobile{
    font-weight:700 !important;
    white-space:nowrap !important;
  }

  /* DELETE button: put near qty line (right side of second line) */
  tr.tr_cart > td.cart_td_remove{
    position:absolute !important;
    left:calc(14px + 74px + 10px + 110px) !important; /* фото + gap + зона qty */
    bottom:16px !important;
    width:auto !important;
    order:999 !important;
  }
  tr.tr_cart > td.cart_td_remove a.delete{
    display:inline-flex !important;
    width:40px !important;
    height:40px !important;
    align-items:center !important;
    justify-content:center !important;
    border-radius:999px !important;
  }
}

/* === CART MOBILE: fix double qty + delete position === */
@media (max-width: 767px){

  /* hide desktop columns */
  .tr_cart > td.cart_td_count,
  .tr_cart > td.cart_td_price{
    display:none !important;
  }

  /* row layout */
  .tr_cart{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:10px !important;
    padding:14px !important;
    position:relative !important;
  }

  .tr_cart > td{
    display:block !important;
    padding:0 !important;
    border:0 !important;
  }

  /* image */
  .tr_cart > td.img-col-cart{
    flex:0 0 70px !important;
  }
  .tr_cart > td.img-col-cart .img{
    border:0 !important;
    box-shadow:none !important;
    background-color:transparent !important;
  }

  /* title */
  .tr_cart > td.cart_td_name{
    flex:1 1 auto !important;
    min-width:0 !important;
  }
  .tr_cart > td.cart_td_name a{
    display:block !important;
    white-space:normal !important;
    line-height:1.25 !important;
  }
  .cart-item-sku{
    display:block !important;
    opacity:.7 !important;
    margin-top:4px !important;
  }

  /* bottom row: qty + price + delete */
  .tr_cart > td.cart_td_mobile{
    width:100% !important;
    margin-top:8px !important;
  }

  .tr_cart .row_cart{
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:10px !important;
  }

  /* compact qty */
  .cart_td_count_mobile{
    display:flex !important;
    align-items:center !important;
    gap:6px !important;
  }
  .btn_count{
    width:28px !important;
    height:28px !important;
    line-height:28px !important;
    border-radius:6px !important;
  }
  input.qty{
    width:34px !important;
    height:28px !important;
    padding:0 !important;
    text-align:center !important;
    font-size:13px !important;
  }

  /* price */
  .cart_td_price_mobile{
    font-weight:700 !important;
    white-space:nowrap !important;
  }

  /* delete button inline (NO absolute!) */
  .tr_cart > td.cart_td_remove{
    position:static !important;
    margin-left:auto !important;
  }
  .tr_cart > td.cart_td_remove a.delete{
    width:36px !important;
    height:36px !important;
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    border-radius:50% !important;
  }
}

/* =========================
   CART (mobile) — нормальная сетка
   1 строка: фото + название
   2 строка: количество + цена + удалить
   ========================= */
@media (max-width: 767px){

  /* сам ряд делаем сеткой */
  tr.tr_cart{
    position: relative;
    display: grid !important;
    grid-template-columns: 86px 1fr;
    grid-template-areas:
      "img name"
      "controls controls";
    gap: 10px 12px;
    padding: 12px 12px 14px;
    border-radius: 16px;
    background: #fff;
  }

  /* прячем десктопные колонки, чтобы не было дублей */
  tr.tr_cart > td.cart_td_count,
  tr.tr_cart > td.cart_td_price{
    display: none !important;
  }

  /* картинка слева */
  td.img-col-cart{
    grid-area: img;
    width: 86px !important;
    min-width: 86px !important;
    padding: 0 !important;
    vertical-align: top !important;
  }

  /* убираем “рамку” у картинки */
  td.img-col-cart .img{
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 14px !important;
    background-size: cover !important;
    background-position: center !important;
    width: 86px !important;
    height: 86px !important;
    display: block !important;
  }

  /* название справа от картинки — на всю ширину */
  td.cart_td_name{
    grid-area: name;
    padding: 0 !important;
    vertical-align: top !important;
  }
  td.cart_td_name .cart-item{
    display: block !important;
    line-height: 1.25 !important;
    font-weight: 600;
  }
  td.cart_td_name .cart-item span{
    white-space: normal !important;
  }
  td.cart_td_name .cart-item-sku{
    display: inline !important;
    opacity: .7;
    font-weight: 400;
  }

  /* нижняя строка (кол-во + цена) */
  td.cart_td_mobile{
    grid-area: controls;
    padding: 0 !important;
  }

  td.cart_td_mobile .row_cart{
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  /* количество компактнее */
  .cart_td_count_mobile{
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  .cart_td_count_mobile .btn_count{
    width: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
  }

  .cart_td_count_mobile .qty{
    width: 36px !important;
    height: 30px !important;
    padding: 0 !important;
    text-align: center !important;
    border-radius: 8px !important;
    font-size: 14px !important;
  }

  /* цена справа (в той же строке) */
  .cart_td_price_mobile{
    font-weight: 700 !important;
    white-space: nowrap !important;
  }

  /* удалить — справа от количества/цены, аккуратной кнопкой */
  td.cart_td_remove{
    position: absolute !important;
    right: 12px !important;
    bottom: 12px !important;
    padding: 0 !important;
    width: auto !important;
  }

  td.cart_td_remove a.delete{
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 999px !important;
    border: 1px solid #e9e9e9 !important;
    background: #fff !important;
    box-shadow: 0 6px 18px rgba(0,0,0,.08) !important;
  }

  td.cart_td_remove a.delete img.remove_icon{
    width: 18px !important;
    height: 18px !important;
  }
}

/* =========================================
   CART mobile FIX (table layout)
   - убираем дубли колонок
   - 1 строка: фото + название (на всю ширину)
   - 2 строка: количество + цена + удалить (удалить справа)
   ========================================= */
@media (max-width: 767px){

  /* Скрываем ДЕСКТОПНЫЕ count/price на мобилке (чтобы не было дубля) */
  table.cart tr.tr_cart > td.cart_td_count,
  table.cart tr.tr_cart > td.cart_td_price{
    display: none !important;
  }

  /* Ряд корзины превращаем в grid */
  table.cart tr.tr_cart{
    display: grid !important;
    grid-template-columns: 86px 1fr auto;
    grid-template-areas:
      "img name name"
      "controls controls remove";
    gap: 10px 12px;
    padding: 12px 12px 14px;
    border-radius: 16px;
    background: #fff;
  }

  /* Картинка */
  table.cart tr.tr_cart > td.img-col-cart{
    grid-area: img;
    padding: 0 !important;
    width: 86px !important;
    min-width: 86px !important;
    vertical-align: top !important;
  }

  /* Убираем рамку у картинки */
  table.cart tr.tr_cart > td.img-col-cart .img{
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
    border-radius: 14px !important;
    background-size: cover !important;
    background-position: center !important;
    width: 86px !important;
    height: 86px !important;
    display: block !important;
  }

  /* Название — на всю ширину справа */
  table.cart tr.tr_cart > td.cart_td_name{
    grid-area: name;
    padding: 0 !important;
  }
  table.cart tr.tr_cart > td.cart_td_name .cart-item{
    display: block !important;
    font-weight: 600;
    line-height: 1.25 !important;
  }
  table.cart tr.tr_cart > td.cart_td_name .cart-item span{
    white-space: normal !important;
  }
  table.cart tr.tr_cart > td.cart_td_name .cart-item-sku{
    opacity: .7;
    font-weight: 400;
  }

  /* Мобильная строка "количество + цена" */
  table.cart tr.tr_cart > td.cart_td_mobile{
    grid-area: controls;
    padding: 0 !important;
  }

  table.cart tr.tr_cart > td.cart_td_mobile .row_cart{
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
  }

  /* Количество — компактнее */
  table.cart tr.tr_cart .cart_td_count_mobile{
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
  }

  table.cart tr.tr_cart .cart_td_count_mobile .btn_count{
    width: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
    border-radius: 8px !important;
  }

  table.cart tr.tr_cart .cart_td_count_mobile .qty{
    width: 36px !important;
    height: 30px !important;
    padding: 0 !important;
    text-align: center !important;
    border-radius: 8px !important;
    font-size: 14px !important;
  }

  /* Цена */
  table.cart tr.tr_cart .cart_td_price_mobile{
    font-weight: 700 !important;
    white-space: nowrap !important;
  }

  /* Удалить — справа от количества/цены (внизу) */
  table.cart tr.tr_cart > td.cart_td_remove{
    grid-area: remove;
    padding: 0 !important;
    align-self: center !important;
    justify-self: end !important;
  }

  table.cart tr.tr_cart > td.cart_td_remove a.delete{
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 999px !important;
    border: 1px solid #e9e9e9 !important;
    background: #fff !important;
    box-shadow: 0 6px 18px rgba(0,0,0,.08) !important;
  }

  table.cart tr.tr_cart > td.cart_td_remove img.remove_icon{
    width: 18px !important;
    height: 18px !important;
  }
}

@media (max-width: 767px){

  /* === 1. ЦЕНА — вернуть и зафиксировать === */
  table.cart tr.tr_cart .cart_td_price_mobile{
    display: block !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    white-space: nowrap !important;
    margin-left: auto !important;
  }

  table.cart tr.tr_cart .row_cart{
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  /* === 2. УБРАТЬ РАМКУ У КАРТИНОК (на 100%) === */
  table.cart tr.tr_cart td.img-col-cart .img{
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    background-color: transparent !important;
  }

  table.cart tr.tr_cart td.img-col-cart a{
    border: none !important;
    box-shadow: none !important;
  }

  /* === 3. КОЛИЧЕСТВО — компактнее === */
  table.cart tr.tr_cart .cart_td_count_mobile .btn_count{
    width: 28px !important;
    height: 28px !important;
    line-height: 28px !important;
    font-size: 14px !important;
  }

  table.cart tr.tr_cart .cart_td_count_mobile .qty{
    width: 34px !important;
    height: 28px !important;
    font-size: 14px !important;
    padding: 0 !important;
  }

}

@media (max-width: 767px){

  /* 1) На всякий случай: включаем и мобильную цену, и “десктопную” цену */
  table.cart tr.tr_cart td.cart_td_mobile,
  table.cart tr.tr_cart td.cart_td_price{
    display: table-cell !important;
    visibility: visible !important;
  }

  table.cart tr.tr_cart .cart_td_price_mobile,
  table.cart tr.tr_cart td.cart_td_price{
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* 2) Делаем карточку строкой-блоком, чтобы можно было нормально разложить элементы */
  table.cart tr.tr_cart{
    position: relative !important;
  }

  /* 3) Цена — справа снизу */
  table.cart tr.tr_cart td.cart_td_price,
  table.cart tr.tr_cart .cart_td_price_mobile{
    position: absolute !important;
    right: 14px !important;
    bottom: 12px !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    white-space: nowrap !important;
    margin: 0 !important;
    z-index: 2 !important;
  }

  /* 4) Чтобы цена не налезала: чуть поднимем блок количества */
  table.cart tr.tr_cart td.cart_td_count,
  table.cart tr.tr_cart .cart_td_count_mobile{
    margin-bottom: 26px !important;
  }

  /* 5) Рамку у картинки убираем (как просил) */
  table.cart tr.tr_cart td.img-col-cart .img{
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
  }
}

@media (max-width: 767px){

  /* 1) Полностью скрываем десктопную цену */
  table.cart tr.tr_cart td.cart_td_price{
    display: none !important;
  }

  /* 2) Оставляем ТОЛЬКО мобильную цену */
  table.cart tr.tr_cart .cart_td_price_mobile{
    display: block !important;
    position: absolute !important;
    right: 14px !important;
    bottom: 12px !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    white-space: nowrap !important;
    opacity: 1 !important;
    z-index: 2 !important;
  }

  /* 3) Чтобы цена не налезала на кнопки */
  table.cart tr.tr_cart .cart_td_count_mobile{
    margin-bottom: 26px !important;
  }
}

@media (max-width: 767px){

  /* === Цена (крупнее + не вылазит за экран) === */
  table.cart tr.tr_cart .cart_td_price_mobile{
    right: 100px !important;      /* сдвигаем влево */
    bottom: 54px !important;
    font-size: 17px !important;  /* делаем крупнее */
    font-weight: 700 !important;
    line-height: 1 !important;
  }

  /* === Кнопка "удалить" — левее и компактнее === */
  table.cart tr.tr_cart td.cart_td_remove{
    position: absolute !important;
    right: 34px !important;      /* было слишком справа */
    bottom: 26px !important;
    z-index: 3 !important;
  }

  table.cart tr.tr_cart td.cart_td_remove .delete{
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* === Чуть больше воздуха снизу под количеством === */
  table.cart tr.tr_cart .cart_td_count_mobile{
    margin-bottom: 30px !important;
  }
}
