/*
Theme Name: Todo Licencias PTY
Theme URI: https://todolicenciaspty.com
Description: Tema custom para Todo Licencias - Códigos y Recargas Digitales
Author: JD Urdaneta
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.1
License: Proprietary
Text Domain: todo-licencias
*/

/* ===== VARIABLES ===== */
:root {
  --tl-blue: #428BCA;
  --tl-blue-dark: #2D6CA2;
  --tl-blue-btn: #428BCA;
  --tl-header-main: #418EFF;
  --tl-header-gradient: linear-gradient(180deg, #418EFF 0%, #0B50A8 100%);
  --tl-teal: #38C1DA;
  --tl-dark-blue: #0B3879;
  --tl-orange: #ff5d00;
  --tl-orange-light: #ff7a2a;
  --tl-green: #25D366;
  --tl-white: #ffffff;
  --tl-gray-light: #F5F5F5;
  --tl-gray: #E0E0E0;
  --tl-gray-dark: #AAAAAA;
  --tl-text: #333333;
  --tl-text-light: #666666;
  --tl-radius: 12px;
  --tl-radius-sm: 8px;
  --tl-shadow: 0 2px 8px rgba(0,0,0,0.08);
  --tl-shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
}

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--tl-text);
  background: var(--tl-white);
  line-height: 1.6;
  font-size: 16px;
  font-weight: 400;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== HEADER ===== */
/* ===== HEADER — igual al sitio original todolicenciaspty.com ===== */
.tl-header {
  background: #ffffff;
  height: 100px;
  display: flex;
  align-items: stretch;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.tl-header-inner {
  width: 100%;
  display: flex;
  align-items: stretch;
}

/* Logo — 20% ancho, centrado verticalmente */
.tl-logo {
  width: 20%;
  min-width: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  text-decoration: none;
}

.tl-logo img {
  height: 60px;
  width: auto;
  max-width: 200px !important;
  object-fit: contain;
}

.tl-logo-text {
  color: #0b3879;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: none; /* solo mostrar si no hay logo imagen */
}

/* Nav menus — bloque de colores */
.tl-nav-menus {
  flex: 1;
  display: flex;
  gap: 0;
}

.tl-nav-dropdown {
  position: relative;
  flex: 1;
}

/* POR MARCA = azul #418eff */
.tl-nav-dropdown:nth-child(1) .tl-nav-btn {
  background: #418eff;
}
.tl-nav-dropdown:nth-child(1) .tl-nav-btn:hover {
  background: #2d7dee;
}
.tl-nav-dropdown:nth-child(1) .tl-dropdown-content {
  background: #418eff;
}
.tl-nav-dropdown:nth-child(1) .tl-dropdown-content a {
  color: #ffffff;
}
.tl-nav-dropdown:nth-child(1) .tl-dropdown-content a:hover {
  background: #bad5fd;
  color: #0b3879;
  border-radius: 30px;
  margin: 0 10px;
  padding-left: 10px;
}

/* POR CATEGORÍA = cyan #38c1da */
.tl-nav-dropdown:nth-child(2) .tl-nav-btn {
  background: #38c1da;
}
.tl-nav-dropdown:nth-child(2) .tl-nav-btn:hover {
  background: #2aafc7;
}
.tl-nav-dropdown:nth-child(2) .tl-dropdown-content {
  background: #38c1da;
}
.tl-nav-dropdown:nth-child(2) .tl-dropdown-content a {
  color: #ffffff;
}
.tl-nav-dropdown:nth-child(2) .tl-dropdown-content a:hover {
  background: #c7ebf1;
  color: #0b3879;
  border-radius: 30px;
  margin: 0 10px;
  padding-left: 10px;
}

.tl-nav-btn {
  width: 100%;
  height: 100%;
  border: none;
  color: #ffffff;
  padding: 20px 25px;
  font-family: 'Montserrat', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.2s;
}

.tl-nav-btn-label {
  font-size: 14px;
  font-weight: 400;
  display: block;
  text-transform: capitalize;
}

.tl-nav-btn-title {
  font-size: 20px;
  font-weight: 700;
  display: block;
  text-transform: uppercase;
}

.tl-nav-btn .arrow {
  font-size: 12px;
  opacity: 0.8;
}

/* Dropdown Menu */
.tl-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 300px;
  max-height: 500px;
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  z-index: 200;
  padding: 20px 0;
}

.tl-nav-dropdown:hover .tl-dropdown-content {
  display: block;
}

.tl-dropdown-content a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: 16px;
  font-weight: 300;
  transition: all 0.15s;
  text-decoration: none;
}

.tl-dropdown-content a img {
  width: 30px;
  height: 30px;
  border-radius: 6px;
  object-fit: cover;
}

/* Header Icons — cada uno es un bloque de color */
.tl-header-icons {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.tl-header-icon {
  color: #ffffff;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 100%;
  transition: opacity 0.2s;
  text-decoration: none;
}

.tl-header-icon:hover {
  opacity: 0.85;
}

.tl-header-icon svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

/* Colores exactos de cada icono */
.tl-currency-selector {
  background: #0082cc;
  color: #ffffff;
  border: none;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 20px;
  cursor: pointer;
  width: 70px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tl-currency-selector:hover { opacity: 0.85; }

.header-search-toggle { background: #1a61b1; }
.header-cart-icon     { background: #0b50a8; }
.header-account-icon  { background: #0b3879; }

/* Search Overlay */
.search-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9999;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
}
.search-overlay.active {
  display: flex;
}
.search-overlay-inner {
  background: white;
  border-radius: 12px;
  padding: 8px;
  width: 90%;
  max-width: 600px;
  display: flex;
  align-items: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}
.search-form {
  display: flex;
  flex: 1;
  align-items: center;
}
.search-form input[type="text"] {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  padding: 15px 20px;
  border-radius: 8px;
}
.search-form button {
  background: var(--tl-blue);
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
}
.search-form button:hover {
  background: var(--tl-blue-dark);
}
.search-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #999;
  cursor: pointer;
  padding: 10px;
  margin-left: 5px;
}

/* ===== HERO BANNER ===== */
/* Hero — igual al original: título centrado sobre el fondo pattern */
.tl-hero {
  background: none;
  padding: 50px 20px 20px;
  text-align: center;
}

.tl-hero h1 {
  color: #418eff;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0;
  display: block;
}

.tl-hero h2 {
  color: #666666;
  font-size: 30px;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ===== BRAND GRID ===== */
/* Sección con patrón geométrico (URL seteada via inline style en front-page.php) */
.tl-brands-bg {
  background-repeat: repeat;
  background-position: center;
}

.tl-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

.tl-filter-bar {
  margin-bottom: 20px;
}

.tl-filter-select {
  padding: 8px 16px;
  border: 1px solid var(--tl-gray);
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  color: var(--tl-text-light);
  background: var(--tl-white);
}

/* Carousel wrapper */
.tl-carousel-wrapper {
  overflow: hidden;
  position: relative;
}

.tl-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.tl-carousel-nav {
  display: flex;
  gap: 8px;
}

.tl-nav-arrow {
  width: 46px;
  height: 33px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  opacity: 0.85;
  transition: opacity 0.2s;
  text-indent: -9999px;
  overflow: hidden;
  display: inline-block;
}

.tl-nav-arrow:hover { opacity: 1; }

/* Flechas: prev = izquierda, next = derecha (clases para no depender de onclick) */
.tl-nav-arrow-prev {
  background: url(assets/images/arrow-prev.png) no-repeat center !important;
}
.tl-nav-arrow-next {
  background: url(assets/images/arrow-next.png) no-repeat center !important;
}

.tl-nav-arrow-light {
  opacity: 0.9;
}
.tl-nav-arrow-light:hover {
  opacity: 1;
}

.tl-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.tl-carousel-dots button {
  width: 30px;
  height: 6px;
  border-radius: 4px;
  border: none;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}

.tl-carousel-dots button.active {
  background: var(--tl-white);
}

.tl-carousel-dots-light button {
  background: rgba(255,255,255,0.4);
  width: 30px;
  height: 6px;
  border-radius: 4px;
}

.tl-carousel-dots-light button.active {
  background: var(--tl-white);
  width: 30px;
}

/* Brand Grid — 6 per row, 3 rows visible (18 brands per page like live site) */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(3, auto);
  gap: 16px;
  transition: transform 0.4s ease;
}

/* Hide brands beyond current page */
.brand-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 8px;
  background: var(--tl-white);
  border-radius: var(--tl-radius);
  box-shadow: var(--tl-shadow);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.3s;
  cursor: pointer;
}

.brand-card.hidden {
  display: none;
}

.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tl-shadow-hover);
}

.brand-card img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  border-radius: 16px;
  margin-bottom: 10px;
}

.brand-card span {
  font-size: 11px;
  font-weight: 600;
  color: var(--tl-text);
  line-height: 1.3;
}

.brand-placeholder {
  width: 90px;
  height: 90px;
  background: var(--tl-gray-light);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.brand-placeholder span {
  font-size: 24px;
  font-weight: 700;
  color: var(--tl-blue);
}

@media (max-width: 767px) {
  .brand-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 10px;
  }
  .brand-card img {
    width: 88px;
    height: 88px;
  }
}

/* ===== PRODUCTS SECTION ===== */
.tl-products-section {
  background: #418eff;
  padding: 40px 0;
  margin: 0;
}

.tl-products-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.tl-products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.tl-products-header h2 {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 5px;
}

.tl-products-header h3 {
  color: var(--tl-white);
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
}

.tl-products-tabs {
  display: flex;
  gap: 16px;
  margin-top: 4px;
}

.tl-products-tabs span {
  color: var(--tl-white);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding-bottom: 2px;
}

.tl-products-tabs span.active {
  border-bottom: 3px solid var(--tl-orange);
}

.tl-products-nav {
  display: flex;
  gap: 8px;
}

.tl-products-nav button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--tl-white);
  background: transparent;
  color: var(--tl-white);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.tl-products-nav button:hover {
  background: rgba(255,255,255,0.2);
}

