/* Pepperfry-style two-bar header + hover mega menu */

.pf-topbar {
  background: #1a1a1a;
  color: #f5f5f5;
  font-size: 0.75rem;
  line-height: 1.2;
  border-bottom: 1px solid #2a2a2a;
  width: 100%;
  overflow: hidden;
}

.pf-topbar-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 420px) minmax(0, 1fr);
  align-items: center;
  column-gap: 1rem;
  min-height: 38px;
  padding: 0.4rem 1.25rem;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.pf-topbar-col {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  min-width: 0;
}

.pf-topbar-col--left {
  justify-content: flex-start;
}

.pf-topbar-col--center {
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  max-width: 420px;
  justify-self: center;
}

.pf-topbar-col--right {
  justify-content: flex-end;
}

.pf-topbar-col a {
  color: #e8e8e8;
  text-decoration: none;
  white-space: nowrap;
  font-size: 0.75rem;
}

.pf-topbar-col a:hover {
  color: #fff;
  text-decoration: underline;
}

.pf-topbar-arrow {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
}

.pf-topbar-arrow:hover {
  color: #f0c4a8;
}

.pf-promo-swiper {
  flex: 1;
  min-width: 0;
  width: 100%;
  height: 1.25rem;
  overflow: hidden;
}

.pf-promo-swiper .swiper-wrapper {
  align-items: center;
}

.pf-promo-swiper .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 1.25rem;
  font-size: 0.75rem;
  color: #f5f5f5;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 991.98px) {
  .pf-topbar-grid {
    grid-template-columns: 1fr;
    padding: 0.45rem 0.75rem;
  }

  .pf-topbar-col--left,
  .pf-topbar-col--right {
    display: none;
  }

  .pf-topbar-col--center {
    max-width: 100%;
    justify-self: stretch;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .pf-topbar-grid {
    grid-template-columns: minmax(0, 1fr) minmax(180px, 320px) minmax(0, 1fr);
    column-gap: 0.5rem;
  }

  .pf-topbar-col {
    gap: 0.65rem;
  }

  .pf-topbar-col a {
    font-size: 0.7rem;
  }
}

.pf-header {
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.pf-main-header {
  border-bottom: 1px solid #eee;
}

.pf-main-header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  min-height: 68px;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

.pf-menu-toggler {
  flex-shrink: 0;
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  margin: 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #222;
  cursor: pointer;
  z-index: 2;
}

.pf-menu-icon {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: #222;
  border-radius: 1px;
  position: relative;
  box-shadow: 0 -6px 0 #222, 0 6px 0 #222;
}

.pf-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  text-decoration: none;
}

.pf-header .pf-header-logo,
.pf-logo .navbar-logo {
  height: 48px;
  width: auto;
  max-width: 130px;
  display: block;
  position: static !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
  object-fit: contain;
}

@media (max-width: 991.98px) {
  .pf-menu-toggler {
    display: inline-flex !important;
  }

  .pf-main-header-inner {
    display: grid;
    grid-template-columns: 2.75rem 1fr auto;
    align-items: center;
    column-gap: 0.5rem;
    row-gap: 0;
    padding: 0.5rem 0.75rem;
    min-height: 60px;
  }

  .pf-menu-toggler {
    grid-column: 1;
    grid-row: 1;
  }

  .pf-logo {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    min-width: 0;
  }

  .pf-header .pf-header-logo {
    height: 42px;
    max-width: 110px;
  }

  .pf-header-actions {
    grid-column: 3;
    grid-row: 1;
    margin-left: 0;
  }
}

@media (min-width: 992px) {
  .pf-main-header-inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 1.25rem;
  }

  .pf-logo {
    justify-self: start;
  }

  .pf-search-trigger {
    justify-self: center;
    width: 100%;
    max-width: 520px;
  }

  .pf-header-actions {
    justify-self: end;
  }
}

.pf-search-trigger {
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  padding: 0.55rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f7f7f7;
  color: #888;
  font-size: 0.875rem;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.pf-search-trigger:hover {
  border-color: #c45c26;
  box-shadow: 0 0 0 2px rgba(196, 92, 38, 0.12);
  color: #666;
}

.pf-header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  flex-shrink: 0;
}

.pf-category-bar {
  background: #fff;
  border-bottom: 1px solid #eee;
}

