/* Global text color */
body,
p,
.navbar,
.card,
.btn,
a {
  font-family: Tahoma, Arial, Helvetica, sans-serif;
  color: #00395a;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

/* Headings and hover links */
h2, h3, h4, h5, h6,
a:hover {
  color: #f3776f;
}

/* Buttons */
.btn-primary,
.btn-outline-secondary {
  color: #fff;
  background-color: #00395a;
  border-color: #00395a;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  color: #f3776f;
  background-color: #00395a;
  border-color: #00395a;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* Product cards */
.product-card,
.card {
  border: 1px solid #ccc;
  padding: 16px;
  margin: 10px 0;
  display: flex;
  flex-direction: column;
}

.product-card img,
.card-img-top,
.carousel-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
}
#product-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center; /* centers fewer cards */
}
.card-text {
  font-size: 0.95rem;
}

/* Top bar */
.topbar {
  background-color: #f1f1f1;
  font-size: 0.85rem;
}

.topbar a {
  color: #00395a;
  text-decoration: none;
}

.topbar a:hover {
  color: #f3776f;
}
.topbar i {
  font-size: 0.9rem;
}

/* Navbar */
.navbar {
  box-shadow: 0 4px 10px rgba(0, 57, 90, 0.08);
}

.navbar-nav {
  justify-content: flex-end;
}

.navbar-nav .nav-link {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.navbar-nav .nav-link.active {
  color: #f3776f !important;
  font-weight: 600;
}

/* Modal carousel */
#modalCarousel img {
  max-height: 100vh;
  object-fit: contain;
}

#imageModal .btn-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1055; /* higher than carousel (1050) */
}

#imageModal .modal-body {
  position: relative;
  z-index: 1;
}

/* Images */
.img-fluid {
  max-width: 100%;
  height: auto;
}

/* Footer */
.footer {
  background-color: #00395a;
  color: #fff;
  font-size: 0.9rem;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.15);
}

.footer a {
  color: #fff;
  text-decoration: none;
}

.footer a:hover {
  color: #f3776f;
  text-decoration: underline;
}

#scrollTopBtn {
  opacity: 0; /* hidden initially */
  visibility: hidden;
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 999;
  background-color: #00395a;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 57, 90, 0.3);
  transition: opacity 0.4s, visibility 0.4s;
}

#scrollTopBtn.show {
  opacity: 1;
  visibility: visible;
}

#scrollTopBtn:hover {
  color: #f3776f;
  background-color: #00395a;
}

@media (max-width: 576px) {
  .footer {
    font-size: 0.85rem;
  }
  .topbar a:last-child {
    display: none;
  }
  .detail-section {
    margin-bottom: 2rem; /* instead of mb-5 */
  }
}
@media (min-width: 768px) {
  .card-text {
    max-height: 4.5em;
    overflow: hidden;
  }
}
/* Category title */
#categoryTitle {
  text-transform: capitalize;
}
.detail-section:last-child {
  margin-bottom: 2rem;
}