/* Product Cards */
.tl-products-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  transition: transform 0.4s ease;
  will-change: transform;
  overflow: hidden;
}

.product-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--tl-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  min-width: calc((100% - 40px) / 3);
  max-width: calc((100% - 40px) / 3);
  flex-shrink: 0;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tl-shadow-hover);
}

.product-card-image {
  background: #ffffff;
  padding: 40px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
}

.product-card-image img {
  max-height: 140px;
  object-fit: contain;
}

.product-card-body {
  padding: 16px;
}

.product-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #444;
  margin-bottom: 8px;
  line-height: 1.4;
}

.product-card-price {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.price-original {
  text-decoration: line-through;
  color: var(--tl-text-light);
  font-size: 13px;
}

.price-current {
  color: #ff5d00;
  font-size: 22px;
  font-weight: 800;
}

.badge-offer {
  display: inline-block;
  background: #2ab6d4;
  color: var(--tl-white);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: capitalize;
  margin-left: auto;
}

.badge-new {
  display: inline-block;
  background: var(--tl-blue);
  color: var(--tl-white);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
}

/* ===== CATEGORIES GRID ===== */
.tl-categories-section {
  background: #42c6de;
  padding: 50px 20px;
}

.tl-categories-header {
  text-align: center;
  margin-bottom: 30px;
}

.tl-categories-header h2 {
  color: #0b3879;
  opacity: 0.75;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.tl-categories-header h3 {
  color: #ffffff;
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.category-card:hover {
  transform: translateY(-4px);
}

.category-card-icon {
  width: 70px;
  height: 70px;
  border: 2px solid rgba(11, 56, 121, 0.45);
  background: rgba(255,255,255,0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  transition: background 0.2s, transform 0.2s;
  overflow: hidden;
}

.category-card:hover .category-card-icon {
  background: #ffffff;
  transform: translateY(-2px);
}

.category-card-icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.category-card-icon svg {
  width: 30px;
  height: 30px;
  fill: #0b3879;
}

.category-card:hover .category-card-icon svg {
  fill: #0b3879;
}

.category-card span {
  font-size: 12px;
  font-weight: 600;
  color: #0b3879;
}

/* ===== NEWSLETTER ===== */
.tl-newsletter {
  text-align: center;
  padding: 50px 20px;
  background: var(--tl-white);
}

.tl-newsletter h2 {
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 20px;
  color: #0b3879;
}

.tl-newsletter-form {
  max-width: 400px;
  margin: 0 auto;
}

.tl-newsletter-form label {
  display: block;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #0b3879;
}

.tl-newsletter-form input[type="email"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--tl-gray);
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  margin-bottom: 16px;
}

.tl-newsletter-form button {
  background: var(--tl-orange);
  color: var(--tl-white);
  border: none;
  padding: 12px 32px;
  border-radius: 20px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.tl-newsletter-form button:hover {
  background: var(--tl-orange-light);
}

/* ===== TRUST BADGES ===== */
.tl-trust-badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  padding: 30px 20px;
}

.tl-trust-badges img {
  height: 40px;
  object-fit: contain;
}

/* ===== PAYMENT METHODS STRIP ===== */
.tl-payment-methods {
  display: flex;
  justify-content: center;
  padding: 20px;
  border-top: 1px solid var(--tl-gray);
}

.tl-payment-methods a {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.tl-payment-methods img {
  height: 28px;
  object-fit: contain;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.tl-payment-methods img:hover {
  opacity: 1;
}

/* Legacy compat */
.tl-payment-icons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px;
  border-top: 1px solid var(--tl-gray);
}

.tl-payment-icons img {
  height: 28px;
  object-fit: contain;
  opacity: 0.7;
}

.tl-payment-icons img:hover {
  opacity: 1;
}

/* ===== ARCHIVE (Brand/Category) PAGE ===== */
/* Archive/shop styles moved to css/shop.css — loaded conditionally */

/* ===== SINGLE PRODUCT PAGE ===== */
.tl-product-hero {
  background: #418eff;
  text-align: center;
  padding: 24px 20px;
}

.tl-product-hero .tl-archive-subtitle {
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.tl-product-hero h1 {
  color: var(--tl-white);
  font-size: 28px;
  font-weight: 800;
  text-transform: uppercase;
  margin-top: 4px;
}

.tl-product-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

.tl-product-main {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}

.tl-product-image {
  background: #f5f5f5;
  border-radius: var(--tl-radius);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1; /* Para que sea un cuadrado perfecto y no sobre espacio vertical */
  overflow: hidden;
}

.tl-product-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (max-width: 768px) {
  .tl-product-image {
    padding: 20px;
    aspect-ratio: auto;
  }
}

.tl-product-info h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--tl-dark-blue);
  margin-bottom: 12px;
}

.tl-product-description {
  color: var(--tl-text-light);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 24px;
}

.tl-product-description p {
  margin-bottom: 12px;
}

.tl-product-purchase {
  margin-bottom: 24px;
}

/* Gana Coins — tonos verdes, mensaje positivo */
.tl-coins-reward-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 12px 16px;
  background: #e8f5e9;
  border: 1px solid #2e7d32;
  border-radius: var(--tl-radius-sm);
  font-size: 14px;
  color: #1b5e20;
}
.tl-coins-reward-badge .tl-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: #2e7d32;
}
.tl-coins-reward-badge strong {
  color: #1b5e20;
}

.tl-quantity-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.tl-quantity-row label {
  font-weight: 600;
  font-size: 14px;
}

.tl-quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--tl-gray);
  border-radius: 6px;
  overflow: hidden;
}

.tl-quantity-control button {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--tl-gray-light);
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
}

.tl-quantity-control input {
  width: 50px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--tl-gray);
  border-right: 1px solid var(--tl-gray);
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  height: 36px;
}

.tl-product-price-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-big {
  font-size: 24px !important;
}

.tl-buy-btn,
.tl-buy-btn.button,
.tl-buy-btn.alt,
button.tl-buy-btn {
  background: #ff5d00 !important;
  background-color: #ff5d00 !important;
  color: #ffffff !important;
  border: none !important;
  padding: 12px 32px !important;
  border-radius: 30px !important;
  font-family: 'Montserrat', sans-serif !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: box-shadow 0.2s !important;
  text-shadow: none !important;
}

.tl-buy-btn:hover,
.tl-buy-btn.button:hover {
  background: #e55200 !important;
  background-color: #e55200 !important;
  box-shadow: 0 0 20px rgba(0,0,0,0.4) !important;
}

.tl-product-badges {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tl-info-badge {
  border: 1px solid var(--tl-gray);
  border-radius: 8px;
  padding: 12px;
}

.tl-info-badge strong {
  display: block;
  font-size: 13px;
  color: var(--tl-blue);
  margin-bottom: 4px;
}

.tl-info-badge small {
  font-size: 11px;
  color: var(--tl-text-light);
  line-height: 1.4;
}


.tl-brand-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tl-brand-badge img {
  flex-shrink: 0;
}
.tl-brand-badge div {
  display: flex;
  flex-direction: column;
}

/* Related Products — mismo bloque azul que "Códigos y Recargas" del home */
.tl-related-products-section {
  margin-top: 40px;
}

.tl-related-products-header .tl-related-subtitle {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 4px;
}

.tl-related-products-header .tl-related-title {
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  text-transform: uppercase;
  margin: 0;
}

/* Carrusel: 2 productos visibles, flechas arriba */
.tl-related-products-header .tl-carousel-nav-related {
  margin-left: auto;
}

.tl-related-carousel-wrapper {
  overflow: hidden;
  position: relative;
}

.tl-related-carousel-wrapper .tl-related-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 20px;
  transition: transform 0.4s ease;
  will-change: transform;
}

/* Desktop: 3 productos visibles */
.tl-related-carousel-wrapper .tl-related-grid .product-card {
  flex: 0 0 calc((100% - 40px) / 3);
  min-width: 0;
  max-width: none;
  text-decoration: none;
  color: inherit;
}

.tl-related-products-section .tl-carousel-dots {
  margin-top: 20px;
}

.tl-related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Override product-card sizing inside related grid (when not carousel) */
.tl-related-grid .product-card {
  min-width: unset;
  max-width: unset;
  width: 100%;
  text-decoration: none;
  color: inherit;
}
.tl-related-grid .product-card-image {
  background: #ffffff;
  padding: 24px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  aspect-ratio: 1 / 1;
}
.tl-related-grid .product-card-image img {
  max-height: 160px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.tl-related-grid .product-card-body {
  padding: 12px 14px;
}
.tl-related-grid .product-card-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
  color: var(--tl-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tl-related-grid .product-card-price {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.tl-related-grid .price-current {
  font-size: 20px;
  font-weight: 700;
  color: var(--tl-orange);
}
.tl-related-grid .price-original {
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
}
.tl-related-grid .badge-offer {
  font-size: 11px;
  background: var(--tl-green);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

@media (max-width: 767px) {
  .tl-product-main {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .tl-product-badges {
    grid-template-columns: 1fr;
  }
  .tl-related-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  /* Móvil: 2 productos visibles */
  .tl-related-carousel-wrapper .tl-related-grid {
    gap: 10px;
  }
  .tl-related-carousel-wrapper .tl-related-grid .product-card {
    flex: 0 0 calc((100% - 10px) / 2);
  }
  .tl-related-grid .product-card-image {
    min-height: 140px;
    padding: 16px 10px;
  }
  .tl-related-grid .product-card-image img {
    max-height: 120px;
  }
  .tl-related-grid .product-card-body {
    padding: 8px 10px;
  }
  .tl-related-grid .price-current {
    font-size: 16px;
  }
}

/* ===== FOOTER ===== */
.tl-footer {
  background: var(--tl-white);
  padding: 40px 20px 20px;
  border-top: 1px solid var(--tl-gray);
}

.tl-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 30px;
}

.tl-footer-col h4 {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--tl-text);
}

.tl-footer-col a {
  display: block;
  font-size: 13px;
  color: var(--tl-text-light);
  margin-bottom: 8px;
  transition: color 0.2s;
}

.tl-footer-col a:hover {
  color: var(--tl-blue);
}

.tl-footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tl-footer-social a svg {
  width: 18px;
  height: 18px;
  fill: var(--tl-blue);
}

.tl-footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid var(--tl-gray);
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.tl-footer-logo img {
  height: 40px;
  object-fit: contain;
}

/* ===== WHATSAPP FLOAT ===== */
.tl-whatsapp,
.tl-whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: var(--tl-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37,211,102,0.4);
  z-index: 9999;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tl-whatsapp:hover,
.tl-whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37,211,102,0.6);
}

.tl-whatsapp svg,
.tl-whatsapp-float svg {
  width: 28px;
  height: 28px;
  fill: var(--tl-white);
}

/* ===== WooCommerce Overrides ===== */
.woocommerce ul.products li.product {
  background: var(--tl-white);
  border-radius: var(--tl-radius);
  box-shadow: var(--tl-shadow);
  padding: 16px;
  transition: transform 0.2s;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-4px);
  box-shadow: var(--tl-shadow-hover);
}

