:root {
  color-scheme: light;
  --tm-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, Cantarell, 'Noto Sans', Helvetica, Arial, sans-serif;
}

html,
body {
  height: 100%;
}

body {
  min-height: 100vh;
  background: var(--tm-body-bg);
  color: var(--tm-body-text);
  font-family: var(--tm-font-body);
}

a {
  color: var(--tm-link);
}

a:hover {
  opacity: .9;
}

.tm-site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.tm-main {
  flex: 1 1 auto;
}

.tm-footer {
  margin-top: auto;
}

/* Header */
.tm-header-top,
.tm-header-sub {
  width: 100%;
  transition: background-color .2s ease, color .2s ease;
}

.tm-header-top {
  min-height: 72px;
  background: var(--tm-header-bg);
  color: var(--tm-header-text);
}

.tm-header-sub {
  background: var(--tm-header-sub-bg);
  color: var(--tm-header-text);
}

.tm-header--sticky {
  position: sticky;
  top: 0;
  z-index: 1030;
}

.tm-header-top a,
.tm-header-top .tm-action-link,
.tm-header-top .tm-brand-link,
.tm-header-top .tm-menu-btn,
.tm-header-sub,
.tm-header-sub a,
.tm-header-sub .nav-link,
.tm-header-sub .dropdown-toggle,
.tm-topbar,
.tm-topbar a,
.tm-topbar .tm-topbar-link,
.tm-topbar-link,
.tm-footer-top a,
.tm-footer-bottom a,
.tm-footer .nav-link {
  color: inherit;
}

.tm-action-link {
  text-decoration: none;
  line-height: 1.1;
}

.tm-search {
  min-width: 0;
}

.tm-search-input {
  border-radius: .5rem 0 0 .5rem;
}

.tm-search-btn {
  background: var(--tm-accent);
  border-color: var(--tm-accent);
  color: var(--tm-accent-text);
  border-radius: 0 .5rem .5rem 0;
  font-weight: 600;
}

.tm-search-btn:hover {
  filter: brightness(.98);
}

.tm-badge-accent {
  background: var(--tm-accent);
  color: var(--tm-accent-text);
}

/* Logo */
.tm-brand {
  flex: 0 0 auto;
  min-width: 0;
}

.tm-brand-link,
.tm-brand .custom-logo-link {
  display: inline-flex;
  align-items: center;
  height: 56px;
  max-width: 100%;
}

.tm-brand-link img,
.tm-brand .custom-logo,
.tm-logo-image {
  display: block;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.tm-brand-link img,
.tm-brand .custom-logo {
  height: 100%;
  max-height: 100%;
}

.tm-logo-image {
  height: 40px !important;
}

/* Menus */
.tm-top-menu,
.tm-primary-menu {
  gap: .25rem;
  flex-wrap: wrap;
}

.tm-top-menu .nav-link,
.tm-primary-menu .nav-link {
  color: var(--tm-header-text);
  padding: .25rem .5rem;
  border-radius: .375rem;
}

.tm-top-menu .nav-link:hover,
.tm-primary-menu .nav-link:hover {
  background: rgba(255, 255, 255, .12);
  color: var(--tm-header-text);
}

.tm-menu-btn {
  color: var(--tm-header-text);
  border: 1px solid color-mix(in srgb, var(--tm-header-text) 35%, transparent);
  background: transparent;
}

.tm-header-top .tm-menu-btn {
  border-color: rgba(255, 255, 255, .35);
}

.tm-menu-btn i {
  color: inherit;
  font-size: 1.35rem;
  line-height: 1;
}

.tm-menu-btn:hover,
.tm-menu-btn:focus,
.tm-menu-btn:active {
  color: var(--tm-header-text);
  background: color-mix(in srgb, var(--tm-header-text) 10%, transparent);
  border-color: color-mix(in srgb, var(--tm-header-text) 50%, transparent);
  box-shadow: none;
}

.tm-header-sub .tm-nav-wrap {
  width: 100%;
  justify-content: center !important;
  flex-wrap: nowrap;
}

.tm-nav-overflow-wrap {
  min-width: 0;
  display: flex;
  justify-content: center;
}

.tm-overflow-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  position: relative;
  font-size: 14px;
}

