/* ═══════════════════════════════════════
   HATLEY UI — Drawers, Toasts, Bottom Bar
   Shared across Cart + The Project
═══════════════════════════════════════ */

/* ═══ SLIDE-OUT DRAWER (shared base) ═══ */
.h-drawer {
  position: fixed;
  top: 0; right: -400px;
  width: 380px; height: 100vh;
  background: #fff;
  box-shadow: -4px 0 30px rgba(0,0,0,0.15);
  z-index: 9000;
  display: flex; flex-direction: column;
  transition: right 0.3s ease;
  font-family: 'Poppins', sans-serif;
}
.h-drawer.open { right: 0; }
.h-drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 8999;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.h-drawer-backdrop.open { opacity: 1; pointer-events: auto; }

.h-drawer-header {
  padding: 1.25rem 1.5rem;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 2px solid #e2e8f0;
  flex-shrink: 0;
}
.h-drawer-title {
  font-family: 'Bakbak One', sans-serif;
  font-size: 1.15rem; color: #1e293b;
}
.h-drawer-count {
  font-size: 0.78rem; font-weight: 400; color: #94a3b8;
  font-family: 'Poppins', sans-serif;
}
.h-drawer-close {
  background: none; border: none; font-size: 1.5rem; color: #94a3b8;
  cursor: pointer; padding: 0 4px; line-height: 1; transition: color 0.2s;
}
.h-drawer-close:hover { color: #1e293b; }

.h-drawer-body {
  flex: 1; overflow-y: auto; padding: 0;
}
.h-drawer-empty {
  padding: 4rem 1.5rem; text-align: center; color: #94a3b8; font-size: 0.9rem;
}
.h-drawer-empty svg { margin-bottom: 1rem; }

.h-drawer-footer {
  padding: 1.25rem 1.5rem;
  border-top: 2px solid #e2e8f0;
  flex-shrink: 0;
}

/* ═══ CART DRAWER (red accent) ═══ */
.h-drawer.cart-drawer .h-drawer-header { border-bottom-color: #c80f28; }
.cart-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem 1.5rem; border-bottom: 1px solid #f1f5f9;
}
.cart-item-img { width: 50px; height: 50px; border-radius: 6px; overflow: hidden; background: #f0f5fa; flex-shrink: 0; }
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: 0.85rem; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-sku { font-size: 0.68rem; color: #94a3b8; font-family: monospace; }
.cart-item-right { text-align: right; flex-shrink: 0; }
.cart-item-price { font-family: 'Bakbak One', sans-serif; font-size: 0.95rem; color: #1e293b; }
.cart-item-qty {
  display: flex; align-items: center; gap: 6px; margin-top: 4px; justify-content: flex-end;
}
.cart-item-qty span { font-size: 0.82rem; font-weight: 600; min-width: 18px; text-align: center; }
.qty-btn {
  width: 24px; height: 24px; border: 1px solid #e2e8f0; border-radius: 4px;
  background: #fff; cursor: pointer; font-size: 0.85rem; color: #475569;
  display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.qty-btn:hover { border-color: #002868; color: #002868; }
.cart-item-remove {
  position: absolute; top: 6px; right: 6px; background: none; border: none;
  color: #cbd5e1; font-size: 0.9rem; cursor: pointer; padding: 2px; line-height: 1;
}
.cart-item-remove:hover { color: #c80f28; }

.cart-subtotal {
  display: flex; justify-content: space-between; align-items: center;
  font-weight: 700; font-size: 1.05rem; color: #1e293b; margin-bottom: 1rem;
}
.cart-subtotal-amount { font-family: 'Bakbak One', sans-serif; font-size: 1.3rem; }
.cart-checkout-btn {
  display: block; width: 100%; text-align: center; background: #c80f28; color: #fff;
  padding: 14px; border-radius: 8px; font-weight: 700; font-size: 0.92rem;
  border: none; cursor: pointer; transition: all 0.2s; font-family: 'Poppins', sans-serif;
}
.cart-checkout-btn:hover { background: #a00d20; }

/* ═══ PROJECT DRAWER (navy accent) ═══ */
.h-drawer.project-drawer .h-drawer-header { border-bottom-color: #002868; }
.proj-item {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.85rem 1.5rem; border-bottom: 1px solid #f1f5f9;
  position: relative;
}
.proj-item-img { width: 50px; height: 50px; border-radius: 6px; overflow: hidden; background: #f0f5fa; flex-shrink: 0; }
.proj-item-img img { width: 100%; height: 100%; object-fit: cover; }
.proj-item-info { flex: 1; min-width: 0; }
.proj-item-name { font-size: 0.85rem; font-weight: 600; color: #1e293b; }
.proj-item-cat { font-size: 0.68rem; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.5px; }
.proj-item-note {
  width: 100%; margin-top: 4px; padding: 4px 6px; border: 1px solid #e2e8f0; border-radius: 4px;
  font-family: 'Poppins', sans-serif; font-size: 0.72rem; color: #475569; resize: none; height: 28px;
}
.proj-item-note:focus { outline: none; border-color: #002868; }
.proj-item-remove {
  background: none; border: none; color: #cbd5e1; font-size: 0.9rem;
  cursor: pointer; padding: 2px; line-height: 1; flex-shrink: 0; margin-top: 2px;
}
.proj-item-remove:hover { color: #c80f28; }
.proj-quote-btn {
  display: block; width: 100%; text-align: center; background: #002868; color: #fff;
  padding: 14px; border-radius: 8px; font-weight: 700; font-size: 0.92rem;
  border: none; cursor: pointer; transition: all 0.2s; font-family: 'Poppins', sans-serif;
}
.proj-quote-btn:hover { background: #001a44; }
.proj-share-btn {
  display: block; width: 100%; text-align: center; background: transparent; color: #002868;
  padding: 10px; border-radius: 8px; font-weight: 600; font-size: 0.82rem;
  border: 2px solid #002868; cursor: pointer; transition: all 0.2s; margin-top: 8px;
  font-family: 'Poppins', sans-serif;
}
.proj-share-btn:hover { background: #002868; color: #fff; }

/* ═══ TOAST ═══ */
.h-toast {
  position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #1e293b; color: #fff; padding: 12px 24px; border-radius: 10px;
  font-family: 'Poppins', sans-serif; font-size: 0.85rem; font-weight: 500;
  z-index: 9500; opacity: 0; transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2); pointer-events: none;
  display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.h-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.h-toast svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ═══ DESKTOP HEADER ICONS ═══ */
.header-shop-icons {
  display: flex; align-items: center; gap: 4px; margin-left: 10px;
}
.header-shop-icon {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; color: #002868;
  position: relative; cursor: pointer; transition: all 0.2s;
}
.header-shop-icon:hover { background: #f0f5fa; color: #c80f28; }
.header-shop-icon svg { width: 20px; height: 20px; }
.header-shop-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #c80f28; color: #fff; font-size: 0.58rem; font-weight: 700;
  border-radius: 10px; display: none; align-items: center; justify-content: center; line-height: 1;
}

/* ═══ MOBILE BOTTOM BAR ═══ */
.h-bottom-bar {
  display: none; /* hidden on desktop */
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid #e2e8f0;
  z-index: 8000; padding: 6px 0;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}
.h-bottom-bar-inner {
  display: flex; justify-content: space-around; align-items: center;
  max-width: 500px; margin: 0 auto;
}
.h-bottom-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 0.62rem; font-weight: 600; color: #64748b; cursor: pointer;
  position: relative; padding: 4px 12px; text-decoration: none;
  background: none; border: none; font-family: 'Poppins', sans-serif;
}
.h-bottom-item:hover, .h-bottom-item.active { color: #002868; }
.h-bottom-item svg { width: 22px; height: 22px; }
.h-bottom-badge {
  position: absolute; top: -2px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: #c80f28; color: #fff; font-size: 0.55rem; font-weight: 700;
  border-radius: 10px; display: none; align-items: center; justify-content: center; line-height: 1;
}

@media (max-width: 768px) {
  .h-bottom-bar { display: block; }
  .h-bottom-bar-inner { padding-left: 60px; } /* clear GHL chat bubble on left */
  .h-drawer { width: 100%; right: -100%; }
  body { padding-bottom: 64px; } /* space for bottom bar */
  .h-toast { bottom: 80px; }
}
