/**
 * Tenbit Addon - Menu Cart Icon & Off-Canvas Drawer Styles
 * Author: Team Tenbit (https://tenbitsol.com)
 * Version: 1.0.0
 */

/* Menu Cart Header Trigger */
.tenbit-menu-cart-wrapper {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.tenbit-menu-cart-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 4px;
  color: #ffffff;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.25s ease;
  position: relative;
}

.tenbit-menu-cart-trigger:hover {
  color: #ff5500;
}

.tenbit-cart-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tenbit-cart-icon-svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  transition: stroke 0.2s ease;
}

.tenbit-cart-label {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.tenbit-cart-count-badge {
  background-color: #ff5500;
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 9999px;
  min-width: 18px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(255, 85, 0, 0.4);
}

.tenbit-cart-subtotal-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

/* Off-Canvas Backdrop Overlay */
.tenbit-cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(10, 12, 11, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.tenbit-cart-drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Off-Canvas Drawer Container */
.tenbit-cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 450px;
  background-color: #ffffff;
  color: #191917;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.35);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.tenbit-cart-drawer.active {
  transform: translateX(0);
}

.tenbit-cart-drawer.drawer-left {
  right: auto;
  left: 0;
  transform: translateX(-100%);
  box-shadow: 10px 0 40px rgba(0, 0, 0, 0.35);
}

.tenbit-cart-drawer.drawer-left.active {
  transform: translateX(0);
}

/* Drawer Header */
.tenbit-cart-drawer-head {
  padding: 22px 24px;
  background-color: #0d0f0e;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tenbit-cart-drawer-head h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0;
}

.tenbit-cart-close-btn {
  background: transparent;
  border: none;
  color: #d0cdc1;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.tenbit-cart-close-btn:hover {
  color: #ff5500;
  transform: rotate(90deg);
}

/* Free Shipping Meter Box */
.tenbit-shipping-progress-box {
  padding: 16px 24px;
  background-color: #f4f3ee;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #191917;
}

.tenbit-shipping-meter-msg strong {
  color: #ff5500;
}

.tenbit-shipping-meter-bar {
  height: 6px;
  background-color: #e7e5dc;
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}

.tenbit-shipping-meter-fill {
  height: 100%;
  background-color: #ff5500;
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Mini-Cart Items List */
.tenbit-mini-cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}

.tenbit-mini-cart-item {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 14px;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.tenbit-mini-cart-thumb {
  width: 74px;
  height: 74px;
  background-color: #f7f6f2;
  border-radius: 2px;
  overflow: hidden;
}

.tenbit-mini-cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tenbit-mini-cart-details h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  margin: 0 0 4px 0;
  line-height: 1.15;
  color: #191917;
}

.tenbit-mini-cart-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  color: #939185;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.tenbit-mini-cart-price-qty {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tenbit-mini-cart-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: #ff5500;
}

.tenbit-mini-cart-qty-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 2px;
  overflow: hidden;
  height: 24px;
}

.tenbit-mini-cart-qty-pill button {
  background: #f4f3ee;
  border: none;
  width: 22px;
  height: 100%;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tenbit-mini-cart-qty-pill span {
  padding: 0 8px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
}

.tenbit-mini-cart-remove {
  background: transparent;
  border: none;
  color: #939185;
  font-size: 1.2rem;
  cursor: pointer;
  transition: color 0.2s ease;
  padding: 6px;
}

.tenbit-mini-cart-remove:hover {
  color: #ff5500;
}

/* Empty State */
.tenbit-mini-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  text-align: center;
  padding: 40px 20px;
  color: #939185;
}

.tenbit-mini-cart-empty-icon {
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  stroke: #d0cdc1;
  fill: none;
}

.tenbit-mini-cart-empty h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  color: #191917;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.tenbit-mini-cart-empty p {
  font-size: 0.9rem;
  max-width: 260px;
  margin-bottom: 20px;
}

/* Drawer Footer */
.tenbit-cart-drawer-footer {
  padding: 22px 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background-color: #fbfbfa;
}

.tenbit-mini-cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #191917;
}

.tenbit-mini-cart-total-amount {
  color: #ff5500;
  font-size: 1.6rem;
}

.tenbit-mini-cart-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tenbit-btn-drawer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.tenbit-btn-drawer-checkout {
  background-color: #ff5500;
  color: #ffffff;
  border-color: #ff5500;
}

.tenbit-btn-drawer-checkout:hover {
  background-color: #e04a00;
  border-color: #e04a00;
  box-shadow: 0 4px 18px rgba(255, 85, 0, 0.35);
  transform: translateY(-1px);
}

.tenbit-btn-drawer-cart {
  background-color: transparent;
  color: #191917;
  border-color: rgba(0, 0, 0, 0.25);
}

.tenbit-btn-drawer-cart:hover {
  background-color: rgba(0, 0, 0, 0.05);
  border-color: #191917;
}

.tenbit-btn-drawer-close {
  background-color: transparent;
  color: #939185;
  border: none;
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  padding: 6px;
  text-decoration: underline;
}

.tenbit-btn-drawer-close:hover {
  color: #ff5500;
}

/* Responsive */
@media (max-width: 480px) {
  .tenbit-cart-drawer {
    max-width: 100%;
  }
}
