/* ============================================================
   LAYOUT.CSS — HameemBhai er Dokan Layout System
   Header · Footer · Mobile Menu · Grid System
   ============================================================ */

/* ══════════════════════════════════════════════════════════════
   HEADER — Sticky Glass Navigation
   ══════════════════════════════════════════════════════════════ */

.header, .hbd-header {
  position: fixed;
  top: var(--admin-bar-h, 0px);
  left: 0;
  right: 0;
  z-index: var(--z-header);
  padding: 14px 0;
  transition: padding var(--transition-smooth), background var(--transition-smooth), box-shadow var(--transition-smooth);
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04);
}

.hbd-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.hbd-header__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  z-index: calc(var(--z-header) + 1);
}

/* ── Logo Mark (CSS text, no SVG) ─────────────────────────── */
.hbd-logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, #1c0d18 0%, #0e0e0e 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
  animation: logoPulse 4s ease-in-out infinite;
}

/* Gradient border via CSS mask trick */
.hbd-logo-mark::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 11px;
  padding: 1.5px;
  background: linear-gradient(135deg, #ff3d7f 0%, #f4a8c7 45%, #9b5de5 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.hbd-logo-mark__text {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ff3d7f 0%, #f4a8c7 50%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  line-height: 1;
  user-select: none;
}

@keyframes logoPulse {
  0%, 100% {
    box-shadow:
      0 0 0 0   rgba(244,168,199,0),
      0 0 10px  rgba(244,168,199,0.2),
      0 0 20px  rgba(255,61,127,0.1);
  }
  50% {
    box-shadow:
      0 0 0 3px rgba(244,168,199,0.07),
      0 0 18px  rgba(244,168,199,0.45),
      0 0 36px  rgba(255,61,127,0.25),
      0 0 52px  rgba(155,93,229,0.12);
  }
}

.hbd-header__logo:hover .hbd-logo-mark {
  transform: scale(1.08) rotate(-5deg);
  box-shadow:
    0 0 0 4px rgba(244,168,199,0.1),
    0 0 22px  rgba(244,168,199,0.5),
    0 0 44px  rgba(255,61,127,0.3);
  animation: none;
}

.hbd-header__brand {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
  line-height: 1;
  display: flex;
  align-items: center;
}

.hbd-header__brand-suffix {
  color: var(--clr-accent) !important;
  font-weight: 400;
  margin-left: 4px;
}

.hbd-logo-dot {
  color: var(--clr-accent);
  text-shadow: 0 0 8px var(--clr-accent-glow), 0 0 16px var(--clr-accent-glow);
  font-weight: 800;
  margin-left: 1px;
}

.hbd-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.hbd-nav__link {
  position: relative;
  padding: var(--sp-2) var(--sp-4);
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--clr-text-secondary);
  text-decoration: none;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.hbd-nav__link:hover {
  color: var(--clr-text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.hbd-nav__link.active {
  color: var(--clr-accent);
}

.hbd-nav__link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--clr-accent);
  border-radius: var(--border-radius-full);
  transition: all var(--transition-base);
  transform: translateX(-50%);
  box-shadow: 0 0 8px var(--clr-accent-glow);
}

.hbd-nav__link:hover::after,
.hbd-nav__link.active::after {
  width: 60%;
}

.hbd-header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  z-index: calc(var(--z-header) + 1);
}

.hbd-header__icon-btn, .hbd-header__user {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-md);
  color: var(--clr-text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hbd-header__icon-btn:hover, .hbd-header__user:hover {
  color: var(--clr-accent);
  background: rgba(244, 168, 199, 0.06);
}

.hbd-header__badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: var(--fw-bold);
  background: var(--clr-accent);
  color: var(--clr-text-on-accent);
  border-radius: 50%;
  padding: 0 4px;
  box-shadow: 0 0 8px var(--clr-accent-glow);
  animation: scaleIn 0.3s var(--transition-spring);
}

.hbd-user-menu {
  position: relative;
}

.hbd-header__icon-btn svg, .hbd-header__user svg {
  pointer-events: none;
}

/* User Dropdown */
.hbd-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--clr-bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-xl);
  padding: var(--sp-4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
  z-index: var(--z-dropdown);
  backdrop-filter: blur(16px);
}

.hbd-user-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hbd-user-dropdown__header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-3);
}

