.badge {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge--success {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
}

.badge--warning {
  background: rgba(217, 119, 6, 0.1);
  color: var(--warning);
}

.badge--info {
  background: rgba(2, 132, 199, 0.1);
  color: var(--info);
}

.badge--error {
  background: rgba(220, 38, 38, 0.1);
  color: var(--error);
}

.badge--muted {
  background: rgba(100, 116, 139, 0.1);
  color: var(--text-muted);
}

.badge--promoted {
  background: var(--warning);
  color: #fff;
  padding: 3px 8px;
  font-size: 0.625rem;
  font-weight: 700;
}

.badge--offers {
  background: var(--info);
  color: #fff;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(249, 115, 22, 0.1);
  color: var(--cta);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.pill:hover {
  background: rgba(249, 115, 22, 0.2);
}

/* Search Dropdown */
.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  display: none;
  z-index: 10;
  max-height: 400px;
  overflow-y: auto;
}

.search-dropdown.active {
  display: block;
}

.search-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.search-item:hover {
  background: rgba(249, 115, 22, 0.04);
}

.search-item:last-child {
  border-bottom: none;
}

.search-item__thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #E2E8F0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-item__title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item__meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.search-dropdown__all {
  display: block;
  padding: 0.75rem 1rem;
  text-align: center;
  color: var(--cta);
  font-weight: 600;
  font-size: 0.875rem;
  border-top: 1px solid var(--border);
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--cta);
}

.breadcrumb__sep {
  display: flex;
  align-items: center;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 2rem;
}

.pagination__btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.15s;
}

.pagination__btn:hover {
  border-color: var(--cta);
  color: var(--cta);
}

.pagination__btn.active {
  background: var(--cta);
  border-color: var(--cta);
  color: #fff;
}

.pagination__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.modal__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-heading);
}

.modal__close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

/* Reviews Popup */
.reviews-trigger {
  position: relative;
  cursor: pointer;
}

.reviews-popup {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  padding: 1rem;
  z-index: 999;
  pointer-events: none;
}

.reviews-popup::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--surface);
}

.reviews-trigger {
  position: relative;
  z-index: 1;
}

.reviews-trigger:hover .reviews-popup {
  display: block;
  pointer-events: auto;
}

/* Section helpers */
.section {
  padding: 3rem 0;
}

.section--surface {
  background: var(--surface);
}

.section--bordered {
  border-top: 1px solid var(--border);
}

/* ============================================
   Product Detail Gallery
   ============================================ */
.pd-gallery__main {
  position: relative;
}

.pd-gallery__slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.pd-gallery__slide--active {
  opacity: 1;
  z-index: 1;
  position: relative;
}

.pd-gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}

.pd-gallery__main:hover .pd-gallery__arrow {
  opacity: 1;
}

.pd-gallery__arrow:hover {
  background: rgba(0, 0, 0, 0.7);
}

.pd-gallery__arrow--left { left: 10px; }
.pd-gallery__arrow--right { right: 10px; }

.pd-gallery__counter {
  position: absolute;
  bottom: 10px;
  right: 10px;
  z-index: 3;
  padding: 3px 10px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.pd-gallery__thumbs {
  overflow-x: auto;
  scrollbar-width: none;
}
.pd-gallery__thumbs::-webkit-scrollbar { display: none; }

.pd-gallery__thumb {
  width: 72px;
  height: 54px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s, border-color 0.2s;
}

.pd-gallery__thumb:hover {
  opacity: 0.9;
}

.pd-gallery__thumb--active {
  border-color: var(--cta);
  opacity: 1;
}

.pd-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section__title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
}

.section__subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

/* Grid helpers */
.grid-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.grid-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.grid-products--listing {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

/* Carousel row */
.carousel-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.carousel-row::-webkit-scrollbar {
  height: 4px;
}

.carousel-row::-webkit-scrollbar-track {
  background: var(--border);
  border-radius: 2px;
}

.carousel-row::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 2px;
}

/* Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead tr {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.data-table th {
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.data-table td {
  padding: 10px 14px;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
}

.data-table tbody tr:last-child {
  border-bottom: none;
}

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1rem;
  z-index: 60;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
  display: none;
}

.cookie-banner.active {
  display: block;
}

/* Cookie Preferences Modal */
.cookie-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.cookie-modal.active {
  display: flex;
}

.cookie-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.cookie-modal__panel {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.75rem;
  max-width: 520px;
  width: 92%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: cookieModalIn 0.25s ease-out;
}

@keyframes cookieModalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cookie-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.cookie-modal__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-heading);
}

.cookie-modal__close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.15s;
}

.cookie-modal__close:hover {
  background: var(--border);
}

.cookie-modal__desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.cookie-modal__categories {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.cookie-cat {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.cookie-cat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.cookie-cat__name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-heading);
}

.cookie-cat__badge {
  font-size: 0.6875rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.cookie-cat__badge--always {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
}

.cookie-cat__desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.5rem;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.cookie-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-toggle__track {
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: 12px;
  position: relative;
  transition: background 0.2s;
}

.cookie-toggle__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.cookie-toggle input:checked + .cookie-toggle__track {
  background: var(--cta);
}

.cookie-toggle input:checked + .cookie-toggle__track::after {
  transform: translateX(20px);
}

.cookie-toggle--disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cookie-toggle input:focus-visible + .cookie-toggle__track {
  outline: 2px solid var(--cta);
  outline-offset: 2px;
}

.cookie-modal__actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}


/* FAQ Accordion */
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.faq-item__q {
  padding: 1rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-heading);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background 0.15s;
}

.faq-item__q::-webkit-details-marker { display: none; }

.faq-item__q::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item[open] .faq-item__q::after {
  transform: rotate(-135deg);
}

.faq-item__q:hover {
  background: rgba(249, 115, 22, 0.04);
}

.faq-item__a {
  padding: 0 1.25rem 1rem;
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.7;
}

.faq-item__a p {
  margin-bottom: 0.5rem;
}

.faq-item__a p:last-child {
  margin-bottom: 0;
}


/* Static content pages (terms, privacy, about) */
.static-content {
  color: var(--text);
  line-height: 1.8;
  font-size: 0.9375rem;
}

.static-content h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 1.75rem 0 0.5rem;
}

.static-content h2:first-child {
  margin-top: 0;
}

.static-content p {
  margin-bottom: 0.75rem;
}

.static-content ul, .static-content ol {
  margin: 0.5rem 0 0.75rem 1.25rem;
}

.static-content li {
  margin-bottom: 0.25rem;
}

.static-content a {
  color: var(--cta);
  font-weight: 600;
}


/* Allow reviews popup to overflow card boundaries */
.reviews-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Dark mode: reviews popup */
[data-theme="dark"] .reviews-popup {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
