/* =====================================================
   PARINHALL — HEADER STYLES
   ===================================================== */

/* ---- Skip-to-content link ---- */
.ph-skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  z-index: 999;
  background: var(--ph-teal);
  color: var(--ph-white);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: top 0.2s;
}
.ph-skip-link:focus {
  top: 8px;
}

/* ---- Sticky Header ---- */
.ph-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251, 249, 245, 0.94);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid rgba(32, 38, 31, 0.07);
  transition: box-shadow 0.3s ease;
}

.ph-header--scrolled {
  box-shadow: var(--shadow-header);
}

/* ---- Top Bar ---- */
.ph-header__top-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-block: 10px;
}

/* ---- Logo ---- */
.ph-logo {
  text-decoration: none;
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  gap: 0;
}

.ph-logo__parin {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 24px;
  color: var(--ph-orange);
  line-height: 1.1;
}

.ph-logo__hall {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 24px;
  color: var(--ph-teal);
  line-height: 1.1;
}

.ph-logo__sub {
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--ph-olive);
  margin-inline-end: 7px;
  white-space: nowrap;
}

/* Custom logo image override */
.ph-logo img {
  height: 48px;
  width: auto;
}

/* ---- Search ---- */
.ph-header__search {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--ph-white);
  border: 1.5px solid rgba(32, 38, 31, 0.1);
  border-radius: var(--radius-pill);
  padding: 7px 13px;
  max-width: 210px;
  box-shadow: 0 3px 10px -6px rgba(32, 38, 31, 0.15);
  transition: var(--transition);
}

.ph-header__search:focus-within {
  border-color: var(--ph-teal);
  box-shadow: 0 0 0 3px rgba(27, 122, 140, 0.1);
}

.ph-header__search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ph-dark);
  text-align: right;
  min-width: 0;
}

.ph-header__search-input::placeholder {
  color: var(--ph-olive);
}

/* ---- Icon Buttons (wishlist etc.) ---- */
.ph-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(32, 38, 31, 0.1);
  background: var(--ph-white);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ph-mid-green);
  flex-shrink: 0;
  transition: var(--transition);
}

.ph-icon-btn:hover {
  border-color: var(--ph-orange);
  color: var(--ph-orange);
}

/* ---- Account ---- */
.ph-header__account {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1.5px solid rgba(32, 38, 31, 0.1);
  background: var(--ph-white);
  border-radius: var(--radius-pill);
  padding: 6px 13px;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
  text-decoration: none;
}

.ph-header__account:hover {
  border-color: var(--ph-teal);
}

.ph-header__account-label {
  line-height: 1.2;
}

.ph-header__account-sub {
  display: block;
  font-size: 10px;
  color: var(--ph-olive);
}

.ph-header__account-main {
  display: block;
  font-size: 12.5px;
  color: var(--ph-dark);
  font-weight: 500;
}

/* ---- Cart Button ---- */
.ph-header__cart {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--ph-dark);
  border-radius: var(--radius-pill);
  padding: 8px 15px;
  cursor: pointer;
  flex-shrink: 0;
  border: none;
  transition: background 0.25s ease;
  color: var(--ph-white);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
}

.ph-header__cart:hover {
  background: var(--ph-teal);
}

.ph-cart-count {
  background: var(--ph-orange);
  color: var(--ph-white);
  font-size: 10.5px;
  font-weight: 600;
  min-width: 17px;
  height: 17px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ---- Nav Strip ---- */
.ph-header__nav {
  border-top: 1px solid rgba(32, 38, 31, 0.06);
}

.ph-header__nav-inner {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 46px;
}

/* All categories button */
.ph-nav__all-cats {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--ph-orange);
  color: var(--ph-white);
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 13px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-body);
  transition: background 0.25s ease;
  flex-shrink: 0;
  white-space: nowrap;
}

.ph-nav__all-cats:hover {
  background: var(--ph-orange-dark);
}

.ph-nav__divider {
  width: 1px;
  height: 18px;
  background: rgba(32, 38, 31, 0.1);
  margin: 0 5px;
  flex-shrink: 0;
}

/* Nav links (from WP menu) */
.ph-nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.ph-nav__links li a {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--ph-mid-green);
  white-space: nowrap;
  transition: color 0.2s ease;
  display: block;
}

.ph-nav__links li a:hover,
.ph-nav__links li.current-menu-item > a {
  color: var(--ph-dark);
}

