/* ============================================================
   Healthcare24 Category Page v2 Styles
   Prefixed with hc24v2- to avoid conflicts with existing CSS
   ============================================================ */

:root {
  --teal: #4a9ea8;
  --teal-dark: #3a8a93;
  --teal-deeper: #2c6e75;
  --teal-light: #e8f4f6;
  --teal-bg: #f0f7f8;
  --coral: #e07c5a;
  --coral-light: #f5ddd4;
  --white: #ffffff;
  --gray-50: #f8fafb;
  --gray-100: #f1f4f6;
  --gray-200: #e2e7eb;
  --gray-300: #ccd3d9;
  --gray-400: #9ca7b0;
  --gray-500: #6b7a85;
  --gray-600: #4a5660;
  --gray-700: #2d3840;
  --gray-800: #1a2530;
  --orange-accent: #e8954a;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.1);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
}

/* ─── HEADER OVERRIDES ─── */

@media (min-width: 993px) {
  .desktop-menu-btn {
    background: #4a9ea8 !important;
    color: white !important;
    border-radius: 12px !important;
    padding: 10px 20px !important;
    flex-direction: row !important;
    gap: 8px !important;
    font-size: 14px !important;
    transition: all 0.2s !important;
  }
  .desktop-menu-btn:hover {
    opacity: 0.9 !important;
  }
  .desktop-menu-btn svg {
    width: 20px !important;
    height: 20px !important;
  }
}

/* Search icon color fix */
.header-top .header-search .search-submit-btn {
  min-height: auto !important;
  background: transparent !important;
}
.header-top .header-search .search-submit-btn svg {
  stroke: #6b7a85 !important;
}
.header-top .header-search .search-submit-btn:hover svg {
  stroke: #4a9ea8 !important;
}

/* Search button - subtle gray icon */
.header-search .search-btn,
.header-search button[type="submit"],
.search-box-desktop button {
  background: transparent !important;
  color: #6b7a85 !important;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0 !important;
  padding: 8px !important;
  cursor: pointer !important;
  transition: color 0.2s !important;
}
.header-search .search-btn:hover,
.header-search button[type="submit"]:hover,
.search-box-desktop button:hover {
  color: #4a9ea8 !important;
  background: transparent !important;
}
.header-search .search-btn:focus,
.header-search button[type="submit"]:focus,
.search-box-desktop button:focus {
  outline: none !important;
  box-shadow: none !important;
}


/* ─── HERO / CATEGORY HEADER ─── */
.hc24v2-category-hero {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 20px 0 16px;
  position: relative;
}
.hc24v2-category-hero .container {
  position: relative;
}
.hc24v2-category-hero h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}
.hc24v2-category-hero p {
  font-size: 14px;
  color: var(--gray-500);
  max-width: 600px;
  line-height: 1.5;
}

/* ─── BREADCRUMB ─── */
.hc24v2-breadcrumb-bar {
  background: var(--white);
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-200);
}
.hc24v2-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 13px;
  color: var(--gray-400);
}
.hc24v2-breadcrumb a {
  color: var(--gray-500);
  text-decoration: none;
  transition: color 0.2s;
}
.hc24v2-breadcrumb a:hover { color: var(--teal); }
.hc24v2-breadcrumb .hc24v2-sep { margin: 0 6px; font-size: 9px; color: var(--gray-300); }
.hc24v2-breadcrumb .hc24v2-current { color: var(--teal-dark); font-weight: 600; }

/* ─── MAIN LAYOUT ─── */
.hc24v2-main-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  padding: 32px 0 60px;
}

/* ─── SIDEBAR ─── */
.hc24v2-sidebar { position: sticky; top: 100px; align-self: start; }

.hc24v2-filter-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  margin-bottom: 20px;
}
.hc24v2-filter-card-header {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: white;
  padding: 18px 24px;
  font-size: 17px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hc24v2-filter-card-header i { font-size: 15px; opacity: 0.8; }

.hc24v2-filter-section {
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-100);
}
.hc24v2-filter-section:last-child { border-bottom: none; }
.hc24v2-filter-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-700);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hc24v2-filter-section-title i {
  color: var(--gray-400);
  cursor: pointer;
  transition: transform 0.3s;
}

.hc24v2-filter-list { list-style: none; }
.hc24v2-filter-list li {
  padding: 8px 12px;
  margin: 2px 0;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.hc24v2-filter-list li:hover { background: var(--teal-light); color: var(--teal-dark); }
.hc24v2-filter-list li.active {
  background: var(--teal);
  color: white;
  font-weight: 600;
}
.hc24v2-filter-list li .count {
  font-size: 12px;
  background: var(--gray-100);
  padding: 2px 8px;
  border-radius: 50px;
  color: var(--gray-500);
  font-weight: 500;
}
.hc24v2-filter-list li.active .count {
  background: rgba(255,255,255,0.25);
  color: white;
}

/* ─── Price Range ─── */
.hc24v2-price-inputs {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.hc24v2-price-input-wrap {
  flex: 1;
  position: relative;
}
.hc24v2-price-input-wrap label {
  position: absolute;
  top: -8px;
  left: 12px;
  background: white;
  padding: 0 4px;
  font-size: 11px;
  color: var(--gray-400);
  font-weight: 500;
}
.hc24v2-price-input-wrap input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  color: var(--gray-700);
  transition: border-color 0.2s;
}
.hc24v2-price-input-wrap input:focus {
  outline: none;
  border-color: var(--teal);
}

.hc24v2-range-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: linear-gradient(to right, var(--teal) 0%, var(--teal) 60%, var(--gray-200) 60%);
  border-radius: 3px;
  margin: 8px 0 20px;
}
.hc24v2-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--teal);
  border: 3px solid white;
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.hc24v2-apply-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.hc24v2-apply-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(74,158,168,0.35);
}

