/* Category Page - HTML/CSS only */

/* ================================
   PREMIUM MARKETPLACE HEADER
   (moved from header.css)
   3-section: Top Bar | Main Header | Nav Bar
   Container: 1320px | Font: Inter
   ================================ */
.site-header .topbar,
.site-header .categories-btn,
.site-header .nav-links a:hover,
.site-header .nav-links a.active {
  --header-primary: #0f766e;
}

.site-header .topbar {
  background: #0f766e;
  height: 40px;
  display: flex;
  align-items: center;
}

.site-header .topbar-inner {
  width: 100%;
  max-width: 1580px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: white;
}

.site-header .topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-header .topbar-headphone {
  display: flex;
  align-items: center;
  color: white;
  opacity: 0.95;
}

.site-header .topbar-headphone svg {
  flex-shrink: 0;
  margin-right: 2px;
}

.site-header .topbar-support,
.site-header .topbar-call {
  color: rgba(255, 255, 255, 0.95);
}

.site-header .topbar-phone-badge {
  background: #fcd638;
  color: #111;
  padding: 4px 14px;
  border-radius: 9999px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}

.site-header .topbar-phone-badge:hover {
  opacity: 0.95;
  transform: scale(1.02);
}

.site-header .topbar-center {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-header .topbar-mobile-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-header .topbar-category-icon {
  display: none;
}

.site-header .topbar-dropdown-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: white;
}

.site-header .topbar-dropdown-wrap .topbar-icon {
  flex-shrink: 0;
  opacity: 0.9;
}

.site-header .topbar-select {
  background: transparent;
  border: none;
  color: white;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  appearance: none;
}

.site-header .topbar-select option {
  color: #111;
}

.site-header .topbar-category {
  color: rgba(255, 255, 255, 0.95);
}

.site-header .topbar-offer-badge {
  background: #fcd638;
  color: #111;
  padding: 4px 12px;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 12px;
}

.site-header .topbar-today {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
}

.site-header .topbar-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-header .topbar-link {
  color: rgba(255, 255, 255, 0.95);
  text-decoration: none;
  transition: opacity 0.2s, color 0.2s;
}

.site-header .topbar-link:hover {
  opacity: 1;
  color: #fcd638;
}

/* Mobile topbar - reference layout: icon+category | badge | today */
@media (max-width: 1023px) {
  .site-header .topbar-inner {
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
  }
  .site-header .topbar-left,
  .site-header .topbar-right {
    display: none;
  }
  .site-header .topbar-dropdown-desktop {
    display: none;
  }
  .site-header .topbar-mobile-left {
    color: rgba(255, 255, 255, 0.95);
  }
  .site-header .topbar-category-icon {
    display: block;
    flex-shrink: 0;
    opacity: 0.95;
  }
  .site-header .topbar-center {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }
  .site-header .topbar-offer-badge {
    flex-shrink: 0;
  }
  .site-header .topbar-today {
    flex-shrink: 0;
  }
}

/* Mobile header - hamburger | logo | cart */
@media (max-width: 1023px) {
  .site-header .header-inner {
    padding: 12px 16px 14px;
  }
  .site-header .header-top-row {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    justify-items: center;
    gap: 8px;
  }
  .site-header .header-top-row .hamburger-circle {
    justify-self: start;
  }
  .site-header .header-top-row .logo-mobile {
    justify-self: center;
  }
  .site-header .header-top-row .header-cart-mobile {
    justify-self: end;
  }
  .site-header .search-wrap {
    width: 100%;
    max-width: none;
    margin-top: 12px;
  }
}

/* Mobile category page spacing */
@media (max-width: 767px) {
  .category-inner {
    padding: 0 16px;
  }
  .category-breadcrumb {
    margin-bottom: 16px;
  }
}