.ph-nav__link {
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--ph-mid-green);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.ph-nav__link:hover {
  color: var(--ph-dark);
}

.ph-nav__link--sale {
  font-weight: 600;
  color: var(--ph-orange) !important;
}

.ph-nav__link--compare {
  color: var(--ph-teal) !important;
}

/* =====================================================
   MEGA MENU
   ===================================================== */
.ph-mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: rgba(251, 249, 245, 0.99);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(32, 38, 31, 0.08);
  border-bottom: 1px solid rgba(32, 38, 31, 0.08);
  box-shadow: 0 28px 56px -26px rgba(32, 38, 31, 0.3);
  z-index: 50;
}

.ph-mega[x-cloak] { display: none; }

.ph-mega__inner {
  padding: 22px 0 26px;
  display: grid;
  grid-template-columns: 236px 1fr 268px;
  gap: 28px;
  align-items: start;
}

/* Rail */
.ph-mega__rail {
  border-inline-start: 1px solid rgba(32, 38, 31, 0.08);
  padding-inline-start: 20px;
}

.ph-mega__rail-label {
  font-size: 11px;
  color: var(--ph-olive);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.ph-mega__rail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 2px;
  background: transparent;
  transition: background 0.2s ease;
  text-decoration: none;
  color: var(--ph-mid-green);
}

.ph-mega__rail-item:hover,
.ph-mega__rail-item--active {
  background: rgba(27, 122, 140, 0.06);
  color: var(--ph-dark);
}

.ph-mega__rail-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ph-mega__rail-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

/* Sub-columns */
.ph-mega__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-content: start;
}

.ph-mega__sub {
  /* shown/hidden via Alpine x-show */
}

.ph-mega__sub[x-cloak] { display: none; }

.ph-mega__sub-title {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 600;
  color: var(--ph-teal);
  margin-bottom: 9px;
  border-bottom: 1px solid rgba(32, 38, 31, 0.1);
  padding-bottom: 7px;
}

.ph-mega__sub-item {
  display: block;
  font-size: 13.5px;
  color: var(--ph-mid-green);
  padding: 5px 0;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.ph-mega__sub-item:hover {
  color: var(--ph-orange);
  padding-inline-end: 5px;
}

/* Feature panel */
.ph-mega__feature {
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  min-height: 210px;
  background: linear-gradient(150deg, var(--ph-teal), var(--ph-teal-dark));
  cursor: pointer;
  display: flex;
  align-items: flex-end;
}

.ph-mega__feature::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 20% 10%, rgba(255,255,255,0.26), transparent 55%);
}

.ph-mega__feature-inner {
  position: relative;
  padding: 14px;
  color: var(--ph-white);
}

.ph-mega__feature-tag {
  font-size: 11.5px;
  opacity: 0.85;
  display: block;
  margin-bottom: 4px;
}

.ph-mega__feature-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.2;
  margin-bottom: 10px;
}

.ph-mega__feature-link {
  display: inline-block;
  font-size: 12.5px;
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  text-decoration: none;
  transition: var(--transition);
}

.ph-mega__feature-link:hover {
  background: rgba(255,255,255,0.15);
}

/* =====================================================
   CART DRAWER
   ===================================================== */
.ph-cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
}

.ph-cart-drawer[x-cloak] { display: none; }

.ph-cart-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 38, 31, 0.45);
  backdrop-filter: blur(3px);
}

.ph-cart-drawer__panel {
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--ph-white);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 30px rgba(32, 38, 31, 0.15);
}

/* Desktop: panel slides in from the side */
@media (min-width: 769px) {
  .ph-cart-drawer__panel {
    animation: phSlideIn 0.3s ease;
  }
}

.ph-cart-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--ph-border);
}

.ph-cart-drawer__title {
  font-family: var(--font-heading);
  font-size: 24px;
  color: var(--ph-dark);
}

.ph-cart-drawer__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--ph-border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ph-mid-green);
  transition: var(--transition);
}

.ph-cart-drawer__close:hover {
  border-color: var(--ph-dark);
  color: var(--ph-dark);
}

.ph-cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.ph-cart-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding-block: 14px;
  border-bottom: 1px solid rgba(32, 38, 31, 0.06);
}

.ph-cart-item__img {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--ph-bg-card);
}

.ph-cart-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph-cart-item__info {
  flex: 1;
}

.ph-cart-item__name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ph-dark);
  line-height: 1.4;
  margin-bottom: 4px;
}