/* ─── PRODUCTS AREA ─── */
.hc24v2-products-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.hc24v2-products-count {
  font-size: 15px;
  color: var(--gray-500);
}
.hc24v2-products-count strong { color: var(--gray-700); }

.hc24v2-products-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hc24v2-view-toggle {
  display: flex;
  background: var(--white);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--gray-200);
}
.hc24v2-view-btn {
  width: 40px; height: 38px;
  border: none;
  background: transparent;
  color: var(--gray-400);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.hc24v2-view-btn.active { background: var(--teal); color: white; }
.hc24v2-view-btn:hover:not(.active) { background: var(--gray-100); }

.hc24v2-sort-select {
  padding: 10px 36px 10px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  background: var(--white);
  color: var(--gray-600);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239ca7b0' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

/* ─── PRODUCT GRID ─── */
.hc24v2-product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.hc24v2-product-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.hc24v2-product-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
}
.hc24v2-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--teal);
}

.hc24v2-product-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 5px 12px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.hc24v2-badge-out {
  background: var(--coral-light);
  color: var(--coral);
}
.hc24v2-badge-sale {
  background: #dcf5e8;
  color: #2a9d5c;
}
.hc24v2-badge-new {
  background: #e0e8ff;
  color: #4a6cf7;
}

.hc24v2-product-wishlist {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 2;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border: none;
  color: var(--gray-400);
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}
.hc24v2-product-wishlist:hover { color: var(--coral); background: white; transform: scale(1.1); }

.hc24v2-product-image {
  aspect-ratio: 4/3;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.hc24v2-product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.4s ease;
}
.hc24v2-product-card:hover .hc24v2-product-image img { transform: scale(1.05); }
.hc24v2-product-image.hc24v2-out-of-stock { opacity: 0.5; filter: grayscale(30%); }

.hc24v2-product-info {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.hc24v2-product-brand {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--teal);
  margin-bottom: 6px;
}
.hc24v2-product-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hc24v2-product-sku {
  font-size: 12px;
  color: var(--gray-400);
  margin-bottom: 12px;
}

.hc24v2-product-pricing {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
}
.hc24v2-product-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--teal-dark);
}
.hc24v2-product-price-old {
  font-size: 14px;
  color: var(--gray-400);
  text-decoration: line-through;
}

.hc24v2-product-action {
  width: calc(100% - 32px);
  margin: 0 16px 16px;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
}
.hc24v2-btn-add-cart {
  background: linear-gradient(135deg, #5bb5c5 0%, #4a9ea8 50%, #3a8a93 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(74,158,168,0.25);
}
.hc24v2-btn-add-cart:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74,158,168,0.4);
}
.hc24v2-btn-out-of-stock {
  background: var(--gray-100);
  color: var(--gray-400);
  cursor: default;
}
.hc24v2-btn-notify {
  background: transparent;
  border: 2px solid var(--coral) !important;
  color: var(--coral);
  margin-top: 8px;
  font-size: 12px;
  padding: 8px;
}
.hc24v2-btn-notify:hover { background: var(--coral-light); }

/* ─── PAGINATION ─── */
.hc24v2-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}
.hc24v2-page-btn {
  min-width: 42px; height: 42px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.hc24v2-page-btn:hover { border-color: var(--teal); color: var(--teal); }
.hc24v2-page-btn.active {
  background: var(--teal);
  border-color: var(--teal);
  color: white;
  font-weight: 700;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 1024px) {
  .hc24v2-product-grid { grid-template-columns: repeat(2, 1fr); }
  .hc24v2-main-layout { grid-template-columns: 240px 1fr; gap: 24px; }
}
@media (max-width: 768px) {
  .hc24v2-main-layout { grid-template-columns: 1fr; padding: 0 8px; }
  .hc24v2-sidebar { position: static; }
  .hc24v2-product-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; width: 100% !important; box-sizing: border-box; overflow: hidden; }
  .hc24v2-product-card { min-width: 0; overflow: hidden; word-break: break-word; }
  .hc24v2-product-image { padding: 0; }
  .hc24v2-category-hero { padding: 32px 0; }
  .hc24v2-category-hero h1 { font-size: 24px; }
  .aimeos.catalog-list .row > .col-lg-9,
  .healthcare-catalog .row > .col-lg-9,
  .col-lg-9 { padding-left: 4px !important; padding-right: 4px !important; }
  .container-xxl.px-4 { padding-left: 8px !important; padding-right: 8px !important; }
  .aimeos.catalog-list .row { margin-left: 0 !important; margin-right: 0 !important; }
}
@media (max-width: 480px) {
  .hc24v2-product-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
}