.woocommerce ul.products li.product .price {
  color: var(--tl-orange) !important;
  font-weight: 700;
}

.woocommerce ul.products li.product .button {
  background: var(--tl-blue) !important;
  color: var(--tl-white) !important;
  border-radius: 6px !important;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 600 !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .brand-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .tl-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .tl-header {
    height: 60px;
  }
  .tl-header-inner {
    padding: 0;
  }
  .tl-logo {
    width: auto;
    padding: 0 12px;
    flex: 1;
  }
  .tl-nav-menus {
    display: none;
  }
  .tl-header-icons .tl-header-icon,
  .tl-header-icons .tl-currency-selector {
    width: 50px;
    height: 60px;
  }
  .tl-logo-text {
    font-size: 16px;
  }
  .brand-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .brand-card img {
    width: 88px;
    height: 88px;
  }
  .tl-products-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .product-card {
    min-width: calc((100% - 12px) / 2);
    max-width: calc((100% - 12px) / 2);
  }
  .product-card-image {
    min-height: 180px;
    padding: 24px 12px;
  }
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .tl-footer-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  .tl-hero h2 {
    font-size: 22px;
  }
}

@media (max-width: 480px) {
  .brand-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tl-footer-inner {
    grid-template-columns: 1fr;
  }
}

/* ===== PAGE HEADER ===== */
.tl-page-header {
  background: var(--tl-blue-gradient);
  color: white;
  padding: 30px 0;
}
.tl-page-header--compact {
  padding: 15px 0;
}
.tl-page-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 10px 0 0;
}
.breadcrumbs {
  font-size: 13px;
  opacity: 0.85;
}
.breadcrumbs a {
  color: white;
  text-decoration: none;
}
.breadcrumbs a:hover {
  text-decoration: underline;
}
.breadcrumbs span {
  margin: 0 4px;
}
.brand-header {
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand-header-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
  background: white;
  border-radius: 12px;
  padding: 8px;
}

/* ===== CATALOG LAYOUT (legacy — shop now uses css/shop.css) ===== */
.tl-catalog {
  padding: 30px 0 60px;
}
.catalog-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}
.catalog-sidebar {
  display: none !important;
}
.catalog-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}
.results-count {
  color: var(--tl-gray);
  font-size: 14px;
  margin: 0;
}
.catalog-sort select,
.catalog-sort .woocommerce-ordering select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  background: white;
}

/* ===== SIDEBAR ===== */
.catalog-sidebar {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 100px;
}
.sidebar-widget {
  margin-bottom: 25px;
}
.sidebar-widget:last-child {
  margin-bottom: 0;
}
.sidebar-widget h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--tl-text);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--tl-blue);
}
.sidebar-categories,
.sidebar-brands {
  list-style: none;
  padding: 0;
  margin: 0;
}
.sidebar-categories li,
.sidebar-brands li {
  margin-bottom: 2px;
}
.sidebar-categories a,
.sidebar-brands a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: var(--tl-text);
  text-decoration: none;
  font-size: 14px;
  border-radius: 6px;
  transition: all 0.2s;
}
.sidebar-categories a:hover,
.sidebar-brands a:hover,
.sidebar-categories a.active {
  background: #EBF5FF;
  color: var(--tl-blue);
}
.sidebar-categories .count {
  margin-left: auto;
  color: #999;
  font-size: 12px;
}
.sidebar-brand-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  border-radius: 4px;
}

/* ===== PRODUCTS GRID (shared/legacy) ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.product-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: var(--tl-text);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}
.product-card-image {
  position: relative;
  aspect-ratio: 1;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card-image img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.product-no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
}
.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.product-badge.sale {
  background: var(--tl-orange);
  color: white;
}
.product-card-info {
  padding: 15px;
  flex: 1;
}
.product-card-info h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--tl-blue);
}
.product-price del {
  font-size: 13px;
  color: #999;
  font-weight: 400;
}
.product-price ins {
  text-decoration: none;
  color: #e44;
}
.product-add-cart {
  display: block;
  width: calc(100% - 30px);
  margin: 0 15px 15px;
  padding: 10px;
  background: var(--tl-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.product-add-cart:hover {
  background: var(--tl-blue-dark);
}

/* ===== NO PRODUCTS ===== */
.no-products {
  text-align: center;
  padding: 30px 20px 30px;
  margin-top: 40px;
}
.no-products h2 {
  color: var(--tl-text);
  margin: 20px 0 10px;
}
.no-products p {
  color: var(--tl-gray);
}
.btn-primary {
  display: inline-block;
  padding: 12px 30px;
  background: var(--tl-blue);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  margin-top: 15px;
  transition: background 0.2s;
}
.btn-primary:hover {
  background: var(--tl-blue-dark);
  color: white;
}

/* ===== SINGLE PRODUCT ===== */
.tl-single-product {
  padding: 30px 0 60px;
}
.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.product-gallery {
  position: sticky;
  top: 100px;
  height: fit-content;
}
.product-main-image {
  position: relative;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0; /* Padding quitado en PC para que la imagen use todo el espacio */
}

@media (max-width: 768px) {
  .product-main-image img {
    padding: 20px; /* Mantenemos el padding en móviles para que no se pegue a los bordes de la pantalla */
  }
}
.product-no-image--large {
  min-height: 400px;
}
.product-badge--large {
  font-size: 14px;
  padding: 6px 16px;
}
.product-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}
.product-thumb {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s;
}
.product-thumb.active,
.product-thumb:hover {
  border-color: var(--tl-blue);
}
.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product Info */
.product-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--tl-blue);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}
.product-brand-link:hover {
  text-decoration: underline;
}
.product-brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
}
.product-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--tl-text);
  margin: 0 0 20px;
  line-height: 1.3;
}
.product-price-box {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.price-current {
  font-size: 32px;
  font-weight: 800;
  color: var(--tl-orange);
}
.price-original {
  font-size: 18px;
  color: #999;
  text-decoration: line-through;
  margin-right: 10px;
}
.price-sale {
  font-size: 32px;
  font-weight: 800;
  color: #e44;
}
.price-savings {
  display: block;
  font-size: 13px;
  color: #28a745;
  font-weight: 600;
  margin-top: 5px;
}
.product-short-desc {
  color: var(--tl-gray);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 20px;
}
.product-features {
  margin-bottom: 25px;
}
.product-features .feature {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--tl-text);
}

/* Add to Cart */
.product-actions form {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 25px;
}
.quantity-selector {
  display: flex;
  align-items: center;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}
.qty-btn {
  width: 40px;
  height: 44px;
  border: none;
  background: #f5f5f5;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s;
}
.qty-btn:hover {
  background: #e0e0e0;
}
.qty-input {
  width: 50px;
  height: 44px;
  border: none;
  text-align: center;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 600;
  -moz-appearance: textfield;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.btn-add-to-cart,
.single_add_to_cart_button,
.woocommerce button.button.alt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 30px;
  background: var(--tl-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-add-to-cart:hover,
.single_add_to_cart_button:hover,
.woocommerce button.button.alt:hover {
  background: #e04d00;
}
.out-of-stock {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
}
.out-of-stock span {
  font-size: 18px;
  font-weight: 700;
  color: #856404;
}
.product-meta-info {
  border-top: 1px solid #eee;
  padding-top: 15px;
}
.meta-row {
  font-size: 13px;
  color: var(--tl-gray);
  margin-bottom: 5px;
}
.meta-label {
  font-weight: 600;
  color: var(--tl-text);
  margin-right: 5px;
}
.meta-row a {
  color: var(--tl-blue);
  text-decoration: none;
}

/* Product Tabs */
.product-tabs {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
  margin-bottom: 40px;
}
.tab-headers {
  display: flex;
  border-bottom: 2px solid #eee;
}
.tab-header {
  padding: 15px 25px;
  border: none;
  background: none;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--tl-gray);
  cursor: pointer;
  position: relative;
}
.tab-header.active {
  color: var(--tl-blue);
}
.tab-header.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--tl-blue);
}
.tab-content {
  padding: 25px;
  line-height: 1.7;
  color: var(--tl-gray);
}
.related-products h2 {
  font-size: 22px;
  margin-bottom: 20px;
}

/* ===== STATIC PAGES ===== */
.tl-page-content {
  padding: 40px 0 60px;
}
.page-body {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 40px;
  max-width: 800px;
  line-height: 1.7;
  color: var(--tl-gray);
}
/* Checkout y cart: ancho completo sin card — contenedores internos al 100% del .tl-container (1280px) */
body.woocommerce-checkout .tl-page-content,
body.woocommerce-checkout .page-body,
body.woocommerce-checkout .woocommerce-page-body,
body.woocommerce-checkout .woocommerce-page-body .woocommerce {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}
.woocommerce-checkout .page-body,
.woocommerce-cart .page-body {
  max-width: 100% !important;
  width: 100% !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin-top: 0 !important;
}
.page-body h2 {
  color: var(--tl-text);
  margin-top: 30px;
}
.page-body a {
  color: var(--tl-blue);
}

