/*!
 * Thor Theme — Hoja de estilos principal
 * Identidad visual de Polígono Thor / COSECAD
 */

/* ============================================
   1. VARIABLES DE MARCA
   ============================================ */
:root{
  --thor-rojo:        #cc2222;
  --thor-rojo-bri:    #e63333;
  --thor-rojo-dim:    rgba(204,34,34,0.12);
  --thor-negro:       #080909;
  --thor-carbon:      #0e1013;
  --thor-panel:       #13161c;
  --thor-panel-alt:   #191c24;
  --thor-borde:       #23262f;
  --thor-borde-s:     #1c1f27;
  --thor-blanco:      #ededea;
  --thor-gris:        #7a8090;
  --thor-gris-c:      #aab0be;
  --thor-header-h:    84px;
}

/* ============================================
   2. BASE
   ============================================ */
body{
  background-color: var(--thor-negro);
  color: var(--thor-gris-c);
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  line-height: 1.65;
}
h1,h2,h3,h4,h5,h6{
  color: var(--thor-blanco);
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 1px;
  line-height: 1.05;
}
a{ color: var(--thor-rojo); text-decoration: none; }
a:hover, a:focus{ color: var(--thor-rojo-bri); }
.screen-reader-text{
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px);
}
.thor-skip-link{
  position: absolute; left: -9999px; top: 0; z-index: 100000;
  background: var(--thor-rojo); color: #fff; padding: 12px 20px;
}
.thor-skip-link:focus{ left: 10px; top: 10px; }

.thor-btn-primary{
  display: inline-block;
  background: var(--thor-rojo); color: #fff !important;
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: .86rem; letter-spacing: 2px; text-transform: uppercase;
  padding: 13px 30px; border-radius: 3px; border: none; cursor: pointer;
  transition: background-color .2s, transform .15s;
}
.thor-btn-primary:hover{ background: var(--thor-rojo-bri); transform: translateY(-2px); color:#fff !important; }

/* ============================================
   3. HEADER
   ============================================ */
.thor-header{
  position: sticky; top: 0; z-index: 999999;
  background-color: var(--thor-negro);
  border-bottom: 1px solid var(--thor-borde);
  isolation: isolate;
  transition: box-shadow .25s, background-color .25s;
}
.thor-header.thor-header-scrolled{
  box-shadow: 0 12px 30px rgba(0,0,0,.5);
}
.thor-header-inner{
  max-width: 1320px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 0 32px;
  min-height: var(--thor-header-h);
}
.thor-branding img{ max-height: 52px; width: auto; display:block; }
.thor-site-title{
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.7rem; letter-spacing: 1px; color: var(--thor-blanco) !important;
}

.thor-nav{ flex: 1; display: flex; justify-content: center; }
.thor-menu{
  list-style: none; display: flex; gap: 30px; margin: 0; padding: 0;
  align-items: center;
}
.thor-menu > li{ position: relative; }
.thor-menu > li > a{
  display: block; padding: 8px 0;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: .84rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--thor-gris-c) !important;
  border-bottom: 2px solid transparent;
}
.thor-menu > li > a:hover,
.thor-menu > li.current-menu-item > a{
  color: var(--thor-rojo) !important;
  border-bottom-color: var(--thor-rojo);
}

/* Submenú — fondo opaco/negro, nunca transparente */
.thor-menu .sub-menu{
  list-style: none; margin: 0; padding: 10px 0;
  position: absolute; top: 100%; left: -20px;
  min-width: 220px;
  background-color: var(--thor-carbon) !important;
  border: 1px solid var(--thor-borde);
  border-top: 2px solid var(--thor-rojo);
  border-radius: 6px;
  box-shadow: 0 20px 40px rgba(0,0,0,.6);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 999999;
}
.thor-menu li.menu-item-has-children:hover > .sub-menu,
.thor-menu li.thor-submenu-open > .sub-menu{
  opacity: 1; visibility: visible; transform: translateY(0);
}
.thor-menu .sub-menu li a{
  display: block; padding: 10px 20px;
  color: var(--thor-blanco) !important;
  font-family: 'Barlow', sans-serif; font-size: .88rem;
  border-bottom: 1px solid var(--thor-borde-s);
}
.thor-menu .sub-menu li:last-child a{ border-bottom: none; }
.thor-menu .sub-menu li a:hover{ color: var(--thor-rojo) !important; }