.hbd-user-dropdown__header strong {
  display: block;
  font-size: var(--fs-base);
  color: #fff;
}

.hbd-user-dropdown__header small {
  color: var(--clr-text-secondary);
  font-size: var(--fs-xs);
}

.hbd-user-dropdown__links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.hbd-user-dropdown__links a {
  color: var(--clr-text-secondary);
  text-decoration: none;
  font-size: var(--fs-sm);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.hbd-user-dropdown__links a:hover {
  background: rgba(244, 168, 199, 0.06);
  color: var(--clr-accent);
}

.hbd-user-dropdown__logout {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--clr-error);
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hbd-user-dropdown__logout:hover {
  background: rgba(232, 114, 114, 0.08);
}

/* Scrolled state: stronger glass */
.header.is-scrolled, .hbd-header.is-scrolled {
  padding: 10px 0;
  background: rgba(16, 16, 16, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-xl);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* Brand / Logo */
.header__brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  text-decoration: none;
  z-index: calc(var(--z-header) + 1);
}

.header__logo {
  width: 40px;
  height: 40px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
}

.header__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Text-based logo fallback */
.header__brand-text {
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-extrabold);
  color: var(--clr-text-primary);
  letter-spacing: var(--ls-tight);
  line-height: 1;
}

.header__brand-text span {
  color: var(--clr-accent);
}

.header__brand-sub {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  font-weight: var(--fw-regular);
  display: block;
  margin-top: 2px;
}

/* Desktop Navigation */
.header__nav {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
}

.header__nav-link {
  position: relative;
  padding: var(--sp-2) var(--sp-4);
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--clr-text-secondary);
  text-decoration: none;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.header__nav-link:hover {
  color: var(--clr-text-primary);
  background: rgba(255, 255, 255, 0.04);
}

.header__nav-link.is-active {
  color: var(--clr-accent);
}

/* Animated underline */
.header__nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--clr-accent);
  border-radius: var(--border-radius-full);
  transition: all var(--transition-base);
  transform: translateX(-50%);
  box-shadow: 0 0 8px var(--clr-accent-glow);
}

.header__nav-link:hover::after,
.header__nav-link.is-active::after {
  width: 60%;
}

/* Header Actions (Cart, User, etc.) */
.header__actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  z-index: calc(var(--z-header) + 1);
}

.header__action-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-md);
  color: var(--clr-text-secondary);
  transition: all var(--transition-fast);
  font-size: var(--fs-lg);
}

.header__action-btn:hover {
  color: var(--clr-accent);
  background: rgba(244, 168, 199, 0.08);
}

/* Cart badge count */
.header__cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: var(--fw-bold);
  background: var(--clr-accent);
  color: var(--clr-text-on-accent);
  border-radius: 50%;
  padding: 0 4px;
  box-shadow: 0 0 8px var(--clr-accent-glow);
  animation: scaleIn 0.3s var(--transition-spring);
}

/* Search toggle in header */
.header__search, .hbd-search {
  position: relative;
}

.hbd-search__toggle {
  background: none;
  border: none;
  color: var(--clr-text-secondary);
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-md);
  transition: all var(--transition-fast);
}

.hbd-search__toggle:hover {
  color: var(--clr-accent);
  background: rgba(244, 168, 199, 0.06);
}

.hbd-search__dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 320px;
  background: rgba(30, 30, 30, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-lg);
  padding: var(--sp-3);
  box-shadow: var(--shadow-xl), 0 0 30px rgba(244, 168, 199, 0.05);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-base);
  z-index: var(--z-dropdown);
}

.hbd-search__dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hbd-search__input {
  width: 100%;
  padding: var(--sp-2-5) var(--sp-4);
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--border-radius-full);
  color: #fff;
  font-size: var(--fs-sm);
  transition: all var(--transition-fast);
}

