/* ===================== BODY ===================== */
body {
  padding-top: 120px; /* adjust to total header height */
  background: #f0f0f0; /* light grey */
  text-transform: capitalize;
  font-family: Arial, sans-serif;
  margin: 0;
}

/* ===================== HEADER & NAVBAR ===================== */
.header-area.fixed-top {
  z-index: 1030;
  background-color: #516c72; /* header color */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
}

.navbar-brand {
  font-size: 1.4em;
}

.navbar-dark .navbar-nav a.nav-link {
  color: #ffffff;
  font-size: 1.1em;
}

/* ===================== DROPDOWN / MEGA MENU ===================== */
.dropdown-menu {
  box-shadow: 0 3px 6px rgba(0,0,0,0.23);
  border: none;
  border-radius: 0;
  padding: 0.7em;
  background-color: #fff;
}

.dropdown-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dropdown-menu li .dropdown-item {
  color: gray;
  font-size: 1em;
  padding: 0.5em 1em;
  transition: background 0.2s;
}

.dropdown-menu li .dropdown-item:hover {
  background-color: #f1f1f1;
}

.dropdown-menu li:first-child a {
  font-weight: bold;
  font-size: 1.1em;
  text-transform: uppercase;
  color: #516beb;
}

/* ===================== HOT SALE BADGE ===================== */
.hot-sale-badge {
  position: absolute;
  border-radius: 5px;
  top: 10px;
  left: -10px;
  background: red;
  color: white;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: bold;
  transform: rotate(-15deg);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

/* ===================== IMAGES ===================== */
.slider-img, .carousel-inner img {
  width: 100%;
  aspect-ratio: 16/6;
  object-fit: cover;
  display: block;
  height: auto;
}

.product-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  height: auto;
}

/* ===================== PRODUCT DETAIL ===================== */
.main-image-wrapper {
  width: 100%;
  max-height: 560px;
  border: 1px solid #ddd;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  position: relative;
  cursor: zoom-in;
}

.main-image-wrapper.zoomed {
  cursor: zoom-out;
}

.main-image-wrapper img {
  display: none;
}

.thumbnail-img {
  max-width: 80px;
  cursor: pointer;
  border: 2px solid transparent;
}

.thumbnail-img.active {
  border-color: #000;
}

/* ===================== COLOR SWATCH ===================== */
.swatch-img {
  display: inline-block;
  border: 2px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s;
}

.swatch-img img {
  width: 34px;
  height: 40px;
  object-fit: cover;
  display: block;
}

.btn-check:checked + .swatch-img {
  border-color: #000;
  box-shadow: 0 0 0 2px #ccc;
}

/* ===================== REVIEWS ===================== */
.review-rating {
  color: #ffc107;
}

form .form-check-label {
  cursor: pointer;
}

/* ===================== HOT SALE IMAGE ===================== */
.hot-sale img {
  width: 60px;
  height: 60px;
  object-fit: cover;
}

/* ===================== SEARCH WRAPPER (MOBILE FIX) ===================== */
.search-wrapper {
  flex-grow: 1;
  display: flex;
  max-width: 100%; /* prevent overflow */
}

.search-wrapper input[type="search"] {
  flex: 1;
  font-size: 16px; /* prevent mobile auto zoom */
}

.search-wrapper button {
  flex-shrink: 0; /* keep button visible */
}



/* Main Product Image Wrapper */
.main-image-wrapper {
  width: 100%;
  height: 560px;
  overflow: hidden;
  border: 1px solid #ddd;
  position: relative;
  cursor: zoom-in;
}

.main-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Hover Zoom (moderate) */
.main-image-wrapper:hover img {
  transform: scale(1.5); /* stronger zoom on hover */
}

/* Click Zoomed State (full zoom) */
.main-image-wrapper.zoomed img {
  transform: scale(2); /* maximum zoom when clicked */
  cursor: zoom-out;
}


  .thumbnail-img {
    width: 60px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
  }
  .thumbnail-img.active {
    border-color: #0d6efd;
  }


/* ===================== DESKTOP MEGA MENU ===================== */
@media (min-width: 992px) {
  .search-wrapper { width: 45% !important; }

  .mega-dropdown { position: static !important; }

  .mega-dropdown .dropdown-menu {
    position: absolute !important; 
    left: 0 !important; 
    right: 0 !important; 
    width: 100vw !important;
    margin-left: calc(-50vw + 50%);
    border-radius: 0; 
    display: none;
  }

  .mega-dropdown:hover .dropdown-menu { display: block; }
}

/* ===================== TIMELINE / ORDER BOX ===================== */
.timeline-step { 
  width: 24%; 
  text-align: center; 
  padding: 6px 0; 
  border-bottom: 3px solid #ccc; 
  font-size: 12px; 
  color: #888; 
}

.timeline-step.active { 
  border-color: #28a745; 
  color: #28a745; 
  font-weight: bold; 
}

.order-box { 
  background: white; 
  border-left: 4px solid #0d6efd; 
  padding: 15px; 
  margin-bottom: 15px; 
  border-radius: 6px; 
}



/* ===================== PERFORMANCE & CLS FIXES ===================== */
/* All images have width & height or aspect-ratio to prevent layout shifts */
img { display: block; max-width: 100%; height: auto; }

/* Lazy load below-the-fold images */
img[loading="lazy"] { display: block; }

/* Smooth transitions for hover effects only */
a, .btn, .swatch-img { transition: all 0.2s ease-in-out; }