.ph-cart-item__price {
  font-size: 13.5px;
  color: var(--ph-teal);
  font-weight: 600;
}

.ph-cart-item__qty {
  display: none; /* replaced by stepper */
}

/* Brand label above product name in drawer */
.ph-cart-item__brand {
  font-size: 11px;
  color: var(--ph-olive);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

/* Qty stepper in drawer */
.ph-cart-item__stepper {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 8px;
  background: var(--ph-bg-card);
  border-radius: 20px;
  width: fit-content;
  border: 1px solid rgba(32,38,31,0.1);
  overflow: hidden;
}

.ph-cart-item__step-btn {
  width: 26px;
  height: 26px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 400;
  color: var(--ph-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  padding: 0;
  line-height: 1;
}

.ph-cart-item__step-btn:hover { background: rgba(32,38,31,0.08); }
.ph-cart-item__step-btn:disabled { opacity: 0.4; cursor: default; }

.ph-cart-item__step-num {
  min-width: 26px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ph-dark);
}

.ph-cart-item__remove {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ph-bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ph-olive);
  flex-shrink: 0;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.ph-cart-item__remove:hover {
  background: #fee;
  color: #c00;
}

.ph-cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 0;
  color: var(--ph-olive);
}

.ph-cart-drawer__footer {
  padding: 20px 24px;
  border-top: 1px solid var(--ph-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Free shipping progress bar */
.ph-cart-ship-bar {
  background: var(--ph-bg);
  border: 1px solid rgba(32,38,31,0.08);
  border-radius: 11px;
  padding: 12px 14px;
}

.ph-cart-ship-bar__label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ph-cart-ship-bar__text {
  font-size: 12.5px;
  color: var(--ph-mid-green);
  font-weight: 500;
  line-height: 1.4;
}

.ph-cart-ship-bar__text--done {
  color: var(--ph-teal);
}

.ph-cart-ship-bar__track {
  height: 6px;
  background: #F0EDE8;
  border-radius: 6px;
  overflow: hidden;
}

.ph-cart-ship-bar__fill {
  height: 100%;
  background: linear-gradient(to left, var(--ph-teal), #7ABCC8);
  border-radius: 6px;
  transition: width 0.5s ease;
  min-width: 4px;
}

.ph-cart-drawer__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  margin-bottom: 4px;
}

.ph-cart-drawer__total-amount {
  font-family: var(--font-heading);
  font-size: 20px;
  color: var(--ph-teal);
  font-weight: 600;
}

.ph-btn-block {
  width: 100%;
  justify-content: center;
}

/* =====================================================
   MOBILE MENU
   ===================================================== */
.ph-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
}

.ph-mobile-menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(32, 38, 31, 0.5);
}

.ph-mobile-menu__panel {
  position: absolute;
  top: 0;
  inset-inline-start: 0;  /* RTL = right: 0 — panel slides from right side */
  bottom: 0;
  width: 85%;
  max-width: 340px;
  background: var(--ph-white);
  display: flex;
  flex-direction: column;
}

.ph-mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--ph-border);
}

.ph-mobile-menu__close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ph-mid-green);
  padding: 4px;
}

.ph-mobile-menu__body {
  overflow-y: auto;
  flex: 1;
  padding: 16px 20px;
}

.ph-mobile-nav {
  list-style: none;
}

.ph-mobile-nav li a {
  display: block;
  padding: 12px 4px;
  font-size: 15px;
  color: var(--ph-dark);
  border-bottom: 1px solid rgba(32, 38, 31, 0.06);
  transition: color 0.2s ease;
}

.ph-mobile-nav li a:hover {
  color: var(--ph-teal);
}

/* Mobile header toggle (hamburger) */
.ph-mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(32, 38, 31, 0.1);
  background: var(--ph-white);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ph-dark);
  flex-shrink: 0;
}

/* =====================================================
   RESPONSIVE HEADER
   ===================================================== */
@media (max-width: 1024px) {
  .ph-mega__inner {
    grid-template-columns: 200px 1fr 0;
    gap: 20px;
  }
  .ph-mega__feature {
    display: none;
  }
}

@media (max-width: 768px) {
  .ph-header__search,
  .ph-header__account,
  .ph-nav__links,
  .ph-header__nav {
    display: none;
  }

  .ph-mobile-toggle {
    display: flex;
  }

  .ph-header__top-inner {
    gap: 10px;
  }
}
