/* ================= SORT BAR ================= */

.sort-bar{
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 20px auto;   /* Right side on desktop */
  width: fit-content;
  font-size: 14px;
}

/* Label */
.sort-bar span{
  font-weight: 600;
  color: #333;
  white-space: nowrap;
}

/* Buttons */
.sort-bar button{
  padding: 6px 12px;
  border: 1px solid #d0d0d0;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  transition: all 0.2s ease;
}

/* Hover */
.sort-bar button:hover{
  border-color: #1a73e8;
  color: #1a73e8;
}

/* Active state */
.sort-bar button.active{
  background: #1a73e8;
  color: #fff;
  border-color: #1a73e8;
}

/* ================= MOBILE ================= */
@media (max-width: 768px){

  .sort-bar{
    margin: 10px 0 15px;
    width: 100%;
    justify-content: space-between;
  }

  .sort-bar span{
    font-size: 13px;
  }

  .sort-bar button{
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* ================= MOBILE SORT BAR REFINEMENT ================= */
@media (max-width: 768px){

  .sort-bar{
    width: 100%;
    margin: 10px 0 15px;
    flex-direction: row;          /* ⬅ keep in one line */
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
  }

  .sort-bar span{
    font-size: 13px;
  }

  .sort-bar button{
    width: auto;                  /* ⬅ NOT full width */
    padding: 6px 12px;            /* ⬅ compact size */
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
  }
}
/* =====================================
   MEGA MENU – FINAL STABLE VERSION
   CLEAN + CENTERED + BEAUTIFUL
===================================== */

/* Parent must be relative */
.th-nav-item.th-has-mega {
  position: relative;
}

/* Mega menu container */
.th-mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(20px);

  background: #ffffff;
  border-radius: 14px;
  padding: 30px 32px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.15);

  width: 980px;
  max-width: 95vw;
  display: flex;
  gap: 40px;

  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
  z-index: 999;
}

/* Show on hover */
.th-has-mega:hover .th-mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* Text column */
.th-mega-col {
  flex: 1;
}

/* Main heading */
.th-mega-col h4 {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  margin-bottom: 20px;
  position: relative;
}

.th-mega-col h4::after {
  content: "";
  width: 44px;
  height: 3px;
  background: linear-gradient(90deg, #ff7a18, #ffb347);
  display: block;
  margin-top: 6px;
  border-radius: 3px;
}

/* Sections grid */
.th-mega-sections {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

/* Section titles */
.th-mega-section h5 {
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #ff7a18;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

/* Links */
.th-mega-section a {
  display: block;
  font-size: 15px;
  color: #444;
  text-decoration: none;
  margin-bottom: 7px;
  padding-left: 14px;
  position: relative;
  transition: all 0.25s ease;
}

.th-mega-section a::before {
  content: "›";
  position: absolute;
  left: 0;
  top: 0;
  color: #ff7a18;
  font-size: 16px;
}

.th-mega-section a:hover {
  color: #ff7a18;
  transform: translateX(5px);
}

/* Image column – CLEAN & CENTERED */
.th-mega-image {
  flex: 0 0 320px;            /* medium column width */
  display: flex;
  align-items: center;        /* vertical center */
  justify-content: center;    /* horizontal center */
}

/* Image sizing */
.th-mega-image img {
  width: 100%;
  max-width: 280px;           /* medium image */
  height: auto;
  margin: 0;                  /* remove bottom push */
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  transition: transform 0.35s ease;
}

/* Gentle hover zoom */
.th-has-mega:hover .th-mega-image img {
  transform: scale(1.03);
}

/* Caret animation */
.th-caret {
  display: inline-block;
  transition: transform 0.3s ease;
}

.th-has-mega:hover .th-caret {
  transform: rotate(180deg);
}

/* Ensure nothing clips the dropdown */
.th-header,
.th-header-inner,
.th-nav {
  overflow: visible;
}

/* =====================================
   END MEGA MENU CSS
===================================== */