.thor-header-actions{ display: flex; align-items: center; gap: 18px; }
.thor-cart-icon{
  position: relative; display: flex; color: var(--thor-blanco) !important;
}
.thor-cart-count{
  position: absolute; top: -8px; right: -10px;
  background: var(--thor-rojo); color: #fff;
  font-size: 10px; font-weight: 700;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* Íconos de redes sociales (header y footer) */
.thor-social-icons{ display: flex; align-items: center; gap: 10px; }
.thor-social-icon{
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--thor-borde);
  color: var(--thor-gris-c) !important;
  transition: border-color .2s, color .2s, background-color .2s;
}
.thor-social-icon:hover{
  border-color: var(--thor-rojo);
  color: var(--thor-rojo) !important;
  background-color: var(--thor-rojo-dim);
}
.thor-social-icons-header{ margin-right: 4px; }
.thor-footer-brand .thor-social-icons{ margin-top: 16px; }

/* Contacto compacto en el header — mismo estilo que los íconos de redes */
.thor-header-contact .thor-contact-list{
  display: flex; gap: 8px; margin: 0; padding: 0;
}
.thor-header-contact .thor-contact-list li{ margin: 0; }
.thor-header-contact .thor-contact-link{
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--thor-borde);
  justify-content: center; gap: 0;
  transition: border-color .2s, background-color .2s;
}
.thor-header-contact .thor-contact-link:hover{
  border-color: var(--thor-rojo);
  background-color: var(--thor-rojo-dim);
}
/* El texto (correo/teléfono) queda disponible para lectores de pantalla,
   pero visualmente solo se ve el ícono — igual técnica que .screen-reader-text */
.thor-header-contact .thor-contact-link span{
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px);
}

/* Bloque de contacto (correo + teléfono) en el footer */
.thor-contact-list{ list-style: none; margin: 0; padding: 0; }
.thor-contact-list li{ margin-bottom: 10px; }
.thor-contact-link{
  display: flex; align-items: center; gap: 10px;
  color: var(--thor-gris-c) !important;
  font-size: .85rem;
  word-break: break-word;
}
.thor-contact-link svg{ flex-shrink: 0; color: var(--thor-rojo); }
.thor-contact-link:hover{ color: var(--thor-rojo) !important; }

/* Toggle móvil */
.thor-nav-toggle{
  display: none; flex-direction: column; gap: 5px;
  background: transparent; border: none; cursor: pointer; padding: 6px;
}
.thor-nav-toggle-bar{
  width: 22px; height: 2px; background: var(--thor-blanco); display: block;
}

/* ============================================
   4. FOOTER
   ============================================ */
.thor-footer{
  background-color: var(--thor-carbon);
  border-top: 1px solid var(--thor-borde);
  padding: 56px 32px 0;
}
.thor-footer-inner{
  max-width: 1320px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr repeat(auto-fit, minmax(160px, 1fr)); gap: 40px;
  padding-bottom: 40px;
}
.thor-footer-brand .thor-site-title{ margin-bottom: 10px; display:block; }
.thor-footer-logo{ margin-bottom: 14px; }
.thor-footer-logo img{ max-height: 40px; width: auto; display: block; }
.thor-footer-logo .custom-logo-link{ display: inline-block; }
.thor-footer-desc{ font-size: .85rem; color: var(--thor-gris); max-width: 320px; }
.thor-footer-heading{
  font-family: 'Barlow Condensed', sans-serif; font-size: .78rem;
  letter-spacing: 2px; text-transform: uppercase; color: var(--thor-gris);
  margin-bottom: 14px;
}
.thor-footer-menu{ list-style: none; margin: 0; padding: 0; }
.thor-footer-menu li{ margin-bottom: 8px; }
.thor-footer-menu a{ color: var(--thor-gris-c) !important; font-size: .88rem; }
.thor-footer-menu a:hover{ color: var(--thor-rojo) !important; }
.thor-footer-bottom{
  border-top: 1px solid var(--thor-borde-s);
  padding: 20px 0; text-align: center;
  font-family: 'Barlow Condensed', sans-serif; font-size: .78rem;
  color: var(--thor-gris); letter-spacing: .5px;
}

/* ============================================
   5. CONTENIDO GENERAL / BLOG
   ============================================ */
