/* Position relative on header container so mega menu dropdowns align accurately */
header#header,
.header-default,
.wrapper-header {
  position: relative;
}

/* Allow mega menu dropdown to break out of inner header flex columns */
header .row.wrapper-header > [class*="col-"],
.box-navigation,
nav {
  position: static;
}

/* Nav Item styling when it has a Mega Menu */
li.menu-item-has-mega-menu {
  position: static !important;
}

li.menu-item-has-mega-menu > a {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Standard WordPress Nav Menu items with children (non-mega-menu) */
.box-nav-ul > li.menu-item-has-children:not(.menu-item-has-mega-menu),
li.menu-item-has-children:not(.menu-item-has-mega-menu) {
  position: relative !important;
}

li.menu-item-has-children > a {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Arrow Icon for Nav Items */
.tf-mega-menu-icon-arrow {
  display: inline-block;
  margin-left: 4px;
  font-size: 7px;
  line-height: 1;
  opacity: 0.85;
  vertical-align: middle;
  transition: transform 0.25s ease;
}

li.menu-item-has-mega-menu:hover > a .tf-mega-menu-icon-arrow,
li.menu-item-has-mega-menu.hovered > a .tf-mega-menu-icon-arrow,
li.menu-item-has-children:hover > a .tf-mega-menu-icon-arrow,
li.menu-item-has-children.hovered > a .tf-mega-menu-icon-arrow {
  transform: rotate(180deg);
}

/* Standard Dropdown Submenu (.sub-menu) Styling */
.box-nav-ul .sub-menu {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  min-width: 230px !important;
  background: #ffffff !important;
  border-radius: 8px !important;
  padding: 14px 18px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid #f1f5f9 !important;
  border-top: 2px solid var(--primary, #000000) !important;
  z-index: 9999 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(10px) !important;
  transition: opacity 0.25s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.25s cubic-bezier(0.165, 0.84, 0.44, 1), visibility 0.25s !important;
  pointer-events: none !important;
  list-style: none !important;
  margin: 0 !important;
}

/* Show Submenu on Hover */
.box-nav-ul li.menu-item-has-children:hover > .sub-menu,
.box-nav-ul li.menu-item-has-children.hovered > .sub-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

/* Override top-level .box-nav-ul .menu-item padding for nested dropdown items */
.box-nav-ul .sub-menu li.menu-item,
.box-nav-ul .sub-menu li {
  padding: 6px 0 !important;
  margin: 0 !important;
  width: 100% !important;
  display: block !important;
  position: relative !important;
  text-align: left !important;
}

/* Links inside standard dropdown submenus */
.box-nav-ul .sub-menu li > a {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  color: var(--text, #4b5563) !important;
  padding: 4px 0 !important;
  transition: color 0.2s ease, transform 0.2s ease !important;
  text-decoration: none !important;
}

.box-nav-ul .sub-menu li > a:hover {
  color: var(--primary, #e11d48) !important;
  transform: translateX(4px) !important;
}

/* Multi-Level (Nested 2nd / 3rd level) Submenus */
.box-nav-ul .sub-menu li.menu-item-has-children > .sub-menu {
  top: 0 !important;
  left: 100% !important;
  margin-left: 6px !important;
  transform: translateX(10px) !important;
}

.box-nav-ul .sub-menu li.menu-item-has-children:hover > .sub-menu {
  transform: translateX(0) !important;
}

/* Submenu nested arrow indicator */
.box-nav-ul .sub-menu .tf-mega-menu-icon-arrow {
  margin-left: auto !important;
  font-size: 8px !important;
  transform: rotate(-90deg);
  transition: transform 0.2s ease;
}

.box-nav-ul .sub-menu li.menu-item-has-children:hover > a .tf-mega-menu-icon-arrow {
  transform: rotate(0deg) !important;
}

/* Mega Menu Dropdown Wrapper */
.tf-mega-menu-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-radius: 0 0 8px 8px;
  border-top: 2px solid var(--primary, #000000);
  visibility: hidden;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s cubic-bezier(0.165, 0.84, 0.44, 1), transform 0.25s cubic-bezier(0.165, 0.84, 0.44, 1), visibility 0.25s;
  z-index: 9999;
  pointer-events: none;
}

/* Scope hover bridge strictly to the menu link element (prevents capturing hover across whole header) */
li.menu-item-has-mega-menu > a::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 100%;
  height: 20px;
  background: transparent;
  pointer-events: auto;
}

/* Width Settings Options */
.tf-mega-menu-dropdown.width-container {
  max-width: 1200px;
  left: 50% !important;
  right: auto !important;
  transform: translate(-50%, 12px) !important;
}

li.menu-item-has-mega-menu:hover > .tf-mega-menu-dropdown.width-container,
li.menu-item-has-mega-menu.hovered > .tf-mega-menu-dropdown.width-container,
li.menu-item-has-mega-menu.active > .tf-mega-menu-dropdown.width-container {
  transform: translate(-50%, 0) !important;
}

.tf-mega-menu-dropdown.width-custom {
  left: 50% !important;
  right: auto !important;
  transform: translate(-50%, 12px) !important;
}

li.menu-item-has-mega-menu:hover > .tf-mega-menu-dropdown.width-custom,
li.menu-item-has-mega-menu.hovered > .tf-mega-menu-dropdown.width-custom,
li.menu-item-has-mega-menu.active > .tf-mega-menu-dropdown.width-custom {
  transform: translate(-50%, 0) !important;
}

/* Show Mega Menu on Hover or .hovered / .active JS class */
li.menu-item-has-mega-menu:hover > .tf-mega-menu-dropdown,
li.menu-item-has-mega-menu.hovered > .tf-mega-menu-dropdown,
li.menu-item-has-mega-menu.active > .tf-mega-menu-dropdown {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Mega Menu Container */
.tf-mega-menu-container {
  padding: 30px;
  margin: 0 auto;
}

/* Mobile Drawer Accordion Styles */
@media (max-width: 991px) {
  li.menu-item-has-mega-menu,
  li.menu-item-has-children {
    position: relative !important;
  }
  .mobile-nav-wrapper .tf-mega-menu-dropdown,
  .canvas-mb .tf-mega-menu-dropdown,
  .mobile-nav-wrapper .sub-menu,
  .canvas-mb .sub-menu {
    position: static !important;
    display: none;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 6px 0 6px 15px !important;
    pointer-events: auto !important;
    background: transparent !important;
  }
  .mobile-nav-wrapper li.menu-item-has-mega-menu.open > .tf-mega-menu-dropdown,
  .canvas-mb li.menu-item-has-mega-menu.open > .tf-mega-menu-dropdown,
  .mobile-nav-wrapper li.menu-item-has-mega-menu.hovered > .tf-mega-menu-dropdown,
  .canvas-mb li.menu-item-has-mega-menu.hovered > .tf-mega-menu-dropdown,
  .mobile-nav-wrapper li.menu-item-has-children.open > .sub-menu,
  .canvas-mb li.menu-item-has-children.open > .sub-menu {
    display: block !important;
  }
  .mobile-nav-wrapper li.menu-item-has-children > a,
  .canvas-mb li.menu-item-has-children > a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
  }
}

/* ==========================================================================
   Elementor Custom Widget: Women Mega Menu Panel Styles
   ========================================================================== */

.tf-women-mega-menu-wrapper {
  font-family: inherit;
  color: #374151;
  width: 100%;
}

.tf-women-mega-menu-inner {
  display: flex;
  flex-direction: column;
}

.tf-women-mega-menu-main-content {
  display: flex;
  gap: 32px;
  width: 100%;
}

.tf-women-mega-menu-main-content.no-promo-column .tf-women-mega-menu-grid {
  width: 100%;
}

.tf-women-mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  flex: 1;
}

/* Column Title & Accent */
.tf-women-mega-menu-column-title {
  position: relative;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 16px 0;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tf-women-mega-menu-column-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.tf-women-mega-menu-column-title a:hover {
  color: #e11d48;
}

.tf-women-mega-menu-column-title::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 24px;
  height: 2px;
  background-color: #e11d48;
  border-radius: 2px;
}

/* Navigation Link Items */
.tf-women-mega-menu-list {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.tf-women-mega-menu-item {
  margin-bottom: 9px;
  list-style: none !important;
}

.tf-women-mega-menu-item-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  color: #4b5563;
  text-decoration: none !important;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.tf-women-mega-menu-item-link:hover {
  color: #e11d48;
  transform: translateX(4px);
}

.tf-women-mega-menu-item-link .tf-item-text {
  flex: 1;
}

/* Badges Styling */
.tf-mega-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 10px;
  color: #ffffff;
  line-height: 1;
  letter-spacing: 0.04em;
  display: inline-block;
  white-space: nowrap;
}

.tf-mega-badge-hot {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
}

.tf-mega-badge-new {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.tf-mega-badge-sale {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.tf-mega-badge-info {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

/* Promo Cards Column */
.tf-women-mega-menu-promo-column {
  width: 300px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
}

.tf-women-mega-promo-card {
  position: relative;
  height: 190px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 18px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.3s ease;
}

.tf-women-mega-promo-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.tf-women-mega-promo-card .tf-promo-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  z-index: 0;
}

.tf-women-mega-promo-card:hover .tf-promo-bg-img {
  transform: scale(1.07);
}

.tf-women-mega-promo-card .tf-promo-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.3) 60%, rgba(0, 0, 0, 0) 100%);
  z-index: 1;
}

.tf-women-mega-promo-card .tf-promo-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
  width: 100%;
}

.tf-promo-subtitle {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fda4af;
  display: block;
  margin-bottom: 3px;
}

.tf-promo-title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 6px 0;
  line-height: 1.25;
}

