/*
Theme Name: Cluster Automotriz Child
Template: twentytwentyfour
Description: Child theme of Twenty Twenty-Four with order verification system and brand restrictions for WooCommerce
Author: Cluster Dev Team
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cluster-automotriz
*/

h1 {
  font-weight: 700;
  margin-top: 20px;
}

.woocommerce-breadcrumb {
  font-size: var(--wp--preset--font-size--small) !important;
}

/* Estilo para el nombre de la categoría del proveedor */
.proveedor-categoria-nombre {
  font-weight: 600;
}

.no-wrap {
  flex-wrap: nowrap;
}

li.home-item {
  border: 1px solid;
  padding: 7px 20px !important;
  border-radius: 100px;
  font-weight: 400;
}

nav li.home-item a::before {
  content: '\f015';
  font-family: 'Font Awesome 7 Free';
  font-size: 18px;
  font-weight: 100;
  display: inline-block;
  margin-right: 0.5em;
  color: inherit;
}

.cluster-buscador .wp-block-search__inside-wrapper {
  background-color: transparent;
  border: 1px solid #ffffff;
  border-radius: 100px;
  padding: 0px;
  flex-direction: row-reverse;
  overflow: hidden;
}

.cluster-buscador
  button.wp-block-search__button.has-text-color.has-base-2-color.has-background.has-icon.wp-element-button {
  padding: 6px 0px;
  font-size: 25px;
}

.cluster-buscador input#wp-block-search__input-1 {
  background: transparent;
  color: #ffffff;
}

.cluster-buscador input::placeholder {
  color: #ffffff !important;
}

.poducto-buscador .wp-block-search__inside-wrapper {
  background-color: #f5f5f5;
  border-radius: 8px;
  border-color: #f5f5f5;
  padding: 0px;
  flex-direction: row-reverse;
  overflow: hidden;
}

.poducto-buscador .wp-block-search__input {
  background: transparent;
  color: #989898;
}

.poducto-buscador .wp-block-search__button.has-icon.wp-element-button {
  background: transparent;
  color: #989898;
  margin: 0px;
}

select.orderby {
  padding: 8px 16px;
  border-radius: 8px;
  border-color: #d4d4d4;
}

.cluster-cuenta {
  border: 1px solid;
  border-radius: 100px;
  padding: 0px 12px !important;
}

.cluster-carrito {
  border: 1px solid;
  border-radius: 100px;
  padding: 0px 12px !important;
}
.woocommerce-view-order nav.woocommerce-MyAccount-navigation,
.woocommerce-orders nav.woocommerce-MyAccount-navigation {
  display: none;
}
.woocommerce-view-order .woocommerce-MyAccount-content,
.woocommerce-orders .woocommerce-MyAccount-content {
  width: 100%;
}
a:focus,
button:focus {
  outline: none;
  box-shadow: none;
}

.bv-btn a:hover {
  background-color: #f3f5f7 !important;
  color: #111111 !important;
}

.bv-btn a:focus {
  background-color: #f3f5f7 !important;
  color: #111111 !important;
}

:root :where(.wp-element-button:hover, .wp-block-button__link:hover) {
  background-color: #245079;
}

:root :where(.wp-element-button:focus, .wp-block-button__link:focus) {
  background-color: #245079;
}

/* Limitar tamaño máximo de la miniatura del proveedor */
.proveedor-thumbnail-wrapper {
  max-width: 200px;
  max-height: 200px;
  min-height: 200px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.proveedor-thumbnail {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
}

.wp-block-woocommerce-checkout-shipping-methods-block,
.wp-block-woocommerce-checkout-order-note-block {
  display: none;
}

form.login.woocommerce-form-login {
  border: none;
  padding: 0px;
}

a:where(:not(.wp-element-button)) {
  text-decoration: none;
}

:root :where(a:where(:not(.wp-element-button)):hover) {
  text-decoration: underline;
}

/* WCFM */

.wcfm_dashboard_wcfm_product_stats {
  display: none !important;
}

main #wcfm-main-contentainer {
  margin: 0px;
}

.page-template-gestor-de-tienda main {
  margin-block-start: 0px;
}

footer.wp-block-template-part {
  margin-block-start: 0px;
}

main #wcfm-content {
  border: none;
}

main #wcfm_menu .wcfm_menu_items {
  width: 94%;
}

.wcfm-collapse .wcfm-container {
  width: auto;
}

.wcfm-collapse .wcfm-collapse .wcfm-top-element-container {
  display: block;
}

