:root {
  --tmd-navy: #042C53;
  --tmd-blue: #33ccff;
  --tmd-blue-light: #E6F1FB;
  --tmd-blue-border: #85B7EB;
  --tmd-gold: #E8C468;
  --tmd-gold-text: #92700A;
  --tmd-muted: #5C6B7A;
  --tmd-border: #E4EAF1;
  --tmd-bg-soft: #FAFCFF;
  --tmd-green: #639922;
  --tmd-green-bg: #EAF3DE;
}

.tmd-listing-wrap {
  color: var(--tmd-navy);
}

.tmd-listing-wrap a {
  text-decoration: none;
  color: inherit;
}

.tmd-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 18px;
  position: relative;
  z-index: 40;
}

.tmd-title-copy {
  flex: 1;
  max-width: 720px;
}

.tmd-title-copy h1 {
  font-size: 23px;
  font-weight: 600;
  margin: 0;
  color: var(--tmd-navy);
}

.tmd-page-search {
  flex-shrink: 0;
  width: 320px;
  max-width: 100%;
  margin-left: auto;
  position: relative;
}

.tmd-page-search-shell {
  position: relative;
}

.tmd-page-search-field {
  display: flex;
  align-items: stretch;
  border: 1.5px solid var(--tmd-blue-border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--tmd-bg-soft);
}

.tmd-page-search-field:focus-within {
  border-color: var(--tmd-blue);
  background: #fff;
}

.tmd-page-search-field input {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  font-size: 13px;
  border: none;
  outline: none;
  background: transparent;
  color: var(--tmd-navy);
}

.tmd-page-search-field button {
  flex-shrink: 0;
  width: 44px;
  border: none;
  background: var(--tmd-blue);
  color: #fff;
  cursor: pointer;
}

.tmd-page-search-field button:hover {
  background: #1fb8e6;
}

.tmd-page-search-hint {
  font-size: 11px;
  color: var(--tmd-muted);
  margin: 7px 0 0;
}

.tmd-page-search.is-open .tmd-page-search-hint {
  visibility: hidden;
  opacity: 0;
}

/* Category / search page autocomplete — same item layout as header live search */
.tmd-page-search .dropdown-menu.tmd-page-search-dropdown:empty {
  display: none !important;
}

.tmd-page-search .dropdown-menu.tmd-page-search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 100070;
  width: 100%;
  min-width: 0;
  max-height: min(360px, calc(100vh - 180px));
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--tmd-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px -10px rgba(4, 44, 83, 0.22);
  float: none !important;
  list-style: none;
}

.tmd-page-search .tmd-search-dropdown .tmd-badge,
.tmd-page-search .tmd-search-dropdown .tmd-card-wish,
.tmd-page-search .tmd-search-dropdown .tmd-card-compare {
  display: none !important;
}

.tmd-page-search .tmd-search-dropdown > li {
  float: none !important;
  list-style: none;
  border: 0;
  margin: 0 0 4px;
}

.tmd-page-search .tmd-search-dropdown > li:last-child {
  margin-bottom: 0;
}

.tmd-page-search .tmd-search-dropdown .tmd-search-item > a {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 10px 12px !important;
  color: var(--tmd-navy) !important;
  text-decoration: none !important;
  white-space: normal;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 8px;
}

.tmd-page-search .tmd-search-dropdown .tmd-search-item > a:hover,
.tmd-page-search .tmd-search-dropdown .tmd-search-item > a:focus {
  background: var(--tmd-bg-soft) !important;
  background-image: none !important;
  border-color: rgba(51, 204, 255, 0.35);
  color: var(--tmd-navy) !important;
}

.tmd-page-search .tmd-search-dropdown .tmd-search-thumb {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 1px solid var(--tmd-border);
  border-radius: 8px;
  background: var(--tmd-bg-soft);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tmd-page-search .tmd-search-dropdown .tmd-search-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tmd-page-search .tmd-search-dropdown .tmd-search-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tmd-page-search .tmd-search-dropdown .tmd-search-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--tmd-navy);
}

.tmd-page-search .tmd-search-dropdown .tmd-search-name mark {
  background: rgba(51, 204, 255, 0.25);
  color: var(--tmd-navy);
  padding: 0 1px;
  border-radius: 2px;
}