.hbd-search__input:focus {
  border-color: var(--clr-accent);
  box-shadow: 0 0 15px rgba(244, 168, 199, 0.25);
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.hbd-search__results {
  max-height: 280px;
  overflow-y: auto;
  margin-top: var(--sp-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hbd-search__result-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--border-radius-md);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.hbd-search__result-item:hover {
  background: rgba(244, 168, 199, 0.08);
}

.hbd-search__result-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.hbd-search__result-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hbd-search__result-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hbd-search__result-price {
  font-size: var(--fs-xs);
  color: var(--clr-accent);
}

.hbd-search__empty {
  padding: var(--sp-4);
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
}


/* ══════════════════════════════════════════════════════════════
   HAMBURGER MENU BUTTON (Mobile)
   ══════════════════════════════════════════════════════════════ */

.hamburger, .hbd-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  cursor: pointer;
  z-index: calc(var(--z-header) + 2);
  background: none;
  border: none;
  padding: 0;
}

.hamburger__line, .hbd-hamburger span {
  width: 100%;
  height: 2px;
  background: var(--clr-text-primary);
  border-radius: var(--border-radius-full);
  transition: all var(--transition-base);
  transform-origin: center;
  display: block;
}

/* Animate to X */
.hamburger.is-active .hamburger__line:nth-child(1),
.hbd-hamburger.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--clr-accent);
}

.hamburger.is-active .hamburger__line:nth-child(2),
.hbd-hamburger.is-active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.is-active .hamburger__line:nth-child(3),
.hbd-hamburger.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--clr-accent);
}

@media (max-width: 768px) {
  .hamburger, .hbd-hamburger {
    display: flex;
  }
}


/* ══════════════════════════════════════════════════════════════
   MOBILE NAVIGATION OVERLAY
   ══════════════════════════════════════════════════════════════ */

.mobile-nav, .hbd-mobile-nav {
  position: fixed;
  inset: 0;
  z-index: var(--z-header);
  background: rgba(26, 26, 26, 0.95);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
  padding: 100px var(--sp-8) var(--sp-8);
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

.mobile-nav.is-open, .hbd-mobile-nav.is-open {
  transform: translateX(0);
}

.mobile-nav__links, .hbd-mobile-nav__links {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.mobile-nav__link, .hbd-mobile-nav .hbd-nav__link {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  font-family: var(--font-heading);
  font-size: var(--fs-xl);
  font-weight: var(--fw-semibold);
  color: var(--clr-text-secondary);
  text-decoration: none;
  border-radius: var(--border-radius-md);
  transition: all var(--transition-base);
  transform: translateX(40px);
  opacity: 0;
}

.mobile-nav.is-open .mobile-nav__link,
.hbd-mobile-nav.is-open .hbd-nav__link {
  transform: translateX(0);
  opacity: 1;
}

/* Stagger animation */
.mobile-nav.is-open .mobile-nav__link:nth-child(1),
.hbd-mobile-nav.is-open .hbd-nav__link:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav.is-open .mobile-nav__link:nth-child(2),
.hbd-mobile-nav.is-open .hbd-nav__link:nth-child(2) { transition-delay: 0.15s; }
.mobile-nav.is-open .mobile-nav__link:nth-child(3),
.hbd-mobile-nav.is-open .hbd-nav__link:nth-child(3) { transition-delay: 0.2s; }
.mobile-nav.is-open .mobile-nav__link:nth-child(4),
.hbd-mobile-nav.is-open .hbd-nav__link:nth-child(4) { transition-delay: 0.25s; }
.mobile-nav.is-open .mobile-nav__link:nth-child(5),
.hbd-mobile-nav.is-open .hbd-nav__link:nth-child(5) { transition-delay: 0.3s; }
.mobile-nav.is-open .mobile-nav__link:nth-child(6),
.hbd-mobile-nav.is-open .hbd-nav__link:nth-child(6) { transition-delay: 0.35s; }
.mobile-nav.is-open .mobile-nav__link:nth-child(7),
.hbd-mobile-nav.is-open .hbd-nav__link:nth-child(7) { transition-delay: 0.4s; }

.mobile-nav__link:hover,
.mobile-nav__link.is-active,
.hbd-mobile-nav .hbd-nav__link:hover,
.hbd-mobile-nav .hbd-nav__link.active {
  color: var(--clr-accent);
  background: rgba(244, 168, 199, 0.06);
}

.mobile-nav__link.is-active::before,
.hbd-mobile-nav .hbd-nav__link.active::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--clr-accent);
  box-shadow: 0 0 8px var(--clr-accent-glow);
}

.mobile-nav__divider, .hbd-mobile-nav__divider {
  height: 1px;
  background: var(--border-subtle);
  margin: var(--sp-6) 0;
}

.mobile-nav__cta, .hbd-mobile-nav__cta {
  margin-top: auto;
  padding-top: var(--sp-6);
}