.tm-menu-track {
  display: flex;
  flex-wrap: nowrap;
  overflow: hidden;
  white-space: nowrap;
  min-width: 0;
  margin-bottom: 0;
  justify-content: center;
}

.tm-menu-track > li {
  flex: 0 0 auto;
}

.tm-menu-more {
  margin-left: .5rem;
  flex: 0 0 auto;
}

.tm-menu-more-list .dropdown-item {
  white-space: normal;
}

.tm-header-sub .tm-menu-more .dropdown-toggle {
  color: inherit;
  border-color: rgba(255, 255, 255, .25);
}

/* Topbar */
.tm-topbar {
  position: relative;
  z-index: 1041;
  line-height: 1.2;
}

.tm-topbar .container {
  padding-top: .55rem;
  padding-bottom: .55rem;
}

.tm-topbar .carousel-item {
  min-height: 20px;
}

.tm-topbar-link {
  text-decoration: none;
}

.tm-topbar-link:hover,
.tm-topbar .tm-topbar-link:hover {
  color: inherit;
  text-decoration: underline;
}

.tm-topbar-small {
  font-size: 14px;
}

.tm-topbar-large {
  font-size: 16px;
}

/* Cards */
.tm-card,
.woocommerce ul.products li.product {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 1rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .03);
}

.tm-card {
  /* reservado por si luego quieres padding propio */
}

.tm-hero {
  background: linear-gradient(180deg, rgba(0, 0, 0, .02), rgba(0, 0, 0, 0));
}

.tm-hero-box {
  background: rgba(0, 0, 0, .03);
}

/* WooCommerce */
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 0;
}

.woocommerce ul.products li.product {
  list-style: none;
  padding: 1rem;
}

.woocommerce ul.products li.product img {
  border-radius: .75rem;
  margin-bottom: .75rem;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 1rem;
  margin: .25rem 0 .5rem;
}

.woocommerce ul.products li.product .price {
  font-weight: 700;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  border-radius: .75rem;
}

/* Sidebar */
.tm-main ul.children {
  margin-top: .25rem;
}

.tm-main .cat-item {
  margin: .25rem 0;
}

.tm-main .cat-item a {
  text-decoration: none;
}


/* Footer */
.tm-footer-top,
.tm-footer-bottom {
  width: 100%;
}

.tm-footer-top {
  background: var(--tm-footer-bg);
  color: var(--tm-footer-text);
}

.tm-footer-bottom {
  background: #000;
  color: #fff;
}

.tm-footer a {
  color: var(--tm-footer-text);
}

.tm-footer a:hover,
.tm-footer-top a:hover,
.tm-footer-bottom a:hover,
.tm-footer .nav-link:hover {
  color: inherit;
  opacity: .9;
}

/* Responsive */
@media (min-width: 768px) {
  .woocommerce ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

@media (max-width: 991.98px) {
  .tm-header-top {
    min-height: 64px;
  }

  .tm-brand-link,
  .tm-brand .custom-logo-link {
    height: 48px;
  }

  .tm-logo-image,
  .tm-brand .custom-logo {
    max-width: 160px;
  }

}

@media (max-width: 575.98px) {
  .tm-header-top {
    min-height: 60px;
  }

  .tm-brand-link,
  .tm-brand .custom-logo-link {
    height: 40px;
  }

  .tm-logo-image,
  .tm-brand .custom-logo {
    max-width: 130px;
  }

  .tm-search-input {
    font-size: 14px;
  }

  .tm-search-btn {
    white-space: nowrap;
  }

}

body,
button,
input,
select,
textarea,
.nav,
.nav-link,
.dropdown-item,
.btn,
.wp-block-button__link,
.woocommerce,
.woocommerce button,
.woocommerce input,
.woocommerce select,
.woocommerce textarea {
  font-family: var(--tm-font-body);
}

h1, h2, h3, h4, h5, h6,
.woocommerce-products-header__title,
.product_title,
.entry-title,
.widget-title {
  font-family: var(--tm-font-body);
}