.tmd-page-search .tmd-search-dropdown .tmd-search-model {
  font-size: 11px;
  color: var(--tmd-muted);
}

.tmd-page-search .tmd-search-dropdown .tmd-search-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.tmd-page-search .tmd-search-dropdown .tmd-search-old {
  font-size: 12px;
  color: var(--tmd-muted);
  text-decoration: line-through;
}

.tmd-page-search .tmd-search-dropdown .tmd-search-new {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--tmd-blue);
}

.tmd-page-search .tmd-search-dropdown .tmd-search-more > a {
  display: block;
  text-align: center;
  padding: 11px 14px !important;
  margin: 2px 0 0;
  border-radius: 8px;
  background: var(--tmd-blue) !important;
  background-image: none !important;
  color: #fff !important;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
}

.tmd-page-search .tmd-search-dropdown .tmd-search-more > a:hover,
.tmd-page-search .tmd-search-dropdown .tmd-search-more > a:focus {
  background: #1fb8e6 !important;
  background-image: none !important;
  color: #fff !important;
}

.tmd-page-search .tmd-search-dropdown .tmd-search-empty {
  padding: 18px 16px 8px;
  text-align: center;
  color: var(--tmd-muted);
  font-size: 13px;
}

.tmd-page {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 26px;
  align-items: start;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.tmd-sidebar {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tmd-filter-card {
  border: 1px solid var(--tmd-border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.tmd-fc-head {
  padding: 13px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--tmd-bg-soft);
  border-bottom: 1px solid var(--tmd-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tmd-fc-head i {
  color: var(--tmd-blue);
}

.tmd-fc-body {
  padding: 12px 16px 14px;
}

.filter-scroll {
  max-height: 250px;
  overflow-y: auto;
  overflow-x: hidden;
}

.filter-scroll::-webkit-scrollbar {
  width: 6px;
}

.filter-scroll::-webkit-scrollbar-thumb {
  background: var(--tmd-blue);
  border-radius: 8px;
}

.tmd-cat-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 12.5px;
  color: var(--tmd-navy);
}

.tmd-cat-link:hover,
.tmd-cat-link.active {
  color: var(--tmd-blue);
}

.tmd-cat-link.active {
  font-weight: 700;
}

.tmd-cat-link .n {
  color: var(--tmd-muted);
  font-size: 11.5px;
}

.tmd-subcat {
  list-style: none;
  margin: 4px 0 8px;
  padding: 0 0 0 12px;
  border-left: 2px solid var(--tmd-blue-light);
}

.tmd-subcat a {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 12px;
  color: var(--tmd-muted);
}

.tmd-subcat a:hover,
.tmd-subcat a.active {
  color: var(--tmd-blue);
}

.tmd-subcat a.active {
  font-weight: 700;
}

details.tmd-cat-group > summary {
  list-style: none;
  cursor: pointer;
}

details.tmd-cat-group > summary::-webkit-details-marker {
  display: none;
}

details.tmd-cat-group > summary .chev {
  transition: transform .18s ease;
  color: var(--tmd-muted);
}

details.tmd-cat-group[open] > summary .chev {
  transform: rotate(180deg);
}

.tmd-check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  font-size: 12.5px;
  cursor: pointer;
  margin: 0;
  font-weight: 400;
}

.tmd-check-row input {
  accent-color: var(--tmd-blue);
  width: 14px;
  height: 14px;
  cursor: pointer;
  margin: 0;
}

.tmd-price-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.tmd-price-inputs input {
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
  border: 1.5px solid var(--tmd-blue-border);
  border-radius: 7px;
  background: var(--tmd-bg-soft);
  outline: none;
  color: var(--tmd-navy);
}

.tmd-price-inputs span {
  color: var(--tmd-muted);
  font-size: 12px;
}

.tmd-help-card {
  background: var(--tmd-navy);
  border-color: var(--tmd-navy);
}

.tmd-help-card .tmd-help-inner {
  padding: 18px 16px;
}

.tmd-help-card p.title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 6px;
}

.tmd-help-card p.desc {
  font-size: 11.5px;
  color: #85B7EB;
  margin: 0 0 12px;
  line-height: 1.55;
}

.tmd-help-card .tmd-help-btn {
  display: block;
  width: 100%;
  padding: 9px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  background: #fff;
  color: var(--tmd-blue);
  border: none;
  text-align: center;
}

.tmd-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.tmd-toolbar .count {
  font-size: 12.5px;
  color: var(--tmd-muted);
  margin: 0;
}

.tmd-toolbar .count strong {
  color: var(--tmd-navy);
}

.tmd-toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tmd-toolbar-right label {
  font-size: 12.5px;
  color: var(--tmd-muted);
  margin: 0;
  font-weight: 400;
}

select.tmd-sort {
  padding: 9px 12px;
  font-size: 12.5px;
  border: 1.5px solid var(--tmd-blue-border);
  border-radius: 8px;
  background: #fff;
  color: var(--tmd-navy);
  cursor: pointer;
  outline: none;
  height: auto;
}

.tmd-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.tmd-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--tmd-blue);
  background: var(--tmd-blue-light);
  border-radius: 20px;
  padding: 5px 11px;
}