/* ===== WooCommerce Overrides ===== */
.woocommerce-ordering {
  margin: 0 !important;
}
.woocommerce-result-count {
  display: none;
}
.woocommerce .quantity .qty {
  width: 50px;
}

/* ===== RESPONSIVE: catalog & product ===== */
@media (max-width: 1024px) {
  .catalog-layout {
    grid-template-columns: 200px 1fr;
  }
  .product-layout {
    grid-template-columns: 1fr 1fr;
    gap: 25px;
  }
}
@media (max-width: 768px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }
  .catalog-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-layout {
    grid-template-columns: 1fr;
  }
  .product-gallery {
    position: static;
  }
}
@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
  .catalog-sidebar {
    grid-template-columns: 1fr;
  }
  .product-actions form {
    flex-direction: column;
  }
  .btn-add-to-cart,
.single_add_to_cart_button,
.woocommerce button.button.alt {
    width: 100%;
  }
}

/* ===== WOOCOMMERCE PAGES (Cart, Account, Checkout) ===== */
/* Global container for WC pages */
.tl-page-content .tl-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

/* Checkout: mismo ancho que el menú — .tl-container limita a 1280px como el header, contenido al 100% dentro */
.woocommerce-checkout .tl-page-content .tl-container,
.woocommerce-checkout .tl-container {
  max-width: 1280px;
  width: 100%;
  padding: 0 40px;
  margin: 0 auto;
  box-sizing: border-box;
}

.woocommerce-page-body {
  max-width: 100%;
}
.woocommerce-page-body .woocommerce {
  padding: 20px 0;
}

/* Cart page: center and full width table */
.woocommerce-cart .woocommerce-page-body .woocommerce {
  max-width: 960px;
  margin: 0 auto;
  padding-top: 0 !important;
}

/* Checkout: 2 columnas; la derecha minmax(0,400px) para que no cause overflow horizontal */
body.woocommerce-checkout form.woocommerce-checkout,
.woocommerce-checkout form.woocommerce-checkout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
  gap: 0 24px;
  align-items: start;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0;
  box-sizing: border-box;
}
/* Ensure billing form stretches full width */
.woocommerce-checkout #customer_details,
.woocommerce-checkout .woocommerce-billing-fields,
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper,
.woocommerce-checkout .woocommerce-additional-fields,
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row {
  width: 100% !important;
  max-width: 100% !important;
}
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper input,
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper select,
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .select2-container,
.woocommerce-checkout .woocommerce-additional-fields textarea {
  width: 100% !important;
  max-width: 100% !important;
}
/* Left column: billing + additional fields */
.woocommerce-checkout #customer_details {
  grid-column: 1;
  grid-row: 1 / 3;
}
.woocommerce-checkout .col2-set .col-1 {
  width: 100% !important;
  float: none !important;
  padding: 0 !important;
}
.woocommerce-checkout .col2-set .col-2 {
  width: 100% !important;
  float: none !important;
  padding: 0 !important;
}
/* Right column: order review (sticky) */
.woocommerce-checkout #order_review_heading {
  grid-column: 2;
  grid-row: 1;
  margin: 0 0 12px 0;
  padding-top: 10px;
}
.woocommerce-checkout #order_review {
  grid-column: 2;
  grid-row: 2;
  background: #f8f9fa;
  padding: 24px;
  border-radius: 12px;
  position: sticky;
  top: 20px;
}
/* Billing fields grid */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-wide {
  grid-column: 1 / -1;
}
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-first {
  grid-column: 1;
}
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-last {
  grid-column: 2;
}
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper input,
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper select,
.woocommerce-checkout .woocommerce-additional-fields textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
}
.woocommerce-checkout .woocommerce-info {
  grid-column: 1 / -1;
}
@media (max-width: 768px) {
  .woocommerce-checkout form.woocommerce-checkout {
    grid-template-columns: 1fr;
  }
  .woocommerce-checkout #order_review_heading {
    grid-column: 1;
    grid-row: auto;
  }
  .woocommerce-checkout #order_review {
    grid-column: 1;
    grid-row: auto;
    position: static;
  }
  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    grid-template-columns: 1fr;
  }
}
.woocommerce table.shop_table {
  border-collapse: collapse;
  width: 100%;
  border: 1px solid #eee;
  border-radius: 8px;
}
.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
}
.woocommerce table.shop_table th {
  background: #f8f9fa;
  font-weight: 600;
}
.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button {
  background: var(--tl-blue) !important;
  color: white !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 12px 24px !important;
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: background 0.2s;
}
.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce a.button:hover {
  background: var(--tl-blue-dark) !important;
}
.woocommerce .woocommerce-MyAccount-navigation ul {
  list-style: none;
  padding: 0;
}
.woocommerce .woocommerce-MyAccount-navigation ul li {
  margin-bottom: 2px;
}
.woocommerce .woocommerce-MyAccount-navigation ul li a {
  display: block;
  padding: 10px 15px;
  border-radius: 6px;
  color: var(--tl-text);
  transition: all 0.2s;
}
.woocommerce .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce .woocommerce-MyAccount-navigation ul li a:hover {
  background: var(--tl-blue);
  color: white;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 10px 12px;
  font-family: 'Montserrat', sans-serif;
}
.woocommerce form .form-row input.input-text:focus {
  border-color: var(--tl-blue);
  outline: none;
  box-shadow: 0 0 0 2px rgba(66,139,202,0.2);
}
.woocommerce-message,
.woocommerce-info {
  border-top-color: var(--tl-blue) !important;
}
.woocommerce-message::before,
.woocommerce-info::before {
  color: var(--tl-blue) !important;
}
.woocommerce-error {
  border-top-color: #e44 !important;
}

/* ===== INFO PAGES (Cómo Comprar, FAQ, Políticas, Contacto) ===== */
.tl-page-hero {
  background: linear-gradient(135deg, var(--tl-blue) 0%, var(--tl-dark) 100%);
  color: white;
  padding: 60px 20px 40px;
  text-align: center;
}
.tl-page-hero span {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.8;
}
.tl-page-hero h1 {
  font-size: 36px;
  font-weight: 800;
  margin: 10px 0 0;
}
.tl-info-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

/* Steps */
.tl-steps {
  margin-bottom: 40px;
}
.tl-step {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid #eee;
}
.tl-step:last-child { border-bottom: none; }
.tl-step-number {
  width: 50px;
  height: 50px;
  background: var(--tl-blue);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  flex-shrink: 0;
}
.tl-step-content h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--tl-dark);
}
.tl-step-content p {
  margin: 0;
  color: #555;
  line-height: 1.6;
}

/* Info boxes */
.tl-info-box {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 28px;
  margin: 24px 0;
  border-left: 4px solid var(--tl-blue);
}
.tl-info-box.tl-info-important {
  border-left-color: var(--tl-orange);
  background: #fff8f0;
}
.tl-info-box h3 {
  margin: 0 0 12px;
  color: var(--tl-dark);
}
.tl-info-box ul {
  margin: 0;
  padding-left: 20px;
}
.tl-info-box li {
  margin: 8px 0;
  color: #555;
  line-height: 1.5;
}
.tl-info-table {
  width: 100%;
  border-collapse: collapse;
}
.tl-info-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #ddd;
  color: #555;
}
.tl-info-table tr:last-child td { border-bottom: none; }

/* FAQ */
.tl-faq-list { margin-bottom: 40px; }
.tl-faq-item {
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}
.tl-faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: white;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: var(--tl-dark);
  text-align: left;
  transition: background 0.2s;
}
.tl-faq-question:hover { background: #f5f5f5; }
.tl-faq-arrow {
  transition: transform 0.3s;
  font-size: 12px;
  color: #999;
}
.tl-faq-item.open .tl-faq-arrow { transform: rotate(180deg); }
.tl-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 20px;
}
.tl-faq-item.open .tl-faq-answer {
  max-height: 500px;
  padding: 0 20px 16px;
}
.tl-faq-answer p {
  color: #555;
  line-height: 1.6;
  margin: 0;
}

/* Policy sections */
.tl-policy-section {
  margin-bottom: 36px;
  padding-bottom: 30px;
  border-bottom: 1px solid #eee;
}
.tl-policy-section:last-of-type { border-bottom: none; }
.tl-policy-section h2 {
  font-size: 22px;
  color: var(--tl-dark);
  margin: 0 0 14px;
}
.tl-policy-section ul {
  padding-left: 20px;
}
.tl-policy-section li {
  margin: 10px 0;
  color: #555;
  line-height: 1.6;
}

/* Contact grid */
.tl-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.tl-contact-card {
  background: white;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  transition: box-shadow 0.2s;
}
.tl-contact-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.tl-contact-icon {
  font-size: 40px;
  margin-bottom: 12px;
}
.tl-contact-card h3 {
  margin: 0 0 8px;
  color: var(--tl-dark);
}
.tl-contact-card p {
  color: #777;
  margin: 0 0 16px;
  font-size: 14px;
}
.tl-btn-primary {
  display: inline-block;
  background: var(--tl-blue);
  color: white !important;
  padding: 10px 24px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
}
.tl-btn-primary:hover { background: var(--tl-dark); }
.tl-btn-secondary {
  display: inline-block;
  border: 2px solid var(--tl-blue);
  color: var(--tl-blue) !important;
  padding: 8px 22px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}
.tl-btn-secondary:hover {
  background: var(--tl-blue);
  color: white !important;
}

/* Responsive info pages */
@media (max-width: 768px) {
  .tl-page-hero h1 { font-size: 26px; }
  .tl-contact-grid { grid-template-columns: 1fr; }
  .tl-step { flex-direction: column; gap: 12px; }
  .tl-step-number { width: 40px; height: 40px; font-size: 18px; }
}

/* ===== CHECKOUT STYLING ===== */
.woocommerce-checkout .tl-page-hero { display: none; }
.woocommerce form.checkout {
  max-width: 100%;
  padding: 30px 0;
}
/* #payment base styles moved to checkout section below */
/* #place_order styles consolidated in checkout section below */

