/*
Theme Name: Divi Todalacocina
Theme URI: https://todalacocina.com
Description: Child theme de Divi optimizado para el directorio de restaurantes de Todalacocina. Combina la flexibilidad del Divi Builder con templates personalizados para el plugin de directorio.
Author: Todalacocina
Author URI: https://todalacocina.com
Template: Divi
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: divi-todalacocina
Tags: restaurant, directory, divi, child-theme, listings
*/

/* ═══════════════════════════════════════════════════════════════
   TODALACOCINA DIVI CHILD THEME
   Versión: 1.0.0
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS VARIABLES ────────────────────────────────────────────── */
:root {
  /* Colores Principales */
  --dtc-red: #c0392b;
  --dtc-red-dark: #a33228;
  --dtc-gold: #d4a017;
  --dtc-dark: #1c1c1c;
  --dtc-gray: #6c757d;
  --dtc-light-gray: #f5f5f5;

  /* Tipografía */
  --font-heading: "Cormorant Garamond", Georgia, serif;
  --font-body:
    "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;

  /* Espaciado */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 40px;
  --spacing-xl: 60px;

  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);

  /* Bordes */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 50px;
}

/* ── RESET & BASE STYLES ──────────────────────────────────────── */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--dtc-dark);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
}

/* ── DIVI OVERRIDES ───────────────────────────────────────────── */
/* Ajustar colores primarios de Divi */
#et-top-navigation nav > ul > li > a:hover,
.et_pb_module.et_pb_text a {
  color: var(--dtc-red) !important;
}

.et_pb_button,
.et_pb_promo_button {
  background-color: var(--dtc-red) !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 600 !important;
  transition: all 0.3s ease !important;
}

.et_pb_button:hover,
.et_pb_promo_button:hover {
  background-color: var(--dtc-red-dark) !important;
  transform: translateY(-2px);
}

/* Ajustar header de Divi */
#main-header {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* ── ESTILOS PARA RESTAURANTES (CUSTOM POST TYPE) ────────────── */

/* Archivo de Restaurantes */
.directory-archive {
  padding-top: 100px;
  background: #fafafa;
}

.directory-header {
  background: linear-gradient(135deg, var(--dtc-red) 0%, #e74c3c 100%);
  color: white;
  padding: var(--spacing-xl) 0;
  text-align: center;
}

.directory-header h1 {
  color: white;
  font-size: 48px;
  margin-bottom: var(--spacing-sm);
}

.directory-filters {
  background: white;
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin: -40px auto 40px;
  max-width: 1200px;
  position: relative;
}

.filter-form {
  display: flex;
  gap: 15px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-field {
  flex: 1;
  min-width: 200px;
}

.filter-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--dtc-dark);
  font-size: 14px;
}

.filter-field select,
.filter-field input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: border-color 0.2s;
}

.filter-field select:focus,
.filter-field input:focus {
  outline: none;
  border-color: var(--dtc-red);
}

.filter-submit {
  flex-shrink: 0;
}

.btn-filter {
  background: var(--dtc-red);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-filter:hover {
  background: var(--dtc-red-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Grid de Restaurantes */
.restaurants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

.restaurant-card {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.restaurant-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.restaurant-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.restaurant-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.restaurant-card:hover .restaurant-image img {
  transform: scale(1.1);
}

.restaurant-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--dtc-gold);
  color: white;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.restaurant-content {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.restaurant-title {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--dtc-dark);
}

.restaurant-title a {
  color: var(--dtc-dark);
  text-decoration: none;
  transition: color 0.2s;
}

.restaurant-title a:hover {
  color: var(--dtc-red);
}

.restaurant-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 12px;
  color: var(--dtc-gray);
  font-size: 14px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.restaurant-excerpt {
  color: var(--dtc-gray);
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.restaurant-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.restaurant-rating {
  display: flex;
  align-items: center;
  gap: 6px;
}

.stars {
  color: var(--dtc-gold);
  font-size: 16px;
}

.btn-view-restaurant {
  background: var(--dtc-red);
  color: white;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-view-restaurant:hover {
  background: var(--dtc-red-dark);
  transform: translateY(-2px);
}

/* Single Restaurante */
.single-restaurant {
  padding-top: 100px;
}

.restaurant-hero {
  position: relative;
  height: 500px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

.restaurant-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.3) 0%,
    rgba(0, 0, 0, 0.7) 100%
  );
}

.restaurant-hero-content {
  position: relative;
  z-index: 2;
  color: white;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  width: 100%;
}

.restaurant-hero h1 {
  font-size: 56px;
  color: white;
  margin-bottom: 12px;
}

.restaurant-main-info {
  display: flex;
  gap: 24px;
  color: white;
  font-size: 18px;
}

.restaurant-content-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 40px;
}

.restaurant-main-content {
  background: white;
  padding: 40px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.restaurant-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

.info-card {
  background: white;
  padding: 30px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.info-card h3 {
  margin-bottom: 20px;
  font-size: 22px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.info-item:last-child {
  border-bottom: none;
}

.info-icon {
  color: var(--dtc-red);
  font-size: 18px;
  margin-top: 2px;
}

.info-text strong {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
}

/* Mapa de Restaurante */
.restaurant-map {
  height: 400px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 30px 0;
}

/* Galería de Fotos */
.restaurant-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 15px;
  margin: 30px 0;
}

.gallery-item {
  position: relative;
  height: 200px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* ── RESPONSIVE ───────────────────────────────────────────────── */
@media (max-width: 992px) {
  .restaurant-content-wrap {
    grid-template-columns: 1fr;
  }

  .restaurant-sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .directory-header h1 {
    font-size: 32px;
  }

  .filter-form {
    flex-direction: column;
  }

  .filter-field {
    width: 100%;
  }

  .restaurants-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .restaurant-hero h1 {
    font-size: 36px;
  }

  .restaurant-main-content {
    padding: 24px;
  }
}
