.site-header,
.site-header-inner,
.header-actions,
.tc-header-cart {
  overflow: visible;
}

.cart-count[hidden],
.tc-cart-count[hidden] {
  display: none !important;
}

.tc-header-cart {
  position: relative;
  flex-shrink: 0;
}

.tc-header-cart__toggle {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

/* Legacy dropdown retired — Cart Drawer is the only cart UI. */
.tc-mini-cart-dropdown {
  display: none !important;
}

.tc-mini-cart-dropdown__panel {
  position: relative;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(17, 24, 39, 0.16);
  overflow: hidden;
}

.tc-mini-cart-dropdown__panel::before {
  content: '';
  position: absolute;
  top: -7px;
  right: 18px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-left: 1px solid #e5e7eb;
  border-top: 1px solid #e5e7eb;
  transform: rotate(45deg);
}

.tc-mini-cart__content {
  position: relative;
  z-index: 1;
  background: #fff;
  overflow-x: hidden;
}

/* Reset WooCommerce widget cart defaults (float + absolute remove) */
.tc-mini-cart__content ul.cart_list,
.tc-mini-cart__content ul.product_list_widget {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tc-mini-cart__content ul.cart_list li,
.tc-mini-cart__content ul.product_list_widget li {
  margin: 0;
  padding: 0;
  list-style: none;
  float: none;
  clear: none;
}

.tc-mini-cart__content ul.cart_list li::before,
.tc-mini-cart__content ul.product_list_widget li::before {
  display: none;
}

.tc-mini-cart__head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid #f1f3f5;
}

.tc-mini-cart__summary {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
}

.tc-mini-cart__list {
  margin: 0;
  padding: 0;
  max-height: min(52vh, 340px);
  overflow-y: auto;
  overflow-x: hidden;
}

.tc-mini-cart-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #f3f4f6;
  position: relative;
}

.tc-mini-cart-item__thumb {
  flex: 0 0 64px;
  width: 64px;
}

.tc-mini-cart-item__thumb a {
  display: block;
  line-height: 0;
}

.tc-mini-cart-item__thumb img,
.tc-mini-cart__content .tc-mini-cart-item img {
  display: block;
  width: 64px !important;
  height: 64px !important;
  max-width: 64px !important;
  margin: 0 !important;
  float: none !important;
  object-fit: cover;
  border-radius: 6px;
  background: #f3f4f6;
  box-shadow: none !important;
}

.tc-mini-cart-item__main {
  flex: 1;
  min-width: 0;
}

.tc-mini-cart-item__row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.tc-mini-cart-item__info {
  flex: 1;
  min-width: 0;
}

.tc-mini-cart-item__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: #4b5563;
  text-decoration: none;
}

a.tc-mini-cart-item__title:hover {
  color: var(--red, #0b8796);
}

.tc-mini-cart-item__info .variation,
.tc-mini-cart-item__info dl {
  margin: 0 0 4px;
  font-size: 11px;
  line-height: 1.4;
  color: #6b7280;
  overflow-wrap: anywhere;
}

.tc-mini-cart-item__info dt,
.tc-mini-cart-item__info dd {
  display: inline;
  margin: 0;
}

.tc-mini-cart-item__info dt {
  font-weight: 600;
}

.tc-mini-cart-item__info dt::after {
  content: ': ';
}

.tc-mini-cart-item__remove {
  flex: 0 0 22px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 22px !important;
  height: 22px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 50%;
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  float: none !important;
  color: #ef4444 !important;
  font-size: 18px !important;
  font-weight: 700;
  line-height: 1;
  text-decoration: none !important;
  background: transparent !important;
  transition: background 0.15s ease;
}

.tc-mini-cart-item__remove:hover {
  background: #fef2f2 !important;
  color: #0b8796 !important;
}

.tc-mini-cart-item__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}

.tc-mini-cart-item__qty {
  font-size: 11px;
  font-weight: 700;
  color: #9ca3af;
}

.tc-mini-cart-item__price {
  font-size: 13px;
  font-weight: 800;
  color: #111827;
  white-space: nowrap;
  text-align: right;
}

.tc-mini-cart-item__price .amount {
  font-weight: 800;
}

.tc-mini-cart__totals {
  background: #f8fafc;
  border-top: 1px solid #eef2f7;
}

.tc-mini-cart__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  font-size: 13px;
  color: #4b5563;
}

.tc-mini-cart__row + .tc-mini-cart__row {
  border-top: 1px solid #eef2f7;
}

.tc-mini-cart__row--total {
  font-size: 14px;
  font-weight: 800;
  color: #111827;
}

.tc-mini-cart__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 14px 14px;
}

.tc-mini-cart__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.tc-mini-cart__btn--view {
  background: #374151;
  color: #fff;
}

.tc-mini-cart__btn--view:hover {
  background: #111827;
  color: #fff;
}

.tc-mini-cart__btn--checkout {
  background: var(--red, #0b8796);
  color: #fff;
}

.tc-mini-cart__btn--checkout:hover {
  background: var(--red-dark, #075b66);
  color: #fff;
}

.tc-mini-cart__empty {
  margin: 0;
  padding: 28px 18px;
  text-align: center;
  font-size: 14px;
  color: #6b7280;
}

.tc-header-cart.is-open .tc-mini-cart-dropdown {
  display: block;
}

.tc-header-cart .tc-mini-cart-dropdown[hidden] {
  display: none !important;
}

@media (max-width: 991px) {
  .tc-mini-cart-dropdown {
    right: -8px;
    width: min(360px, calc(100vw - 20px));
  }
}
