/* Cart two-pane: left stays, right scrolls */
body.yy-no-sidebar .main-content {
  overflow: hidden !important;
}

body.yy-no-sidebar .page-content {
  padding-bottom: 12px !important;
  overflow: hidden;
}

body.yy-no-sidebar .page-content > .container-fluid:last-of-type {
  height: calc(100vh - 158px);
  overflow: hidden;
  padding-bottom: 0 !important;
}

body.yy-no-sidebar .footer {
  display: none;
}

#yy-cart-page {
  height: 100%;
}

.yy-cart-layout {
  display: flex;
  align-items: stretch;
  gap: 20px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.yy-cart-side {
  flex: 0 0 280px;
  width: 280px;
  height: 100%;
  max-height: none;
  position: relative;
  top: auto;
  overflow-x: hidden;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e6ebf2;
  border-radius: 10px;
  padding: 16px 0 20px;
  box-shadow: 0 2px 12px rgba(31, 35, 41, 0.04);
  scrollbar-width: thin;
}

.yy-cart-main {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 6px;
  padding-bottom: 24px;
  scrollbar-width: thin;
}

.yy-dir-search {
  position: relative;
  margin: 0 16px 14px;
}

.yy-dir-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #bfbfbf;
  pointer-events: none;
}

.yy-dir-search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 38px;
  border: 1px solid #e5e6eb;
  border-radius: 8px;
  background: #f7f9fc;
  font-size: 14px;
  color: #262626;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.yy-dir-search input:focus {
  border-color: #91caff;
  background: #fff;
}

.yy-dir-search input::placeholder {
  color: #bfbfbf;
}

.yy-dir-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 2px 16px 10px;
  padding: 10px 4px;
  color: #1f1f1f;
  font-size: 16px;
  font-weight: 700;
}

.yy-dir-title i {
  color: #8c8c8c;
  font-size: 20px;
}

.yy-dir-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.yy-dir-group {
  margin: 0;
}

.yy-dir-group.is-hidden {
  display: none;
}

.yy-dir-parent {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  color: #262626 !important;
  font-size: 15px;
  line-height: 1.45;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.yy-dir-parent > .bx {
  flex: 0 0 20px;
  width: 20px;
  font-size: 20px;
  color: #1677ff;
  line-height: 1;
}

.yy-dir-parent > span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yy-dir-count {
  flex: 0 0 auto;
  min-width: 20px;
  height: 20px;
  padding: 0 7px;
  border-radius: 10px;
  background: #f0f0f0;
  color: #8c8c8c;
  font-size: 12px;
  font-weight: 600;
  font-style: normal;
  line-height: 20px;
  text-align: center;
}

.yy-dir-group.is-open > .yy-dir-parent .yy-dir-count {
  background: #e8f3ff;
  color: #1677ff;
}

.yy-dir-arrow {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border-top: 1.5px solid #bfbfbf;
  border-right: 1.5px solid #bfbfbf;
  transform: rotate(45deg);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.yy-dir-group.is-open > .yy-dir-parent .yy-dir-arrow {
  transform: rotate(135deg);
  border-color: #1677ff;
}

.yy-dir-parent:hover {
  color: #1677ff !important;
  background: #f5f9ff;
}

.yy-dir-group.is-open > .yy-dir-parent {
  color: #1677ff !important;
  font-weight: 600;
}

.yy-dir-children {
  display: none;
  list-style: none;
  margin: 0;
  padding: 4px 0 10px;
  background: #fafbfd;
}

.yy-dir-group.is-open > .yy-dir-children {
  display: block;
}

.yy-dir-children li.is-hidden {
  display: none;
}

.yy-filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px 11px 46px;
  color: #595959 !important;
  font-size: 14px;
  line-height: 1.45;
  text-decoration: none !important;
  transition: color 0.15s ease, background 0.15s ease;
}

.yy-filter-item > span {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.yy-filter-item:hover {
  color: #1677ff !important;
  background: #f0f6ff;
}

.yy-filter-item.is-active,
.yy-filter-item.is-active:hover {
  color: #1677ff !important;
  background: #e8f3ff;
  font-weight: 600;
}

.yy-filter-item em {
  min-width: 20px;
  padding: 0 7px;
  height: 20px;
  line-height: 20px;
  border-radius: 10px;
  background: #ececec;
  color: #8c8c8c;
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
}

.yy-filter-item.is-active em {
  background: #1677ff;
  color: #fff;
}

.yy-filter-item i {
  padding: 0 6px;
  height: 18px;
  line-height: 18px;
  border-radius: 2px;
  background: #1677ff;
  color: #fff !important;
  font-style: normal;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.yy-filter-intro {
  margin-bottom: 16px;
  padding: 10px 16px;
  color: #595959;
  background: #fff;
  border: 1px solid #eef0f4;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.6;
}

.yy-cart-heading {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}

.yy-cart-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1f1f1f;
}

.yy-cart-heading em {
  font-style: normal;
  font-size: 13px;
  color: #8c8c8c;
  font-weight: 400;
}

@media (max-width: 991.98px) {
  body.yy-no-sidebar .page-content > .container-fluid:last-of-type {
    height: auto;
    overflow: visible;
  }

  body.yy-no-sidebar .main-content,
  body.yy-no-sidebar .page-content {
    overflow: visible !important;
  }

  body.yy-no-sidebar .footer {
    display: block;
  }

  #yy-cart-page,
  .yy-cart-layout,
  .yy-cart-main,
  .yy-cart-side {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .yy-cart-layout {
    flex-direction: column;
  }

  .yy-cart-side {
    flex: none;
    width: 100%;
  }
}
