:root {
  --tm-shop-border: rgba(15, 23, 42, 0.08);
  --tm-shop-soft: #f8fafc;
  --tm-shop-muted: #64748b;
  --tm-shop-strong: #0f172a;
  --tm-shop-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

/* Compactación general del contenido del archive */
.tm-shop-archive {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: .94rem;
  position: relative;
}

.tm-shop-archive,
.tm-shop-archive p,
.tm-shop-archive li,
.tm-shop-archive label,
.tm-shop-archive input,
.tm-shop-archive select,
.tm-shop-archive button,
.tm-shop-archive .button,
.tm-shop-archive .btn,
.tm-shop-archive textarea {
  font-size: .94rem;
}

.tm-shop-breadcrumbs nav.woocommerce-breadcrumb {
  margin: 0;
  color: var(--tm-shop-muted);
  font-size: .95rem;
}

.tm-shop-breadcrumbs a {
  color: var(--tm-shop-muted);
  text-decoration: none;
}

.tm-shop-hero {
  background: linear-gradient(135deg,#fff 0%,#f8fafc 100%);
  border: 1px solid var(--tm-shop-border);
  border-radius: 1.35rem;
  padding: 1rem 1.3rem;
  box-shadow: var(--tm-shop-shadow);
}

.tm-shop-title {
  margin: 0 0 .45rem;
  font-size: clamp(1.55rem, 2vw, 1.8rem);
  line-height: 1.08;
  font-weight: 800;
  color: var(--tm-shop-strong);
}

.tm-shop-description {
  color: var(--tm-shop-muted);
  font-size: .95rem;
  line-height: 1.55;
}

.tm-shop-description p { margin: 0; }

.tm-shop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin-top: .85rem;
}

.tm-shop-meta__item {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 46px;
  padding: .6rem .95rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--tm-shop-border);
}

.tm-shop-meta__item span {
  font-weight: 800;
  font-size: 1rem;
  color: var(--tm-shop-strong);
}

.tm-shop-meta__item small {
  color: var(--tm-shop-muted);
  font-size: .9rem;
}

.tm-shop-ordering .woocommerce-ordering { margin: 0; }

.tm-shop-ordering select,
.tm-shop-archive .woocommerce-ordering select,
.tm-shop-archive select.orderby {
  min-width: 220px;
  min-height: 42px;
  height: 42px;
  padding: .45rem 2.35rem .45rem .85rem;
  border-radius: .95rem;
  font-size: .95rem;
}

.tm-filter-accordion .accordion-item {
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: .95rem !important;
  overflow: hidden;
  margin-bottom: .75rem;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.05);
}

.tm-filter-accordion .accordion-button {
  font-weight: 700;
  font-size: .98rem;
  padding: .9rem 1rem;
  background: #f3f4f8;
  color: var(--tm-shop-strong);
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-top-color: rgba(15, 23, 42, 0.22);
  box-shadow: none !important;
}

.tm-filter-accordion .accordion-button:not(.collapsed) {
  color: var(--tm-shop-strong);
  background: #f3f4f8;
  font-size: .95rem;
}

.tm-filter-accordion .accordion-body {
  padding: .9rem 1rem;
  font-size: .93rem;
}

.tm-filter-check { padding: .4rem 0; }

.tm-shop-archive input[type="text"],
.tm-shop-archive input[type="number"],
.tm-shop-archive input[type="search"],
.tm-shop-archive select,
.tm-shop-archive textarea {
  min-height: 40px;
  padding: .45rem .75rem;
  border-radius: .75rem;
  font-size: .94rem;
}

.tm-shop-archive button,
.tm-shop-archive .button,
.tm-shop-archive .btn,
.tm-shop-archive input[type="submit"],
.tm-shop-archive input[type="button"],
.tm-shop-archive .wp-element-button {
  min-height: 42px;
  padding: .6rem .95rem;
  border-radius: .75rem;
  font-size: .95rem;
  font-weight: 700;
}

.tm-shop-products {
  margin-top: 0;
  position: relative;
  min-height: 120px;
}

.tm-shop-products ul.products {
  display: grid !important;
  grid-template-columns: repeat(2,minmax(0,1fr)) !important;
  gap: 1rem !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.tm-shop-products ul.products::before,
.tm-shop-products ul.products::after {
  display: none !important;
  content: none !important;
}

.tm-shop-products ul.products li.product {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  float: none !important;
  clear: none !important;
  padding: 0 !important;
  list-style: none !important;
}

.tm-shop-products nav.woocommerce-pagination {
  margin-top: 1.25rem;
}

.tm-shop-products nav.woocommerce-pagination ul {
  border: 0;
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  padding: 0;
}

.tm-shop-products nav.woocommerce-pagination ul li { border: 0; }

.tm-shop-products nav.woocommerce-pagination ul li a,
.tm-shop-products nav.woocommerce-pagination ul li span {
  border-radius: .8rem;
  border: 1px solid var(--tm-shop-border);
  min-width: 40px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  font-size: .94rem;
}

.tm-shop-products nav.woocommerce-pagination ul li span.current {
  background: #111827;
  color: #fff;
  border-color: #111827;
}

@media (min-width: 768px) {
  .tm-shop-products ul.products {
    grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  }
}

@media (min-width: 1200px) {
  .tm-shop-products ul.products {
    grid-template-columns: repeat(4,minmax(0,1fr)) !important;
  }
}

@media (max-width: 575.98px) {
  .tm-shop-products ul.products {
    grid-template-columns: 1fr !important;
  }

  .tm-shop-hero {
    padding: .9rem 1rem;
  }

  .tm-shop-title {
    font-size: 1.4rem;
  }

  .tm-shop-ordering select {
    min-width: 100%;
    width: 100%;
  }
}


.tm-shop-meta {
  align-items: center;
}

.tm-shop-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  align-items: center;
}

.tm-shop-active-filters__chip,
.tm-shop-active-filters__clear {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 32px;
  padding: .32rem .7rem;
  border-radius: 999px;
  border: 1px solid var(--tm-shop-border);
  background: #fff;
  color: var(--tm-shop-muted);
  text-decoration: none;
  font-size: .82rem;
  line-height: 1.1;
}

.tm-shop-active-filters__chip:hover,
.tm-shop-active-filters__clear:hover {
  color: var(--tm-shop-strong);
  border-color: rgba(15, 23, 42, 0.16);
}

.tm-shop-active-filters__chip span:first-child {
  color: var(--tm-shop-strong);
}

.tm-shop-active-filters__clear {
  background: #f8fafc;
  font-weight: 600;
}

.tm-shop-ordering select,
.tm-shop-archive .woocommerce-ordering select,
.tm-shop-archive select.orderby {
  min-width: 190px;
  min-height: 36px;
  height: 36px;
  padding: .25rem 2rem .25rem .7rem;
  font-size: .84rem;
}

.tm-shop-loading {
  position: absolute;
  inset: 0;
  z-index: 25;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
  padding-top: 2.5rem;
}

.tm-shop-loading__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(2px);
  border-radius: 1rem;
}

.tm-shop-loading__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .85rem;
  padding: 1.15rem 1.4rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.tm-shop-loading__spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--tm-accent) 24%, #ffffff);
  border-top-color: var(--tm-accent);
  animation: tm-shop-loading-spin .8s linear infinite;
}

.tm-shop-loading__label {
  font-size: .92rem;
  font-weight: 700;
  color: var(--tm-shop-strong);
}

@keyframes tm-shop-loading-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 991.98px) {
  .tm-shop-active-filters {
    width: 100%;
  }
}
