:root {
  --topbar-height: 60px;
  --mainmenu-height: 50px;
  --submenu-height: 50px;
  --headerstrip-height: 26px;
  --indicator-height: 26px;
  --card-height: 400px;
  --bottombar-height: 60px;
}

/* WRAPPER */

#sellPageWrapper {
  min-height: calc(100vh - var(--bottombar-height));
  padding-bottom: var(--bottombar-height); /* 🔹 extra space so card isn’t hidden */
  background-color: #f8f9fa;
  font-family: 'Kanit', sans-serif;
}

#sellContent {
  margin-top: var(--topbar-height);
}

/* TOP BAR */
#topBar {
  height: var(--topbar-height);
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 18px;
  border-bottom: 1px solid #ddd;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 99;
}

/* MAIN & SUB MENU */
#mainMenuIcons,
#subMenuIcons,
#insuranceMenuIcons,
#vinTypeIcons {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  gap: 6px;
  background-color: #f0f0f0;
  border-bottom: 1px solid #ccc;
  flex-wrap: wrap;
}

#sellPageWrapper .menu-icon .long-label {
  display: inline-block;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  word-break: break-word;
}

#sellPageWrapper .menu-icon,
#sellPageWrapper .submenu-icon {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  margin: 0 4px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.2s ease;
  cursor: pointer;
}

#sellPageWrapper .menu-icon:hover,
#sellPageWrapper .submenu-icon:hover {
  background-color: #d8ecff;
  border-color: #3399ff;
}

#sellPageWrapper .menu-icon.active,
#sellPageWrapper .submenu-icon.active {
  background-color: #0077cc;
  border-color: #0077cc;
  color: white;
  font-weight: 600;
}

/* PRODUCT HEADER STRIP */
#productHeader {
  height: var(--headerstrip-height);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  background-color: #fff;
  color: #333;
}

/* SWIPE INDICATOR */
#swipeIndicator {
  height: var(--indicator-height);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background-color: #fff;
}

.swipe-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ccc;
}
.swipe-dot.active {
  background-color: #0077cc;
}

/* ✅ SWIPE CARD SECTION — updated to horizontal scroll */
#swipeCardSection {
  display: flex;
  flex-direction: row;
  gap: 16px;
  padding: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 12px;
  background-color: #ffffff;
}

#swipeCardSection::-webkit-scrollbar {
  display: none;
}

/* ✅ PRODUCT CARD — scrollable, no absolute */
.product-card {
  flex: 0 0 80%;
  max-width: 320px;
  min-width: 260px;
  scroll-snap-align: center;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  padding: 16px;
  box-sizing: border-box;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* PRODUCT IMAGE */
.product-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  margin-bottom: 12px;
}

/* PRODUCT TEXT */
.product-card h3 {
  margin-top: 12px;
  font-size: 18px;
  color: #333;
}

.product-card p {
  font-size: 14px;
  color: #666;
}

/* ORDER BUTTON */
.order-btn {
  display: block;
  width: 100%;
  padding: 10px;
  font-size: 15px;
  font-weight: 600;
  background-color: #3cff22;
  color: rgb(2, 7, 73);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.order-btn:hover {
  background-color: #31e619;
}

/* BOTTOM NAV BAR */
#bottomBar {
  height: var(--bottombar-height);
  background-color: #ffffff;
  border-top: 1px solid #ccc;
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 100;
}

#brochureCard {
  max-width: 400px;
  width: 85%;
  height: 280px;
  margin: 20px auto;
  padding: 16px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}

#brochureCard img {
  max-width: 80%;
  max-height: 190px; /* 🔹 keeps image within card */
  object-fit: contain;
  border-radius: 8px;
  flex-shrink: 0; /* don't let it shrink too much */
}

.product-actions {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto; /* pushes buttons to bottom */
}

.product-actions .order-btn {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: white;
}

.key-submit-btn {
  background-color: #2d89ef; /* Blue */
}

.product-actions .order-btn:not(.key-submit-btn) {
  background-color: #28a745; /* Green */
}

.order-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#pricePreview {
  margin: 10px 0;
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
}

