/*
Theme Name: AGL Custom Theme
Theme URI: https://autorecambiosgl.com
Author: Autorecambios GL
Author URI: https://autorecambiosgl.com
Description: Tema hardcoded ultra-ligero para Autorecambios GL.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: agl-custom-theme
*/

/* Barlow autoalojada (elimina petición bloqueante a Google Fonts) */
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/barlow/barlow-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/barlow/barlow-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/barlow/barlow-500-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/barlow/barlow-500-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/barlow/barlow-600-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/barlow/barlow-600-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/barlow/barlow-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('assets/fonts/barlow/barlow-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('assets/fonts/barlow/barlow-800-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Barlow';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('assets/fonts/barlow/barlow-800-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

body {
  font-family: 'Barlow', ui-sans-serif, system-ui, sans-serif;
}

/* Evitar overflow horizontal sin forzar scroll vertical en html y body a la vez */
html {
  max-width: 100%;
}

body {
  overflow-x: clip;
  max-width: 100%;
}

/* Evitar scroll horizontal por Tailwind grid gaps o contenedores demasiado anchos */
.mx-auto {
  max-width: 100%;
}

/* Estilos minimos de apoyo. El layout principal usa utilidades Tailwind por CDN. */
:root {
  color-scheme: light;
}

body {
  margin: 0;
}

.bg-brand-orange {
  background-color: #E57E25;
}

.text-brand-orange {
  color: #E57E25;
}

.border-brand-orange {
  border-color: #E57E25;
}

.bg-brand-dark {
  background-color: #232f3e;
}

.text-brand-dark {
  color: #232f3e;
}

.border-brand-dark {
  border-color: #232f3e;
}

.bg-bg-light {
  background-color: #f7f9fa;
}

.agl-gradient-hero {
  background: radial-gradient(circle at top right, rgba(229, 126, 37, 0.35), transparent 42%);
}

.agl-gradient-hero-b2b {
  background: radial-gradient(circle at bottom left, rgba(229, 126, 37, 0.38), transparent 46%);
}

.agl-gradient-banner {
  background: linear-gradient(90deg, #232f3e 0%, #334155 55%, #E57E25 100%);
}


/* Fuente vectorial de logos de marcas de coche
   La declaración @font-face se inyecta desde `functions.php` apuntando a
   `assets/fonts/car-makes-icons/` dentro del tema para evitar rutas a /uploads.
*/

.brand-icon {
  font-family: 'car-makes-icons', sans-serif !important;
  font-size: 40px;
  line-height: 1;
  font-style: normal;
  font-weight: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* Estilos robustos de navegacion para menus gestionados desde WP Admin. */
.agl-desktop-menu .menu,
#agl-mobile-menu .menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.agl-desktop-menu .menu > li {
  margin: 0;
}

.agl-desktop-menu .menu > li > a {
  display: inline-flex;
  align-items: center;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.agl-desktop-menu .menu > li > a:hover,
.agl-desktop-menu .menu > li.current-menu-item > a,
.agl-desktop-menu .menu > li.current_page_item > a {
  color: #ffedd5;
}

#agl-mobile-menu .menu li {
  margin: 0;
}

#agl-mobile-menu .menu a {
  display: block;
  color: #232f3e;
  font-weight: 700;
  text-decoration: none;
}

.agl-logo-wrap img,
.agl-logo-wrap .custom-logo {
  max-height: 40px;
  width: auto;
}

/* -----------------------------
   Fix: eliminar franja blanca bajo el footer (desktop)
   y estilos globales para subcategorías
   ----------------------------- */

@media (min-width: 1024px) {
  /* Asegurarnos que el área inferior del footer sea sólidamente oscura */
  footer .border-t {
    background-color: #232f3e !important; /* mismo que --brand-dark */
    border-color: #232f3e !important;
  }

  footer {
    margin-bottom: 0 !important;
    background-color: #232f3e !important;
  }
}

/* Subcategorías: tarjetas coherentes en listados de productos */
.woocommerce ul.products li.product.product-category,
.woocommerce ul.products li.product.category {
  background: #ffffff;
  border: 1px solid #e9eef2;
  border-radius: 10px;
  padding: 12px;
  transition: transform .15s ease, box-shadow .15s ease;
  overflow: hidden;
}
.woocommerce ul.products li.product.product-category:hover,
.woocommerce ul.products li.product.category:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(43,62,79,0.06);
}
.woocommerce ul.products li.product.product-category img,
.woocommerce ul.products li.product.category img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.woocommerce ul.products li.product.product-category .woocommerce-loop-category__title,
.woocommerce ul.products li.product.category .woocommerce-loop-category__title {
  color: #232f3e;
  font-weight: 800;
  margin-top: 0.6rem;
}

@media (min-width: 768px) {
  .woocommerce ul.products li.product.product-category,
  .woocommerce ul.products li.product.category {
    padding: 18px;
  }
}