.pf-category-bar .container-fluid {
  display: flex;
  justify-content: center;
  max-width: 1440px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.pf-category-nav {
  display: flex;
  align-items: stretch;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
  min-height: 44px;
}

.pf-category-item {
  position: relative;
  flex-shrink: 0;
}

.pf-category-link {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.pf-category-link:hover,
.pf-category-item.is-active .pf-category-link {
  color: #c45c26;
  border-bottom-color: #c45c26;
}

.pf-category-link.pf-store-all {
  color: #c45c26;
}

.pf-mega-flyout {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #fff;
  border-top: 1px solid #eee;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 1020;
}

.pf-mega-flyout.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.pf-mega-flyout-inner {
  display: flex;
  gap: 1.5rem;
  padding: 1.25rem 1rem 1.5rem;
  max-height: min(70vh, 480px);
}

.pf-mega-panels {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
}

.pf-mega-panel {
  display: none;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  align-content: flex-start;
}

.pf-mega-panel.is-active {
  display: flex;
}

.pf-mega-column {
  min-width: 150px;
  max-width: 200px;
}

.pf-mega-column-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.45rem;
}

.pf-mega-column-title a {
  color: #222;
  text-decoration: none;
}

.pf-mega-column-title a:hover {
  color: #c45c26;
}

.pf-mega-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pf-mega-links li {
  margin-bottom: 0.3rem;
}

.pf-mega-links a {
  color: #555;
  font-size: 0.8125rem;
  text-decoration: none;
  line-height: 1.35;
}

.pf-mega-links a:hover {
  color: #c45c26;
  text-decoration: underline;
}

.pf-mega-preview-wrap {
  width: 260px;
  flex-shrink: 0;
}

.pf-mega-preview-wrap img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 6px;
  transition: opacity 0.2s ease;
}

.pf-mega-view-all {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #c45c26;
  text-decoration: none;
  margin-top: 0.25rem;
}

.pf-mega-view-all:hover {
  text-decoration: underline;
}

/* Mobile offcanvas menu — scrollable body */
@media (max-width: 991.98px) {
  .pf-mobile-nav.offcanvas {
    width: min(320px, 90vw) !important;
    max-width: 90vw !important;
    margin-left: 0 !important;
  }

  .pf-mobile-nav.offcanvas.show {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden;
  }

  .pf-mobile-nav .offcanvas-header {
    flex-shrink: 0;
    border-bottom: 1px solid #eee;
  }

  .pf-mobile-nav .pf-offcanvas-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding-bottom: 2.5rem !important;
  }

  .pf-mobile-nav .nav-link {
    color: #222 !important;
    font-weight: 500;
  }

  .pf-mobile-cats {
    max-height: none;
  }
}

/* Mobile category accordion */
.pf-mobile-cat-group {
  border-bottom: 1px solid #eee;
}

.pf-mobile-cat-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  background: none;
  border: none;
  font-weight: 600;
  font-size: 0.9375rem;
  color: #222;
}

.pf-mobile-sub-list {
  list-style: none;
  padding: 0 0 0.75rem 0.75rem;
  margin: 0;
}

.pf-mobile-sub-list a {
  display: block;
  padding: 0.35rem 0;
  color: #555;
  text-decoration: none;
  font-size: 0.875rem;
}

.pf-mobile-child-list {
  list-style: none;
  padding-left: 0.75rem;
  margin: 0 0 0.5rem;
}

.pf-mobile-child-list a {
  font-size: 0.8125rem;
  color: #777;
}

[data-bs-theme="dark"] .pf-header,
[data-bs-theme="dark"] .pf-category-bar {
  background: #1a1a1a;
  border-color: #333;
}

[data-bs-theme="dark"] .pf-main-header {
  border-color: #333;
}

[data-bs-theme="dark"] .pf-search-trigger {
  background: #252525;
  border-color: #444;
  color: #aaa;
}

[data-bs-theme="dark"] .pf-category-link {
  color: #eee;
}

[data-bs-theme="dark"] .pf-mega-flyout {
  background: #1a1a1a;
  border-color: #333;
}

[data-bs-theme="dark"] .pf-mega-column-title a,
[data-bs-theme="dark"] .pf-mega-links a {
  color: #ccc;
}

[data-bs-theme="dark"] .pf-menu-toggler {
  background: #252525;
  border-color: #444;
}

[data-bs-theme="dark"] .pf-menu-icon {
  background: #f0f0f0;
  box-shadow: 0 -6px 0 #f0f0f0, 0 6px 0 #f0f0f0;
}

@media (max-width: 991.98px) {
  .pf-mega-flyout {
    display: none !important;
  }
}