.thor-main{ max-width: 1320px; margin: 0 auto; padding: 48px 32px; min-height: 40vh; }
.thor-archive-title{ font-size: 2.4rem; margin-bottom: 20px; }
.thor-blog-grid{ display: grid; grid-template-columns: repeat(3,1fr); gap: 24px; }
.thor-post-card{
  background: var(--thor-panel); border: 1px solid var(--thor-borde); border-radius: 6px;
  overflow: hidden; transition: border-color .2s, transform .2s;
}
.thor-post-card:hover{ border-color: var(--thor-rojo); transform: translateY(-4px); }
.thor-post-card-thumb img{ display:block; width: 100%; }
.thor-post-card-body{ padding: 18px 20px; }
.thor-post-card-meta{ font-size: .72rem; color: var(--thor-gris); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.thor-post-card-title{ font-size: 1.4rem; margin-bottom: 10px; }
.thor-post-card-title a{ color: var(--thor-blanco) !important; }
.thor-post-card-excerpt{ font-size: .85rem; color: var(--thor-gris-c); margin-bottom: 12px; }
.thor-post-card-link{ font-family:'Barlow Condensed',sans-serif; font-size:.78rem; letter-spacing:1.5px; text-transform:uppercase; }

.thor-single-title{ font-size: 2.6rem; margin: 10px 0 20px; }
.thor-single-meta{ font-size: .78rem; color: var(--thor-gris); text-transform: uppercase; letter-spacing: 1px; }
.thor-single-thumb{ margin-bottom: 28px; border-radius: 6px; overflow: hidden; }
.thor-single-content{ max-width: 760px; font-size: 1rem; }
.thor-single-content p{ margin-bottom: 1.2em; }

.thor-pagination{ margin-top: 40px; display: flex; gap: 10px; justify-content: center; }
.thor-pagination .page-numbers{
  display:inline-flex; align-items:center; justify-content:center;
  min-width: 38px; height: 38px; padding: 0 10px;
  background: var(--thor-panel); border: 1px solid var(--thor-borde); border-radius: 4px;
  color: var(--thor-gris-c) !important; font-family:'Barlow Condensed',sans-serif;
}
.thor-pagination .page-numbers.current,
.thor-pagination .page-numbers:hover{
  background: var(--thor-rojo); border-color: var(--thor-rojo); color: #fff !important;
}

.thor-search-form{ display: flex; gap: 8px; max-width: 420px; }
.thor-search-field{
  flex: 1; background: transparent; border: 1px solid var(--thor-borde); border-radius: 3px;
  padding: 11px 14px; color: var(--thor-blanco); font-family: 'Barlow', sans-serif;
}
.thor-search-submit{
  background: var(--thor-rojo); color:#fff; border: none; border-radius: 3px;
  padding: 0 20px; font-family:'Barlow Condensed',sans-serif; font-weight:700;
  letter-spacing: 1.5px; text-transform: uppercase; cursor: pointer;
}

.thor-404{ text-align: center; padding: 90px 32px; }
.thor-404-inner{ max-width: 480px; margin: 0 auto; }
.thor-404-eyebrow{ color: var(--thor-rojo); font-family:'Barlow Condensed',sans-serif; letter-spacing:3px; font-size:.8rem; text-transform:uppercase; margin-bottom:10px; }
.thor-404-title{ font-size: 3.4rem; margin-bottom: 14px; }
.thor-404-desc{ margin-bottom: 26px; }
.thor-404-search{ margin-top: 30px; display:flex; justify-content:center; }

.thor-comments{ max-width: 760px; margin-top: 50px; }
.thor-comment-list{ list-style:none; margin:0; padding:0; }
.thor-comments-title{ font-size: 1.6rem; margin-bottom: 20px; }

/* ============================================
   6. WOOCOMMERCE — TIENDA / CARRITO / CHECKOUT
   ============================================ */
.thor-woo-wrap{ max-width: 1320px; margin: 0 auto; padding: 48px 32px; }

.woocommerce ul.products li.product{
  background: var(--thor-panel); border: 1px solid var(--thor-borde); border-radius: 6px;
  padding: 16px; transition: border-color .2s, transform .2s;
}
.woocommerce ul.products li.product:hover{ border-color: var(--thor-rojo); transform: translateY(-4px); }
.woocommerce ul.products li.product .woocommerce-loop-product__title{
  color: var(--thor-blanco); font-family: 'Bebas Neue', sans-serif; font-size: 1.3rem;
}
.woocommerce ul.products li.product .price{ color: var(--thor-rojo-bri) !important; font-family: 'Bebas Neue', sans-serif; }

.woocommerce table.shop_table{
  background-color: var(--thor-panel); border: 1px solid var(--thor-borde);
  border-radius: 6px; border-collapse: separate; overflow: hidden;
}
.woocommerce table.shop_table thead th{
  background-color: var(--thor-panel); border-bottom: 1px solid var(--thor-borde) !important;
  color: var(--thor-gris) !important; font-family: 'Barlow Condensed', sans-serif;
  font-size: .75rem; letter-spacing: 1.5px; text-transform: uppercase; padding: 14px 18px;
}
.woocommerce table.shop_table tbody td{
  border-bottom: 1px solid var(--thor-borde-s) !important; color: var(--thor-gris-c);
  padding: 16px 18px; vertical-align: middle;
}
.woocommerce table.shop_table .product-name a{ color: var(--thor-blanco) !important; font-weight: 500; }
.woocommerce table.shop_table .product-price,
.woocommerce table.shop_table .product-subtotal{
  color: var(--thor-rojo-bri) !important; font-family: 'Bebas Neue', sans-serif; font-size: 1.1rem;
}
.woocommerce .quantity .qty{
  background-color: var(--thor-panel-alt) !important; border: 1px solid var(--thor-borde) !important;
  color: var(--thor-blanco) !important; border-radius: 3px; height: 34px; text-align: center;
}

.cart_totals{
  background-color: var(--thor-panel) !important; border: 1px solid var(--thor-borde) !important;
  border-top: 2px solid var(--thor-rojo) !important; border-radius: 6px; padding: 20px !important;
}
.cart_totals h2{
  font-family: 'Barlow Condensed', sans-serif !important; font-size: .8rem !important;
  letter-spacing: 2px; text-transform: uppercase; color: var(--thor-gris) !important;
  border: none !important; margin-bottom: 14px !important;
}
.cart_totals table.shop_table{ border: none !important; background: transparent !important; }
.cart_totals .order-total .amount{
  color: var(--thor-rojo-bri) !important; font-family: 'Bebas Neue', sans-serif; font-size: 1.6rem;
}

.woocommerce-billing-fields h3,
.woocommerce-additional-fields h3,
#order_review_heading{
  font-family: 'Barlow Condensed', sans-serif !important; font-size: .8rem !important;
  letter-spacing: 2px; text-transform: uppercase; color: var(--thor-gris) !important;
  border-bottom: 1px solid var(--thor-borde); padding-bottom: 10px; margin-bottom: 18px !important;
}
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout textarea,
.woocommerce-checkout select,
.select2-selection{
  background-color: transparent !important; border: 1px solid var(--thor-borde) !important;
  color: var(--thor-blanco) !important; border-radius: 3px !important; padding: 11px 14px !important;
  font-family: 'Barlow', sans-serif;
}
#order_review, .woocommerce-checkout-review-order{
  background-color: var(--thor-panel) !important; border: 1px solid var(--thor-borde) !important;
  border-top: 2px solid var(--thor-rojo) !important; border-radius: 6px; padding: 20px !important;
}
.woocommerce-checkout-review-order-table .order-total .amount{
  color: var(--thor-rojo-bri) !important; font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem;
}
ul.payment_methods li label{ color: var(--thor-blanco) !important; }
.payment_box{ background-color: var(--thor-panel-alt) !important; color: var(--thor-gris-c) !important; }
.payment_box::before{ border-bottom-color: var(--thor-panel-alt) !important; }