/* Background decorative blob for mobile nav */
.mobile-nav::before, .hbd-mobile-nav::before {
  content: '';
  position: absolute;
  top: 10%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: var(--clr-accent);
  filter: blur(120px);
  opacity: 0.08;
  pointer-events: none;
}

@media (min-width: 769px) {
  .mobile-nav, .hbd-mobile-nav {
    display: none;
  }
}

@media (max-width: 768px) {
  .header__nav, .hbd-nav {
    display: none;
  }
}


/* ══════════════════════════════════════════════════════════════
   PAGE WRAPPER — Offset for fixed header
   ══════════════════════════════════════════════════════════════ */

.page, #main-content {
  padding-top: 140px; /* height of fixed header + visual spacing */
  min-height: 100vh;
}


/* ══════════════════════════════════════════════════════════════
   RESPONSIVE GRID SYSTEM
   ══════════════════════════════════════════════════════════════ */

.row {
  display: grid;
  gap: var(--sp-6);
}

.row--tight { gap: var(--sp-4); }
.row--loose { gap: var(--sp-10); }

/* Auto-fit responsive grids */
.grid-auto-sm { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.grid-auto-md { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-auto-lg { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }

/* Explicit column layouts */
.col-1  { grid-template-columns: 1fr; }
.col-2  { grid-template-columns: repeat(2, 1fr); }
.col-3  { grid-template-columns: repeat(3, 1fr); }
.col-4  { grid-template-columns: repeat(4, 1fr); }
.col-5  { grid-template-columns: repeat(5, 1fr); }
.col-6  { grid-template-columns: repeat(6, 1fr); }

/* Sidebar layout (sidebar + main content) */
.layout-sidebar {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--sp-8);
  align-items: start;
}

.layout-sidebar--right {
  grid-template-columns: 1fr 320px;
}

/* Two-column with wider right */
.layout-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-8);
}

.layout-split--wide-left {
  grid-template-columns: 2fr 1fr;
}

.layout-split--wide-right {
  grid-template-columns: 1fr 2fr;
}

/* Responsive breakpoints */
@media (max-width: 1024px) {
  .col-4 { grid-template-columns: repeat(2, 1fr); }
  .col-5 { grid-template-columns: repeat(3, 1fr); }
  .col-6 { grid-template-columns: repeat(3, 1fr); }
  .layout-sidebar { grid-template-columns: 260px 1fr; gap: var(--sp-6); }
  .layout-split--wide-left,
  .layout-split--wide-right { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .col-2,
  .col-3,
  .col-4,
  .col-5,
  .col-6 { grid-template-columns: 1fr; }

  .layout-sidebar,
  .layout-sidebar--right {
    grid-template-columns: 1fr;
  }

  .layout-split,
  .layout-split--wide-left,
  .layout-split--wide-right {
    grid-template-columns: 1fr;
  }
}


/* ══════════════════════════════════════════════════════════════
   BREADCRUMBS
   ══════════════════════════════════════════════════════════════ */

.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  padding: var(--sp-4) 0;
  font-size: var(--fs-sm);
}

.breadcrumbs__item {
  color: var(--clr-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.breadcrumbs__item:hover {
  color: var(--clr-accent);
}

.breadcrumbs__separator {
  color: var(--clr-text-muted);
  opacity: 0.5;
  font-size: var(--fs-xs);
}

.breadcrumbs__current {
  color: var(--clr-text-primary);
  font-weight: var(--fw-medium);
}


/* ══════════════════════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════════════════════ */

.footer, .hbd-footer {
  background: var(--clr-bg-elevated);
  border-top: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
  padding-bottom: var(--sp-6);
}

/* Decorative top glow line */
.footer::before, .hbd-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--clr-accent) 30%,
    var(--clr-accent-hover) 50%,
    var(--clr-accent) 70%,
    transparent
  );
  opacity: 0.4;
}

.footer__main, .hbd-footer__inner {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--sp-10);
  padding: var(--sp-16) var(--container-pad) var(--sp-10);
  max-width: var(--container-xl);
  margin-inline: auto;
}

/* Brand column */
.footer__brand, .hbd-footer__col--brand {
  max-width: 300px;
}

.hbd-footer__logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.hbd-footer__logo .hb-logo-svg {
  width: 38px;
  height: 38px;
  border-radius: var(--border-radius-md);
  overflow: hidden;
  filter: drop-shadow(0 2px 8px rgba(244, 168, 199, 0.25));
}

