/* Daily Dura Single Products Page Styling */

/* Page Banner */
.page-banner-products {
  background-size: cover;
  background-position: center;
  padding: 3.5rem 0 3rem;
  color: #FFFFFF;
  text-align: center;
}

.products-page-section {
  padding: 2.5rem 0 4rem;
  background: #FFFFFF;
}

/* Controls Bar: Flex Container for Left Tabs & Right Search/Sort */
.products-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #E2E8F0;
  flex-wrap: wrap;
}

/* Category Filter Tabs Navigation Bar */
.products-tabs-nav {
  position: relative;
  display: inline-flex;
  align-items: center;
  background: #F1F5F9;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid #E2E8F0;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.04);
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  -webkit-overflow-scrolling: touch;
  gap: 4px;
}

.products-tabs-nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Tab Buttons */
.tab-btn {
  position: relative;
  background: transparent;
  border: 1.5px solid transparent;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.tab-btn:hover {
  color: #155E42;
  background: rgba(21, 94, 66, 0.06);
}

.tab-btn.active {
  background: #155E42 !important;
  color: #FFFFFF !important;
  box-shadow: 0 4px 12px rgba(21, 94, 66, 0.28);
  border-color: #155E42 !important;
}

.tab-btn.active span {
  color: #FFFFFF !important;
}

/* Hide legacy floating pill to prevent mobile scroll sync bugs */
.tab-indicator-pill {
  display: none !important;
}

/* Right Side: Search Box & Sort Dropdown */
.products-controls-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.products-controls-right .search-box {
  margin: 0;
  position: relative;
  width: 240px;
}

.products-controls-right .search-box input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.4rem;
  border-radius: 12px;
  border: 1.5px solid #E2E8F0;
  background: #F8FAF8;
  font-size: 0.9rem;
  color: #0E2350;
  outline: none;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.products-controls-right .search-box input:focus {
  border-color: #155E42;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(21, 94, 66, 0.1);
}

.products-controls-right .search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748B;
  font-size: 0.875rem;
  pointer-events: none;
}

.category-sort-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0E2350;
  white-space: nowrap;
}

.sort-select {
  padding: 0.65rem 1rem;
  border-radius: 12px;
  border: 1.5px solid #E2E8F0;
  background: #F8FAF8;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0E2350;
  outline: none;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.sort-select:focus {
  border-color: #155E42;
  background: #FFFFFF;
}

/* Responsive Queries */
@media (max-width: 992px) {
  .products-controls-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
  }
  
  .products-tabs-nav {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    padding: 6px;
    border-radius: 14px;
  }

  .products-controls-right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .products-controls-right .search-box {
    width: 100%;
  }

  .category-sort-box {
    width: 100%;
    justify-content: space-between;
  }

  .sort-select {
    flex-grow: 1;
  }
}

@media (max-width: 640px) {
  .tab-btn {
    padding: 0.5rem 0.95rem;
    font-size: 0.825rem;
  }
}