.tmd-chip i {
  font-size: 12px;
  cursor: pointer;
}

.tmd-chip-clear {
  font-size: 11.5px;
  color: var(--tmd-muted);
  text-decoration: underline;
  align-self: center;
  cursor: pointer;
}

.tmd-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  align-items: stretch;
}

/* Home page modules: 4 cards per row with fuller thumbnails */
.common-home .tmd-grid {
  grid-template-columns: repeat(4, 1fr);
}

.common-home .tmd-card-media {
  height: auto;
}

.common-home .tmd-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Product page related products: same card grid, 4 per row */
.product-product .tmd-related-section .tmd-grid,
.tmd-related-section .tmd-grid {
  grid-template-columns: repeat(4, 1fr);
}

.product-product .tmd-related-section .tmd-card-media,
.tmd-related-section .tmd-card-media {
  height: 180px;
}

.product-product .tmd-related-section .tmd-card-media img,
.tmd-related-section .tmd-card-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Featured slider (home page) - ensure cards keep the same thumb/layout */
.tmd-featured-carousel .owl-item {
  padding: 0 8px;
  box-sizing: border-box;
  display: flex;
  justify-content: center;
}

.tmd-featured-carousel .tmd-card {
  width: 100%;
}

/* Product page related slider */
.tmd-related-carousel .owl-item {
  padding: 0 8px;
  box-sizing: border-box;
}

.tmd-related-carousel .tmd-card {
  width: 100%;
}

@media (max-width: 479px) {
  .tmd-featured-carousel .owl-item {
    padding: 0 4px;
  }

  .tmd-related-carousel .owl-item {
    padding: 0 4px;
  }
}

.tmd-card {
  border: 1px solid var(--tmd-border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  color: var(--tmd-navy);
}

.tmd-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px -10px rgba(4,44,83,.25);
  border-color: rgba(51, 204, 255, 0.55);
}

.tmd-card-media {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(150deg, #EAF8FF 0%, #D4F2FF 55%, #C7EDFF 100%);
  overflow: hidden;
}

.tmd-card-media img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
}

.tmd-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 3px 9px;
  border-radius: 20px;
  text-transform: uppercase;
  z-index: 0;
}

.tmd-badge-best {
  background: var(--tmd-gold);
  color: var(--tmd-gold-text);
}

.tmd-badge-free {
  background: var(--tmd-green-bg);
  color: var(--tmd-green);
}

.tmd-badge-new {
  background: #fff;
  color: #33ccff;
}

.tmd-card-wish {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(51, 204, 255, 0.35);
  z-index: 0;
  color: #33ccff;
}

.tmd-card-wish:hover {
  background: #33ccff;
  border-color: #33ccff;
  color: #fff;
}

.tmd-card-compare {
  display: none !important;
}

.tmd-card-videos {
  display: none !important;
}

