:root {
  /* Підкручуй під свій макет */
  --ak-cart-col-image: 106px;
  --ak-cart-col-name: minmax(220px, 1fr);
  --ak-cart-col-qty: 103px;
  --ak-cart-col-price: 110px;
  --ak-cart-col-remove: 32px;
  --ak-cart-gap: 30px;
}
.ak-cart {
  --ak-top-offset: 0px; /* set by JS */
}
.ak-cart__left,
.ak-cart__right {
  min-height: calc(100vh - var(--ak-top-offset));
}
.ak-cart__left {
  background: #fff;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0; /* important for internal scroll */
}
.ak-cart__right {
  height: 100%;
  position: sticky;
  top: 0;
  align-self: stretch;
}

/* Шапка колонок */
.ak-cart__cols {
  display: grid;
  grid-template-columns:
    var(--ak-cart-col-image) var(--ak-cart-col-name) var(--ak-cart-col-qty)
    var(--ak-cart-col-price) var(--ak-cart-col-remove);
  gap: var(--ak-cart-gap);
  align-items: center;
  margin: 0 0 12px;
  padding: 0 20px;
  color: #ababab;
  font-size: 14px;
  font-weight: 400;
}
.entry-header {
  display: none;
}
.woocommerce-cart .site-main {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0px 20px 0 20px;
}
/* “Назва” має стартувати після колонки з фото (тому ставимо її в 2-гу колонку) */
.ak-cart__col--name {
  grid-column: 2;
}
.ak-cart__col--qty,
.ak-cart__col--price {
  text-align: left;
}
.ak-cart__back {
  display: none;
}
.woocommerce-cart button[name="update_cart"] {
  display: none !important;
}
/* layout */
.ak-cart__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  gap: 24px;
  align-items: start;
}

.ak-cart__head {
  padding: 24px 24px 0;
}
.ak-cart__scroll {
  padding: 16px 24px 24px;
  overflow: auto;
  height: 100%;
}

/* right sticky */
.ak-cart__summary {
  position: sticky;
  top: 24px;
  background: #f9f9f9;
  border-radius: 24px;
  padding: 24px;
}

/* items */
.ak-cart-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 140px 140px 40px;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #eee;
}
.ak-cart-item__img img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 16px;
}
.ak-cart-item__remove-link {
  font-size: 24px;
  line-height: 1;
  text-decoration: none;
}

/* cross-sells spacing */
.cross-sells {
  margin-top: 24px;
}

/* ==============================
   Figma behavior tweaks
   ============================== */

.ak-cart__grid {
  align-items: stretch;
}

/* scroll ONLY the products list */
.ak-cart__scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  height: auto; /* override old 100% */
  max-height: 63vh;
  scrollbar-width: thin; /* найтонше що дозволяє FF */
  scrollbar-color: var(--ak-green, #0aa84f) white;
}
.ak-cart__scroll::-webkit-scrollbar {
  /* <-- робить вертикальну полоску ВУЖЧОЮ */
  width: 1px;
}
.ak-cart__scroll::-webkit-scrollbar-track {
  background: transparent; /* доріжка прозора */
}