@media screen and (max-width: 768px) {
  .h-small {
    display: none;
  }
  .page-template-raw {
    padding-top: 50px;
  }
  .hw-full {
    min-height: calc(100vh - 250px);
  }
  .no-wrap {
    flex-wrap: wrap;
  }
  nav li.home-item {
    padding: 5px 10px !important;
  }
  nav li.home-item a span {
    display: none;
  }
  nav li.home-item a::before {
    margin-right: 0px;
  }
  .cluster-cuenta {
    padding: 6px !important;
  }
  .cluster-cuenta a {
    padding: 0px;
  }
  .cluster-cuenta a span {
    display: none;
  }
  .cluster-carrito {
    padding: 6px !important;
  }
  .cluster-carrito button {
    padding: 0px;
  }
  .wp-block-group,
  .wp-block-group .wp-block-template-part {
    width: 100%;
  }
}

/* ============================================ */
/* ESTILOS PARA TABLAS DE PROVEEDORES Y CATEGORÍAS */
/* ============================================ */

/* Estilos generales para las tablas DataTable */
#cluster-proveedores-table.dataTable,
#cluster-categorias-table.dataTable {
  border-collapse: separate;
  border-spacing: 0;
  width: 100% !important;
  margin: 0 !important;
}

/* Encabezados de tabla */
#cluster-proveedores-table thead th,
#cluster-categorias-table thead th {
  background-color: #f9f9f9;
  border-bottom: 2px solid #e0e0e0;
  padding: 12px 10px;
  font-weight: 600;
  color: #333;
  text-align: left;
  font-size: 13px;
}

/* Celdas del cuerpo de la tabla */
#cluster-proveedores-table.dataTable tbody td,
#cluster-categorias-table.dataTable tbody td {
  padding: 12px 10px;
  border-bottom: 1px solid #e8e8e8;
  vertical-align: middle;
  color: #555;
  font-size: 13px;
}

/* Zebra striping - mayor especificidad para sobrescribir DataTables */
table#cluster-proveedores-table.dataTable.wcfm-datatable tbody tr,
table#cluster-categorias-table.dataTable.wcfm-datatable tbody tr {
  background-color: #ffffff !important;
  transition: background-color 0.15s ease;
}

table#cluster-proveedores-table.dataTable.wcfm-datatable
  tbody
  tr:nth-child(even),
table#cluster-categorias-table.dataTable.wcfm-datatable
  tbody
  tr:nth-child(even) {
  background-color: #f8f8f8 !important;
}

/* Hover effect con mayor especificidad */
table#cluster-proveedores-table.dataTable.wcfm-datatable tbody tr:hover,
table#cluster-categorias-table.dataTable.wcfm-datatable tbody tr:hover {
  background-color: #f0f0f0 !important;
}

/* Hover en filas */
#cluster-proveedores-table.dataTable tbody tr:hover,
#cluster-categorias-table.dataTable tbody tr:hover {
  background-color: #f0f0f0 !important;
  cursor: pointer;
}

/* Primera columna (icono de estado) */
#cluster-proveedores-table tbody td:first-child,
#cluster-categorias-table tbody td:first-child {
  width: 30px;
  padding: 8px;
  text-align: center;
}

/* Columna de acciones */
#cluster-proveedores-table tbody td:last-child,
#cluster-categorias-table tbody td:last-child {
  text-align: center;
  white-space: nowrap;
}

/* Iconos de acción */
#cluster-proveedores-table .wcfm-action-icon,
#cluster-categorias-table .wcfm-action-icon {
  display: inline-block;
  margin: 0 4px;
  padding: 6px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  color: #666;
}

#cluster-proveedores-table .wcfm-action-icon:hover,
#cluster-categorias-table .wcfm-action-icon:hover {
  background-color: #e3f2fd;
  color: #1976d2;
  text-decoration: none;
}

/* Imagen/logo de proveedor */
#cluster-proveedores-table tbody td img {
  border-radius: 4px;
  border: 1px solid #e0e0e0;
}

/* Texto en negrita (nombres) */
#cluster-proveedores-table tbody td strong,
#cluster-categorias-table tbody td strong {
  font-weight: 600;
  color: #333;
}

/* Controles de DataTables */
#cluster-proveedores-table_wrapper .dataTables_filter input,
#cluster-categorias-table_wrapper .dataTables_filter input {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 6px 12px;
  margin-left: 8px;
}

#cluster-proveedores-table_wrapper .dataTables_length select,
#cluster-categorias-table_wrapper .dataTables_length select {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px 8px;
  margin: 0 8px;
}

/* Paginación */
#cluster-proveedores-table_wrapper .dataTables_paginate .paginate_button,
#cluster-categorias-table_wrapper .dataTables_paginate .paginate_button {
  padding: 6px 12px;
  margin: 0 2px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  color: #333 !important;
}