.footer__brand-name, .hbd-footer__brand-name {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
}

.footer__brand-desc, .hbd-footer__tagline {
  font-size: var(--fs-sm);
  color: var(--clr-text-secondary);
  line-height: var(--lh-relaxed);
  margin-top: var(--sp-4);
  margin-bottom: var(--sp-6);
}

/* Social links */
.footer__socials, .hbd-footer__social {
  display: flex;
  gap: var(--sp-3);
}

.footer__social-link, .hbd-footer__social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius-md);
  background: var(--clr-bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--clr-text-secondary);
  font-size: var(--fs-md);
  transition: all var(--transition-base);
  text-decoration: none;
}

.footer__social-link:hover, .hbd-footer__social-link:hover {
  color: var(--clr-accent);
  border-color: var(--border-accent);
  background: var(--clr-accent-subtle);
  transform: translateY(-3px);
  box-shadow: 0 4px 15px rgba(244, 168, 199, 0.15);
}

/* Footer columns */
.footer__column, .hbd-footer__col {
  /* each link column */
}

.footer__column-title, .hbd-footer__heading {
  font-family: var(--font-heading);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  color: var(--clr-text-primary);
  margin-bottom: var(--sp-5);
  position: relative;
  padding-bottom: var(--sp-3);
}

.footer__column-title::after, .hbd-footer__heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--clr-accent);
  border-radius: var(--border-radius-full);
}

.footer__links, .hbd-footer__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.footer__link, .hbd-footer__list a {
  font-size: var(--fs-sm);
  color: var(--clr-text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.footer__link:hover, .hbd-footer__list a:hover {
  color: var(--clr-accent);
  transform: translateX(4px);
}

.footer__link::before, .hbd-footer__list a::before {
  content: '';
  width: 0;
  height: 1px;
  background: var(--clr-accent);
  transition: width var(--transition-fast);
}

.footer__link:hover::before, .hbd-footer__list a:hover::before {
  width: 12px;
}

/* Newsletter in footer */
.footer__newsletter {
  margin-top: var(--sp-6);
}

.footer__newsletter-form {
  display: flex;
  gap: var(--sp-2);
}

.footer__newsletter-input {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  background: var(--clr-bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-md);
  color: var(--clr-text-primary);
  font-size: var(--fs-sm);
  transition: border-color var(--transition-fast);
}

.footer__newsletter-input:focus {
  border-color: var(--clr-accent);
}

.footer__newsletter-input::placeholder {
  color: var(--clr-text-muted);
}

/* Divider before bottom bar */
.footer__divider {
  height: 1px;
  background: var(--border-subtle);
}

/* Bottom bar: copyright + payment icons */
.footer__bottom, .hbd-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-4);
  padding: var(--sp-6) var(--container-pad);
  max-width: var(--container-xl);
  margin-inline: auto;
  border-top: 1px solid var(--border-subtle);
}

.footer__copyright, .hbd-footer__bottom p {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  margin-bottom: 0;
}

.footer__copyright a, .hbd-footer__bottom p a {
  color: var(--clr-accent);
}

/* Payment icons area */
.footer__payments, .hbd-footer__payments {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
}

.hbd-payment-badge {
  display: inline-block;
  padding: var(--sp-1.5) var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--clr-accent);
  background: rgba(244, 168, 199, 0.08);
  border: 1px solid var(--border-accent);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.hbd-payment-badge:hover {
  background: var(--clr-accent);
  color: var(--clr-text-on-accent);
  box-shadow: 0 0 10px var(--clr-accent-glow);
  transform: translateY(-1px);
}

.footer__payment-icon {
  width: 44px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--clr-bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-xs);
  padding: var(--sp-1);
  transition: border-color var(--transition-fast);
}

.footer__payment-icon:hover {
  border-color: var(--border-accent);
}

.footer__payment-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: grayscale(100%) brightness(1.5);
  opacity: 0.6;
  transition: all var(--transition-fast);
}

.footer__payment-icon:hover img {
  filter: none;
  opacity: 1;
}

/* Decorative blob in footer */
.footer__blob {
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: var(--clr-accent);
  filter: blur(150px);
  opacity: 0.04;
  pointer-events: none;
}