.ak-cart__scroll::-webkit-scrollbar-thumb {
  background: var(--ak-green, #0aa84f);
  border-radius: 999px;
}

/* accessories/cross-sells: outside scroll */
.ak-cart__cross {
  flex: 0 0 auto;
  margin-top: 24px;
  padding: 24px;
  background-color: #f9f9f9;
  border-radius: 25px;
}

.ak-cart__summary {
  height: 100%;
}
/* =========================================
   ACCESSORIES (ak-cart__cross) — 1 ряд / 2 товари
   ========================================= */

/* Accessories block */
.ak-acc {
  margin-top: auto;
}

.ak-acc__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.ak-acc-card {
  background: #fff;
  border-radius: 25px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 98px;
}

.ak-acc-card__img {
  width: 74px;
  height: 74px;
  border-radius: 20px;
  overflow: hidden;
  background: #f3f3f3;
  flex: 0 0 74px;
  display: grid;
  place-items: center;
}

.ak-acc-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ak-acc-card__info {
  flex: 1 1 auto;
  min-width: 0;
}

.ak-acc-card__title {
  display: block;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  color: var(--ak-text-black, #101010);
  text-decoration: none;
  margin-bottom: 6px;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ak-acc-card__price {
  font-size: 16px;
  line-height: 1.2;
  color: var(--ak-green, #009846);
}

.ak-acc-card__price del {
  color: lightgrey;
}

.ak-acc-card__btn {
  width: 67px;
  height: 67px;
  border-radius: 15px;
  background: var(--ak-green, #009846);
  display: grid;
  place-items: center;
  flex: 0 0 67px;

  text-decoration: none;
  border: 0;
  cursor: pointer;
}

.ak-acc-card__btn svg {
  display: block;
}

/* =========================
   CART ITEMS (Figma-like)
========================= */

.ak-cart__items {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 1 ряд товару */
.ak-cart-item {
  display: grid;
  grid-template-columns: 106px minmax(240px, 1fr) 103px 120px 24px; /* img | title | qty | price | remove */
  align-items: center;
  column-gap: 24px;
  padding: 18px 0;
  border-bottom: 1px solid #f2f2f2;
}

/* картинка */
.ak-cart-item__media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ak-cart-item__thumb {
  width: 106px;
  height: 106px;
  border-radius: 20px;
  background: #f3f3f3;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ak-cart-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* назва */
.ak-cart-item__title a {
  color: #101010;
  font-family: "Inter Tight", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  text-decoration: none;
  display: inline-block;
  max-width: 272px; /* як на фігмі */
}

.ak-cart-item__title a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* qty pill 103x40 radius 15 */
.ak-qty {
  width: 103px;
  height: 40px;
  border-radius: 25px;
  border: 1px solid #dadada;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  gap: 1px;
}

.ak-qty__btn {
  width: 18px;
  height: 18px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: #101010;
  font-family: "Inter Tight", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ak-qty__btn:hover {
  opacity: 0.7;
}

.ak-qty__input {
  width: 28px;
  border: 0;
  background: transparent;
  text-align: center;
  color: #101010;
  font-family: "Inter Tight", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 400;
  outline: none;
  padding: 0;
}

/* прибрати стрілки number */
.ak-qty__input::-webkit-outer-spin-button,
.ak-qty__input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.ak-qty__input[type="number"] {
  -moz-appearance: textfield;
}

/* price (зелений 20px) */
.ak-cart-item__price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.ak-cart-item__price-unit {
  color: #009846;
  font-family: "Inter Tight", system-ui, -apple-system, sans-serif;
  font-size: 20px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
}

/* якщо підсумок під ціною не потрібен (у макеті не бачу) */
.ak-cart-item__price-sub {
  display: none;
}

/* remove (хрестик 17x17, зелений) */
.ak-cart-item__remove {
  display: flex;
  justify-content: flex-end;
}

.ak-remove {
  width: 17px;
  height: 17px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #009846; /* currentColor для svg */
  text-decoration: none;
  line-height: 0;
}

.ak-remove svg {
  width: 17px;
  height: 17px;
  display: block;
}

.ak-remove:hover {
  opacity: 0.75;
  transform: scale(1.06);
}

/* 1) список товарів: щоб не тягнуло елементи по висоті */
.ak-cart__items {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 2) один товар (рядок) */
.ak-cart-item {
  display: grid;
  grid-template-columns: 106px minmax(220px, 1fr) 103px 110px 32px;
  align-items: center;
  column-gap: 30px;
  padding: 0;
}

/* мініатюра як в фігмі: 106x106 з сірим фоном і радіусом */
.ak-cart-item__thumb {
  width: 106px;
  height: 106px;
  border-radius: 20px;
  background: #f3f3f3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ak-cart-item__thumb img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* кількість (капсула 103x40) */
.ak-cart-item__qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 103px;
  height: 40px;
  box-sizing: border-box;
  gap: 6px;
}

.ak-cart-item__qty button {
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  color: #101010;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ak-cart-item__qty input[type="number"] {
  width: 32px;
  border: 0;
  background: transparent;
  text-align: center;
  outline: none;
  font-family: "Inter Tight", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #101010;
  padding: 0;
  -moz-appearance: textfield;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0);
}

.ak-cart-item__qty input[type="number"]::-webkit-outer-spin-button,
.ak-cart-item__qty input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ціна */
.ak-cart-item__price {
  color: #009846;
  font-family: "Inter Tight", system-ui, -apple-system, sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

/* remove (хрестик) */
.ak-cart-item__remove a {
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.ak-cart-item__remove svg {
  width: 19px;
  height: 19px;
  display: block;
}

.ak-cart-item__remove a:hover {
  opacity: 0.75;
  transform: scale(1.04);
}
.checkout-button {
  display: flex !important
;
  width: 100%;
  height: 65px;
  padding: 10px 44px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  border-radius: 15px;
  background: #009846 !important;
  color: white;
  font-size: 18px;
  line-height: 100%;
  vertical-align: baseline;
}
/* =========================
   ACCESSORIES: прибрати зайве
   (наявність/код/OEM, wishlist)
========================= */
.ak-cart__cross .ak-card__badges,
.ak-cart__cross .yith-wcwl-add-to-wishlist,
.ak-cart__cross .stock,
.ak-cart__cross .woocommerce-product-details__short-description {
  display: none !important;
}

.hentry .entry-content a {
  text-decoration: none;
  /* color: inherit; */
}
/* Назва товару в кошику */

/* назва */
.ak-cart-item__name {
  color: var(--ak-text-black);
}

.ak-cart-item__name a {
  color: #101010 !important;
  text-decoration: none !important ;
  font-family: "Inter Tight", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  display: block;
  max-width: 272px; /* як у фігмі */
}
.cart_totals {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.cart_totals .wc-proceed-to-checkout {
  margin-top: auto;
  margin-bottom: 0px;
}
.ak-cart-item__name a:hover {
  text-decoration: none;
  opacity: 0.85;
}
.ak-cart .ak-cart__item_name a,
.ak-cart .ak-cart__item_name a:visited {
  color: #101010 !important;
  text-decoration: none !important;

  font-family: "Inter Tight", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: normal;

  display: inline-block;
}

.ak-cart .ak-cart__item_name a:hover {
  text-decoration: none !important;
  opacity: 0.85;
}
.ak-cart .ak-cart-item__name a,
.ak-cart .ak-cart-item__name a:visited {
  color: #101010 !important;
  text-decoration: none !important;
  font-family: "Inter Tight", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  font-weight: 500;
}
.wc-proceed-to-checkout .button.checkout-button {
  font-size: 18px;
}

table.shop_table_responsive tbody tr td,
table.shop_table_responsive tbody tr th {
  text-align: left;
  background: transparent;
}
/* =========================
   Responsive (на випадок 1024-1189)
========================= */

@media (max-width: 1333px) {
  .ak-cart-item {
    grid-template-columns: 106px minmax(220px, 1fr) 100px 100px 22px;

    column-gap: 10px;
    padding: 0;
  }
  .ak-cart__grid {
    grid-template-columns: minmax(0, 1fr) 400px;
  }
}

@media (max-width: 1189px) {
  .ak-cart-item__title a {
    max-width: 240px;
  }
  .ak-cart__summary {
    padding: 14px;
  }
}

@media (max-width: 1024px) {
  .ak-cart__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .ak-cart__left {
    max-height: 60vh;
  }
  .ak-cart__summary {
    height: auto;
  }
  .ak-cart__right {
    min-height: auto;
  }
}

@media (max-width: 768px) {
  .ak-cart-item {
    grid-template-columns: 84px 1fr;
    grid-template-areas:
      "img title"
      "img qty"
      "img price"
      "img remove";
    row-gap: 10px;
    column-gap: 14px;
  }

  .ak-cart-item__media {
    grid-area: img;
  }
  .ak-cart-item__title {
    grid-area: title;
  }
  .ak-cart-item__qty {
    grid-area: qty;
  }
  .ak-cart-item__price {
    grid-area: price;
  }
  .ak-cart-item__remove {
    grid-area: remove;
    justify-content: flex-start;
  }

  .ak-cart-item__thumb {
    width: 84px;
    height: 84px;
    border-radius: 18px;
  }
  .ak-cart-item {
    grid-template-columns: 106px 1fr 32px;
    grid-template-areas:
      "thumb name remove"
      "thumb qty  remove"
      "thumb price remove";
    row-gap: 10px;
    column-gap: 14px;
    align-items: start;
  }
  .ak-cart-item__thumb {
    grid-area: thumb;
  }
  .ak-cart-item__name {
    grid-area: name;
  }
  .ak-cart-item__qty {
    grid-area: qty;
  }
  .ak-cart-item__price {
    grid-area: price;
  }
  .ak-cart-item__remove {
    grid-area: remove;
  }
  .ak-cart-item__name a {
    max-width: 100%;
  }
  .ak-acc__list {
    grid-template-rows: 1fr;
    /* width: 900px; */
    max-width: 100%;
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 426px) {
  .woocommerce-cart .site-main {
    padding: 0px 10px 0 10px;
  }
  .ak-cart-item {
    grid-template-columns: 83px 1fr 32px;
    grid-template-areas:
      "thumb name remove"
      "thumb price qty";
    position: relative;
    padding: 8px;
  }

  .ak-cart-item__qty {
    grid-area: qty;
    position: absolute;
    right: 0;
    bottom: -8px;
  }

  .ak-cart__cols {
    display: none;
  }
  .ak-cart__scroll {
    padding: 16px 10px 10px;
  }

  .ak-cart-item__name {
    font-size: 14px;
  }
  .ak-cart-item__remove {
    justify-content: end;
  }
  .ak-cart-item__remove a {
    width: 17px;
    height: 17px;
  }

  .ak-cart-item__remove svg {
    width: 17px;
    height: 17px;
  }
  .ak-cart-item__price-unit {
    font-size: 14px;
  }
  .ak-cart__head {
    padding: 10px 10px 0;
  }
  .ak-cart__title,
  .ak-cart__cross-title,
  .cart_totals h2 {
    font-size: 24px;
  }

  .ak-cart__scroll {
    padding: 16px 0px 10px;
  }
  .ak-cart__cross {
    padding: 10px;
  }
  .ak-acc-card {
    padding: 10px;
  }
  .ak-cart__cross-title {
    margin-bottom: 12px;
  }
  .ak-acc-card__btn {
    width: 57px;
    height: 57px;
    flex: 0 0 57px;
  }
  .wc-proceed-to-checkout .button.checkout-button {
    font-size: 14px;
  }
  .checkout-button {
    height: 55px;
  }
  .cart-subtotal td,
  .order-total td {
    padding: 10px 0px;
    font-size: 14px;
  }
  .ak-acc-card__title {
    font-size: 14px;
    white-space: normal;
  }
  .ak-cart-item__meta {
    line-height: 105%;
  }
  .ak-acc-card__price {
    font-size: 14px;
  }
  .ak-cart__scroll {
    min-height: 50vh;
  }
}
