/* Contenedor Principal */
.tdf-catalog-wrapper {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- BARRA DE FILTROS Y BÚSQUEDA --- */
.tdf-filter-bar {
    background: #f8f8f8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #eee;
}

.tdf-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.tdf-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 200px;
}

.tdf-form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #444;
}

.tdf-form-group input[type="text"],
.tdf-form-group select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}

/* Botones */
.tdf-btn-group {
    flex-direction: row;
    align-items: flex-end;
    flex: 0 0 auto; /* No crecer */
}

.tdf-btn-search {
    background-color: #722F37;
    color: white;
    border: none;
    padding: 11px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.3s;
}

.tdf-btn-search:hover {
    background-color: #5a232b;
}

.tdf-btn-reset {
    color: #666;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 10px;
    display: inline-block;
}

.tdf-btn-reset:hover {
    color: #d00;
}


/* --- GRID DE VINOS --- */
.tdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* Tarjeta */
.tdf-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tdf-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

/* Cabecera */
.tdf-card-header {
    position: relative;
    background-color: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
}

.tdf-badge-pais {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #722F37;
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    z-index: 2;
}

.tdf-img-container {
    height: 250px; /* Un poco más alto para lucir la botella */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.3s;
}

.tdf-img-container:hover {
    transform: scale(1.02);
}

.tdf-img-container img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

.tdf-zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.tdf-img-container:hover .tdf-zoom-icon {
    opacity: 1;
}

/* Cuerpo */
.tdf-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.tdf-title {
    font-size: 1.4rem;
    margin: 0 0 15px 0;
    color: #1a1a1a;
    line-height: 1.2;
    text-align: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* --- CONTENIDO LIBRE (Gutenberg) --- */
.tdf-free-content {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.6;
}

.tdf-free-content p {
    margin-bottom: 10px;
}

.tdf-free-content h4, 
.tdf-free-content h5 {
    color: #722F37;
    margin-top: 15px;
    margin-bottom: 5px;
}

.tdf-free-content ul {
    padding-left: 20px;
    margin-bottom: 10px;
}

/* Lightbox */
.tdf-lightbox {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    padding-top: 80px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.9); 
}

.tdf-lightbox-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 85vh;
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

.tdf-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}