/* Base */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  background-color: #fff8f2;
  color: #333;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
  border-radius: 10px;
}

/* Header */
.main-header {
  background-color: #ff6b00;
  color: white;
  padding: 15px 5%;
  position: sticky;
  top: 0;
  z-index: 100;

  /* Flexbox for layout */
  display: flex;
  justify-content: space-between;
  align-items: center;

  /* Prevent wrapping */
  flex-wrap: nowrap;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 20px;
  min-width: 0; /* Prevent overflow on very small screens */
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0; /* Prevent shrinking */
}

.logo img {
  height: 40px;
  width: auto;
}

.home-button {
  color: white;
  background-color: rgba(255, 255, 255, 0.2);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 14px;
  transition: background 0.3s ease;
  white-space: nowrap; /* Prevent text wrap */
  flex-shrink: 0; /* Prevent shrinking */
  cursor: pointer;
}

.home-button:hover {
  background-color: rgba(255, 255, 255, 0.4);
}

/* Responsive adjustments for small screens */
@media (max-width: 480px) {
  .main-header {
    padding: 15px 10px;
  }

  .nav-container {
    gap: 10px;
  }

  .logo img {
    height: 36px;
  }

  .home-button {
    padding: 6px 12px;
    font-size: 13px;
  }
}


/* Title */
.product-title {
  text-align: center;
  margin: 25px auto 10px;
}

.product-title h1 {
  font-size: 28px;
  color: #d85b00;
}

/* Product Section */
.product-detail-section {
  padding: 30px 5%;
}

.product-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
}

.image-carousel {
  flex: 1;
  min-width: 280px;
  max-width: 500px;
  overflow-x: auto;
}

.carousel-wrapper {
  display: flex;
  gap: 15px;
  scroll-snap-type: x mandatory;
}

.carousel-wrapper img {
  width: 300px;
  height: 300px;
  object-fit: cover;
  scroll-snap-align: start;
  border: 3px solid #ff6b00;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Product Info */
.product-info {
  flex: 1;
  min-width: 300px;
}

.product-info .price {
  font-size: 26px;
  color: #d85b00;
  font-weight: bold;
  margin-bottom: 15px;
}

.description {
  margin-bottom: 25px;
  line-height: 1.6;
  color: #555;
}

.owner-details h3 {
  margin-bottom: 8px;
  color: #444;
}

.owner-details p {
  margin: 8px 0;
}

.owner-details a.shop-button {
  display: inline-flex;
  align-items: center;
  background-color: #ff6b00;
  color: white;
  padding: 8px 14px;
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.3s ease;
  gap: 8px;
}

.owner-details a.shop-button:hover {
  background-color: #e65c00;
}

.owner-details a.shop-button svg {
  width: 16px;
  height: 16px;
}

/* More Like This Section */
.more-like-this {
  padding: 40px 5%;
  background-color: #fff2e5;
}

.more-like-this h2 {
  margin-bottom: 20px;
  text-align: center;
  color: #d85b00;
  font-size: 1.8rem;
  font-weight: 600;
}

/* Vertical container of 2 scrollable rows */
.scrollable-rows {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

/* Each horizontal row of product cards */
.scrollable-cards-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding-bottom: 12px;
}

/* Individual card styles */
.related-card {
  min-width: 160px;
  max-width: 180px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 10px;
  text-align: center;
  flex-shrink: 0;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  text-decoration: none;
  color: #333;
}

.related-card:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

/* Image inside card */
.related-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 10px;
}

/* Product name */
.related-card p {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}

/* Footer */
.footer {
  background: linear-gradient(to right, #ff6b00, #ffa64d);
  color: white;
  padding: 20px 5%;
  text-align: center;
  font-size: 14px;
  margin-top: 60px;
}

/* Mobile */
@media (max-width: 768px) {
  .product-grid {
    flex-direction: column;
    align-items: center;
  }

  .carousel-wrapper img {
    width: 220px;
    height: 220px;
  }

  .related-card img {
    height: 80px;
  }
}