/* ===== SEARCH OVERLAY ===== */
.tl-search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,20,40,0.92);
  z-index: 10000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.tl-search-overlay.active {
  opacity: 1;
  visibility: visible;
}
.tl-search-container {
  width: 90%;
  max-width: 600px;
  position: relative;
}
.tl-search-form {
  display: flex;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}
.tl-search-form input[type="text"] {
  flex: 1;
  padding: 18px 24px;
  font-size: 18px;
  border: none;
  outline: none;
  font-family: 'Montserrat', sans-serif;
}
.tl-search-form button {
  background: var(--tl-blue);
  border: none;
  padding: 18px 24px;
  cursor: pointer;
  transition: background 0.2s;
}
.tl-search-form button:hover {
  background: var(--tl-dark);
}
.tl-search-close {
  position: absolute;
  top: -50px;
  right: 0;
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.tl-search-close:hover { opacity: 1; }

/* ==========================================================================
   WooCommerce Order Detail / Checkout — Fix gray text on white bg
   ========================================================================== */
.woocommerce-order-details th,
.woocommerce-order-details td,
.woocommerce-table--order-details th,
.woocommerce-table--order-details td,
.woocommerce-order-overview li,
.woocommerce-order-overview li strong,
.woocommerce-customer-details th,
.woocommerce-customer-details td,
.woocommerce-customer-details address,
.order_details th,
.order_details td,
.shop_table th,
.shop_table td,
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td,
.woocommerce-thankyou-order-received,
.woocommerce-notice,
.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
.woocommerce-order-overview,
.wc-bacs-bank-details,
.wc-bacs-bank-details-account-name {
    color: #333 !important;
}

.woocommerce-order-details .product-name a,
.woocommerce-table--order-details .product-name a {
    color: #2a6fa0 !important;
}

.woocommerce-order-overview li {
    color: #555 !important;
}

.woocommerce-order-overview li strong {
    color: #1a2332 !important;
}

/* ===== Partner Badges (Microsoft/Trustpilot) ===== */
.tl-partner-badges {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
  border: 1px solid #c8e1f8;
  border-radius: 10px;
}
.tl-partner-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.tl-partner-badge img {
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.tl-partner-badge:hover img {
  opacity: 0.8;
}
@media (max-width: 600px) {
  .tl-partner-badges {
    flex-direction: column;
    gap: 12px;
  }
}

/* ===== Mobile: use full screen width, minimal padding ===== */
@media (max-width: 768px) {
  /* Global container — tight padding */
  .tl-page-content .tl-container {
    padding: 0 10px !important;
    max-width: 100% !important;
  }
  
  /* WC page body */
  .woocommerce-page-body {
    padding: 8px 0 !important;
  }
  .woocommerce-page-body .woocommerce {
    padding: 10px 0 !important;
  }
  
  /* Cart page */
  .woocommerce-cart .woocommerce-page-body {
    padding: 0 !important;
  }
  .woocommerce table.shop_table {
    margin: 0 !important;
  }
  .woocommerce .cart-collaterals {
    padding: 0 10px !important;
  }
  
  /* Checkout */
  .woocommerce-checkout form.woocommerce-checkout {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 0 !important;
  }
  .woocommerce-checkout .woocommerce-info {
    margin: 0 0 12px 0 !important;
    font-size: 13px;
  }
  .woocommerce-checkout #order_review {
    padding: 16px 12px !important;
    margin: 0 !important;
    border-radius: 8px;
  }
  .woocommerce-checkout h3 {
    font-size: 18px !important;
    margin: 16px 0 8px !important;
  }
  .woocommerce-checkout .form-row {
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
  }
  .woocommerce-checkout label {
    font-size: 13px !important;
  }
  
  /* Dashboard / My Account */
  .page-id-8 .page-body,
  .woocommerce-account .page-body {
    max-width: 100% !important;
    padding: 10px !important;
  }
  .woocommerce-MyAccount-content {
    padding: 0 !important;
  }
  
  /* Remove all top spacing on WC pages */
  .tl-page-content {
    padding: 4px 0 !important;
  }
  .tl-page-header {
    padding: 12px 10px !important;
  }
  .tl-page-header h1 {
    font-size: 18px !important;
    margin: 0 !important;
  }
  .page-body,
  .woocommerce-page-body {
    padding: 10px 0 !important;
  }
  
  /* General WC elements */
  .woocommerce .woocommerce-result-count,
  .woocommerce .woocommerce-ordering {
    padding: 0 10px !important;
  }
  
  /* Buttons full width on mobile */
  .woocommerce .checkout-button,
  .woocommerce .button.alt {
    width: 100% !important;
    padding: 14px !important;
    font-size: 16px !important;
  }
  /* Checkout mobile: stacked */
  .woocommerce-checkout .tl-container,
  .woocommerce-checkout .tl-page-content .tl-container {
    padding: 0 16px !important;
  }
}

/* ===== CHECKOUT — TEXT COLORS & PAYMENT METHODS ===== */

/* Labels y texto en checkout — negro claro, legible */
.woocommerce-checkout label,
.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-additional-fields h3,
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review h3,
.woocommerce-checkout .shop_table th,
.woocommerce-checkout .shop_table td,
.woocommerce-checkout abbr[title] {
  color: #222 !important;
}

/* Subtítulos de sección */
.woocommerce-checkout h3 {
  color: #1a1a1a !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  margin-bottom: 16px !important;
}

/* Payment method styles consolidated in the checkout section below */

/* Payssion — selector de métodos */
.tl-payssion-methods {
  color: #222 !important;
}
.tl-payssion-country-group strong {
  color: #888 !important;
  font-size: 11px !important;
}
.tl-payssion-options label {
  color: #222 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  border: 2px solid #e0e0e0 !important;
  border-radius: 8px !important;
  padding: 8px 14px !important;
  cursor: pointer !important;
  transition: border-color 0.2s, background 0.2s !important;
}
.tl-payssion-options label:has(input:checked) {
  border-color: var(--tl-blue) !important;
  background: #f0f6ff !important;
}

/* #place_order styles consolidated in checkout section below */

/* Totals en order review */
.woocommerce-checkout .woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout .woocommerce-checkout-review-order-table .order-total td {
  color: #111 !important;
  font-weight: 700 !important;
  font-size: 16px !important;
}

/* Nota de privacidad */
.woocommerce-checkout .woocommerce-privacy-policy-text {
  font-size: 11px !important;
  color: #888 !important;
}
.woocommerce-checkout .woocommerce-privacy-policy-text a {
  color: var(--tl-blue) !important;
}

/* ===== CARRITO ===== */
.tl-cart-hero {
  background: #0b3879;
  margin-top: 0 !important;
}

.woocommerce-cart .tl-page-header {
  display: none !important;
}

.woocommerce-cart .tl-page-content,
.woocommerce-cart .site-content,
.woocommerce-cart .page-content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.woocommerce-cart .tl-page-content .tl-container {
  padding-top: 0 !important;
}

.woocommerce-cart .page-body {
  padding-top: 0 !important;
}

body.woocommerce-cart {
  --tl-cart-header-gap: 0px;
}

.tl-cart-page {
  background: #f4f7fb;
  padding: 8px 0 48px;
}

.tl-cart-table-wrap {
  background: #ffffff;
  border: 1px solid #d9e5f2;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(11,56,121,0.08);
}

.tl-cart-table thead th {
  background: #eef5ff;
  color: #0b3879;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tl-cart-table tbody td {
  vertical-align: middle;
  border-top: 1px solid #edf2f7;
}

.tl-cart-table .product-thumbnail {
  width: 140px;
}

.tl-cart-table td.product-thumbnail,
.tl-cart-table th.product-thumbnail {
  min-width: 140px;
}

.tl-cart-brand-thumb {
  width: 132px !important;
  height: 132px !important;
  max-width: 132px !important;
  object-fit: contain;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid #dbe7f5;
  padding: 10px;
  box-shadow: 0 4px 14px rgba(11,56,121,0.06);
  display: block;
}

.tl-cart-table .product-name a {
  color: #0b3879;
  font-weight: 700;
}

.tl-cart-table .product-price,
.tl-cart-table .product-subtotal {
  color: #ff6b00;
  font-weight: 800;
}

.tl-cart-table .quantity .qty {
  border: 1px solid #cfe0f5;
  border-radius: 10px;
  min-height: 42px;
}

.tl-cart-table .actions {
  background: #f8fbff;
}

.tl-cart-table .button,
.tl-cart-collaterals .button,
.tl-cart-page .wc-proceed-to-checkout a.checkout-button {
  background: var(--tl-orange) !important;
  border-color: var(--tl-orange) !important;
  color: #fff !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
}

.tl-cart-table button[name="update_cart"] {
  display: none !important;
}

.tl-cart-table .button:hover,
.tl-cart-collaterals .button:hover,
.tl-cart-page .wc-proceed-to-checkout a.checkout-button:hover {
  background: #e04d00 !important;
  border-color: #e04d00 !important;
}

.tl-cart-collaterals .cart_totals {
  background: #ffffff;
  border: 1px solid #d9e5f2;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(11,56,121,0.08);
}

@media (max-width: 768px) {
  .tl-cart-page {
    padding: 20px 0 36px;
  }

  .tl-cart-table .product-thumbnail {
    width: 96px;
  }

  .tl-cart-table td.product-thumbnail,
  .tl-cart-table th.product-thumbnail {
    min-width: 96px;
  }

  .tl-cart-brand-thumb {
    width: 88px !important;
    height: 88px !important;
    max-width: 88px !important;
    border-radius: 14px;
    padding: 8px;
    margin-left: auto;
  }

  .tl-cart-table td.product-thumbnail,
  .tl-cart-table td.product-thumbnail a {
    display: block !important;
  }

  .tl-cart-table td.product-thumbnail::before {
    display: none !important;
  }
}

.woocommerce-checkout .tl-page-header {
  display: none !important;
}

.woocommerce-checkout .tl-page-content,
.woocommerce-checkout .tl-page-content .tl-container,
.woocommerce-checkout .page-body {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

.woocommerce-checkout .page-body {
  padding: 0 !important;
}

.woocommerce-checkout .woocommerce-page-body .woocommerce {
  padding-top: 0 !important;
}

@media (min-width: 769px) {
  .woocommerce-checkout form.woocommerce-checkout {
    background: #f4f7fb;
    padding: 24px 0 40px;
    max-width: 100% !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 400px) !important;
    gap: 0 24px !important;
    width: 100%;
    box-sizing: border-box;
  }
}

.woocommerce-checkout #customer_details {
  padding-right: 0;
}