.tf-promo-discount-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  background-color: #e11d48;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  margin-bottom: 8px;
  letter-spacing: 0.03em;
}

.tf-promo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.tf-promo-btn:hover {
  gap: 9px;
  color: #fda4af;
}

/* Bottom Highlights Strip */
.tf-women-mega-highlights-strip {
  margin-top: 24px;
  background: #f9fafb;
  border: 1px solid #f3f4f6;
  border-radius: 8px;
  padding: 14px 20px;
}

.tf-women-mega-highlights-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: center;
}

.tf-women-mega-highlight-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tf-women-mega-highlight-icon {
  font-size: 16px;
  color: #e11d48;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: #ffe4e6;
  border-radius: 50%;
}

.tf-women-mega-highlight-info .tf-highlight-title {
  font-size: 12px;
  font-weight: 700;
  color: #111827;
  margin: 0;
  line-height: 1.2;
}

.tf-women-mega-highlight-info .tf-highlight-desc {
  font-size: 10.5px;
  color: #6b7280;
  display: block;
  margin-top: 2px;
}

/* Responsive Overrides inside Mega Menu */
@media (max-width: 1200px) {
  .tf-women-mega-menu-main-content {
    flex-direction: column;
    gap: 24px;
  }
  .tf-women-mega-menu-promo-column {
    width: 100%;
    flex-direction: row;
  }
  .tf-women-mega-promo-card {
    flex: 1;
    height: 180px;
  }
}

@media (max-width: 768px) {
  .tf-mega-menu-container {
    padding: 16px 12px;
  }
  .tf-women-mega-menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .tf-women-mega-highlights-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .tf-women-mega-menu-promo-column {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .tf-women-mega-menu-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .tf-women-mega-highlights-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .tf-women-mega-promo-card {
    height: 150px;
    padding: 14px;
  }
  .tf-promo-title {
    font-size: 13.5px;
  }
}

