/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --white: #ffffff;
  --off-white: #fafafa;
  --light-gray: #f5f5f5;
  --border: #e8e8e8;
  --text-dark: #1a1a1a;
  --text-mid: #555555;
  --text-light: #888888;
  --accent: #7b5ea7;
  --accent-light: #ede8f5;
  --gold: #c8a86b;
  --green-muted: #8d9b88;
  --terracotta: #a55e40;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'DM Sans', sans-serif;
}

html { scroll-behavior: smooth; }

/* FIX #7: prevent horizontal scroll on mobile */
body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }

/* FIX #1: was width:160% — the root cause of ALL image overflow on mobile */
img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

ul { list-style: none; }

/* ===== TOP BAR ===== */
/* Desktop */
.top-bar{
  background: linear-gradient(90deg, #ff4d8d, #ff8c42);
  color:#fff;
  padding:7px 20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

/* Mobile */
@media (max-width:768px){
  .top-bar{
    flex-direction:column;
    align-items:center;
    gap:8px;
    padding:10px;
  }

  .top-bar-promo{
    display:none;
  }

  .top-bar-contact{
    display:flex;
    justify-content:center;
    width:100%;
    font-size:13px;
  }
}

/* ===== HEADER ===== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 48px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1500;
}

.logo {
  display: flex;
  align-items: center;
  height: 60px;
}

/* FIX #2: logo img was inheriting width:160%, now properly constrained */
.logo img {
  height: 100%;
  max-height: 55px;
  width: auto !important; /* override global img rule */
  max-width: 200px;
}

/* FIX #3: search margin was 255px each side — collapsed header on tablets */
.search-wrap {
  flex: 1;
  margin: 0 32px;
  position: relative;
  max-width: 480px;
}
.search-wrap input {
  width: 100%;
  padding: 11px 44px 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-dark);
  background: #ffffff;
  outline: none;
  transition: border-color 0.2s;
}
.search-wrap input:focus { border-color: var(--accent); background: var(--white); }
.search-wrap .search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 15px;
  pointer-events: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-shrink: 0;
}

.header-icon {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #000000;
  cursor: pointer;
  transition: color 0.2s;
  white-space: nowrap;
}
.header-icon:hover { color: var(--accent); }
.header-icon i { font-size: 18px; }

/* ===== HAMBURGER (mobile only) ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0px;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #000000;
  border-radius: 2px;
  transition: all 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== NAV — DESKTOP ===== */
.nav {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 70px;
  z-index: 999;
}

.nav-inner {
  display: flex;
  align-items: center;
  padding: 0 48px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-inner::-webkit-scrollbar { display: none; }

.nav-item {
  position: relative;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  color: #000000;
  padding: 14px 16px;
  white-space: nowrap;
  transition: color 0.2s;
  user-select: none;
}
.nav-item:hover { color: var(--accent); }
.nav-item.sale-item { color: #c0392b; font-weight: 600; }
.nav-item.sale-item:hover { color: #962d22; }

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  right: 50%;
  height: 2px;
  background: var(--accent);
  transition: left 0.25s, right 0.25s;
}
.nav-item:hover::after { left: 16px; right: 16px; }
.nav-item.sale-item::after { background: #c0392b; }

/* ===== MEGA MENU — DESKTOP ===== */
.mega-menu {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0,0,0,0.10);
  z-index: 998;
  padding: 36px 48px 40px;
  animation: megaFadeIn 0.18s ease;
  max-height: 80vh;
  overflow-y: auto;
  margin-top: -5px;
}

@keyframes megaFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-item:hover .mega-menu { display: block; }

.mega-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 32px;
}

.mega-col h4 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dark);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid var(--border);
}
.mega-col h4.sub { margin-top: 20px; }

.mega-col a {
  display: block;
  font-size: 13.5px;
  color: var(--text-mid);
  padding: 4px 0;
  transition: color 0.15s, padding-left 0.15s;
}
.mega-col a:hover { color: var(--accent); padding-left: 6px; }

/* ===== MOBILE DRAWER NAV ===== */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 85%;
  max-width: 340px;
  height: 100%;
  background: var(--white);
  z-index: 3000;
  box-shadow: 4px 0 24px rgba(0,0,0,0.15);
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  flex-direction: column;
}
.mobile-nav.open { transform: translateX(0); }

.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 2999;
  opacity: 0;
  transition: opacity 0.3s;
}
.mobile-nav-overlay.open { opacity: 1; }

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 1;
}
.mobile-nav-logo {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-dark);
}
.mobile-nav-logo span { color: var(--accent); }
.mobile-nav-close {
  width: 34px; height: 34px;
  border: none;
  background: var(--light-gray);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-dark);
}

.m-nav-item { border-bottom: 1px solid var(--border); }
.m-nav-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
  text-align: left;
}
.m-nav-trigger.sale { color: #c0392b; }
.m-nav-trigger .chevron {
  font-size: 13px;
  color: var(--text-light);
  transition: transform 0.25s;
  flex-shrink: 0;
}
.m-nav-item.open .chevron { transform: rotate(90deg); }

.m-mega-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background: var(--off-white);
}
.m-nav-item.open .m-mega-panel { max-height: 9000px; }

.m-mega-group { border-top: 1px solid var(--border); }

.m-mega-group-title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 24px;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-dark);
  cursor: pointer;
  text-align: left;
}
.m-mega-group-title .g-chevron {
  font-size: 11px;
  color: var(--text-light);
  transition: transform 0.2s;
}
.m-mega-group.open .g-chevron { transform: rotate(90deg); }

.m-mega-links {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.m-mega-group.open .m-mega-links { max-height: 600px; }

.m-mega-links a {
  display: block;
  padding: 10px 36px;
  font-size: 14px;
  color: var(--text-mid);
  border-top: 1px solid var(--border);
  transition: color 0.15s, background 0.15s;
}
.m-mega-links a:active { color: var(--accent); background: var(--accent-light); }

.mobile-search {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.mobile-search input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  background: var(--off-white);
}
.mobile-search input:focus { border-color: var(--accent); }

.mobile-nav-actions {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.mobile-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--light-gray);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  cursor: pointer;
}
.mobile-action-btn i { color: var(--accent); width: 20px; }