.tmd-card-body {
  padding: 14px 15px 15px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tmd-card-cat {
  font-size: 10px;
  font-weight: 700;
  color: #33ccff;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 0 0 6px;
}

.tmd-card-title {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 6px;
  color: var(--tmd-navy);
}

.tmd-card-title a {
  color: var(--tmd-navy);
  text-decoration: none;
}

.tmd-card-title a:hover {
  color: #33ccff;
}

.tmd-card-desc {
  font-size: 11.5px;
  color: var(--tmd-muted);
  line-height: 1.5;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 34px;
}

.tmd-card-rate {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.tmd-stars {
  color: #E8B923;
  font-size: 11px;
  letter-spacing: 1px;
}

.tmd-rate-n {
  font-size: 11px;
  color: var(--tmd-muted);
}

.tmd-card-ver {
  font-size: 10px;
  color: var(--tmd-muted);
  background: var(--tmd-bg-soft);
  border: 1px solid var(--tmd-border);
  border-radius: 5px;
  padding: 2px 7px;
  width: fit-content;
  margin-bottom: 12px;
}

.tmd-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tmd-card-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.tmd-price-old {
  font-size: 11.5px;
  color: var(--tmd-muted);
  text-decoration: line-through;
}

.tmd-price-new {
  font-size: 16px;
  font-weight: 700;
  color: var(--tmd-navy);
}

.tmd-freetag {
  font-size: 15px;
  font-weight: 700;
  color: var(--tmd-green);
}

.tmd-btn-cart {
  padding: 8px 14px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 7px;
  background: #33ccff;
  color: #fff;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.tmd-btn-cart:hover {
  background: #1fb8e6;
  color: #fff;
}

.irs--flat .irs-bar,
.irs--flat .irs-handle > i:first-child,
.irs--flat .irs-from,
.irs--flat .irs-to,
.irs--flat .irs-single {
  background-color: var(--tmd-blue);
}

.tmd-results-wrap {
  position: relative;
  min-height: 120px;
}

.tmd-results-wrap.loading:after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.55);
  z-index: 3;
}

.tmd-empty {
  padding: 40px 20px;
  text-align: center;
  border: 1px dashed var(--tmd-border);
  border-radius: 12px;
  color: var(--tmd-muted);
}

.tmd-pager {
  margin-top: 28px;
  margin-bottom: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  text-align: center;
}

.tmd-pager .pagination {
  margin: 0 auto;
  display: inline-flex;
  float: none;
  vertical-align: middle;
}

.tmd-pager .pagination > li > a,
.tmd-pager .pagination > li > span {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  margin: 0 3px;
  border: 1px solid var(--tmd-border);
  background: #fff;
  color: var(--tmd-blue);
  font-weight: 600;
  font-size: 13px;
  line-height: 1;
  box-shadow: none;
}

.tmd-pager .pagination > li > a:hover,
.tmd-pager .pagination > li > span:hover {
  background: var(--tmd-bg-soft);
  border-color: var(--tmd-blue);
  color: var(--tmd-blue);
}

.tmd-pager .pagination > .active > a,
.tmd-pager .pagination > .active > a:focus,
.tmd-pager .pagination > .active > a:hover,
.tmd-pager .pagination > .active > span,
.tmd-pager .pagination > .active > span:focus,
.tmd-pager .pagination > .active > span:hover {
  background: var(--tmd-blue);
  border-color: var(--tmd-blue);
  color: #fff;
}

.tmd-pager .pagination > .disabled > a,
.tmd-pager .pagination > .disabled > span {
  color: #b0bac5;
  background: #fff;
  border-color: var(--tmd-border);
  opacity: 0.7;
}

.tmd-seo-block {
  margin: 10px 0 30px;
}

.tmd-seo-inner {
  border: 1px solid var(--tmd-border);
  border-radius: 12px;
  background: var(--tmd-bg-soft);
  padding: 24px 26px;
}

.tmd-seo-inner h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 10px;
}

.tmd-seo-inner p {
  font-size: 12.5px;
  color: var(--tmd-muted);
  line-height: 1.7;
  margin: 0;
}

.tmd-listing-wrap .breadcrumb {
  margin-bottom: 12px;
}

/* Breadcrumbs – same navy / Open Sans as category pages everywhere */
.breadcrumb {
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  color: var(--tmd-navy);
}

.breadcrumb > li {
  text-shadow: none;
  color: var(--tmd-navy);
}

.breadcrumb a {
  color: var(--tmd-navy);
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
}

.breadcrumb a:hover,
.breadcrumb a:focus {
  color: var(--tmd-blue);
}

.breadcrumb i {
  color: var(--tmd-navy);
  font-size: 12px;
}

