/* SZ Herbals Shopping Cart CSS */

:root {
  --cart-font-serif: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --cart-font-sans: 'Montserrat', sans-serif;
}

/* CART ICON & BADGE IN NAVIGATION */
.nav-cart-btn {
  background: none;
  border: none;
  color: var(--mid, #3a3a3a);
  font-family: var(--cart-font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  transition: color 0.3s;
  position: relative;
  text-decoration: none;
}
.nav-cart-btn:hover {
  color: var(--leaf, #1e3d35);
}
.nav-cart-btn svg {
  width: 20px;
  height: 20px;
}
.nav-cart-badge {
  background: var(--leaf, #1e3d35);
  color: #fff;
  font-family: var(--cart-font-sans);
  font-size: 0.55rem;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  padding: 0 4px;
}

/* OVERLAY WITH GLASSMORPHISM */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 43, 36, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}

/* DRAWER CONTAINER */
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 90vw;
  background: var(--cream, #f7f7f5);
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0,0,0,0.08);
}
.cart-drawer.open {
  transform: translateX(0);
}

/* DRAWER HEADER */
.cart-header {
  padding: 2rem;
  border-bottom: 0.5px solid var(--mist, #d5d5d3);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cart-header h3 {
  font-family: var(--cart-font-serif);
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--deep, #111111);
  letter-spacing: 0.02em;
}
.cart-close {
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--deep, #111111);
  transition: transform 0.3s ease;
}
.cart-close:hover {
  transform: rotate(90deg);
}
.cart-close svg {
  width: 22px;
  height: 22px;
}

/* CART ITEMS LIST */
.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 2rem;
}
.cart-item {
  display: flex;
  gap: 1.2rem;
  padding: 1.5rem 0;
  border-bottom: 0.5px solid var(--fog, #f0f0ee);
  align-items: center;
}
.cart-item-img {
  width: 70px;
  height: 70px;
  background: #fff;
  border: 0.5px solid var(--fog, #f0f0ee);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cart-item-img img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}
.cart-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.cart-item-name {
  font-family: var(--cart-font-serif);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--deep, #111111);
  line-height: 1.3;
}
.cart-item-price {
  font-family: var(--cart-font-sans);
  font-size: 0.78rem;
  color: var(--mid, #3a3a3a);
  font-weight: 400;
}
.cart-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.4rem;
}
.cart-qty {
  display: flex;
  align-items: center;
  border: 0.5px solid var(--mist, #d5d5d3);
  background: #fff;
}
.cart-qty button {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--mid, #3a3a3a);
  transition: background 0.2s;
}
.cart-qty button:hover {
  background: var(--fog, #f0f0ee);
}
.cart-qty span {
  font-family: var(--cart-font-sans);
  font-size: 0.78rem;
  min-width: 24px;
  text-align: center;
  color: var(--deep, #111111);
}
.cart-item-remove {
  font-family: var(--cart-font-sans);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage, #a6a6a6);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s;
}
.cart-item-remove:hover {
  color: #c44;
}

/* EMPTY STATE */
.cart-empty {
  text-align: center;
  padding: 5rem 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}
.cart-empty p {
  font-family: var(--cart-font-sans);
  font-size: 0.8rem;
  color: var(--sage, #a6a6a6);
  letter-spacing: 0.05em;
}

/* DRAWER FOOTER */
.cart-footer {
  padding: 2rem;
  border-top: 0.5px solid var(--mist, #d5d5d3);
  background: #fff;
}
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.cart-total span:first-child {
  font-family: var(--cart-font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid, #3a3a3a);
}
.cart-total span:last-child {
  font-family: var(--cart-font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--deep, #111111);
}
.btn-checkout {
  width: 100%;
  font-family: var(--cart-font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream, #f7f7f5);
  background: var(--mid, #3a3a3a);
  padding: 1.2rem;
  border: none;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  text-align: center;
  text-decoration: none;
  display: block;
}
.btn-checkout:hover {
  background: var(--deep, #111111);
  transform: translateY(-1px);
}

/* TOAST/ALERT POPUP FOR ADDED TO CART */
.cart-toast {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  background: var(--leaf, #1e3d35);
  color: #fff;
  padding: 1rem 1.6rem;
  font-family: var(--cart-font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  z-index: 10001;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}
.cart-toast.show {
  transform: translateY(0);
  opacity: 1;
}