#cluster-proveedores-table_wrapper .dataTables_paginate .paginate_button:hover,
#cluster-categorias-table_wrapper .dataTables_paginate .paginate_button:hover {
  background-color: #f5f5f5;
  border-color: #ccc;
}

#cluster-proveedores-table_wrapper
  .dataTables_paginate
  .paginate_button.current,
#cluster-categorias-table_wrapper
  .dataTables_paginate
  .paginate_button.current {
  background-color: #2196f3 !important;
  border-color: #2196f3 !important;
  color: #fff !important;
}

/* Mejoras responsive */
@media screen and (max-width: 768px) {
  #cluster-proveedores-table tbody td,
  #cluster-categorias-table tbody td {
    padding: 8px 6px;
    font-size: 12px;
  }

  #cluster-proveedores-table thead th,
  #cluster-categorias-table thead th {
    padding: 10px 6px;
    font-size: 12px;
  }
}

/* ============================================
   INFORMACIÓN DE PROVEEDOR EN LISTA DE PRODUCTOS
   ============================================ */

.product-proveedor-link {
  margin: 8px 0;
  font-size: 14px;
  text-align: center;
}

.product-proveedor-link a {
  color: #0073aa;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.product-proveedor-link a:hover {
  color: #005a87;
  text-decoration: underline;
}

/* ============================================
   PÁGINA DE TAXONOMÍA PROVEEDOR
   ============================================ */

/* Contenedor principal - todo el ancho */
.tax-proveedor main.wp-block-group {
  max-width: 100% !important;
  padding-right: var(--wp--preset--spacing--40);
  padding-left: var(--wp--preset--spacing--40);
}

/* Título del proveedor */
.proveedor-archive-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  margin-top: 1rem;
}

/* Columnas con ancho completo */
.tax-proveedor .wp-block-columns {
  max-width: 100% !important;
  width: 100% !important;
}

/* Sidebar de categorías */
.tax-proveedor .wp-block-column:first-child {
  max-width: 266px;
}

.tax-proveedor .wp-block-column:first-child h3 {
  margin-top: 0;
  font-size: 20px;
  border-bottom: 2px solid;
  margin-top: 20px;
  margin-bottom: 20px;
  line-height: 1.55;
}

/* Columna de productos - ancho completo */
.tax-proveedor .wp-block-column:last-child {
  width: 100% !important;
}

/* Query block ancho completo */

/* Estilos para header de proveedor */
.proveedor-header {
  margin-top: 2rem;
}