.site-header .header {
  background: white;
  min-height: 90px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.site-header .header-inner {
  max-width: 1580px;
  margin: 0 auto;
  padding: 0 24px;
}

.site-header .logo {
  color: #0f766e;
  font-weight: 700;
}

.site-header .search-wrap {
  max-width: 600px;
}

.site-header .search-input {
  border-radius: 999px;
  border: 1px solid #e5e7eb;
}

.site-header .search-input::placeholder {
  color: #9ca3af;
}

.site-header .header-right {
  gap: 30px;
}

.site-header .icon-circle.yellow {
  background: #fcd638;
}

.site-header .header-icon:hover .icon-circle.yellow {
  background: #e5c42e;
  transform: scale(1.05);
}

.site-header .nav-bar {
  background: #f7f7f7;
  border-bottom: none;
  box-shadow: none;
}

.site-header .nav-inner {
  max-width: 1580px;
  margin: 0 auto;
  padding: 0 24px;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.site-header .categories-btn {
  background: #0f766e;
  color: white;
  padding: 14px 22px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.2s;
}

.site-header .categories-btn:hover {
  background: #0d655d;
  transform: translateY(-1px);
}

.site-header .nav-links {
  gap: 28px;
  font-size: 16px;
  font-weight: 500;
  color: #1f2937;
}

.site-header .nav-links a {
  color: inherit;
}

.site-header .nav-links a:hover,
.site-header .nav-links a.active {
  color: #0f766e;
}

.site-header .nav-links .nav-link-contact .nav-chevron {
  display: none;
}

.site-header .nav-support {
  background: transparent;
}

.site-header .nav-support-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.site-header .nav-support:hover .nav-support-icon-wrap {
  background: #0f766e;
  color: white;
}

.site-header {
  font-family: 'Inter', 'Poppins', 'Plus Jakarta Sans', sans-serif;
}

/* ================================
   CATEGORY LAYOUT & CONTENT
   ================================ */

/* Layout */
.category-main {
  background: #f9fafb;
  padding: 32px 0 64px;
  font-family: Inter, sans-serif;
}

.category-inner {
  max-width: 1580px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Breadcrumb */
.category-breadcrumb {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 24px;
}

.category-breadcrumb a {
  color: #0f766e;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.category-breadcrumb a:hover {
  text-decoration: underline;
}

.category-breadcrumb .breadcrumb-sep {
  margin: 0 8px;
  opacity: 0.6;
}

/* Filter button mobile */
.filter-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: white;
  border: 1px solid #eee;
  border-radius: 12px;
  margin-bottom: 24px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
}

.filter-toggle:hover {
  background: #f9fafb;
}

@media (min-width: 1024px) {
  .filter-toggle { display: none; }
}

/* Two column layout */
.category-layout {
  display: flex;
  gap: 32px;
}

/* Sidebar */
.filter-sidebar {
  width: 300px;
  flex-shrink: 0;
  display: none;
}

@media (min-width: 1024px) {
  .filter-sidebar { display: block; }
}

.filter-panel {
  background: white;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 20px;
  position: sticky;
  top: 24px;
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.filter-header h3 {
  font-weight: 600;
  color: #1f2937;
  margin: 0;
}

.filter-clear {
  font-size: 14px;
  color: #0f766e;
  background: none;
  border: none;
  cursor: pointer;
}

.filter-clear:hover { text-decoration: underline; }

.filter-section {
  border-top: 1px solid #eee;
  padding: 20px 0;
}

.filter-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.filter-section-header span {
  font-weight: 600;
  color: #1f2937;
}

.filter-reset {
  font-size: 12px;
  color: #0f766e;
  background: none;
  border: none;
  cursor: pointer;
}

.filter-reset:hover { text-decoration: underline; }

.filter-search {
  position: relative;
  margin-bottom: 12px;
}

.filter-search input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.filter-search input:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.15);
}

.filter-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.filter-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 192px;
  overflow-y: auto;
}

.filter-list li { margin-bottom: 4px; }

.filter-list label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  gap: 8px;
}

.filter-list label:hover { background: #f9fafb; }

.filter-list input {
  margin-right: 8px;
}

.filter-list .count {
  font-size: 14px;
  color: #6b7280;
}

.filter-slider {
  width: 100%;
  height: 8px;
  border-radius: 4px;
  background: #e5e7eb;
  margin-bottom: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.filter-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0f766e;
  cursor: pointer;
}

.filter-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0f766e;
  cursor: pointer;
  border: none;
}

