body {
  background-color: white;
}


.image-row {
  max-width: 1100px;
  margin: auto;
  padding: 50px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 50px;
} 

.item {
  position: relative;
} 
 
.item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
}

.item p {
  text-align: center;
  color: #445a56;
  margin-top: 10px;
}


.category-nav {
  max-width: 500px;
  margin: 40px auto;
  padding: 10px;
  background-color: #ffffff;
  border-radius: 12px; 
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-nav:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

.category-nav a {
  text-decoration: none;
  color: #155E9A;
  font-size: clamp(0.9rem, 1.8vw, 1rem);
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 999px;
  background-color: transparent;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* Active link */
.category-nav a.active {
  background-color: #155E9A;
  color: #ffffff;
}

/* Hover for desktop */
.category-nav a:hover {
  background-color: #155E9A;
  color: #ffffff;
}



/* PLUS BUTTON */
.quick-add {
  position: absolute;
  bottom: 55px;
  right: 15px;
  width: 42px;
  height: 42px;
  border: none;
  background: white;
  color: black;
  font-size: 26px;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.25s ease;
}

.item:hover .quick-add {
  opacity: 1;
  transform: scale(1);
}

/* POPUP */
.product-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 999;
  /* simple fade-in */
  opacity: 0;
  transition: opacity 0.25s ease;
}

.product-popup.show {
  opacity: 1;
}

.popup-box {
  background: #ffffff;
  width: 450px;
  height: 520px;
  padding: 32px 40px;
  position: relative;
  box-sizing: border-box;
}

.popup-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  font-size: 26px;
  cursor: pointer;
  color: #333333;
}

.popup-content-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr);
  gap: 40px;
  align-items: flex-start;
  align-items: center;
}

/* LEFT SIDE */
.popup-media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.popup-img {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
}

/* RIGHT SIDE */
.popup-info {
  font-family: "Georgia", "Times New Roman", serif;
  color: #1f271d;
}

.popup-badge {
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 8px;
  color: white;
}

.popup-title {
  font-size: 32px;
  line-height: 1.3;
  margin: 0 0 8px;
}

.popup-price {
  font-size: 20px;
  margin: 4px 0 12px;
}

.popup-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  color: #a5671f;
  font-size: 14px;
}

.popup-rating .stars {
  letter-spacing: 2px;
}

.popup-rating .reviews {
  color: #666666;
}

/* AMOUNT SECTION */
.popup-amount {
  margin-bottom: 24px;
}

.amount-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #777777;
}

.amount-options {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.amount-btn {
  border: 1px solid #c5c7b8;
  background: #ffffff;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
}

.amount-btn.active {
  border-color: #505d34;
}

/* PRIMARY CTA */
.add-cart-popup {
  display: inline-block;
  margin-top: 10px;
  padding: 14px 36px;
  border-radius: 0;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 13px;
  background: #3982f5;
  color: white;
  
}

/* Secondary link */
.popup-view-details {
  display: block;
  margin-top: 18px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
  color: #555555;
}

/* Responsive */
@media (max-width: 768px) {
  .popup-box {
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
    padding: 24px 20px;
  }

  .popup-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.product-popup {
  display: none; /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
}

.popup-box {
  background: #fff;
  padding: 20px;
  max-width: 500px;
  width: 90%;
}

.cart-icon {
  position: relative;
  display: inline-block;
}

.cart-dot {
  position: absolute;
  top: 2px;
  right: -1.3px;
  width: 7px;
  height: 7px;
  background: #fff;          /* default = white */
  border-radius: 50%;
  display: none;
  transition: background 0.2s ease;
}

/* Desktop: hover ANYWHERE on header */
@media (hover: hover) and (pointer: fine) {
  .header:hover .cart-dot {
    background: #155E9A;
  }
}

/* Mobile / touch: always blue */
@media (hover: none) and (pointer: coarse) {
  .cart-dot {
    background: #155E9A !important;  /* FORCE blue */
  }
}

/* FORCE HEADER HOVER STATE ONLY ON product.html */
.force-header-hover .header {
  background-color: #ffffff;
}

/* nav links */
.force-header-hover .header a {
  color: #155E9A;
}

/* icons */
.force-header-hover .header ion-icon {
  color: #155E9A;
}

.force-header-hover .header .menu-btn {
  color: #155E9A;
}

/* underline animation (same as hover) */
.force-header-hover .header .nav a::after {
  transform: scaleX(1);
}

/* cart badge visible */
.force-header-hover .cart-count {
  opacity: 1;
}
