/* Woodstyle: мини-корзина. Стили ограничены выпадающей корзиной. */
#top #top-links #cart > .dropdown-menu.ws-mini-cart{box-sizing:border-box;width:580px!important;min-width:0!important;max-width:calc(100vw - 24px)!important;padding:24px!important;right:0;left:auto;border:1px solid #e7e5e1!important;border-radius:18px!important;background:#fff!important;color:#303a30;box-shadow:0 16px 45px #0002!important;font-family:'PT Sans Narrow',sans-serif;max-height:calc(100dvh - 110px);overflow-y:auto;overscroll-behavior:contain}
#top #top-links #cart .ws-mini-cart *{box-sizing:border-box}
#top #top-links #cart .ws-mini-cart > li{padding:0!important;margin:0;min-width:0}
#top #top-links #cart .ws-mini-cart table{width:100%!important;max-width:none!important;margin:0!important;border:0!important;border-collapse:collapse;background:transparent!important}
#top #top-links #cart .ws-mini-cart td{border:0!important;padding:0!important;background:transparent!important;vertical-align:middle;font-size:17px;line-height:1.35;color:#303a30}
#top #top-links #cart .ws-mini-cart .ws-cart-products,#top #top-links #cart .ws-mini-cart .ws-cart-products tbody{display:block}
#top #top-links #cart .ws-mini-cart .ws-cart-products tr{display:grid;grid-template-columns:100px minmax(0,1fr) auto auto 34px;align-items:center;gap:12px;padding:12px 0 20px;background:transparent!important}
#top #top-links #cart .ws-mini-cart .ws-cart-products tr+tr{border-top:1px solid #eceae7;padding-top:20px}
#top #top-links #cart .ws-mini-cart .ws-cart-products td:nth-child(2){min-width:0;text-align:left;overflow-wrap:anywhere}
#top #top-links #cart .ws-mini-cart .ws-cart-products td:nth-child(3),#top #top-links #cart .ws-mini-cart .ws-cart-products td:nth-child(4){white-space:nowrap;text-align:right}
#top #top-links #cart .ws-mini-cart .ws-cart-products a{color:#303a30!important;text-decoration:none;font-size:18px;line-height:1.35}
#top #top-links #cart .ws-mini-cart .ws-cart-products a:hover{text-decoration:underline}
#top #top-links #cart .ws-mini-cart .ws-cart-products small{font-size:14px;color:#777}
#top #top-links #cart .ws-mini-cart .img-thumbnail{display:block;width:100px!important;height:100px!important;max-width:none!important;padding:0!important;border:0!important;border-radius:12px!important;object-fit:cover;background:#f5f4f2}
#top #top-links #cart .ws-mini-cart .ws-cart-remove{display:inline-flex;align-items:center;justify-content:center;width:34px;height:38px;min-width:0;padding:0!important;margin:0;border:0!important;border-radius:9px!important;background:#f4f3f1!important;color:#777!important;box-shadow:none;font-size:16px;cursor:pointer}
#top #top-links #cart .ws-mini-cart .ws-cart-remove:hover{background:#eae7e3!important;color:#303a30!important}
#top #top-links #cart .ws-mini-cart .ws-cart-totals{border-top:1px solid #e6e4e0!important;margin-top:4px!important}
#top #top-links #cart .ws-mini-cart .ws-cart-totals td{padding-top:16px!important;color:#81817a;font-size:17px;text-align:left}
#top #top-links #cart .ws-mini-cart .ws-cart-totals td strong{font-weight:400}
#top #top-links #cart .ws-mini-cart .ws-cart-totals td:last-child{white-space:nowrap;text-align:right;padding-left:16px!important}
#top #top-links #cart .ws-mini-cart .ws-cart-totals tr:last-child td{font-size:21px;color:#303a30;padding-bottom:4px!important}
#top #top-links #cart .ws-mini-cart .ws-cart-totals tr:last-child strong{font-weight:700}
#top #top-links #cart .ws-mini-cart .ws-cart-actions{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:24px 0 0!important;text-align:center}
#top #top-links #cart .ws-mini-cart .ws-cart-actions a{display:flex;align-items:center;justify-content:center;min-height:48px;padding:10px 15px!important;border:1px solid #dcded8!important;border-radius:999px!important;background:#fff!important;color:#303a30!important;text-decoration:none;font-size:19px;line-height:1.2;white-space:nowrap}
#top #top-links #cart .ws-mini-cart .ws-cart-actions strong{font-weight:700}
#top #top-links #cart .ws-mini-cart .ws-cart-actions .ws-cart-checkout{background:#303a30!important;border-color:#303a30!important;color:#fff!important}
#top #top-links #cart .ws-mini-cart .ws-cart-actions a:hover{background:#f3f2ef!important}
#top #top-links #cart .ws-mini-cart .ws-cart-actions .ws-cart-checkout:hover{background:#484848!important}
#top #top-links #cart .ws-mini-cart a:focus-visible,#top #top-links #cart .ws-mini-cart button:focus-visible{outline:2px solid #777;outline-offset:3px}
#top #top-links #cart .ws-mini-cart > li > p.text-center{margin:0;padding:18px 8px;text-align:center;font-size:18px;color:#777}
@media(max-width:600px){
#top #top-links #cart > .dropdown-menu.ws-mini-cart{position:fixed!important;top:76px!important;right:12px!important;left:12px!important;width:auto!important;max-width:none!important;padding:18px!important;max-height:calc(100dvh - 92px)}
#top #top-links #cart .ws-mini-cart .ws-cart-products tr{grid-template-columns:84px minmax(0,1fr) 44px;gap:10px}
#top #top-links #cart .ws-mini-cart .ws-cart-remove{width:44px;height:44px}
#top #top-links #cart .ws-mini-cart .img-thumbnail{width:84px!important;height:84px!important}
#top #top-links #cart .ws-mini-cart .ws-cart-products td:first-child{grid-row:1 / 3;grid-column:1}
#top #top-links #cart .ws-mini-cart .ws-cart-products td:nth-child(2){grid-column:2;grid-row:1}
#top #top-links #cart .ws-mini-cart .ws-cart-products td:nth-child(3){grid-column:2;grid-row:2;text-align:left;color:#777}
#top #top-links #cart .ws-mini-cart .ws-cart-products td:nth-child(4){grid-column:2;grid-row:3;text-align:left;font-size:19px}
#top #top-links #cart .ws-mini-cart .ws-cart-products td:last-child{grid-column:3;grid-row:1}
#top #top-links #cart .ws-mini-cart .ws-cart-actions{gap:10px}
#top #top-links #cart .ws-mini-cart .ws-cart-actions a{font-size:17px;padding:10px!important}
}
@media(max-width:360px){#top #top-links #cart .ws-mini-cart .ws-cart-actions{grid-template-columns:1fr}}

/* Пустое окно: исходный компактный размер, включая AJAX-обновления списка. */
#top #top-links #cart > .dropdown-menu.ws-mini-cart:not(:has(table)){width:290px!important;min-width:0!important;max-width:calc(100vw - 24px)!important;padding:12px!important;border-radius:14px!important}
#top #top-links #cart .ws-mini-cart:not(:has(table)) > li > p.text-center{padding:18px 12px 20px!important}
#cart_btn .ws-cart-label{position:relative;display:inline-flex!important;align-items:center;gap:7px}
#cart_btn .ws-cart-label em{font-style:normal}
#cart_btn .ws-cart-count{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;padding:0 6px;border-radius:999px;background:#303a30;color:#fff;font:700 14px/1 Arial,sans-serif}
#top #top-links #cart:has(.dropdown-menu p.text-center) #cart_btn .ws-cart-count{display:none}
#top #top-links #cart:has(.dropdown-menu p.text-center) #cart_btn > .ws-cart-label{display:block!important}
@media(max-width:1199px){
#cart_btn{position:relative}
#cart_btn .ws-cart-label{position:absolute;top:-5px;right:-8px}
#top #top-links #cart:has(.dropdown-menu p.text-center) #cart_btn .ws-cart-label{display:none!important}
}
@media(max-width:600px){
#top #top-links #cart > .dropdown-menu.ws-mini-cart:not(:has(table)){position:fixed!important;left:auto!important;right:12px!important;top:76px!important;width:290px!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 92px)!important}
}

/* Шапка сайта имеет z-index:1003; корзина должна быть выше. */
#top #top-links #cart > .dropdown-menu.ws-mini-cart{z-index:1010!important}

/* v4: мобильный значок без фона нажатия; счётчик отдельно от рисунка. */
@media(max-width:1199px){
  #top #top-links #cart > #cart_btn,
  #top #top-links #cart > #cart_btn:hover,
  #top #top-links #cart > #cart_btn:focus,
  #top #top-links #cart > #cart_btn:active,
  #top #top-links #cart.open > #cart_btn {
    position:relative;display:inline-flex!important;align-items:center;justify-content:flex-start;
    box-sizing:border-box;width:44px;height:24px;padding:0!important;
    background:transparent!important;box-shadow:none!important;text-shadow:none!important;
    -webkit-tap-highlight-color:transparent;
  }
  #top #top-links #cart > #cart_btn .icon_shopping-cart {
    position:static!important;display:block;width:24px!important;height:24px!important;
    flex:0 0 24px;background-size:24px auto!important;background-color:transparent!important;
    box-shadow:none!important;filter:none!important;
  }
  #top #top-links #cart > #cart_btn .ws-cart-label {
    position:absolute!important;top:-7px!important;left:27px!important;right:auto!important;
    margin:0!important;padding:0!important;line-height:1;pointer-events:none;
  }
  #top #top-links #cart > #cart_btn .ws-cart-count {
    box-sizing:border-box;min-width:18px;height:18px;padding:0 4px;font:700 11px/1 Arial,sans-serif;
  }
  #top #top-links #cart > #cart_btn:focus:not(:focus-visible){outline:none}
  #top #top-links #cart > #cart_btn:focus-visible{outline:2px solid #777;outline-offset:2px}
}

@media(max-width:1199px){
  #top #top-links #cart{height:24px;vertical-align:middle;line-height:0}
  #top #top-links #cart > #cart_btn{vertical-align:top}
}

#top #top-links #cart .ws-mini-cart td{display:table-cell!important}
#top #top-links #cart .ws-mini-cart > li > div{min-width:0!important;padding:0!important}
#top #top-links #cart .ws-mini-cart .ws-cart-products td{width:auto!important;min-width:0!important}
#top #top-links #cart .ws-mini-cart > li + li{margin-top:0!important;padding-top:0!important;border-top:0!important}
#top #top-links #cart .ws-mini-cart .ws-cart-actions{white-space:normal!important}

#top #top-links #cart .ws-mini-cart tr,#top #top-links #cart .ws-mini-cart tbody{background:transparent!important}

/* Woodstyle: убираем штатный нижний отступ корзины,
   который поднимал значок относительно соседних иконок. */
@media (max-width:1199px) {
    #top #top-links .ws-header-cart #cart,
    #top #top-links #cart {
        margin-top:0!important;
        margin-bottom:0!important;
        vertical-align:middle;
    }
}