.filter-price-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.filter-price-inputs input {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  max-width: 90px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  box-sizing: border-box;
}

.filter-price-inputs .to {
  font-size: 14px;
  color: #6b7280;
  flex-shrink: 0;
}

.filter-rating-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rating-btn {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
}

.rating-btn.active {
  background: #0f766e;
  color: white;
}

.rating-btn:not(.active) {
  background: #f3f4f6;
  color: #374151;
}

.rating-btn:not(.active):hover { background: #e5e7eb; }

/* Color swatches */
.filter-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-color-swatch:hover {
  border-color: #d1d5db;
}

.filter-color-swatch.active {
  border-color: #1f2937;
  box-shadow: 0 0 0 1px #1f2937;
}

/* Size buttons */
.filter-size-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.size-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.size-btn:hover {
  border-color: #9ca3af;
}

.size-btn.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

/* Product area */
.product-area {
  flex: 1;
  min-width: 0;
}

.product-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.product-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.view-toggle {
  display: flex;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.view-toggle button {
  padding: 10px;
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
}

.view-toggle button:hover { background: #f3f4f6; }

.view-toggle button.active {
  background: #0f766e;
  color: white;
}

.view-toggle button.active:hover {
  background: #0d655d;
}

.product-results {
  font-size: 14px;
  color: #6b7280;
}

.product-sort {
  padding: 10px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  color: #374151;
  background: white;
  cursor: pointer;
  min-width: 140px;
}

.product-sort:focus {
  outline: none;
  border-color: #0f766e;
}

/* Product grid */
.product-area .product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .product-area .product-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .product-area .product-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Product card link */
.product-area .product-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Product card (scoped to category grid) */
.product-area .product-card {
  background: white;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 16px;
  transition: box-shadow 0.2s;
}

.product-area .product-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.product-area .product-card-image {
  height: 280px;
  /* background: #f3f4f6; */
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-area .product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 16px;
  transition: transform 0.3s;
}

.product-area .product-card:hover .product-card-image img {
  transform: scale(1.03);
}

.product-area .product-card-title {
  font-size: 15px;
  font-weight: 500;
  color: #1f2937;
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-area .product-card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  font-size: 14px;
}

.product-area .product-card-rating .stars { color: #fbbf24; }

.product-area .product-card-rating .count { color: #6b7280; }

.product-area .product-card-price {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.product-area .product-card-price .current {
  font-weight: 600;
  color: #1f2937;
}

.product-area .product-card-price .old {
  font-size: 14px;
  color: #9ca3af;
  text-decoration: line-through;
}

.product-area .product-card-price .discount {
  font-size: 14px;
  color: #ef4444;
  font-weight: 500;
}

.product-area .product-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.product-area .btn-wishlist {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: white;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s;
}

.product-area .btn-wishlist:hover {
  border-color: #0f766e;
  color: #0f766e;
}

.product-area .btn-add-cart {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: #0f766e;
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.product-area .btn-add-cart:hover { background: #0d655d; }

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.pagination-inner {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: white;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
}

.pagination button:hover { background: #f3f4f6; }

.pagination button.active {
  background: #0f766e;
  color: white;
  border-color: #0f766e;
}

.pagination .ellipsis {
  padding: 0 8px;
  color: #6b7280;
}

/* Filter drawer (mobile) */
.filter-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
}

.filter-drawer-overlay.is-open { display: block; }

.filter-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  max-width: 85vw;
  height: 100%;
  background: white;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  z-index: 50;
  transform: translateX(-100%);
  transition: transform 0.3s;
  overflow-y: auto;
}

.filter-drawer.is-open { transform: translateX(0); }

@media (min-width: 1024px) {
  .filter-drawer,
  .filter-drawer-overlay { display: none !important; }
}

.filter-drawer .filter-panel {
  position: static;
  border: none;
  border-radius: 0;
  padding: 20px;
}

.filter-drawer-close {
  padding: 8px;
  background: none;
  border: none;
  color: #6b7280;
  cursor: pointer;
}

.filter-drawer-close:hover { color: #1f2937; }