.woocommerce-checkout #customer_details > div,
.woocommerce-checkout #order_review {
  background: #ffffff;
  border: 1px solid #d9e5f2;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(11,56,121,0.08);
}

.woocommerce-checkout #customer_details > div {
  padding: 20px 22px;
}

.woocommerce-checkout #customer_details .woocommerce-billing-fields,
.woocommerce-checkout #customer_details .woocommerce-shipping-fields,
.woocommerce-checkout .woocommerce-additional-fields {
  margin-top: 0;
}

.woocommerce-checkout #customer_details .form-row {
  margin-bottom: 6px;
}

.woocommerce-checkout #order_review {
  padding: 8px 10px 10px;
}

.woocommerce-checkout h3 {
  color: #0b3879;
  margin: 0 0 2px;
}

.woocommerce-checkout .form-row input,
.woocommerce-checkout .form-row select,
.woocommerce-checkout .form-row textarea {
  border: 1px solid #cfe0f5;
  border-radius: 12px;
  min-height: 46px;
}

.tl-checkout-item-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.woocommerce-checkout-review-order-table .product-name {
  vertical-align: top;
}

.tl-review-product {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.tl-review-product-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
}

.tl-review-product-title {
  font-weight: 700;
  color: #0b3879;
}

.tl-review-product-qty {
  margin-top: 4px;
  color: #5f6f85;
  font-weight: 600;
}

.tl-checkout-brand-thumb,
.woocommerce-checkout-review-order-table .product-name .tl-cart-brand-thumb {
  width: 80px !important;
  height: 80px !important;
  max-width: 80px !important;
  object-fit: contain !important;
  background: #fff !important;
  border: 1px solid #dbe7f5 !important;
  border-radius: 8px !important;
  padding: 4px !important;
  box-shadow: 0 4px 14px rgba(11,56,121,0.06) !important;
  flex-shrink: 0;
  align-self: flex-start;
}

.tl-review-product img.tl-checkout-product-thumb {
  width: 80px !important;
  height: auto !important;
  max-width: 80px !important;
  object-fit: contain !important;
  border-radius: 8px !important;
  border: 1px solid #dbe7f5 !important;
  padding: 4px !important;
  background: #fff !important;
  flex-shrink: 0;
}

.woocommerce-checkout-review-order-table .product-name {
  color: #0b3879;
  font-weight: 700;
}

.woocommerce-checkout-review-order-table .amount,
.woocommerce-checkout-review-order-table .order-total td,
.woocommerce-checkout-review-order-table .cart-subtotal td {
  color: #111111 !important;
  font-weight: 800;
}

.woocommerce-checkout #payment {
  background: #f8fbff !important;
  border: 1px solid #d9e5f2;
  border-radius: 18px;
  margin-top: 10px;
}

.woocommerce-checkout #payment ul.payment_methods {
  padding: 14px 14px 6px !important;
}

.woocommerce-checkout #payment ul.payment_methods li {
  border: 1px solid #dbe7f5;
  border-radius: 14px;
  background: #fff;
  margin-bottom: 12px;
  padding: 12px 14px;
  transition: background 0.15s, border-color 0.15s;
}
.woocommerce-checkout #payment ul.payment_methods li:hover {
  background: #f8faff;
  border-color: #c5d8f0;
}

.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method > label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 15px;
  color: #0b3879;
  vertical-align: middle;
  margin: 0;
  cursor: pointer;
}

.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method > input[type="radio"] {
  flex: 0 0 auto;
  margin: 0 8px 0 0;
  accent-color: var(--tl-blue);
  width: 18px;
  height: 18px;
}

.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method > .payment_box,
.woocommerce-checkout #payment ul.payment_methods > li.wc_payment_method > #tl-fee-notice {
  width: 100%;
}

/* Payment method badge icons — unified sizing for all gateways */
.woocommerce-checkout #payment ul.payment_methods li img {
  height: 32px;
  max-height: 40px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  flex-shrink: 0;
}

.woocommerce-checkout #payment .payment_box {
  margin-top: 10px !important;
  padding: 12px 14px !important;
  border-radius: 12px;
  background: #f7fbff !important;
  border: 1px solid #d0e0ff;
  color: #333;
  font-size: 13px;
}
.woocommerce-checkout #payment .payment_box p {
  color: #333;
  margin: 0;
}

/* Botón "Realizar el pedido" — single source of truth */
.woocommerce-checkout #payment .button,
.woocommerce-checkout #place_order {
  background: var(--tl-orange) !important;
  border-color: var(--tl-orange) !important;
  color: #fff !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  padding: 16px 24px !important;
  width: 100% !important;
  letter-spacing: 0.5px !important;
  margin-top: 12px !important;
  transition: background 0.2s !important;
}

.woocommerce-checkout #payment .button:hover,
.woocommerce-checkout #place_order:hover {
  background: #e04d00 !important;
  border-color: #e04d00 !important;
}

@media (max-width: 768px) {
  .woocommerce-checkout form.woocommerce-checkout {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 10px 0 30px !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

  .woocommerce-checkout #customer_details,
  .woocommerce-checkout #order_review,
  .woocommerce-checkout #order_review_heading {
    width: 100% !important;
    max-width: 100% !important;
  }

  .woocommerce-checkout #customer_details {
    padding-right: 0;
  }

  .woocommerce-checkout #customer_details > div,
  .woocommerce-checkout #order_review {
    padding: 20px;
    border-radius: 16px;
  }

  .woocommerce-checkout-review-order-table .product-name img,
  .woocommerce-checkout-review-order-table .wc-item-meta img,
  .woocommerce-checkout-review-order-table .variation img,
  .woocommerce-checkout-review-order-table .product-name .tl-cart-brand-thumb,
  .tl-checkout-brand-thumb {
    width: 60px !important;
    height: auto !important;
    max-width: 60px !important;
  }
}

/* ===== CHECKOUT — Evitar desbordamiento horizontal ===== */
html:has(body.woocommerce-checkout),
body.woocommerce-checkout {
  overflow-x: hidden;
  max-width: 100%;
}
/* Hidden select2 elements cause horizontal overflow */
body.woocommerce-checkout .select2-hidden-accessible {
  position: absolute !important;
  width: 1px !important;
  overflow: hidden !important;
}
body.woocommerce-checkout .tl-page-content,
body.woocommerce-checkout .tl-container,
body.woocommerce-checkout .page-body,
body.woocommerce-checkout .woocommerce-page-body,
body.woocommerce-checkout .woocommerce-page-body .woocommerce,
body.woocommerce-checkout form.woocommerce-checkout {
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}
body.woocommerce-checkout .tl-page-content,
body.woocommerce-checkout .tl-container {
  width: 100%;
}
body.woocommerce-checkout form.woocommerce-checkout {
  min-width: 0;
}
body.woocommerce-checkout #customer_details,
body.woocommerce-checkout #order_review_heading,
body.woocommerce-checkout #order_review {
  min-width: 0;
  overflow-x: hidden;
}
/* Solo contenido del checkout (no header/footer): evita overflow sin cambiar tamaño de logos */
.woocommerce-checkout .tl-page-content img {
  max-width: 100%;
  height: auto;
}
.woocommerce-checkout .tl-page-content iframe,
.woocommerce-checkout .tl-page-content video {
  max-width: 100%;
  height: auto;
}

/* ===== CHECKOUT WRAPPER — sin hero, padding limpio ===== */
.tl-checkout-wrapper {
  padding: 30px 0 60px;
  background: #f4f6f9;
  min-height: 60vh;
}
.tl-checkout-wrapper .tl-container {
  max-width: 1280px;
  padding: 0 40px;
}
.tl-checkout-wrapper .page-body {
  max-width: 100% !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}
@media (max-width: 768px) {
  .tl-checkout-wrapper {
    padding: 16px 0 40px;
  }
  .tl-checkout-wrapper .tl-container {
    padding: 0 16px;
  }
}

/* ===== PAGOS MANUALES — Grid visual de logos ===== */
.tl-method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.tl-method-card {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  padding: 12px 8px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 64px;
}