.proveedor-header-content {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.proveedor-header-logo {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  border-radius: 12px;
  overflow: hidden;
  background: #f0f0f0;
}

.proveedor-header-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.proveedor-header-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.proveedor-header-initials {
  color: #ffffff;
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.proveedor-header-info {
  flex: 1;
}

.proveedor-header-info h1 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.proveedor-header-title {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.proveedor-meta {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.proveedor-meta-item {
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  margin: 0;
}

.proveedor-descripcion {
  font-size: 15px;
  font-weight: 500;
  color: #555;
  margin: 0;
}

@media (max-width: 768px) {
  .proveedor-header-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .proveedor-header-logo {
    width: 120px;
    height: 120px;
  }

  .proveedor-meta-item {
    justify-content: center;
  }
}

/* Estilos para filtro personalizado de categorías */
.proveedor-category-filter {
  border-radius: 8px;
}

.proveedor-category-filter h3 {
  margin-top: 0;
  font-size: 1.2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.category-filter-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-filter-list li {
  margin-bottom: 0.75rem;
  padding: 0.25rem 0;
}

.category-filter-list label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  gap: 0.5rem;
  transition: color 0.2s ease;
}

.category-filter-list input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  margin: 0;
  cursor: pointer;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 2px solid #d4d4d4;
  border-radius: 4px;
  background-color: #ffffff;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: inset 0 0 0 0 transparent;
}

.category-filter-list input[type='checkbox']:hover {
  border-color: #0073aa;
  box-shadow: 0 0 8px rgba(0, 115, 170, 0.15);
}

.category-filter-list input[type='checkbox']:checked {
  background-color: #0073aa;
  border-color: #0073aa;
}

.category-filter-list input[type='checkbox']:checked::after {
  content: '✓';
  color: #ffffff;
  font-size: 14px;
  font-weight: bold;
  position: absolute;
  line-height: 1;
}

.category-filter-list label:hover {
  color: #0073aa;
}

.category-filter-list label span {
  line-height: 1.4;
  font-weight: 500;
}

/* Transición de productos filtrados */
.wp-block-post-template article {
  transition: opacity 0.3s ease;
}

.wp-block-post-template article.filtered-hidden {
  opacity: 0.3;
  pointer-events: none;
}

/* ============================================
   PÁGINA DE ARCHIVO DE PROVEEDORES
   ============================================ */

/* Contenedor principal - todo el ancho */
.lista-proveedores-container {
  max-width: 100% !important;
  width: 100% !important;
}

.lista-proveedores-container .wp-block-columns {
  display: flex !important;
  flex-direction: row !important;
  gap: 2rem !important;
  max-width: 100% !important;
  width: 100% !important;
}

.lista-proveedores-container .wp-block-column:first-child {
  max-width: 266px;
}

.lista-proveedores-container .wp-block-column:last-child {
  flex-basis: 75% !important;
  max-width: 75% !important;
  flex: 1 !important;
}

/* Grid de proveedores */
.proveedores-grid-container {
  width: 100%;
}

.proveedores-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.proveedores-grid-item {
  transition: opacity 0.3s ease;
}

.proveedores-grid-item.filtered-hidden {
  opacity: 0.3;
  pointer-events: none;
}

.proveedor-item-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.proveedor-image {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 1rem;
  background: #f0f0f0;
  border: 1px solid #eeeeee;
}

.proveedor-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.proveedor-image-placeholder img {
  object-fit: contain;
  padding: 1rem;
}

.proveedor-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #667eea;
  color: #ffffff;
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.proveedor-name {
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  margin: 0;
  line-height: 1.4;
}

/* Estilos para filtro de categorías de proveedores */

.wc-block-components-product-image {
  margin-bottom: 12px;
}
.proveedores-category-filter h3 {
  margin-top: 0;
  font-size: 20px;
  border-bottom: 2px solid;
  margin-top: 20px;
  margin-bottom: 20px;
  line-height: 1.55;
  font-weight: 600;
}

.proveedores-category-filter .category-filter-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.proveedores-category-filter .category-filter-list li {
  margin-bottom: 0.75rem;
  padding: 0.25rem 0;
}

.proveedores-category-filter .category-filter-list label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  gap: 0.5rem;
  transition: color 0.2s ease;
}

.proveedores-category-filter .category-filter-list input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  margin: 0;
  cursor: pointer;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 2px solid #d4d4d4;
  border-radius: 4px;
  background-color: #ffffff;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: inset 0 0 0 0 transparent;
}

.proveedores-category-filter
  .category-filter-list
  input[type='checkbox']:hover {
  border-color: #0073aa;
  box-shadow: 0 0 8px rgba(0, 115, 170, 0.15);
}

.proveedores-category-filter
  .category-filter-list
  input[type='checkbox']:checked {
  background-color: #0073aa;
  border-color: #0073aa;
}

.proveedores-category-filter
  .category-filter-list
  input[type='checkbox']:checked::after {
  content: '✓';
  color: #ffffff;
  font-size: 14px;
  font-weight: bold;
  position: absolute;
  line-height: 1;
}

.proveedores-category-filter .category-filter-list label:hover {
  color: #0073aa;
}

.proveedores-category-filter .category-filter-list label span {
  line-height: 1.4;
  font-weight: 500;
}

.proveedores-category-filter .category-filter-list label:hover {
  color: #0073aa;
}

.proveedores-category-filter .category-filter-list label span {
  line-height: 1.4;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
  .proveedores-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .lista-proveedores-container .wp-block-columns {
    flex-direction: column !important;
  }

  .lista-proveedores-container .wp-block-column {
    flex-basis: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .proveedores-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .proveedores-grid {
    grid-template-columns: 1fr;
  }
}
.tax-proveedor .wp-block-query {
  max-width: 100% !important;
  width: 100% !important;
}

/* Grid de productos en taxonomía proveedor */
.tax-proveedor .wp-block-post-template {
  gap: 2rem;
  width: 100% !important;
  max-width: 100% !important;
}

/* Productos individuales */
.tax-proveedor .wp-block-post {
  width: 100% !important;
}

/* Responsive */
@media screen and (max-width: 768px) {
  .tax-proveedor main.wp-block-group {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .proveedor-archive-title {
    font-size: 1.8rem;
  }

  .tax-proveedor .wp-block-columns {
    flex-direction: column;
  }

  .tax-proveedor .wp-block-column {
    width: 100% !important;
    flex-basis: 100% !important;
  }

  .tax-proveedor .wp-block-post-template {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

.wcfm_menu_logo,
.wcfm_screen_manager_dummy.text_tip,
.wcfm_wp_admin_view.text_tip {
  display: none;
}

.wcfm-collapse .wcfm-top-element-container {
  width: 98% !important;
}

a.wcfm_order_mark_complete.wcfm-action-icon,
.wcfm_dashboard_stats {
  display: none;
}

.woocommerce-account .entry-content {
  margin-bottom: 100px;
}