@media (max-width: 1100px) {
  .tmd-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .common-home .tmd-grid,
  .tmd-related-section .tmd-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991px) {
  .tmd-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .tmd-toolbar-right {
    width: 100%;
    flex-wrap: wrap;
  }

  .tmd-toolbar-right select.tmd-sort {
    flex: 1 1 140px;
    min-width: 0;
  }

  .tmd-featured-carousel .tmd-card-media,
  .tmd-related-carousel .tmd-card-media,
  .common-home .tmd-card-media,
  .tmd-related-section .tmd-card-media {
    height: 160px;
  }
}

@media (max-width: 900px) {
  .common-home .tmd-grid,
  .tmd-related-section .tmd-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tmd-page {
    grid-template-columns: 1fr;
  }

  .tmd-sidebar {
    position: static;
  }

  .tmd-title-row {
    flex-direction: column;
    gap: 18px;
  }

  .tmd-page-search {
    width: 100%;
  }

  .tmd-filter-card {
    border-radius: 10px;
  }
}

@media (max-width: 767px) {
  .tmd-listing-wrap {
    padding-left: 12px;
    padding-right: 12px;
  }

  .tmd-title-copy h1 {
    font-size: 20px;
  }

  .tmd-card-foot {
    flex-wrap: wrap;
  }

  .tmd-btn-cart {
    width: 100%;
    text-align: center;
  }

  .tmd-pager .pagination > li > a,
  .tmd-pager .pagination > li > span {
    min-width: 34px;
    height: 34px;
    margin: 0 2px;
    font-size: 12px;
  }

  #header-cart .dropdown-menu.tmd-cart-dropdown {
    width: calc(100vw - 24px);
    max-width: 360px;
  }

  .tmd-featured-carousel .owl-item,
  .tmd-related-carousel .owl-item {
    padding: 0 6px;
  }
}

@media (max-width: 620px) {
  .tmd-grid,
  .common-home .tmd-grid,
  .tmd-related-section .tmd-grid {
    grid-template-columns: 1fr;
  }

  .tmd-card-media,
  .common-home .tmd-card-media,
  .tmd-related-section .tmd-card-media,
  .tmd-featured-carousel .tmd-card-media,
  .tmd-related-carousel .tmd-card-media {
    height: 180px;
  }

  .tmd-chips {
    gap: 6px;
  }

  .tmd-page-search-dropdown {
    max-height: min(280px, calc(100vh - 160px));
  }
}

@media (max-width: 480px) {
  .tmd-title-copy h1 {
    font-size: 18px;
  }

  .tmd-card-body {
    padding: 12px;
  }

  .tmd-toolbar-right label {
    width: 100%;
  }

  .tmd-toolbar-right select.tmd-sort {
    width: 100%;
    flex: 1 1 100%;
  }
}

/* ---- Toast notifications ---- */
#tmd-toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: calc(100vw - 40px);
}