.woocommerce #place_order,
.woocommerce a.checkout-button,
.woocommerce button.button,
.woocommerce input.button{
  background-color: var(--thor-rojo) !important; color: #ffffff !important;
  font-family: 'Barlow Condensed', sans-serif !important; font-weight: 700 !important;
  letter-spacing: 2px; text-transform: uppercase; border-radius: 3px !important; border: none !important;
  transition: background-color .2s, transform .15s;
}
.woocommerce #place_order:hover,
.woocommerce a.checkout-button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover{
  background-color: var(--thor-rojo-bri) !important; transform: translateY(-2px);
}
.woocommerce-message, .woocommerce-info{
  background-color: var(--thor-panel) !important; border-top-color: var(--thor-rojo) !important;
  color: var(--thor-gris-c) !important;
}
.woocommerce-error{
  background-color: var(--thor-panel) !important; border-top-color: var(--thor-rojo) !important;
  color: var(--thor-blanco) !important;
}

/* ============================================
   7. RESPONSIVE
   ============================================ */
@media (max-width: 900px){
  .thor-nav{
    position: fixed; top: var(--thor-header-h); left: 0; right: 0; bottom: 0;
    background: var(--thor-negro); display: block;
    transform: translateX(100%); transition: transform .25s ease;
    padding: 24px; overflow-y: auto; z-index: 999998;
  }
  .thor-nav.thor-nav-open{ transform: translateX(0); }
  .thor-menu{ flex-direction: column; align-items: flex-start; gap: 4px; width: 100%; }
  .thor-menu > li{ width: 100%; }
  .thor-menu > li > a{ padding: 14px 0; width: 100%; border-bottom: 1px solid var(--thor-borde-s); }
  .thor-menu .sub-menu{
    position: static; opacity: 1; visibility: visible; transform: none;
    display: none; box-shadow: none; margin: 6px 0 6px 14px; width: calc(100% - 14px);
  }
  .thor-menu li.thor-submenu-open > .sub-menu{ display: block; }
  .thor-nav-toggle{ display: flex; }
  .thor-blog-grid{ grid-template-columns: repeat(2,1fr); }
  .thor-footer-inner{ grid-template-columns: 1fr; }
}
@media (max-width: 600px){
  .thor-header-inner{ padding: 0 18px; }
  .thor-main, .thor-woo-wrap{ padding: 32px 18px; }
  .thor-blog-grid{ grid-template-columns: 1fr; }
  .thor-404-title{ font-size: 2.4rem; }
}