/* Mobile footer */
@media (max-width: 1024px) {
  .footer__main, .hbd-footer__inner {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--sp-8);
  }
  .footer__brand, .hbd-footer__col--brand {
    grid-column: 1 / -1;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .footer__main, .hbd-footer__inner {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
    padding: var(--sp-10) var(--container-pad) var(--sp-8);
  }
  .footer__bottom, .hbd-footer__bottom {
    flex-direction: column;
    text-align: center;
  }
}


/* ══════════════════════════════════════════════════════════════
   BACK TO TOP BUTTON
   ══════════════════════════════════════════════════════════════ */

.back-to-top, .hbd-footer__back-to-top {
  position: fixed;
  bottom: var(--sp-8);
  right: var(--sp-8);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-md);
  color: var(--clr-accent);
  font-size: var(--fs-lg);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-base);
  z-index: var(--z-sticky);
}

.back-to-top.is-visible, .hbd-footer__back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover, .hbd-footer__back-to-top:hover {
  background: var(--clr-accent);
  color: var(--clr-text-on-accent);
  border-color: var(--clr-accent);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .back-to-top, .hbd-footer__back-to-top {
    bottom: var(--sp-4);
    right: var(--sp-4);
    width: 40px;
    height: 40px;
  }
}


/* ============================================================
   LAYOUT POLISH — HameemBhai er Dokan (appended)
   Premium micro-refinements across header, footer & mobile nav
   ============================================================ */


/* ── 1. HBD Logo SVG responsive sizing ─────────────────────── */
@media (max-width: 768px) {
  .hbd-header__logo .hb-logo-svg { width: 34px; height: 34px; }
  .hbd-header__brand { font-size: 1rem; }
  .hbd-header__brand-suffix { display: none; }
  .hbd-header__actions { gap: 0.5rem; }
  .hbd-header__icon-btn, .hbd-header__user { width: 36px; height: 36px; }
}


/* ── 2. Smoother nav underline animation ───────────────────── */
.hbd-nav__link {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.hbd-nav__link.active,
.hbd-nav__link:hover {
  color: #fff;
}
.hbd-nav__link.active { color: #f4a8c7; }


/* ── 3. Search dropdown smooth open ────────────────────────── */
.hbd-search__dropdown {
  transform-origin: top center;
}
.hbd-search__dropdown.is-open {
  animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}


/* ── 4. User dropdown polish ──────────────────────────────── */
.hbd-user-dropdown {
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 30px rgba(244,168,199,0.05);
}
.hbd-user-dropdown.is-open {
  animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hbd-user-dropdown__links a,
.hbd-user-dropdown__logout {
  border-radius: 8px;
  display: block;
  width: 100%;
}


/* ── 5. Hamburger styling polish ───────────────────────────── */
.hbd-hamburger {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  padding: 8px;
}
.hbd-hamburger span {
  width: 20px;
  background: rgba(255, 255, 255, 0.8);
}
.hbd-hamburger.is-active span {
  background: #f4a8c7;
}


/* ── 6. Footer contact info polish ─────────────────────────── */
.hbd-footer__contact-info {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.8;
  margin-top: 1rem;
}
.hbd-footer__brand-suffix { color: #f4a8c7; font-weight: 400; margin-left: 4px; }


/* ── 7. Mobile nav premium overlay enhancement ──────────────── */
.hbd-mobile-nav {
  background: rgba(20, 20, 20, 0.97);
  padding-top: 120px;
}
.hbd-mobile-nav .hbd-nav__link {
  font-size: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  width: 100%;
}
.hbd-mobile-nav .hbd-nav__link.active {
  background: rgba(244, 168, 199, 0.08);
  border-left: 3px solid #f4a8c7;
}


/* ── 8. Back-to-top button — scroll-triggered visibility ────── */
.hbd-footer__back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(42, 42, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(244, 168, 199, 0.2);
  border-radius: 12px;
  color: #f4a8c7;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 200;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}
.hbd-footer__back-to-top:hover {
  background: #f4a8c7;
  color: #1a1a1a;
  border-color: #f4a8c7;
  box-shadow: 0 4px 20px rgba(244, 168, 199, 0.3);
  transform: translateY(-3px);
}


/* ── 9. Global body improvements ────────────────────────────── */
body.menu-open { overflow: hidden; }
body.is-loading { overflow: hidden; }
::selection {
  background: rgba(244, 168, 199, 0.3);
  color: #fff;
}
::-moz-selection {
  background: rgba(244, 168, 199, 0.3);
  color: #fff;
}