.tmd-toast {
  pointer-events: auto;
  position: relative;
  min-width: 280px;
  max-width: 420px;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #1f2937;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  opacity: 0;
  transform: translateX(120%) scale(0.96);
  transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.tmd-toast.tmd-toast--in {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.tmd-toast.tmd-toast--out {
  opacity: 0;
  transform: translateX(120%) scale(0.96);
}

.tmd-toast--success { border-color: rgba(51, 204, 255, 0.65); }
.tmd-toast--info { border-color: rgba(51, 204, 255, 0.65); }
.tmd-toast--error { border-color: rgba(239, 68, 68, 0.55); }

.tmd-toast-icon {
  width: 32px;
  flex: 0 0 32px;
  height: 32px;
  border-radius: 50%;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tmd-toast--success .tmd-toast-icon { background: rgba(51, 204, 255, 0.15); }
.tmd-toast--info .tmd-toast-icon { background: rgba(51, 204, 255, 0.15); }
.tmd-toast--error .tmd-toast-icon { background: rgba(239, 68, 68, 0.12); }

.tmd-toast--success .tmd-toast-icon i { color: #33ccff; }
.tmd-toast--info .tmd-toast-icon i { color: #33ccff; }
.tmd-toast--error .tmd-toast-icon i { color: #dc2626; }

.tmd-toast-message {
  font-size: 14px;
  line-height: 1.45;
  flex: 1;
  color: #374151;
}

.tmd-toast-message a {
  color: #33ccff;
  text-decoration: underline;
  font-weight: 600;
}

.tmd-toast-message a:hover {
  color: #1fb8e6;
}

.tmd-toast-close {
  background: transparent;
  border: 0;
  color: #9ca3af;
  font-size: 22px;
  line-height: 20px;
  cursor: pointer;
  padding: 0;
}

.tmd-toast-close:hover { color: #374151; }

.tmd-toast-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: rgba(51, 204, 255, 0.45);
  transform-origin: left center;
  animation: tmdToastProgress linear forwards;
}

.tmd-toast--success .tmd-toast-progress { background: rgba(51, 204, 255, 0.55); }
.tmd-toast--info .tmd-toast-progress { background: rgba(51, 204, 255, 0.55); }
.tmd-toast--error .tmd-toast-progress { background: rgba(220, 38, 38, 0.45); }

@keyframes tmdToastProgress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 575px) {
  #tmd-toast-container {
    left: 12px;
    right: 12px;
    top: 12px;
  }

  .tmd-toast {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
}

/* ---- Header cart dropdown (card theme) ---- */
#header-cart .dropdown-menu.tmd-cart-dropdown {
  width: 360px;
  padding: 0;
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--tmd-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px -10px rgba(4, 44, 83, 0.22);
  overflow: hidden;
}

#header-cart .tmd-cart-dropdown > li {
  list-style: none;
}

#header-cart .tmd-cart-items {
  max-height: 280px;
  overflow-y: auto;
  padding: 8px 0;
}

#header-cart .tmd-cart-items .table {
  margin: 0;
  background: transparent;
}

#header-cart .tmd-cart-items .table > tbody > tr > td {
  border: 0;
  border-bottom: 1px solid var(--tmd-border);
  padding: 12px 10px;
  vertical-align: middle;
  background: #fff !important;
}

#header-cart .tmd-cart-items .table > tbody > tr:last-child > td {
  border-bottom: 0;
}

#header-cart .tmd-cart-thumb .img-thumbnail {
  width: 52px;
  height: 52px;
  object-fit: cover;
  padding: 0;
  border: 1px solid var(--tmd-border);
  border-radius: 8px;
  background: var(--tmd-bg-soft);
}

#header-cart .tmd-cart-info {
  font-size: 13px;
  line-height: 1.4;
  color: var(--tmd-navy);
}

#header-cart .tmd-cart-info a {
  color: var(--tmd-navy);
  font-weight: 600;
  text-decoration: none;
}

#header-cart .tmd-cart-info a:hover {
  color: var(--tmd-blue);
}

#header-cart .tmd-cart-info small {
  color: var(--tmd-muted);
  font-size: 11px;
}

#header-cart .tmd-cart-qty {
  color: var(--tmd-muted);
  font-size: 12px;
  white-space: nowrap;
}

#header-cart .tmd-cart-price {
  color: var(--tmd-navy);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

#header-cart .tmd-cart-remove-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid #fecaca;
  border-radius: 7px;
  background: #fef2f2;
  color: #dc2626;
  line-height: 24px;
  box-shadow: none;
}

#header-cart .tmd-cart-remove-btn:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

#header-cart .tmd-cart-summary {
  background: var(--tmd-bg-soft);
  border-top: 1px solid var(--tmd-border);
}

#header-cart .tmd-cart-summary > div {
  padding: 12px 14px 14px !important;
}

#header-cart .tmd-cart-summary .table {
  margin: 0 0 12px;
  background: transparent;
}

#header-cart .tmd-cart-summary .table > tbody > tr > td {
  border: 0;
  padding: 4px 0;
  font-size: 13px;
  color: var(--tmd-muted);
  background: transparent !important;
}

#header-cart .tmd-cart-summary .table > tbody > tr:last-child > td {
  color: var(--tmd-navy);
  font-size: 14px;
  padding-top: 8px;
}

#header-cart .tmd-cart-actions {
  display: flex;
  gap: 8px;
}

#header-cart .tmd-cart-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

#header-cart .tmd-cart-btn-view {
  background: #fff;
  color: var(--tmd-navy);
  border: 1.5px solid var(--tmd-blue-border);
}

#header-cart .tmd-cart-btn-view:hover {
  border-color: var(--tmd-blue);
  color: var(--tmd-blue);
}