.tl-method-card:hover {
  border-color: var(--method-color, #418eff);
  background: #f8f9ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.tl-method-card.selected {
  border-color: var(--method-color, #418eff);
  background: #f0f6ff;
  box-shadow: 0 0 0 3px rgba(65,142,255,0.15);
}

.tl-method-logo {
  height: 32px;
  width: auto;
  max-width: 90px;
  object-fit: contain;
}

.tl-method-name-text,
.tl-method-name-fallback {
  font-size: 12px;
  font-weight: 700;
  color: #333;
  text-align: center;
}

.tl-payment-info-box {
  background: #f8f9ff;
  border: 2px solid #418eff;
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 10px;
}

.tl-account-details {
  font-size: 14px;
  color: #222;
  line-height: 1.8;
  margin-bottom: 10px;
}

.tl-copy-details-btn {
  background: #418eff;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.tl-copy-details-btn:hover {
  background: #2a7aff;
}

.tl-amount-box {
  margin-top: 10px;
  padding: 10px 14px;
  background: #fff8e1;
  border: 1px solid #ffc107;
  border-radius: 8px;
  font-size: 14px;
  color: #555;
}

@media (max-width: 480px) {
  .tl-method-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tl-method-logo {
    height: 26px;
  }
}

/* ===== MI CUENTA — HERO BANNER ===== */
.woocommerce-account .tl-page-header {
  display: none !important; /* Quitamos el page-header genérico */
}
.woocommerce-account .tl-page-content {
  padding-top: 0 !important;
  background: #f4f6f9;
}

.tl-account-hero {
  background: #0b3879;
  padding: 24px 0 28px;
  color: white;
}
.tl-account-hero-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.tl-account-avatar {
  flex-shrink: 0;
}
.tl-avatar-img {
  border-radius: 50% !important;
  border: 3px solid rgba(255,255,255,0.4) !important;
  width: 56px !important;
  height: 56px !important;
}
.tl-account-hero-info {
  flex: 1;
}
.tl-account-hero-info h2 {
  margin: 0 0 4px !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  color: white !important;
}
.tl-account-hero-email {
  font-size: 13px;
  color: rgba(255,255,255,0.75);
}
.tl-account-hero-coins {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 15px;
  color: white;
}
.tl-account-hero-coins .tl-coin-icon {
  font-size: 20px;
}

/* Wrapper sin gap extra */
.woocommerce-account .tl-myaccount-wrapper {
  background: #f4f6f9;
  padding: 20px 0 40px;
}

@media (max-width: 768px) {
  .tl-account-hero {
    padding: 16px 0 20px;
  }
  .tl-account-hero-inner {
    gap: 10px;
  }
  .tl-account-hero-info h2 {
    font-size: 18px !important;
  }
  .tl-account-hero-coins {
    width: 100%;
    justify-content: center;
  }
}

/* ===== CUSTOM SVGS & EMOJI REPLACEMENTS ===== */
.tl-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  color: var(--tl-orange); /* Main accent color */
  margin-right: 6px;
  margin-top: -2px;
}
.tl-icon-small {
  width: 14px;
  height: 14px;
  color: var(--tl-orange);
}
.tl-info-badge strong {
  display: flex;
  align-items: center;
  color: var(--tl-dark-blue);
}
.tl-coins-reward .tl-icon,
.tl-coin-icon .tl-icon,
.tl-stat-icon .tl-icon {
  color: #F5A623; /* Un dorado chévere para las coins */
}
.tl-stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}
.tl-stat-icon .tl-icon {
  width: 32px;
  height: 32px;
}

/* ===== PAYMENT METHOD LOGOS HOMOGENEOUS LOOK ===== */
.tl-payment-grid, .tl-footer-payments {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
}

@media (max-width: 768px) {
  .tl-payment-grid, .tl-footer-payments {
    grid-template-columns: repeat(2, 1fr);
    max-width: 100% !important;
    overflow: hidden !important;
  }
  .woocommerce-checkout #payment {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
}

.tl-payment-logo-card {
  background: var(--tl-white);
  border: 1px solid var(--tl-gray);
  border-radius: var(--tl-radius-sm);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  height: 44px; 
}

.tl-payment-logo-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.tl-payment-logo-card img {
  max-height: 24px !important;
  max-width: 100% !important;
  width: auto !important;
  object-fit: contain !important;
  margin: 0 !important;
  display: block;
  opacity: 1 !important;
}

/* ===== HEADINGS EN AZUL OSCURO (Solo en contenido) ===== */
.tl-page-content h1,
.tl-page-content h2,
.tl-page-content h3,
.tl-page-content h4,
.product_title,
.woocommerce-loop-product__title,
.tl-info-badge strong,
#order_review_heading,
.woocommerce-billing-fields h3,
.woocommerce-additional-fields h3 {
  color: var(--tl-dark-blue) !important;
}

/* Protegemos los títulos que van sobre fondos azules/oscuros */
.tl-page-header h1,
.tl-account-hero h2,
.tl-account-hero h3,
.tl-footer-col h4,
.tl-footer-social h4 {
  color: #ffffff !important;
}

/* ===== CORRECCIÓN DE HEADINGS Y ENLACES PAGOS ===== */
.tl-page-content h2.widget-title,
.tl-page-content h2.section-title {
  color: var(--tl-dark-blue) !important;
}

/* Evitar que las tarjetas de pagos se achiquen demasiado */
/* Título de producto en azul oscuro (fix por si faltaba especificidad) */
h1.product_title.entry-title {
  color: var(--tl-dark-blue) !important;
}
/* ===== MOBILE NAVIGATION STYLES ===== */
.tl-mobile-nav-bars { display: none; }
.header-mobile-menu { display: none; }
.tl-mobile-menu-overlay { display: none; }

@media (max-width: 768px) {
  /* Hide desktop-only elements */
  .tl-nav-menus, .header-account-icon { display: none !important; }
  .header-mobile-menu { display: flex !important; }
  
  /* Mobile header: Grid layout */
  .tl-logo-text { display: none !important; }
  .tl-header-icons > * {
    margin: 0 !important;
    border-radius: 0 !important;
  }
  .tl-header {
    height: auto !important;
    padding-bottom: 0 !important;
  }
  .tl-header-inner {
    display: grid !important;
    grid-template-columns: 112px 1fr;
    grid-template-rows: 68px 78px 78px;
    background: #fff;
    padding: 0 !important;
    width: 100%;
  }

  /* 2. Top Left: Logo */
  .tl-logo {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    min-width: 0;
  }
  .tl-logo img {
    height: 52px !important;
    width: auto;
    max-width: 90px;
  }

  /* 3. Top Right: Icons */
  .tl-header-icons {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 68px;
    background: #004b87;
  }
  .tl-header-icons .tl-header-icon,
  .tl-header-icons .tl-currency-selector {
    width: 100% !important;
    height: 68px !important;
    border-left: 1px solid rgba(255,255,255,0.08);
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px !important;
  }
  .tl-currency-selector {
    background-color: #1294e6 !important;
  }
  .header-search-toggle {
    background-color: #1d67b8 !important;
  }
  .header-cart-icon {
    background-color: #0e56a9 !important;
  }
  .header-mobile-menu {
    background-color: #004b87 !important;
  }

  /* 4. Bottom full-width stacked bars */
  .tl-mobile-nav-bars {
    grid-column: 1 / 3;
    grid-row: 2 / 4;
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  .tl-mobile-bar-marca,
  .tl-mobile-bar-categoria {
    width: 100%;
    height: 78px;
    padding: 14px 18px;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .tl-header-inner::after {
    content: none;
  }
  
  /* Ensure the SVG icons inside the buttons are properly sized */
  .tl-header-icons svg {
    width: 24px !important;
    height: 24px !important;
  }


  /* Colors and link styles for mobile bars */
  .tl-mobile-bar-marca,
  .tl-mobile-bar-categoria {
    color: #fff !important;
    text-decoration: none !important;
    position: relative;
  }

  .tl-mobile-bar-marca {
    background-color: #428bca !important;
  }
  .tl-mobile-bar-categoria {
    background-color: #2ab6d4 !important; /* matches original cyan */
  }
  .bar-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    width: auto;
  }
  .bar-text .small-text {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 2px;
  }
  .bar-text .big-text {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.05;
    text-transform: uppercase;
  }
  .arrow-chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.95);
    flex-shrink: 0;
  }
  .arrow-chevron svg {
    width: 22px !important;
    height: 22px !important;
  }
  
  /* Mobile Sidebar Menu */
  .tl-mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: block; 
  }
  .tl-mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
  }
  .tl-mobile-menu {
    position: absolute;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100%;
    background: #fff;
    box-shadow: 2px 0 12px rgba(0,0,0,0.2);
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
  }
  .tl-mobile-menu-overlay.active .tl-mobile-menu {
    left: 0;
  }
  .tl-mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
  }
  .tl-mobile-menu-header img {
    height: 30px;
    width: auto;
  }
  .tl-mobile-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #333;
    cursor: pointer;
  }
  .tl-mobile-menu-content {
    padding: 20px;
  }
  .tl-mobile-menu-link {
    display: block;
    padding: 12px 0;
    font-weight: 700;
    color: var(--tl-dark-blue);
    text-decoration: none;
    border-bottom: 1px solid #eee;
  }
  .tl-mobile-menu-section {
    margin-top: 24px;
  }
  .tl-mobile-menu-section h3 {
    font-size: 14px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 12px;
  }
  .tl-mobile-menu-section a {
    display: block;
    padding: 10px 0;
    color: #444;
    text-decoration: none;
    font-size: 15px;
  }
  
  /* Fix Cart/Checkout Buttons on Mobile */
  .woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
  .woocommerce-checkout #place_order,
  .woocommerce .button.alt {
    width: 100% !important;
    padding: 16px !important;
    font-size: 18px !important;
    display: block;
    text-align: center;
  }
  
  /* Fix Search Overlay on Mobile */
  .tl-search-overlay {
    padding-top: 80px !important;
  }
  .tl-search-close {
    top: 20px !important;
    right: 20px !important;
    font-size: 32px !important;
    position: fixed !important;
  }
  .tl-search-container {
    width: 90% !important;
  }
}

/* ===== CARRITO MÓVIL — imagen al lado del nombre ===== */
@media (max-width: 768px) {
  .tl-cart-table .cart_item,
  .tl-cart-table .woocommerce-cart-form__cart-item {
    display: grid !important;
    grid-template-columns: 90px 1fr;
    grid-template-rows: auto;
    gap: 0 12px;
    padding: 16px 12px;
    align-items: start;
    border-bottom: 1px solid #edf2f7;
  }

  .tl-cart-table .cart_item td {
    border: none !important;
    padding: 2px 0 !important;
  }

  /* Remove "x" in top-left */
  .tl-cart-table .cart_item .product-remove {
    grid-column: 1 / -1;
    grid-row: 1;
    text-align: right;
    padding: 0 !important;
    height: auto;
  }

  /* Image — left column */
  .tl-cart-table .cart_item .product-thumbnail {
    grid-column: 1;
    grid-row: 2 / 5;
    width: 80px !important;
    min-width: 80px !important;
  }

  .tl-cart-table .cart_item .product-thumbnail::before {
    display: none !important;
  }

  .tl-cart-table .cart_item .product-thumbnail img {
    width: 80px !important;
    height: auto !important;
    max-width: 80px !important;
    border-radius: 10px;
  }

  /* Name — right column */
  .tl-cart-table .cart_item .product-name {
    grid-column: 2;
    grid-row: 2;
    font-size: 14px;
    font-weight: 600;
  }

  .tl-cart-table .cart_item .product-name::before {
    display: none !important;
  }

  /* Price — right column below name */
  .tl-cart-table .cart_item .product-price {
    grid-column: 2;
    grid-row: 3;
  }

  /* Quantity — right column */
  .tl-cart-table .cart_item .product-quantity {
    grid-column: 2;
    grid-row: 4;
  }

  /* Subtotal — right column */
  .tl-cart-table .cart_item .product-subtotal {
    grid-column: 2;
    grid-row: 5;
  }

  /* Hide table header on mobile */
  .tl-cart-table thead {
    display: none !important;
  }

  /* Fix responsive table display override */
  .tl-cart-table.shop_table_responsive tbody tr td {
    display: block !important;
  }
}

/* ===== CHECKOUT MÓVIL — campos full width ===== */
@media (max-width: 768px) {
  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  /* Nombre y Apellidos lado a lado */
  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper #billing_first_name_field,
  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper #billing_last_name_field {
    display: inline-block;
  }

  /* Todos los form-row full width */
  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    float: none !important;
    margin-right: 0 !important;
  }

  /* Nombre/Apellidos en grid 2 cols */
  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-first,
  .woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row-last {
    width: 100% !important;
  }

  /* Inputs y selects full width */
  .woocommerce-checkout .form-row input.input-text,
  .woocommerce-checkout .form-row select,
  .woocommerce-checkout .form-row textarea,
  .woocommerce-checkout .form-row .select2-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Mejorar apariencia de campos */
  .woocommerce-checkout .form-row input.input-text,
  .woocommerce-checkout .form-row select,
  .woocommerce-checkout .form-row .select2-selection {
    min-height: 48px !important;
    padding: 12px 14px !important;
    font-size: 15px !important;
    border: 1px solid #cfe0f5 !important;
    border-radius: 12px !important;
    background: #f8fafd !important;
    transition: border-color 0.2s;
  }

  .woocommerce-checkout .form-row input.input-text:focus,
  .woocommerce-checkout .form-row select:focus,
  .woocommerce-checkout .form-row .select2-container--focus .select2-selection {
    border-color: #0b50a8 !important;
    background: #fff !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(11,80,168,0.1) !important;
  }

  /* Labels más visibles */
  .woocommerce-checkout .form-row label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #0b3879 !important;
    margin-bottom: 4px !important;
  }

  /* Sección billing con padding */
  .woocommerce-checkout #customer_details > div {
    padding: 16px !important;
    border-radius: 14px !important;
  }

  /* Select2 fix */
  .woocommerce-checkout .select2-container .select2-selection--single {
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    border-radius: 12px !important;
    border: 1px solid #cfe0f5 !important;
    background: #f8fafd !important;
  }
}

/* ===== FIX: Eliminar scroll horizontal en checkout móvil (refuerzo) ===== */
html, body {
  overflow-x: hidden !important;
}
body.woocommerce-checkout,
body.woocommerce-checkout * {
  box-sizing: border-box !important;
}
body.woocommerce-checkout .select2-hidden-accessible {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
}

/* ===== BRAND DOTS — visibles sobre fondo claro ===== */
.tl-brands-bg .tl-carousel-dots button {
  background: rgba(11, 56, 121, 0.25);
}
.tl-brands-bg .tl-carousel-dots button.active {
  background: #0b3879;
}

/* ===== OCULTAR notificaciones WooCommerce en carrito ===== */
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-info {
  display: none !important;
}

/* ===== Botones Carrito: lado a lado, mismo tamaño ===== */
.tl-cart-page .wc-proceed-to-checkout {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  padding: 10px 0 !important;
}
.tl-cart-page .wc-proceed-to-checkout a.checkout-button {
  flex: 6 !important;
  background: var(--tl-orange) !important;
  border-color: var(--tl-orange) !important;
  color: #fff !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  padding: 14px 10px !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}
.tl-cart-page .wc-proceed-to-checkout a.tl-btn-continue {
  flex: 4 !important;
  background: #0b3879 !important;
  border-color: #0b3879 !important;
  color: #fff !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 14px 10px !important;
  text-align: center !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 0 !important;
  white-space: nowrap !important;
}
.tl-cart-page .wc-proceed-to-checkout a.checkout-button:hover {
  background: #e04d00 !important;
}
.tl-cart-page .wc-proceed-to-checkout a.tl-btn-continue:hover {
  background: #092d61 !important;
}

/* ===== Botones carrito móvil: 50/50 y permitir wrap texto ===== */
@media (max-width: 768px) {
  .tl-cart-page .wc-proceed-to-checkout a.checkout-button,
  .tl-cart-page .wc-proceed-to-checkout a.tl-btn-continue {
    flex: 1 1 0 !important;
    white-space: normal !important;
    font-size: 13px !important;
    padding: 12px 8px !important;
  }
}

/* ===== AUTH PAGE — Login/Register ===== */
.tl-auth-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background: #f4f7fb;
}
.tl-auth-container {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 20px;
  padding: 36px 28px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.tl-auth-logo {
  text-align: center;
  margin-bottom: 24px;
}
.tl-auth-logo img {
  height: 50px;
  width: auto;
  max-width: 200px !important;
  object-fit: contain;
}
/* Tabs */
.tl-auth-tabs {
  display: flex;
  background: #f0f4f9;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
  gap: 4px;
}
.tl-auth-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: #6b7c93;
  cursor: pointer;
  transition: all 0.2s;
}
.tl-auth-tab.active {
  background: #0b3879;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(11,56,121,0.3);
}
/* Fields */
.tl-auth-field {
  margin-bottom: 16px;
}
.tl-auth-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #0b3879;
  margin-bottom: 6px;
}
.tl-auth-field input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #d9e5f2;
  border-radius: 12px;
  font-size: 15px;
  background: #f8fafd;
  transition: all 0.2s;
  box-sizing: border-box;
}
.tl-auth-field input:focus {
  border-color: #0b50a8;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(11,80,168,0.1);
}
.tl-auth-field input::placeholder {
  color: #a0b4cc;
}
/* Options row */
.tl-auth-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 13px;
}
.tl-auth-remember {
  color: #6b7c93;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.tl-auth-forgot {
  color: #418eff;
  text-decoration: none;
  font-weight: 500;
}
.tl-auth-forgot:hover {
  text-decoration: underline;
}
/* Button */
.tl-auth-btn-primary {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  background: linear-gradient(135deg, #ff6b00, #ff8c33);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(255,107,0,0.3);
}
.tl-auth-btn-primary:hover {
  background: linear-gradient(135deg, #e04d00, #ff6b00);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255,107,0,0.4);
}
/* Privacy text */
.tl-auth-privacy {
  font-size: 12px;
  color: #8899aa;
  margin-bottom: 16px;
  line-height: 1.5;
}
.tl-auth-privacy a {
  color: #418eff;
}
/* Hide default WC styles on this page */
.tl-auth-page .woocommerce-form-login,
.tl-auth-page .woocommerce-form-register {
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ===== Botón Comprar — naranja en producto individual ===== */
.single_add_to_cart_button,
.single_add_to_cart_button.button.alt,
.btn-add-to-cart {
  background: var(--tl-orange) !important;
  color: #fff !important;
}
.single_add_to_cart_button:hover,
.single_add_to_cart_button.button.alt:hover,
.btn-add-to-cart:hover {
  background: #e04d00 !important;
}

/* ===== Carrito vacío — diseño centrado ===== */
.woocommerce-cart .cart-empty {
  text-align: center;
  padding: 30px 20px 30px;
  margin-top: 40px;
  font-size: 18px;
  color: #6b7c93;
}
.woocommerce-cart .cart-empty::before {
  content: '🛒';
  display: block;
  font-size: 64px;
  margin-bottom: 16px;
}
.woocommerce-cart .return-to-shop {
  text-align: center;
  padding: 0 20px 80px;
}
.woocommerce-cart .return-to-shop a.button {
  background: var(--tl-orange) !important;
  color: #fff !important;
  border-radius: 12px !important;
  padding: 14px 32px !important;
  font-weight: 700 !important;
  font-size: 16px !important;
  text-decoration: none;
  display: inline-block;
}
.woocommerce-cart .return-to-shop a.button:hover {
  background: #e04d00 !important;
}

/* ===== Carrito vacío: ocultar hero y centrar mensaje ===== */
.woocommerce-cart .woocommerce-notices-wrapper + .cart-empty {
  margin-top: 60px !important;
}
.woocommerce-cart .tl-cart-hero:has(~ .tl-cart-page .cart-empty),
.woocommerce-cart .tl-cart-page:has(.cart-empty) {
  padding-top: 0;
}
.woocommerce-cart .tl-cart-page:has(.cart-empty) .tl-cart-table-wrap {
  display: none;
}

/* ===== Carrito vacío: spacing correcto ===== */
.woocommerce-cart .wc-empty-cart-message {
  padding-top: 60px !important;
}

/* ===== Bandera de región en producto ===== */
.tl-region-flag {
  font-size: 20px;
  vertical-align: middle;
  margin-right: 2px;
}

/* ===== Account Profile Buttons ===== */
.tl-profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tl-profile-actions .tl-quick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  margin: 0;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  transition: background 0.2s;
}
.tl-profile-actions .btn-primary { background: #0b3879; }
.tl-profile-actions .btn-primary:hover { background: #092d61; }
.tl-profile-actions .btn-secondary { background: #418eff; }
.tl-profile-actions .btn-secondary:hover { background: #2d7ae6; }
.tl-profile-actions .btn-logout {
  grid-column: 1 / -1;
  background: #dc3545;
}
.tl-profile-actions .btn-logout:hover { background: #b02a37; }

@media (max-width: 768px) {
  .tl-profile-actions {
    grid-template-columns: 1fr 1fr;
  }
  .tl-profile-actions .btn-logout {
    grid-column: 1 / -1;
  }
}