#header-cart .tmd-cart-btn-checkout {
  background: var(--tmd-blue);
  color: #fff;
  border: 1.5px solid var(--tmd-blue);
}

#header-cart .tmd-cart-btn-checkout:hover {
  background: #1fb8e6;
  border-color: #1fb8e6;
  color: #fff;
}

#header-cart .tmd-cart-empty {
  padding: 28px 16px;
}

#header-cart .tmd-cart-empty p {
  margin: 0;
  color: var(--tmd-muted);
  font-size: 13px;
}

@media (max-width: 478px) {
  #header-cart .dropdown-menu.tmd-cart-dropdown {
    width: calc(100vw - 24px);
    right: -40px;
  }
}

/* ---- Header live search autocomplete ---- */
#search {
  position: relative;
}

#search .dropdown-menu.tmd-search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 100070;
  width: 100%;
  min-width: 0;
  max-width: none;
  max-height: min(360px, calc(100vh - 160px));
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--tmd-border);
  border-radius: 12px;
  box-shadow: 0 12px 32px -10px rgba(4, 44, 83, 0.22);
  float: none !important;
  list-style: none;
}

/* Hide card badges / wishlist if injected in header search results */
#search .tmd-search-dropdown .tmd-badge,
#search .tmd-search-dropdown .tmd-card-wish,
#search .tmd-search-dropdown .tmd-card-compare,
#search .tmd-search-dropdown .btn[onclick*="wishlist"] {
  display: none !important;
}

#search .tmd-search-dropdown > li {
  float: none !important;
  list-style: none;
  border: 0;
  margin: 0 0 4px;
}

#search .tmd-search-dropdown > li:last-child {
  margin-bottom: 0;
}

#search .tmd-search-dropdown .tmd-search-item > a {
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 10px 12px !important;
  color: var(--tmd-navy) !important;
  text-decoration: none !important;
  white-space: normal;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 8px;
}

#search .tmd-search-dropdown .tmd-search-item > a:hover,
#search .tmd-search-dropdown .tmd-search-item > a:focus {
  background: var(--tmd-bg-soft) !important;
  background-image: none !important;
  border-color: rgba(51, 204, 255, 0.35);
  color: var(--tmd-navy) !important;
}

.dropdown-menu.tmd-search-dropdown li > a:hover,
.dropdown-menu.tmd-search-dropdown li > a:focus,
.header_tmd_layout1 #search .dropdown-menu.tmd-search-dropdown li > a:hover,
.header_tmd_layout1 #search .dropdown-menu.tmd-search-dropdown li > a:focus {
  background-color: var(--tmd-bg-soft) !important;
  background-image: none !important;
  color: var(--tmd-navy) !important;
}

#search ul.dropdown-menu.tmd-search-dropdown > li {
  float: none !important;
}

#search .tmd-search-thumb {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 1px solid var(--tmd-border);
  border-radius: 8px;
  background: var(--tmd-bg-soft);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

#search .tmd-search-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#search .tmd-search-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#search .tmd-search-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--tmd-navy);
}

#search .tmd-search-name mark {
  background: rgba(51, 204, 255, 0.25);
  color: var(--tmd-navy);
  padding: 0 1px;
  border-radius: 2px;
}

#search .tmd-search-model {
  font-size: 11px;
  color: var(--tmd-muted);
}

#search .tmd-search-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 2px;
}

#search .tmd-search-old {
  font-size: 12px;
  color: var(--tmd-muted);
  text-decoration: line-through;
}

#search .tmd-search-new {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--tmd-blue);
}

#search .tmd-search-more > a {
  display: block;
  text-align: center;
  padding: 11px 14px;
  margin: 2px 0 0;
  border-radius: 8px;
  background: var(--tmd-blue);
  color: #fff !important;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none !important;
}

#search .tmd-search-more > a:hover {
  background: #1fb8e6 !important;
  background-image: none !important;
  color: #fff !important;
}

#search .tmd-search-empty {
  padding: 18px 16px 8px;
  text-align: center;
  color: var(--tmd-muted);
  font-size: 13px;
}

@media (max-width: 575px) {
  #search .dropdown-menu.tmd-search-dropdown {
    min-width: 0;
    max-width: none;
    width: 100%;
  }

  .search_wrap {
    right: -8px;
    width: calc(100vw - 24px);
    max-width: none;
  }
}
